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

## org.modeshape.jcr
Enum JcrRepository.Option

    java.lang.Object
      java.lang.Enum<JcrRepository.Option>
          org.modeshape.jcr.JcrRepository.Option

All Implemented Interfaces:
  Serializable, Comparable<JcrRepository.Option>

Enclosing class:
  JcrRepository

    public static enum JcrRepository.Option

extends Enum<JcrRepository.Option>

The available options for the `JcrRepository`.

Enum Constant Summary
`ANONYMOUS_USER_ROLES` A comma-delimited list of default roles provided for anonymous access.
`EXPOSE_WORKSPACE_NAMES_IN_DESCRIPTOR` A boolean flag that indicates whether a complete list of workspace names should be exposed in the custom repository descriptor `Repository.REPOSITORY_WORKSPACES`.
`INDEX_READ_DEPTH` The depth of the subgraphs that should be loaded from the connectors during indexing operations.
`JAAS_LOGIN_CONFIG_NAME` The `JAAS application configuration name` that specifies which login modules should be used to validate credentials.
`PERFORM_REFERENTIAL_INTEGRITY_CHECKS` A boolean flag that specifies whether referential integrity checks should be performed upon `Session.save()`.
`PROJECT_NODE_TYPES` Flag that defines whether or not the node types should be exposed as content under the " `/jcr:system/jcr:nodeTypes`" node.
`QUERY_EXECUTION_ENABLED` A boolean flag that specifies whether this repository is expected to execute searches and queries.
`QUERY_INDEX_DIRECTORY` The system may maintain a set of indexes that improve the performance of searching and querying the content.
`QUERY_INDEXES_REBUILT_SYNCHRONOUSLY` Indicates whether the query indexes should be rebuilt on startup synchronously ('true') or asynchronously ('false').
`QUERY_INDEXES_UPDATED_SYNCHRONOUSLY` A boolean flag that specifies whether updates to the indexes (if used) should be made synchronously, meaning that a call to `Session.save()` will not return until the search indexes have been completely updated.
`READ_DEPTH` The depth of the subgraphs that should be loaded from the connectors during normal read operations.
`REBUILD_QUERY_INDEX_ON_STARTUP` Indicates under what circumstances the query index should be automatically rebuilt on startup.
`REMOVE_DERIVED_CONTENT_WITH_ORIGINAL` A boolean option that dictates whether content derived from other content (e.g., by sequencers) should be automatically removed when the content from which it was derived is removed from the repository.
`REPOSITORY_JNDI_LOCATION` A String property that when specified tells the `JcrEngine` where to put the `Repository` in to JNDI.
`SYSTEM_SOURCE_NAME` The name of the source (and optionally the workspace in the source) where the "/jcr:system" branch should be stored.
`TABLES_INCLUDE_COLUMNS_FOR_INHERITED_PROPERTIES` The query system represents node types as tables that can be queried, but there are two ways to define the columns for each of those tables.
`USE_ANONYMOUS_ACCESS_ON_FAILED_LOGIN` Indicates whether a failed attempt to `JcrRepository.login()` should automatically attempt to use anonymous access instead.
`USE_SECURITY_CONTEXT_CREDENTIALS` Deprecated. Use custom AuthenticationProvider implementations instead
`VERSION_HISTORY_STRUCTURE` The structure of the version history.

