org.modeshape.jboss.service

## Class RepositoryService

- java.lang.Object
- - org.modeshape.jboss.service.RepositoryService

- All Implemented Interfaces:
    org.jboss.msc.service.Service<JcrRepository>, org.jboss.msc.value.Value<JcrRepository>, Environment

      public class RepositoryService
      extends Object
      implements org.jboss.msc.service.Service<JcrRepository>, Environment

  A `RepositoryService` instance is the service responsible for initializing a `JcrRepository` in the ModeShape engine using the information from the configuration.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BINARY_STORAGE_CONTAINER_NAME`
    `static String` | `CONTENT_CONTAINER_NAME`
    `static String` | `WORKSPACES_CONTAINER_NAME`

    - ### Fields inherited from interface org.jboss.msc.service.Service

      `NULL, NULL_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RepositoryService(RepositoryConfiguration repositoryConfiguration)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `changeAuthenticatorField(MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue, String authenticatorName)` Immediately change and apply the specified authenticator field in the current repository configuration to the new value.
    `void` | `changeField(MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue)` Immediately change and apply the specified field in the current repository configuration to the new value.
    `void` | `changeIndexDefinitionField(MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue, String indexDefinitionName)` Immediately change and apply the specified index definition field in the current repository configuration to the new value.
    `void` | `changeIndexProviderField(MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue, String indexProviderName)` Immediately change and apply the specified index provider field in the current repository configuration to the new value.
    `void` | `changeSequencerField(MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue, String sequencerName)` Immediately change and apply the specified sequencer field in the current repository configuration to the new value.
    `void` | `changeSourceField(MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue, String sourceName)` Immediately change and apply the specified external source field in the current repository configuration to the new value.
    `void` | `changeTextExtractorField(MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue, String extractorName)` Immediately change and apply the specified extractor field in the current repository configuration to the new value.
    `org.jboss.msc.value.InjectedValue<BinaryStorage>` | `getBinaryStorageInjector()`
    `CacheContainer` | `getCacheContainer(String name)` Get the cache container with the given name.
    `org.jboss.msc.value.InjectedValue<CacheContainer>` | `getCacheManagerInjector()`
    `ClassLoader` | `getClassLoader(ClassLoader fallbackLoader, String... classpathEntries)` Get a classloader given the supplied set of logical classpath entries, which the implementation can interpret however it needs.
    `org.jboss.msc.value.InjectedValue<String>` | `getDataDirectoryPathInjector()`
    `org.jboss.msc.value.InjectedValue<ModeShapeEngine>` | `getEngineInjector()`
    `org.jboss.msc.value.InjectedValue<org.jboss.modules.ModuleLoader>` | `getModuleLoaderInjector()`
    `org.jboss.msc.value.InjectedValue<RepositoryStatistics>` | `getMonitorInjector()`
    `JcrRepository` | `getValue()`
    `org.jboss.msc.value.InjectedValue<CacheContainer>` | `getWorkspacesCacheContainerInjector()`
    `String` | `repositoryName()`
    `void` | `setJournalPath(String journalPath)` Sets the path (relative) of the journal.
    `void` | `setJournalRelativeTo(String journalRelativeTo)` Sets the base folder of the journal
    `void` | `shutdown()` Shutdown this environment, allowing it to reclaim any resources.
    `void` | `start(org.jboss.msc.service.StartContext arg0)`
    `void` | `stop(org.jboss.msc.service.StopContext context)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CONTENT_CONTAINER_NAME

          public static final String CONTENT_CONTAINER_NAME

      See Also:
        Constant Field Values

    - #### BINARY_STORAGE_CONTAINER_NAME

          public static final String BINARY_STORAGE_CONTAINER_NAME

      See Also:
        Constant Field Values

    - #### WORKSPACES_CONTAINER_NAME

          public static final String WORKSPACES_CONTAINER_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RepositoryService

          public RepositoryService(RepositoryConfiguration repositoryConfiguration)

  - ### Method Detail

    - #### getValue

          public JcrRepository getValue()
                                 throws IllegalStateException,
                                        IllegalArgumentException

      Specified by:
        `getValue` in interface `org.jboss.msc.value.Value<JcrRepository>`
      Throws:
        `IllegalStateException`
        `IllegalArgumentException`

    - #### getCacheContainer

          public CacheContainer getCacheContainer(String name)

      Description copied from interface: `Environment`
      Get the cache container with the given name. Note that the name might be a logical name or it might refer to the location of an Infinispan configuration; the exact semantics is dependent upon the implementation.
      Specified by:
        `getCacheContainer` in interface `Environment`
      Parameters:
        `name` - the name of the cache container; may be null
      Returns:
        the cache container; never null

    - #### getClassLoader

          public ClassLoader getClassLoader(ClassLoader fallbackLoader,
                                   String... classpathEntries)

      Description copied from interface: `Environment`
      Get a classloader given the supplied set of logical classpath entries, which the implementation can interpret however it needs.
      Specified by:
        `getClassLoader` in interface `Environment`
      Parameters:
        `fallbackLoader` - the classloader that should be used is the fallback class loader
        `classpathEntries` - the logical classpath entries
      Returns:
        the classloader

    - #### shutdown

          public void shutdown()

      Description copied from interface: `Environment`
      Shutdown this environment, allowing it to reclaim any resources.
      Specified by:
        `shutdown` in interface `Environment`

    - #### repositoryName

          public final String repositoryName()

    - #### start

          public void start(org.jboss.msc.service.StartContext arg0)
                     throws org.jboss.msc.service.StartException

      Specified by:
        `start` in interface `org.jboss.msc.service.Service<JcrRepository>`
      Throws:
        `org.jboss.msc.service.StartException`

    - #### stop

          public void stop(org.jboss.msc.service.StopContext context)

      Specified by:
        `stop` in interface `org.jboss.msc.service.Service<JcrRepository>`

    - #### changeField

          public void changeField(MappedAttributeDefinition defn,
                         org.jboss.dmr.ModelNode newValue)
                           throws RepositoryException,
                                  org.jboss.as.controller.OperationFailedException

      Immediately change and apply the specified field in the current repository configuration to the new value.
      Parameters:
        `defn` - the attribute definition for the value; may not be null
        `newValue` - the new string value
      Throws:
        `RepositoryException` - if there is a problem obtaining the repository configuration or applying the change
        `org.jboss.as.controller.OperationFailedException` - if there is a problem obtaining the raw value from the supplied model node

    - #### changeIndexProviderField

          public void changeIndexProviderField(MappedAttributeDefinition defn,
                                      org.jboss.dmr.ModelNode newValue,
                                      String indexProviderName)
                                        throws RepositoryException,
                                               org.jboss.as.controller.OperationFailedException

      Immediately change and apply the specified index provider field in the current repository configuration to the new value.
      Parameters:
        `defn` - the attribute definition for the value; may not be null
        `newValue` - the new string value
        `indexProviderName` - the name of the index provider
      Throws:
        `RepositoryException` - if there is a problem obtaining the repository configuration or applying the change
        `org.jboss.as.controller.OperationFailedException` - if there is a problem obtaining the raw value from the supplied model node

    - #### changeIndexDefinitionField

          public void changeIndexDefinitionField(MappedAttributeDefinition defn,
                                        org.jboss.dmr.ModelNode newValue,
                                        String indexDefinitionName)
                                          throws RepositoryException,
                                                 org.jboss.as.controller.OperationFailedException

      Immediately change and apply the specified index definition field in the current repository configuration to the new value.
      Parameters:
        `defn` - the attribute definition for the value; may not be null
        `newValue` - the new string value
        `indexDefinitionName` - the name of the index definition
      Throws:
        `RepositoryException` - if there is a problem obtaining the repository configuration or applying the change
        `org.jboss.as.controller.OperationFailedException` - if there is a problem obtaining the raw value from the supplied model node

    - #### changeSequencerField

          public void changeSequencerField(MappedAttributeDefinition defn,
                                  org.jboss.dmr.ModelNode newValue,
                                  String sequencerName)
                                    throws RepositoryException,
                                           org.jboss.as.controller.OperationFailedException

      Immediately change and apply the specified sequencer field in the current repository configuration to the new value.
      Parameters:
        `defn` - the attribute definition for the value; may not be null
        `newValue` - the new string value
        `sequencerName` - the name of the sequencer
      Throws:
        `RepositoryException` - if there is a problem obtaining the repository configuration or applying the change
        `org.jboss.as.controller.OperationFailedException` - if there is a problem obtaining the raw value from the supplied model node

    - #### changeSourceField

          public void changeSourceField(MappedAttributeDefinition defn,
                               org.jboss.dmr.ModelNode newValue,
                               String sourceName)
                                 throws RepositoryException,
                                        org.jboss.as.controller.OperationFailedException

      Immediately change and apply the specified external source field in the current repository configuration to the new value.
      Parameters:
        `defn` - the attribute definition for the value; may not be null
        `newValue` - the new string value
        `sourceName` - the name of the source
      Throws:
        `RepositoryException` - if there is a problem obtaining the repository configuration or applying the change
        `org.jboss.as.controller.OperationFailedException` - if there is a problem obtaining the raw value from the supplied model node

    - #### changeTextExtractorField

          public void changeTextExtractorField(MappedAttributeDefinition defn,
                                      org.jboss.dmr.ModelNode newValue,
                                      String extractorName)
                                        throws RepositoryException,
                                               org.jboss.as.controller.OperationFailedException

      Immediately change and apply the specified extractor field in the current repository configuration to the new value.
      Parameters:
        `defn` - the attribute definition for the value; may not be null
        `newValue` - the new string value
        `extractorName` - the name of the sequencer
      Throws:
        `RepositoryException` - if there is a problem obtaining the repository configuration or applying the change
        `org.jboss.as.controller.OperationFailedException` - if there is a problem obtaining the raw value from the supplied model node

    - #### changeAuthenticatorField

          public void changeAuthenticatorField(MappedAttributeDefinition defn,
                                      org.jboss.dmr.ModelNode newValue,
                                      String authenticatorName)
                                        throws RepositoryException,
                                               org.jboss.as.controller.OperationFailedException

      Immediately change and apply the specified authenticator field in the current repository configuration to the new value.
      Parameters:
        `defn` - the attribute definition for the value; may not be null
        `newValue` - the new string value
        `authenticatorName` - the name of the authenticator
      Throws:
        `RepositoryException` - if there is a problem obtaining the repository configuration or applying the change
        `org.jboss.as.controller.OperationFailedException` - if there is a problem obtaining the raw value from the supplied model node

    - #### getBinaryStorageInjector

          public org.jboss.msc.value.InjectedValue<BinaryStorage> getBinaryStorageInjector()

      Returns:
        the injector used to set the configuration details for the binaries storage

    - #### getMonitorInjector

          public org.jboss.msc.value.InjectedValue<RepositoryStatistics> getMonitorInjector()

      Returns:
        the injector used to get the repository statistics (never `null`)

    - #### getEngineInjector

          public org.jboss.msc.value.InjectedValue<ModeShapeEngine> getEngineInjector()

      Returns:
        the injector used to set the `ModeShapeEngine` reference

    - #### getCacheManagerInjector

          public org.jboss.msc.value.InjectedValue<CacheContainer> getCacheManagerInjector()

      Returns:
        the injector used to set the CacheContainer reference used for content storage

    - #### getDataDirectoryPathInjector

          public org.jboss.msc.value.InjectedValue<String> getDataDirectoryPathInjector()

      Returns:
        the injector used to set the data directory for this repository

    - #### getModuleLoaderInjector

          public org.jboss.msc.value.InjectedValue<org.jboss.modules.ModuleLoader> getModuleLoaderInjector()

      Returns:
        the injector used to set the jboss module loader

    - #### getWorkspacesCacheContainerInjector

          public org.jboss.msc.value.InjectedValue<CacheContainer> getWorkspacesCacheContainerInjector()

      Returns:
        the injector used to set the workspaces cache container

    - #### setJournalPath

          public void setJournalPath(String journalPath)

      Sets the path (relative) of the journal.
      Parameters:
        `journalPath` - a `String`, may not be null

    - #### setJournalRelativeTo

          public void setJournalRelativeTo(String journalRelativeTo)

      Sets the base folder of the journal
      Parameters:
        `journalRelativeTo` - a `String`, may not be null

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