edu.internet2.middleware.shibboleth.common.config.resource
Class SVNResourceBeanDefinitionParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
          extended by edu.internet2.middleware.shibboleth.common.config.resource.AbstractResourceBeanDefinitionParser
              extended by edu.internet2.middleware.shibboleth.common.config.resource.SVNResourceBeanDefinitionParser
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser

public class SVNResourceBeanDefinitionParser
extends AbstractResourceBeanDefinitionParser

Bean definition parser for SVNResources.


Field Summary
static String CTX_TIMEOUT_ATTRIB_NAME
          Configuration element attribute "connectionTimeout" which holds the timeout used when connecting to the SVN server.
static int DEFAULT_CTX_TIMEOUT
          Default value of "connectionTimeout", 3000 milliseconds.
static int DEFAULT_PROXY_PORT
          Default value of "proxyPort", 8080 .
static int DEFAULT_READ_TIMEOUT
          Default value of "readTimeout", 5000 milliseconds.
private  org.slf4j.Logger log
          Class logger.
static String PASSWORD_ATTRIB_NAME
          Configuration element attribute "password" which holds the SVN password.
static String PROXY_HOST_ATTRIB_NAME
          Configuration element attribute "proxyHost" which holds the hostname of the proxy server used when connecting to the SVN server.
static String PROXY_PASSWORD_ATTRIB_NAME
          Configuration element attribute "proxyPassword" which holds the password used with the proxy server used when connecting to the SVN server.
static String PROXY_PORT_ATTRIB_NAME
          Configuration element attribute "proxyPort" which holds the port of the proxy server used when connecting to the SVN server.
static String PROXY_USERNAME_ATTRIB_NAME
          Configuration element attribute "proxyUsername" which holds the username used with the proxy server used when connecting to the SVN server.
static String READ_TIMEOUT_ATTRIB_NAME
          Configuration element attribute "readTimeout" which holds the timeout used when reading from the SVN server.
static String REPOSITORY_URL_ATTRIB_NAME
          Configuration element attribute "repositoryURL" which holds the URL to the remote repository.
static String RESOURCE_FILE_ATTRIB_NAME
          Configuration element attribute "resourceFile" which holds the path to the resource file represented by the SVN resource.
static String REVISION_ATTRIB_NAME
          Configuration element attribute "revision" which holds the path to the working copy directory.
static QName SCHEMA_TYPE
          Schema type.
static String USERNAME_ATTRIB_NAME
          Configuration element attribute "username" which holds the SVN username.
static String WORKING_COPY_DIR_ATTRIB_NAME
          Configuration element attribute "workingCopyDirectory" which holds the path to the working copy directory.
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE
 
Constructor Summary
SVNResourceBeanDefinitionParser()
           
 
Method Summary
protected  org.tmatesoft.svn.core.wc.SVNClientManager buildClientManager(Element configElement)
          Builds the SVN client manager from the given configuration options.