Method Summary
`static JcrRepository.Option` | `findOption(String option)` Determine the option given the option name.
`static JcrRepository.Option` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static JcrRepository.Option[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### PROJECT_NODE_TYPES

    public static final JcrRepository.Option PROJECT_NODE_TYPES

  Flag that defines whether or not the node types should be exposed as content under the " `/jcr:system/jcr:nodeTypes`" node. Value is either "`true`" or "`false`" (default).

  See Also:
    `JcrRepository.DefaultOption.PROJECT_NODE_TYPES`

### JAAS_LOGIN_CONFIG_NAME

    public static final JcrRepository.Option JAAS_LOGIN_CONFIG_NAME

  The `JAAS application configuration name` that specifies which login modules should be used to validate credentials.

### SYSTEM_SOURCE_NAME

    public static final JcrRepository.Option SYSTEM_SOURCE_NAME

  The name of the source (and optionally the workspace in the source) where the "/jcr:system" branch should be stored. The format is "`name of workspace@name of source`", or simply "`name of source`" if the default workspace is to be used. If this option is not used, a transient in-memory source will be used.

  Note that all leading and trailing whitespace is removed for both the source name and workspace name. Thus, a value of "`@`" implies a zero-length workspace name and zero-length source name.

  Also, any use of the '@' character in source and workspace names must be escaped with a preceding backslash.

### READ_DEPTH

    public static final JcrRepository.Option READ_DEPTH

  The depth of the subgraphs that should be loaded from the connectors during normal read operations. The default value is 1.

### INDEX_READ_DEPTH

    public static final JcrRepository.Option INDEX_READ_DEPTH

  The depth of the subgraphs that should be loaded from the connectors during indexing operations. The default value is 4.

### ANONYMOUS_USER_ROLES

    public static final JcrRepository.Option ANONYMOUS_USER_ROLES

  A comma-delimited list of default roles provided for anonymous access. A null or empty value for this option means that anonymous access is disabled.

### TABLES_INCLUDE_COLUMNS_FOR_INHERITED_PROPERTIES

    public static final JcrRepository.Option TABLES_INCLUDE_COLUMNS_FOR_INHERITED_PROPERTIES

  The query system represents node types as tables that can be queried, but there are two ways to define the columns for each of those tables. One approach is that each table only has columns representing the (single-valued) property definitions explicitly defined by the node type. The other approach also adds columns for each of the (single-valued) property definitions inherited by the node type from all of the `NodeType.getSupertypes()`.

  The default value is 'true'.

### QUERY_EXECUTION_ENABLED

    public static final JcrRepository.Option QUERY_EXECUTION_ENABLED

  A boolean flag that specifies whether this repository is expected to execute searches and queries. If client applications will never perform searches or queries, then maintaining the query indexes is an unnecessary overhead, and can be disabled. Note that this is merely a hint, and that searches and queries might still work when this is set to 'false'.

  The default is 'true', meaning that clients can execute searches and queries.

### QUERY_INDEX_DIRECTORY

    public static final JcrRepository.Option QUERY_INDEX_DIRECTORY

  The system may maintain a set of indexes that improve the performance of searching and querying the content. These size of these indexes depend upon the size of the content being stored, and thus may consume a significant amount of space. This option defines a location on the file system where this repository may (if needed) store indexes so they don't consume large amounts of memory.

  If specified, the value must be a valid path to a writable directory on the file system. If the path specifies a non-existant location, the repository may attempt to create the missing directories. The path may be absolute or relative to the location where this VM was started. If the specified location is not a readable and writable directory (or cannot be created as such), then this will generate an exception when the repository is created.

  The default value is null, meaning the search indexes may not be stored on the local file system and, if needed, will be stored within memory.

### QUERY_INDEXES_UPDATED_SYNCHRONOUSLY

    public static final JcrRepository.Option QUERY_INDEXES_UPDATED_SYNCHRONOUSLY

  A boolean flag that specifies whether updates to the indexes (if used) should be made synchronously, meaning that a call to `Session.save()` will not return until the search indexes have been completely updated. The benefit of synchronous updates is that a search or query performed immediately after a `save()` will operate upon content that was just changed. The downside is that the `save()` operation will take longer.

  With asynchronous updates, however, the only work done during a `save()` invocation is that required to persist the changes in the underlying repository source, while changes to the search indexes are made in a different thread that may not run immediately. In this case, there may be an indeterminate lag before searching or querying after a `save()` will operate upon the changed content.

  The default is value 'false', meaning the updates are performed asynchronously.

### PERFORM_REFERENTIAL_INTEGRITY_CHECKS

    public static final JcrRepository.Option PERFORM_REFERENTIAL_INTEGRITY_CHECKS

  A boolean flag that specifies whether referential integrity checks should be performed upon `Session.save()`. By default, this option is enabled, meaning that referential integrity checks are performed to ensure that nodes referenced by other nodes cannot be removed.

  If no `PropertyType.REFERENCE` properties are used within your content, these referential integrity checks will never find referring nodes. In these cases, you may be able to improve performance by skipping these checks.

  The default value is 'true', meaning that these checks are performed.

### EXPOSE_WORKSPACE_NAMES_IN_DESCRIPTOR

    public static final JcrRepository.Option EXPOSE_WORKSPACE_NAMES_IN_DESCRIPTOR

  A boolean flag that indicates whether a complete list of workspace names should be exposed in the custom repository descriptor `Repository.REPOSITORY_WORKSPACES`.

  If this option is set to `true`, then any code that can access the repository can retrieve a complete list of workspace names through the `Repository.getDescriptor(String)` method without `logging in`.

  Since some ModeShape installations may consider the list of workspace names to be restricted information and limit the ability of some or all users to see a complete list of workspace names, this option can be set to `false` to disable this capability. If this option is set to `false`, the `Repository.REPOSITORY_WORKSPACES` descriptor will not be set. In other words, the following code will print `false`.

       Repository repo = ...;
       System.out.println(repo.getDescriptorKeys().contains(org.modeshape.jcr.api.Repository#REPOSITORY_WORKSPACES));

  The default value is 'true', meaning that the descriptor is populated.

### REPOSITORY_JNDI_LOCATION

    public static final JcrRepository.Option REPOSITORY_JNDI_LOCATION

  A String property that when specified tells the `JcrEngine` where to put the `Repository` in to JNDI. Assumes that you have write access to the JNDI tree. If no value set, then the `Repository` will not be bound to JNDI.

### VERSION_HISTORY_STRUCTURE

    public static final JcrRepository.Option VERSION_HISTORY_STRUCTURE

  The structure of the version history. There are two values allowed:
  - "flat" will store all "`nt:versionHistory`" nodes with a name matching the UUID of the versioned node and directly under the `/jcr:system/jcr:versionStorage` node. For example, given a " `mix:versionable`" node with the UUID `fae2b929-c5ef-4ce5-9fa1-514779ca0ae3`, the corresponding " `nt:versionHistory`" node will be at `/jcr:system/jcr:versionStorage/fae2b929-c5ef-4ce5-9fa1-514779ca0ae3`.
  - "hierarchical" will store all "`nt:versionHistory`" nodes under a hiearchical structure created by the first 8 characters of the UUID string. For example, given a "`mix:versionable`" node with the UUID `fae2b929-c5ef-4ce5-9fa1-514779ca0ae3`, the corresponding "`nt:versionHistory`" node will be at `/jcr:system/jcr:versionStorage/fa/e2/b9/29/c5ef-4ce5-9fa1-514779ca0ae3`.

  The "hierarchical" structure is used by default and in cases where the option's value does not case-independently match the `JcrRepository.VersionHistoryOption.FLAT` or `JcrRepository.VersionHistoryOption.HIERARCHICAL` values.

### REMOVE_DERIVED_CONTENT_WITH_ORIGINAL

    public static final JcrRepository.Option REMOVE_DERIVED_CONTENT_WITH_ORIGINAL

  A boolean option that dictates whether content derived from other content (e.g., by sequencers) should be automatically removed when the content from which it was derived is removed from the repository.

  For example, consider that a file is uploaded and sequenced, and that the content derived from the file is stored in the repository. When that file is removed, this option dictates whether the derived content should also be removed automatically.

  A value of 'true' will ensure that all content derived from deleted content is also deleted. A value of 'false' will leave the derived content. The default value is 'true'.

### USE_ANONYMOUS_ACCESS_ON_FAILED_LOGIN

    public static final JcrRepository.Option USE_ANONYMOUS_ACCESS_ON_FAILED_LOGIN

  Indicates whether a failed attempt to `JcrRepository.login()` should automatically attempt to use anonymous access instead. If anonymous access is not enabled, then failed login attempts will still cause an `LoginException` to be thrown. The default value is 'false'.

  See Also:
    `ANONYMOUS_USER_ROLES`

### REBUILD_QUERY_INDEX_ON_STARTUP

    public static final JcrRepository.Option REBUILD_QUERY_INDEX_ON_STARTUP

  Indicates under what circumstances the query index should be automatically rebuilt on startup. If this is set to 'always', the content for the entire JCR repository will be loaded and re-indexed each time that the repository is started. If this is set to 'ifMissing', re-indexing will only occur if there is no existing index. The default value is 'ifMissing'.

### QUERY_INDEXES_REBUILT_SYNCHRONOUSLY

    public static final JcrRepository.Option QUERY_INDEXES_REBUILT_SYNCHRONOUSLY

  Indicates whether the query indexes should be rebuilt on startup synchronously ('true') or asynchronously ('false'). Rebuilding the query indexes can be an expensive operation on workspaces with large amounts of content, so setting this value to 'false' can cause a significant decrease in repository startup time. However, if this value is set to 'false', the query indexes may not accurately reflect the content in the repository while the rebuild is occurring. The default value is 'true'.

### USE_SECURITY_CONTEXT_CREDENTIALS

    @Deprecated
    public static final JcrRepository.Option USE_SECURITY_CONTEXT_CREDENTIALS

  Deprecated. Use custom AuthenticationProvider implementations instead
  Indicates whether `SecurityContextCredentials` should be supported by the `Repository.login(Credentials)` and `Repository.login(Credentials, String)` methods. By default, this support is disabled and not recommended; instead, use custom `AuthenticationProvider`s.

Method Detail

### values

    public static JcrRepository.Option[] values()

  Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

      for (JcrRepository.Option c : JcrRepository.Option.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static JcrRepository.Option valueOf(String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `IllegalArgumentException` - if this enum type has no constant with the specified name
    `NullPointerException` - if the argument is null

### findOption

    public static JcrRepository.Option findOption(String option)

  Determine the option given the option name. This does more than `valueOf(String)`, since this method first tries to match the supplied string to the option's `name`, then the uppercase version of the supplied string to the option's name, and finally if the supplied string is a camel-case version of the name (e.g., "projectNodeTypes").

  Parameters:
    `option` - the string version of the option's name
  Returns:
    the matching Option instance, or null if an option could not be matched using the supplied value

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

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