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` | `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()`
    `org.infinispan.manager.CacheContainer` | `getCacheContainer(String name)` Get the cache container with the given name.
    `org.jboss.msc.value.InjectedValue<org.infinispan.manager.CacheContainer>` | `getCacheManagerInjector()`
    `org.jgroups.Channel` | `getChannel(String name)` Get the JGroups channel with the given logical name.
    `org.jboss.msc.value.InjectedValue<ChannelFactory>` | `getChannelFactoryInjector()`
    `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<IndexStorage>` | `getIndexStorageConfigInjector()`
    `org.jboss.msc.value.InjectedValue<org.jboss.modules.ModuleLoader>` | `getModuleLoaderInjector()`
    `org.jboss.msc.value.InjectedValue<RepositoryStatistics>` | `getMonitorInjector()`
    `JcrRepository` | `getValue()`
    `org.jboss.msc.value.InjectedValue<org.infinispan.manager.CacheContainer>` | `getWorkspacesCacheContainerInjector()`
    `String` | `repositoryName()`
    `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 org.infinispan.manager.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

    - #### getChannel

          public org.jgroups.Channel getChannel(String name)
                                         throws Exception

      Description copied from interface: `Environment`
      Get the JGroups channel with the given logical name.
      Specified by:
        `getChannel` in interface `Environment`
      Parameters:
        `name` - the name of the channel; may not be null
      Returns:
        the channel, or null if there is no such channel and the environment does not support clustering
      Throws:
        `Exception` - if there is a problem obtaining the named channel

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

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

    - #### getIndexStorageConfigInjector

          public org.jboss.msc.value.InjectedValue<IndexStorage> getIndexStorageConfigInjector()

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

    - #### 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<org.infinispan.manager.CacheContainer> getCacheManagerInjector()

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

    - #### getChannelFactoryInjector

          public org.jboss.msc.value.InjectedValue<ChannelFactory> getChannelFactoryInjector()

      Returns:
        the injector used to set the JGroups' ChannelFactory

    - #### 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<org.infinispan.manager.CacheContainer> getWorkspacesCacheContainerInjector()

      Returns:
        the injector used to set the workspaces cache container

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