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

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


org.drools.resource
Class SvnResourceHandler

java.lang.Object
  extended by org.drools.resource.BaseResourceHandler
      extended by org.drools.resource.SvnResourceHandler
All Implemented Interfaces:
ResourceHandler

public class SvnResourceHandler
extends BaseResourceHandler
implements ResourceHandler

Resource Handler implementation for subversion. Assumes that there is an HTTP accessible subversion repository with the following structure: Base URL - Example: http://localhost/svn/resource-handler Subfolders off the base URL: /drls /dsls /functions /rules /spreadsheets Security can be enabled and if it's enabled, you will need to have appropriate credentials to access any URL resource.

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

Field Summary
 
Fields inherited from class org.drools.resource.BaseResourceHandler
repositoryUrl
 
Constructor Summary
SvnResourceHandler()
           
 
Method Summary
 boolean authenticate(String url)
          Authenticate the user based on his/her credentials, typically a username/password combo.
 String getPassword()
           
 String getRepositoryUrl()
           
 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.
 String getUsername()
           
 void setCredentials(String username, String password)
          Set the credentials for the resource handler calls.
 void setPassword(String password)
           
 void setRepositoryUrl(String url)
           
 void setUsername(String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SvnResourceHandler

public SvnResourceHandler()
Method Detail

authenticate

public boolean authenticate(String url)
Description copied from interface: ResourceHandler
Authenticate the user based on his/her credentials, typically a username/password combo.

Specified by:
authenticate in interface ResourceHandler
Returns:

setCredentials

public void setCredentials(String username,
                           String password)
Description copied from interface: ResourceHandler
Set the credentials for the resource handler calls. Typically called before the user attempts to get any resources.

Specified by:
setCredentials in interface ResourceHandler

getResourceStream

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

Specified by:
getResourceStream in interface ResourceHandler
Returns:
Throws:
ResourceUrlNotFoundException
ResourceTypeNotSupportedException
ResourceAccessDeniedException

getResourceURL

public String getResourceURL(RepositoryBean aRepositoryBean)
                      throws ResourceTypeNotSupportedException
Description copied from interface: ResourceHandler
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.

Specified by:
getResourceURL in interface ResourceHandler
Returns:
Throws:
ResourceTypeNotSupportedException

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

setRepositoryUrl

public void setRepositoryUrl(String url)
Specified by:
setRepositoryUrl in interface ResourceHandler

getRepositoryUrl

public String getRepositoryUrl()


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