org.jboss.dna.jcr
Interface JcrConfiguration.RepositoryDefinition<ReturnType>

Type Parameters:
ReturnType -
All Superinterfaces:
DnaConfiguration.Removable<ReturnType>, DnaConfiguration.Returnable<ReturnType>, DnaConfiguration.SetDescription<JcrConfiguration.RepositoryDefinition<ReturnType>>
Enclosing class:
JcrConfiguration

public static interface JcrConfiguration.RepositoryDefinition<ReturnType>
extends DnaConfiguration.Returnable<ReturnType>, DnaConfiguration.Removable<ReturnType>, DnaConfiguration.SetDescription<JcrConfiguration.RepositoryDefinition<ReturnType>>

Interface used to define a JCR Repository that's accessible from the JcrEngine.


Method Summary
 JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(File cndFile)
          Specify that the CND file is to be loaded into the repository.
 JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(InputStream cndContent)
          Specify that the CND file is to be loaded into the repository.
 JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(String pathToCndFile)
          Specify that the CND file located at the supplied path should be loaded into the repository.
 JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(URL urlOfCndFile)
          Specify that the CND file is to be loaded into the repository.
 String getOption(JcrRepository.Option option)
          Get the value for the repository option.
 String getSource()
          Get the name of the repository source that is to be used by this JCR repository.
 JcrConfiguration.RepositoryDefinition<ReturnType> registerNamespace(String prefix, String uri)
          Specify the namespace binding that should be made available in this repository.
 JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option, boolean value)
          Specify the repository option that is to be set.
 JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option, double value)
          Specify the repository option that is to be set.
 JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option, float value)
          Specify the repository option that is to be set.
 JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option, int value)
          Specify the repository option that is to be set.
 JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option, long value)
          Specify the repository option that is to be set.
 JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option, String value)
          Specify the repository option that is to be set.
 JcrConfiguration.RepositoryDefinition<ReturnType> setSource(String sourceName)
          Specify the name of the repository source that is to be used by this JCR repository.
 
Methods inherited from interface org.jboss.dna.repository.DnaConfiguration.Returnable
and
 
Methods inherited from interface org.jboss.dna.repository.DnaConfiguration.Removable
remove
 
Methods inherited from interface org.jboss.dna.repository.DnaConfiguration.SetDescription
getDescription, setDescription
 

Method Detail

setSource

JcrConfiguration.RepositoryDefinition<ReturnType> setSource(String sourceName)
Specify the name of the repository source that is to be used by this JCR repository.

Parameters:
sourceName - the name of the repository source that should be exposed by this JCR repository
Returns:
the interface used to set the value for the property; never null
Throws:
IllegalArgumentException - if the source name parameter is null

getSource

String getSource()
Get the name of the repository source that is to be used by this JCR repository.

Returns:
the source name, or null if it has not yet been set

setOption

JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option,
                                                            String value)
Specify the repository option that is to be set.

Parameters:
option - the option to be set
value - the new value for the option
Returns:
the interface used to set the value for the property; never null
Throws:
IllegalArgumentException - if either parameter is null

setOption

JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option,
                                                            boolean value)
Specify the repository option that is to be set.

Parameters:
option - the option to be set
value - the new value for the option
Returns:
the interface used to set the value for the property; never null
Throws:
IllegalArgumentException - if either parameter is null

setOption

JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option,
                                                            int value)
Specify the repository option that is to be set.

Parameters:
option - the option to be set
value - the new value for the option
Returns:
the interface used to set the value for the property; never null
Throws:
IllegalArgumentException - if either parameter is null

setOption

JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option,
                                                            long value)
Specify the repository option that is to be set.

Parameters:
option - the option to be set
value - the new value for the option
Returns:
the interface used to set the value for the property; never null
Throws:
IllegalArgumentException - if either parameter is null

setOption

JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option,
                                                            float value)
Specify the repository option that is to be set.

Parameters:
option - the option to be set
value - the new value for the option
Returns:
the interface used to set the value for the property; never null
Throws:
IllegalArgumentException - if either parameter is null

setOption

JcrConfiguration.RepositoryDefinition<ReturnType> setOption(JcrRepository.Option option,
                                                            double value)
Specify the repository option that is to be set.

Parameters:
option - the option to be set
value - the new value for the option
Returns:
the interface used to set the value for the property; never null
Throws:
IllegalArgumentException - if either parameter is null

getOption

String getOption(JcrRepository.Option option)
Get the value for the repository option.

Parameters:
option - the option
Returns:
the current option value, which may be null if the option has not been set (and its default would be used)
Throws:
IllegalArgumentException - if the option parameter is null

addNodeTypes

JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(String pathToCndFile)
Specify that the CND file located at the supplied path should be loaded into the repository.

Parameters:
pathToCndFile - the path to the CND file
Returns:
this object for chained method invocation
Throws:
IllegalArgumentException - if the string is null or empty
DnaConfigurationException - if there is an error reading the CND file

addNodeTypes

JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(File cndFile)
Specify that the CND file is to be loaded into the repository.

Parameters:
cndFile - the CND file
Returns:
this object for chained method invocation
Throws:
IllegalArgumentException - if the file is null
DnaConfigurationException - if there is an error reading the file

addNodeTypes

JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(URL urlOfCndFile)
Specify that the CND file is to be loaded into the repository.

Parameters:
urlOfCndFile - the URL of the CND file
Returns:
this object for chained method invocation
Throws:
IllegalArgumentException - if the URL is null
DnaConfigurationException - if there is an error reading the content at the URL

addNodeTypes

JcrConfiguration.RepositoryDefinition<ReturnType> addNodeTypes(InputStream cndContent)
Specify that the CND file is to be loaded into the repository.

Parameters:
cndContent - the stream containing the CND content
Returns:
this object for chained method invocation
Throws:
IllegalArgumentException - if the URL is null
DnaConfigurationException - if there is an error reading the stream at the URL

registerNamespace

JcrConfiguration.RepositoryDefinition<ReturnType> registerNamespace(String prefix,
                                                                    String uri)
Specify the namespace binding that should be made available in this repository.

Parameters:
prefix - the namespace prefix; may not be null or empty, and must be a valid prefix
uri - the uri for the namespace; may not be null or empty
Returns:
the interface used to set the value for the property; never null


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