站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

ResourceHandler (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.resource
Interface ResourceHandler

All Known Implementing Classes:
SvnResourceHandler

public interface ResourceHandler

Resource handler for interace that all implementations must provide. Subversion is the first implementation of this interface. The interface may need to be changed/extended to accomodate advanced line items, like resource locking/deployment.

Author:
James Williams (james.williams@redhat.com)

Method Summary
 boolean authenticate(String url)
          Authenticate the user based on his/her credentials, typically a username/password combo.
 ByteArrayOutputStream getResourceStream(RepositoryBean aRepositoryBean)
          Get the URL contents.
 String getResourceURL(RepositoryBean aRepositoryBean)
          Get the latest version of the resource from the repository if no version is specified.
 void setCredentials(String username, String password)
          Set the credentials for the resource handler calls.
 void setRepositoryUrl(String url)
           
 

Method Detail

getResourceStream

ByteArrayOutputStream getResourceStream(RepositoryBean aRepositoryBean)
                                        throws ResourceUrlNotFoundException,
                                               ResourceTypeNotSupportedException,
                                               ResourceAccessDeniedException
Get the URL contents. This method should also be smart enough to pull the specific version if specified in the RepositoryBean version attribute.

Parameters:
aRepositoryBean -
Returns:
Throws:
ResourceUrlNotFoundException
ResourceTypeNotSupportedException
ResourceAccessDeniedException

getResourceURL

String getResourceURL(RepositoryBean aRepositoryBean)
                      throws ResourceTypeNotSupportedException
Get the latest version of the resource from the repository if no version is specified. This method should also be smart enough to pull the specific version if specified in the RepositoryBean version attribute.

Parameters:
aRepositoryBean -
Returns:
Throws:
ResourceTypeNotSupportedException

authenticate

boolean authenticate(String url)
Authenticate the user based on his/her credentials, typically a username/password combo.

Parameters:
url -
Returns:

setCredentials

void setCredentials(String username,
                    String password)
Set the credentials for the resource handler calls. Typically called before the user attempts to get any resources.

Parameters:
username -
password -

setRepositoryUrl

void setRepositoryUrl(String url)


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.