org.jboss.dna.repository
Class RepositoryService

java.lang.Object
  extended by org.jboss.dna.repository.RepositoryService
All Implemented Interfaces:
AdministeredService

@ThreadSafe
public class RepositoryService
extends Object
implements AdministeredService

Author:
Randall Hauch

Nested Class Summary
protected  class RepositoryService.Administrator
          The administrative component for this service.
 
Constructor Summary
RepositoryService(RepositoryLibrary sources, String configurationSourceName, org.jboss.dna.graph.ExecutionContext context)
          Create a service instance, reading the configuration describing new RepositorySource instances from the source with the supplied name.
RepositoryService(RepositoryLibrary sources, String configurationSourceName, org.jboss.dna.graph.properties.Path pathToConfigurationRoot, org.jboss.dna.graph.ExecutionContext context)
          Create a service instance, reading the configuration describing new RepositorySource instances from the source with the supplied name and path within the repository.
 
Method Summary
protected  org.jboss.dna.graph.connectors.RepositorySource createRepositorySource(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 RepositorySource described by the supplied properties.
 boolean equals(Object obj)
          
 ServiceAdministrator getAdministrator()
          
 String getConfigurationSourceName()
           
 org.jboss.dna.graph.ExecutionContext getExecutionEnvironment()
           
 String getJndiName()
           
 RepositoryLibrary getRepositorySourceManager()
           
protected  void startService()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryService

public RepositoryService(RepositoryLibrary sources,
                         String configurationSourceName,
                         org.jboss.dna.graph.ExecutionContext context)
Create a service instance, reading the configuration describing new RepositorySource instances from the source with the supplied name.

Parameters:
sources - the source manager
configurationSourceName - the name of the RepositorySource that is the configuration repository
context - the execution context in which this service should run
Throws:
IllegalArgumentException - if the bootstrap source is null or the execution context is null

RepositoryService

public RepositoryService(RepositoryLibrary sources,
                         String configurationSourceName,
                         org.jboss.dna.graph.properties.Path pathToConfigurationRoot,
                         org.jboss.dna.graph.ExecutionContext context)
Create a service instance, reading the configuration describing new RepositorySource instances from the source with the supplied name and path within the repository.

Parameters:
sources - the source manager
configurationSourceName - the name of the RepositorySource that is the configuration repository
pathToConfigurationRoot - the path of the node in the configuration source repository that should be treated by this service as the root of the service's configuration; if null, then "/dna:system" is used
context - the execution context in which this service should run
Throws:
IllegalArgumentException - if the bootstrap source is null or the execution context is null
Method Detail

getAdministrator

public ServiceAdministrator getAdministrator()

Specified by:
getAdministrator in interface AdministeredService

getConfigurationSourceName

public String getConfigurationSourceName()
Returns:
configurationSourceName

getRepositorySourceManager

public RepositoryLibrary getRepositorySourceManager()
Returns:
sources

getExecutionEnvironment

public org.jboss.dna.graph.ExecutionContext getExecutionEnvironment()
Returns:
env

getJndiName

public String getJndiName()

startService

protected void startService()

createRepositorySource

protected org.jboss.dna.graph.connectors.RepositorySource createRepositorySource(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 RepositorySource described by the supplied properties.

Parameters:
path - the path to the node where these properties were found; never null
properties - the properties; never null
problems - the problems container in which any problems should be reported; never null
Returns:
the repository source instance, or null if it could not be created

equals

public boolean equals(Object obj)

Overrides:
equals in class Object


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.