|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.connector.federation.FederatedRepositorySource
@ThreadSafe public class FederatedRepositorySource
| Nested Class Summary | |
|---|---|
protected class |
FederatedRepositorySource.Capabilities
|
| Field Summary | |
|---|---|
static String |
CACHE_POLICY_TIME_TO_LIVE_CONFIG_PROPERTY_NAME
|
protected static String |
CONFIGURATION_SOURCE_NAME
|
protected static String |
CONFIGURATION_SOURCE_PATH
|
static String |
DEFAULT_CONFIGURATION_SOURCE_PATH
|
static int |
DEFAULT_RETRY_LIMIT
The default limit is 0 for retrying connection calls to the underlying source. |
static String |
DNA_CACHE_SEGMENT
|
static String |
DNA_PROJECTIONS_SEGMENT
|
protected static String |
PASSWORD
|
static String |
PATH_TO_CONFIGURATION_INFORMATION
|
static String |
PROJECTION_RULES_CONFIG_PROPERTY_NAME
|
protected static String |
REPOSITORY_NAME
|
protected static String |
RETRY_LIMIT
|
protected static String |
SECURITY_DOMAIN
|
protected static String |
SOURCE_NAME
|
protected static String |
USERNAME
|
| Constructor Summary | |
|---|---|
FederatedRepositorySource()
Create a new instance of the source, which must still be properly initialized with a repository name. |
|
FederatedRepositorySource(String repositoryName)
Create a new instance of the source with the required repository name and federation service. |
|
| Method Summary | |
|---|---|
protected void |
changeRepositoryConfig()
This method is called to signal that some aspect of the configuration has changed. |
protected CallbackHandler |
createCallbackHandler()
|
protected Projection |
createProjection(org.jboss.dna.graph.ExecutionContext context,
ProjectionParser projectionParser,
org.jboss.dna.graph.properties.Path path,
Map<org.jboss.dna.graph.properties.Name,org.jboss.dna.graph.properties.Property> properties,
org.jboss.dna.common.collection.Problems problems)
Instantiate the Projection described by the supplied properties. |
boolean |
equals(Object obj)
|
org.jboss.dna.graph.connectors.RepositorySourceCapabilities |
getCapabilities()
|
String |
getConfigurationSourceName()
Get the name in JNDI of a RepositorySource instance that should be used by the federated
repository as the configuration repository. |
String |
getConfigurationSourcePath()
Get the path in the source that will be subgraph below the /dna:system branch of the repository. |
org.jboss.dna.graph.connectors.RepositoryConnection |
getConnection()
|
protected org.jboss.dna.graph.ExecutionContext |
getExecutionContext()
|
String |
getName()
|
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
|
String |
getPassword()
Get the password that should be used when authenticating and creating connections. |
Reference |
getReference()
|
protected FederatedRepository |
getRepository()
Get the FederatedRepository instance that this source is using. |
protected FederatedRepositoryConfig |
getRepositoryConfiguration(org.jboss.dna.graph.ExecutionContext context,
org.jboss.dna.graph.connectors.RepositoryConnectionFactory connectionFactory)
Create a FederatedRepositoryConfig instance from the current properties of this instance. |
org.jboss.dna.graph.connectors.RepositoryContext |
getRepositoryContext()
|
String |
getRepositoryName()
Get the name of the federated repository. |
int |
getRetryLimit()
|
String |
getSecurityDomain()
Get the name of the security domain that should be used by JAAS to identify the application or security context. |
String |
getUsername()
Get the username that should be used when authenticating and creating connections. |
int |
hashCode()
|
void |
initialize(org.jboss.dna.graph.connectors.RepositoryContext context)
|
void |
setConfigurationSourceName(String sourceName)
Get the name of a RepositorySource instance that should be used by the federated
repository as the configuration repository. |
void |
setConfigurationSourcePath(String pathInSourceToConfigurationRoot)
Set the path in the source that will be subgraph below the /dna:system branch of the repository. |
void |
setName(String sourceName)
Set the name of this source. |
void |
setPassword(String password)
Get the password that should be used when authenticating and creating connections. |
void |
setRepositoryName(String repositoryName)
Get the name of the federated repository. |
void |
setRetryLimit(int limit)
|
void |
setSecurityDomain(String securityDomain)
Set the name of the security domain that should be used by JAAS to identify the application or security context. |
void |
setUsername(String username)
Set the username that should be used when authenticating and creating connections. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_RETRY_LIMIT
connection calls to the underlying source.
public static final String DEFAULT_CONFIGURATION_SOURCE_PATH
protected static final String REPOSITORY_NAME
protected static final String SOURCE_NAME
protected static final String USERNAME
protected static final String PASSWORD
protected static final String CONFIGURATION_SOURCE_NAME
protected static final String CONFIGURATION_SOURCE_PATH
protected static final String SECURITY_DOMAIN
protected static final String RETRY_LIMIT
public static final String PATH_TO_CONFIGURATION_INFORMATION
public static final String DNA_CACHE_SEGMENT
public static final String DNA_PROJECTIONS_SEGMENT
public static final String PROJECTION_RULES_CONFIG_PROPERTY_NAME
public static final String CACHE_POLICY_TIME_TO_LIVE_CONFIG_PROPERTY_NAME
| Constructor Detail |
|---|
public FederatedRepositorySource()
repository name.
public FederatedRepositorySource(String repositoryName)
repositoryName - the repository name
IllegalArgumentException - if the federation service is null or the repository name is null or blank| Method Detail |
|---|
public void initialize(org.jboss.dna.graph.connectors.RepositoryContext context)
throws org.jboss.dna.graph.connectors.RepositorySourceException
initialize in interface org.jboss.dna.graph.connectors.RepositorySourceorg.jboss.dna.graph.connectors.RepositorySourceExceptionRepositorySource.initialize(org.jboss.dna.graph.connectors.RepositoryContext)public org.jboss.dna.graph.connectors.RepositoryContext getRepositoryContext()
public String getName()
getName in interface org.jboss.dna.graph.connectors.RepositorySourcepublic void setName(String sourceName)
This is a required property.
sourceName - the name of this repository sourcesetConfigurationSourceName(String),
setConfigurationSourcePath(String),
setPassword(String),
setUsername(String),
setRepositoryName(String),
setPassword(String),
setUsername(String),
setName(String)public int getRetryLimit()
getRetryLimit in interface org.jboss.dna.graph.connectors.RepositorySourceRepositorySource.getRetryLimit()public void setRetryLimit(int limit)
setRetryLimit in interface org.jboss.dna.graph.connectors.RepositorySourceRepositorySource.setRetryLimit(int)public String getConfigurationSourceName()
RepositorySource instance that should be used by the federated
repository as the configuration repository.
This is a required property.
RepositorySource instance that should be used for the configuration, or null if the
federated repository instance is to be found in JNDIsetConfigurationSourceName(String)public void setConfigurationSourceName(String sourceName)
RepositorySource instance that should be used by the federated
repository as the configuration repository. The instance will be retrieved from the RepositoryConnectionFactory
instance from the repository context supplied during
initialization.
This is a required property.
sourceName - the name of the RepositorySource instance that should be used for the configuration, or null if
the federated repository instance is to be found in JNDIgetConfigurationSourceName(),
setConfigurationSourcePath(String),
setPassword(String),
setUsername(String),
setRepositoryName(String),
setName(String)public String getConfigurationSourcePath()
/dna:system branch of the repository.
This is a required property.
setConfigurationSourcePath(String)public void setConfigurationSourcePath(String pathInSourceToConfigurationRoot)
/dna:system branch of the repository.
This is a required property.
pathInSourceToConfigurationRoot - the path within the configuration source to the node that should be the root of the
configuration information, or null if the path hasn't yet been set or if the federated repository instance is to be
found in JNDIsetConfigurationSourcePath(String),
setConfigurationSourceName(String),
setPassword(String),
setUsername(String),
setRepositoryName(String),
setName(String)public String getSecurityDomain()
public void setSecurityDomain(String securityDomain)
securityDomain - Sets securityDomain to the specified value.public String getRepositoryName()
This is a required property.
setRepositoryName(String)public void setRepositoryName(String repositoryName)
This is a required property.
repositoryName - the new name of the repository
IllegalArgumentException - if the repository name is null, empty or blankgetRepositoryName(),
setConfigurationSourceName(String),
setConfigurationSourcePath(String),
setPassword(String),
setUsername(String),
setName(String)public String getUsername()
creating connections.
This is an optional property, required only when authentication is to be used.
setUsername(String)public void setUsername(String username)
creating connections.
This is an optional property, required only when authentication is to be used.
username - the username, or null if no username has been set or are not to be usedgetUsername(),
setPassword(String),
setConfigurationSourceName(String),
setConfigurationSourcePath(String),
setPassword(String),
setRepositoryName(String),
setName(String)public String getPassword()
creating connections.
This is an optional property, required only when authentication is to be used.
setPassword(String)public void setPassword(String password)
creating connections.
This is an optional property, required only when authentication is to be used.
password - the password, or null if no password have been set or are not to be usedgetPassword(),
setConfigurationSourceName(String),
setConfigurationSourcePath(String),
setUsername(String),
setRepositoryName(String),
setName(String)protected void changeRepositoryConfig()
repository
instance has been created, it's configuration is
rebuilt and updated. Nothing is done,
however, if there is currently no repository.
public org.jboss.dna.graph.connectors.RepositoryConnection getConnection()
throws org.jboss.dna.graph.connectors.RepositorySourceException
getConnection in interface org.jboss.dna.graph.connectors.RepositorySourceorg.jboss.dna.graph.connectors.RepositorySourceExceptionRepositorySource.getConnection()
protected FederatedRepository getRepository()
throws org.jboss.dna.graph.connectors.RepositorySourceException
FederatedRepository instance that this source is using. This method uses the following logic:
FederatedRepository already was obtained from a prior call, the same instance is returned.FederatedRepository is created using a FederatedRepositoryConfig is created from this instance's
properties and ExecutionContext and RepositoryConnectionFactory instances obtained from JNDI.
org.jboss.dna.graph.connectors.RepositorySourceExceptionprotected org.jboss.dna.graph.ExecutionContext getExecutionContext()
protected CallbackHandler createCallbackHandler()
protected FederatedRepositoryConfig getRepositoryConfiguration(org.jboss.dna.graph.ExecutionContext context,
org.jboss.dna.graph.connectors.RepositoryConnectionFactory connectionFactory)
FederatedRepositoryConfig instance from the current properties of this instance. This method does
not modify the state of this instance.
context - the execution context that should be used to read the configuration; may not be nullconnectionFactory - the factory for RepositoryConnections can be obtained; may not be null
protected Projection createProjection(org.jboss.dna.graph.ExecutionContext context,
ProjectionParser projectionParser,
org.jboss.dna.graph.properties.Path path,
Map<org.jboss.dna.graph.properties.Name,org.jboss.dna.graph.properties.Property> properties,
org.jboss.dna.common.collection.Problems problems)
Projection described by the supplied properties.
context - the execution context that should be used to read the configuration; may not be nullprojectionParser - the projection rule parser that should be used; may not be nullpath - the path to the node where these properties were found; never nullproperties - the properties; never nullproblems - the problems container in which any problems should be reported; never null
public Reference getReference()
getReference in interface Referenceable
public Object getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
throws Exception
getObjectInstance in interface ObjectFactoryExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic org.jboss.dna.graph.connectors.RepositorySourceCapabilities getCapabilities()
getCapabilities in interface org.jboss.dna.graph.connectors.RepositorySourceRepositorySource.getCapabilities()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||