protected  void doParse(Element configElement, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          
protected  Class getBeanClass(Element arg0)
          
protected  int getConnectionTimeout(Element configElement)
          Gets the value of the "connectionTimeout" attribute.
protected  String getPassword(Element configElement)
          Gets the value of the "password" attribute.
protected  String getProxyHost(Element configElement)
          Gets the value of the "proxyHost" attribute.
protected  String getProxyPassword(Element configElement)
          Gets the value of the "proxyPassword" attribute.
protected  int getProxyPort(Element configElement)
          Gets the value of the "proxyPort" attribute.
protected  String getProxyUsername(Element configElement)
          Gets the value of the "proxyUsername" attribute.
protected  int getReadTimeout(Element configElement)
          Gets the value of the "readTimeout" attribute.
protected  String getResourceFile(Element configElement)
          Gets the value of the "resourceFile" attribute.
protected  org.tmatesoft.svn.core.SVNURL getRespositoryUrl(Element configElement)
          Gets the value of the "repositoryURL" attribute.
protected  long getRevision(Element configElement)
          Gets the value of the "revision" attribute.
protected  String getUsername(Element configElement)
          Gets the value of the "username" attribute.
protected  File getWorkingCopyDirectory(Element configElement)
          Gets the value of the "repositoryURL" attribute.
protected  String resolveId(Element configElement, org.springframework.beans.factory.support.AbstractBeanDefinition beanDefinition, org.springframework.beans.factory.xml.ParserContext parserContext)
          
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.resource.AbstractResourceBeanDefinitionParser
addResourceFilter
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClassName, getParentName, parseInternal
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMA_TYPE

public static final QName SCHEMA_TYPE
Schema type.


REPOSITORY_URL_ATTRIB_NAME

public static final String REPOSITORY_URL_ATTRIB_NAME
Configuration element attribute "repositoryURL" which holds the URL to the remote repository.

See Also:
Constant Field Values

CTX_TIMEOUT_ATTRIB_NAME

public static final String CTX_TIMEOUT_ATTRIB_NAME
Configuration element attribute "connectionTimeout" which holds the timeout used when connecting to the SVN server.

See Also:
Constant Field Values

READ_TIMEOUT_ATTRIB_NAME

public static final String READ_TIMEOUT_ATTRIB_NAME
Configuration element attribute "readTimeout" which holds the timeout used when reading from the SVN server.

See Also:
Constant Field Values

WORKING_COPY_DIR_ATTRIB_NAME

public static final String WORKING_COPY_DIR_ATTRIB_NAME
Configuration element attribute "workingCopyDirectory" which holds the path to the working copy directory.

See Also:
Constant Field Values

REVISION_ATTRIB_NAME

public static final String REVISION_ATTRIB_NAME
Configuration element attribute "revision" which holds the path to the working copy directory.

See Also:
Constant Field Values

RESOURCE_FILE_ATTRIB_NAME

public static final String RESOURCE_FILE_ATTRIB_NAME
Configuration element attribute "resourceFile" which holds the path to the resource file represented by the SVN resource.

See Also:
Constant Field Values

USERNAME_ATTRIB_NAME

public static final String USERNAME_ATTRIB_NAME
Configuration element attribute "username" which holds the SVN username.

See Also:
Constant Field Values

PASSWORD_ATTRIB_NAME

public static final String PASSWORD_ATTRIB_NAME
Configuration element attribute "password" which holds the SVN password.

See Also:
Constant Field Values

PROXY_HOST_ATTRIB_NAME

public static final String PROXY_HOST_ATTRIB_NAME
Configuration element attribute "proxyHost" which holds the hostname of the proxy server used when connecting to the SVN server.

See Also:
Constant Field Values

PROXY_PORT_ATTRIB_NAME

public static final String PROXY_PORT_ATTRIB_NAME
Configuration element attribute "proxyPort" which holds the port of the proxy server used when connecting to the SVN server.

See Also:
Constant Field Values

PROXY_USERNAME_ATTRIB_NAME

public static final String PROXY_USERNAME_ATTRIB_NAME
Configuration element attribute "proxyUsername" which holds the username used with the proxy server used when connecting to the SVN server.

See Also:
Constant Field Values

PROXY_PASSWORD_ATTRIB_NAME

public static final String PROXY_PASSWORD_ATTRIB_NAME
Configuration element attribute "proxyPassword" which holds the password used with the proxy server used when connecting to the SVN server.

See Also:
Constant Field Values

DEFAULT_CTX_TIMEOUT

public static final int DEFAULT_CTX_TIMEOUT
Default value of "connectionTimeout", 3000 milliseconds.

See Also:
Constant Field Values

DEFAULT_READ_TIMEOUT

public static final int DEFAULT_READ_TIMEOUT
Default value of "readTimeout", 5000 milliseconds.

See Also:
Constant Field Values

DEFAULT_PROXY_PORT

public static final int DEFAULT_PROXY_PORT
Default value of "proxyPort", 8080 .

See Also:
Constant Field Values

log

private final org.slf4j.Logger log
Class logger.

Constructor Detail

SVNResourceBeanDefinitionParser

public SVNResourceBeanDefinitionParser()
Method Detail

getBeanClass

protected Class getBeanClass(Element arg0)

Overrides:
getBeanClass in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

resolveId

protected String resolveId(Element configElement,
                           org.springframework.beans.factory.support.AbstractBeanDefinition beanDefinition,
                           org.springframework.beans.factory.xml.ParserContext parserContext)

Overrides:
resolveId in class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

doParse

protected void doParse(Element configElement,
                       org.springframework.beans.factory.xml.ParserContext parserContext,
                       org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
                throws org.springframework.beans.factory.BeanCreationException

Overrides:
doParse in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
Throws:
org.springframework.beans.factory.BeanCreationException

buildClientManager

protected org.tmatesoft.svn.core.wc.SVNClientManager buildClientManager(Element configElement)
Builds the SVN client manager from the given configuration options.

Parameters:
configElement - element bearing the configuration options
Returns:
the SVN client manager

getRespositoryUrl

protected org.tmatesoft.svn.core.SVNURL getRespositoryUrl(Element configElement)
                                                   throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "repositoryURL" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is missing or contains an invalid SVN URL

getConnectionTimeout

protected int getConnectionTimeout(Element configElement)
                            throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "connectionTimeout" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute, or 3000 if the attribute is not defined
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string

getReadTimeout

protected int getReadTimeout(Element configElement)
                      throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "readTimeout" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute, or 5000 if the attribute is not defined
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string

getWorkingCopyDirectory

protected File getWorkingCopyDirectory(Element configElement)
                                throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "repositoryURL" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is missing or contains an invalid directory path

getRevision

protected long getRevision(Element configElement)
                    throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "revision" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is missing or contains an invalid number

getResourceFile

protected String getResourceFile(Element configElement)
                          throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "resourceFile" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is missing or contains an empty string

getUsername

protected String getUsername(Element configElement)
                      throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "username" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string

getPassword

protected String getPassword(Element configElement)
                      throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "password" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string

getProxyHost

protected String getProxyHost(Element configElement)
                       throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "proxyHost" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string

getProxyPort

protected int getProxyPort(Element configElement)
                    throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "proxyPort" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute, or 8080 if the attribute is not defined
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string

getProxyUsername

protected String getProxyUsername(Element configElement)
                           throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "proxyUsername" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string

getProxyPassword

protected String getProxyPassword(Element configElement)
                           throws org.springframework.beans.factory.BeanCreationException
Gets the value of the "proxyPassword" attribute.

Parameters:
configElement - resource configuration element
Returns:
value of the attribute
Throws:
org.springframework.beans.factory.BeanCreationException - thrown if the attribute is present but contains an empty string


Copyright © 1999-2012. All Rights Reserved.