Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr
Interface JcrConfiguration.RepositoryDefinition<ReturnType>

Type Parameters:
  `ReturnType` -

All Superinterfaces:
  ModeShapeConfiguration.Removable<ReturnType>, ModeShapeConfiguration.Returnable<ReturnType>, ModeShapeConfiguration.SetDescription<JcrConfiguration.RepositoryDefinition<ReturnType>>

All Known Implementing Classes:
  JcrConfiguration.RepositoryBuilder

Enclosing class:
  JcrConfiguration

    public static interface JcrConfiguration.RepositoryDefinition<ReturnType>

extends ModeShapeConfiguration.Returnable<ReturnType>, ModeShapeConfiguration.Removable<ReturnType>, ModeShapeConfiguration.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.
`JcrConfiguration.AuthenticatorDefinition<? extends JcrConfiguration.RepositoryDefinition<ReturnType>>` | `authenticator(String name)` Obtain or create a definition for the `authentication provider` with the supplied name or identifier.
`String` | `getName()` Get the name of this repository definition.
`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>` | `setInitialContent(File file, String firstWorkspace, String... otherWorkspaces)` Specify the location of the file containing the initial content for the repository.
`JcrConfiguration.RepositoryDefinition<ReturnType>` | `setInitialContent(String path, String firstWorkspace, String... otherWorkspaces)` Specify the location of the file containing the initial content for the 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.modeshape.repository.ModeShapeConfiguration.Returnable
`and`

Methods inherited from interface org.modeshape.repository.ModeShapeConfiguration.Removable
`remove`

Methods inherited from interface org.modeshape.repository.ModeShapeConfiguration.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

### getName

    String getName()

  Get the name of this repository definition.

  Returns:
    the name; never null

### 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.

  This method may be called multiple times, once per CND file.

  Parameters:
    `pathToCndFile` - the path to the CND file
  Returns:
    this object for chained method invocation
  Throws:
    `IllegalArgumentException` - if the string is null or empty
    `ModeShapeConfigurationException` - 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
    `ModeShapeConfigurationException` - 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.

  This method may be called multiple times, once per CND file.

  Parameters:
    `urlOfCndFile` - the URL of the CND file
  Returns:
    this object for chained method invocation
  Throws:
    `IllegalArgumentException` - if the URL is null
    `ModeShapeConfigurationException` - 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.

  This method may be called multiple times, once per CND file.

  Parameters:
    `cndContent` - the stream containing the CND content
  Returns:
    this object for chained method invocation
  Throws:
    `IllegalArgumentException` - if the URL is null
    `ModeShapeConfigurationException` - 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

### setInitialContent

    JcrConfiguration.RepositoryDefinition<ReturnType> setInitialContent(String path,
                                                                        String firstWorkspace,
                                                                        String... otherWorkspaces)

  Specify the location of the file containing the initial content for the repository.

  Parameters:
    `path` - the path to the file containing the initial content; may not be null or empty
    `firstWorkspace` - the first workspace in which this content should be loaded
    `otherWorkspaces` - additional workspaces in which this content should be loaded
  Returns:
    the interface used to set the value for the property; never null

### setInitialContent

    JcrConfiguration.RepositoryDefinition<ReturnType> setInitialContent(File file,
                                                                        String firstWorkspace,
                                                                        String... otherWorkspaces)

  Specify the location of the file containing the initial content for the repository.

  Parameters:
    `file` - the file containing the initial content; may not be null, and must exist and be readable
    `firstWorkspace` - the first workspace in which this content should be loaded
    `otherWorkspaces` - additional workspaces in which this content should be loaded
  Returns:
    the interface used to set the value for the property; never null

### authenticator

    JcrConfiguration.AuthenticatorDefinition<? extends JcrConfiguration.RepositoryDefinition<ReturnType>> authenticator(String name)

  Obtain or create a definition for the `authentication provider` with the supplied name or identifier. A new definition will be created if there currently is no authenticator defined with the supplied name.

  Parameters:
    `name` - the name or identifier of the authenticator
  Returns:
    the details of the authenticator definition; never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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