Interface Repository
- All Known Subinterfaces:
CRXRepository
,JackrabbitRepository
,SlingRepository
- All Known Implementing Classes:
AbstractRepository
,AbstractSlingRepository2
,EmptyRepository
,JNDIRepository
,ProxyRepository
Repository
object is usually acquired through the RepositoryFactory
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Key to aString
descriptor.static final String
One of four possible values for the descriptorIDENTIFIER_STABILITY
.static final String
One of four possible values for the descriptorIDENTIFIER_STABILITY
.static final String
One of four possible values for the descriptorIDENTIFIER_STABILITY
.static final String
One of four possible values for the descriptorIDENTIFIER_STABILITY
.static final String
Deprecated.As of JCR 2.0.static final String
Deprecated.As of JCR 2.0.static final String
Key to aboolean
descriptor.static final String
Key toString
descriptor.static final String
One of three possible values for the descriptorNODE_TYPE_MANAGEMENT_INHERITANCE
.static final String
One of three possible values for the descriptorNODE_TYPE_MANAGEMENT_INHERITANCE
.static final String
One of three possible values for the descriptorNODE_TYPE_MANAGEMENT_INHERITANCE
.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to along[]
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Deprecated.As of JCR 2.0.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key to aboolean
descriptor.static final String
Key toString
descriptor.static final String
One of three possible values for the descriptorQUERY_JOINS
.static final String
One of three possible values for the descriptorQUERY_JOINS
.static final String
One of three possible values for the descriptorQUERY_JOINS
.static final String
Key to aString[]
descriptor.static final String
Key to aboolean
descriptor.static final String
Deprecated.As of JCR 2.0.static final String
Deprecated.As of JCR 2.0.static final String
The descriptor key for the name of this repository implementation.static final String
The descriptor key for the name of the repository vendor.static final String
The descriptor key for the URL of the repository vendor.static final String
The descriptor key for the version of this repository implementation.static final String
The descriptor key for the name of the specification that this repository implements.static final String
The descriptor key for the version of the specification that this repository implements.static final String
Key to aboolean
descriptor. -
Method Summary
Modifier and TypeMethodDescriptiongetDescriptor
(String key) A convenience method.String[]
Returns a string array holding all descriptor keys available for this implementation, both the standard descriptors defined by the string constants in this interface and any implementation-specific descriptors.getDescriptorValue
(String key) The value of a single-value descriptor is found by passing the key for that descriptor to this method.Value[]
The value array of a multi-value descriptor is found by passing the key for that descriptor to this method.boolean
Returnstrue
ifkey
is a valid single-value descriptor; otherwise returnsfalse
.boolean
Returnstrue
ifkey
is a standard descriptor defined by the string constants in this interface andfalse
if it is either a valid implementation-specific key or not a valid key.login()
Equivalent tologin(null, null)
.Equivalent tologin(null, workspaceName)
.login
(Credentials credentials) Equivalent tologin(credentials, null)
.login
(Credentials credentials, String workspaceName) Authenticates the user using the suppliedcredentials
.
-
Field Details
-
SPEC_VERSION_DESC
The descriptor key for the version of the specification that this repository implements. For JCR 2.0 the value of this descriptor is theString
"2.0".- See Also:
-
SPEC_NAME_DESC
The descriptor key for the name of the specification that this repository implements. For JCR 2.0 the value of this descriptor is theString
"Content Repository for Java Technology API".- See Also:
-
REP_VENDOR_DESC
The descriptor key for the name of the repository vendor. The descriptor returned for this key is aString
.- See Also:
-
REP_VENDOR_URL_DESC
The descriptor key for the URL of the repository vendor. The descriptor returned for this key is aString
.- See Also:
-
REP_NAME_DESC
The descriptor key for the name of this repository implementation. The descriptor returned for this key is aString
.- See Also:
-
REP_VERSION_DESC
The descriptor key for the version of this repository implementation. The descriptor returned for this key is aString
.- See Also:
-
WRITE_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if repository content can be updated through the JCR API (as opposed to having read-only access).- Since:
- JCR 2.0
- See Also:
-
IDENTIFIER_STABILITY
Key to aString
descriptor. Returns one of the followingjavax.jcr.Repository
constants indicating the stability of identifiers:- IDENTIFIER_STABILITY_METHOD_DURATION
- Identifiers may change between method calls.
- IDENTIFIER_STABILITY_SAVE_DURATION
- Identifiers are guaranteed stable within a single save/refresh cycle.
- IDENTIFIER_STABILITY_SESSION_DURATION
- Identifiers are guaranteed stable within a single session.
- IDENTIFIER_STABILITY_INDEFINITE_DURATION
- Identifiers are guaranteed to be stable forever.
- Since:
- JCR 2.0
- See Also:
-
IDENTIFIER_STABILITY_METHOD_DURATION
One of four possible values for the descriptorIDENTIFIER_STABILITY
. Indicates that identifiers may change between method calls.- Since:
- JCR 2.0
- See Also:
-
IDENTIFIER_STABILITY_SAVE_DURATION
One of four possible values for the descriptorIDENTIFIER_STABILITY
. Indicates that identifiers are guaranteed stable within a single save/refresh cycle.- Since:
- JCR 2.0
- See Also:
-
IDENTIFIER_STABILITY_SESSION_DURATION
One of four possible values for the descriptorIDENTIFIER_STABILITY
. Indicates that identifiers are guaranteed stable within a single session.- Since:
- JCR 2.0
- See Also:
-
IDENTIFIER_STABILITY_INDEFINITE_DURATION
One of four possible values for the descriptorIDENTIFIER_STABILITY
. Indicates that identifiers are guaranteed to be stable forever.- Since:
- JCR 2.0
- See Also:
-
OPTION_XML_EXPORT_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if XML export is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_XML_IMPORT_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if XML import is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_UNFILED_CONTENT_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if unfiled content is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_VERSIONING_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if full versioning is supported.- See Also:
-
OPTION_SIMPLE_VERSIONING_SUPPORTED
- See Also:
-
OPTION_ACTIVITIES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if activities are supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_BASELINES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if configurations and baselines are supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_ACCESS_CONTROL_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if access control is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_LOCKING_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if locking is supported.- See Also:
-
OPTION_OBSERVATION_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if asynchronous observation is supported.- See Also:
-
OPTION_JOURNALED_OBSERVATION_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if journaled observation is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_RETENTION_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if retention and hold are supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_LIFECYCLE_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if lifecycles are supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_TRANSACTIONS_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if transactions are supported.- See Also:
-
OPTION_WORKSPACE_MANAGEMENT_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if workspace management is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if the primary node type of an existing node can be updated.- Since:
- JCR 2.0
- See Also:
-
OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if the mixin node types of an existing node can be added and removed.- Since:
- JCR 2.0
- See Also:
-
OPTION_SHAREABLE_NODES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if the creation of shareable nodes is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if node type management is supported.- Since:
- JCR 2.0
- See Also:
-
OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if node and property with same name is supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_INHERITANCE
Key toString
descriptor. Returns one of the followingjavax.jcr.Repository
constants indicating the level of support for node type inheritance:- NODE_TYPE_MANAGEMENT_INHERITANCE_MINIMAL
- Registration of primary node types is limited to those which have only nt:base as supertype. Registration of mixin node types is limited to those without any supertypes.
- NODE_TYPE_MANAGEMENT_INHERITANCE_SINGLE
- Registration of primary node types is limited to those with exactly one supertype. Registration of mixin node types is limited to those with at most one supertype.
- NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE
- Primary node types can be registered with one or more supertypes. Mixin node types can be registered with zero or more supertypes.
- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_INHERITANCE_MINIMAL
One of three possible values for the descriptorNODE_TYPE_MANAGEMENT_INHERITANCE
. Indicates that registration of primary node types is limited to those which have only nt:base as supertype. Registration of mixin node types is limited to those without any supertypes.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_INHERITANCE_SINGLE
One of three possible values for the descriptorNODE_TYPE_MANAGEMENT_INHERITANCE
. Indicates that registration of primary node types is limited to those with exactly one supertype. Registration of mixin node types is limited to those with at most one supertype.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE
One of three possible values for the descriptorNODE_TYPE_MANAGEMENT_INHERITANCE
. Indicates that primary node types can be registered with one or more supertypes. Mixin node types can be registered with zero or more supertypes.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if override of inherited property or child node definitions is supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if primary items are supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if preservation of child node ordering is supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if residual property and child node definitions are supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if autocreated properties and child nodes are supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if same-name sibling child nodes are supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_PROPERTY_TYPES
Key to along[]
descriptor. Returns an array holding thejavax.jcr.PropertyType
constants for the property types (includingUNDEFINED
, if supported) that a registered node type can specify, or a zero-length array if registered node types cannot specify property definitions.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if multivalue properties are supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if registration of a node types with more than oneBINARY
property is permitted.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED
Key to aboolean
descriptor. Returns true if and only value-constraints are supported.- Since:
- JCR 2.0
- See Also:
-
NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED
Key to aboolean
descriptor. Returns true if and only the update of node types is supported for node types currently in use as the type of an existing node in the repository.- Since:
- JCR 2.0
- See Also:
-
QUERY_LANGUAGES
Key to aString[]
descriptor. Returns an array holding the constants representing the supported query languages, or a zero-length if query is not supported.- Since:
- JCR 2.0
- See Also:
-
QUERY_STORED_QUERIES_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if stored queries are supported.- Since:
- JCR 2.0
- See Also:
-
QUERY_FULL_TEXT_SEARCH_SUPPORTED
Key to aboolean
descriptor. Returnstrue
if and only if full-text search is supported.- Since:
- JCR 2.0
- See Also:
-
QUERY_JOINS
Key toString
descriptor. Returns one of the followingjavax.jcr.Repository
constants indicating the level of support for joins in queries:- QUERY_JOINS_NONE
- Joins are not supported. Queries are limited to a single selector.
- QUERY_JOINS_INNER
- Inner joins are supported.
- QUERY_JOINS_INNER_OUTER
- Inner and outer joins are supported.
- Since:
- JCR 2.0
- See Also:
-
QUERY_JOINS_NONE
One of three possible values for the descriptorQUERY_JOINS
. Indicates that joins are not supported. Queries are limited to a single selector.- Since:
- JCR 2.0
- See Also:
-
QUERY_JOINS_INNER
One of three possible values for the descriptorQUERY_JOINS
. Indicates that inner joins are supported.- Since:
- JCR 2.0
- See Also:
-
QUERY_JOINS_INNER_OUTER
One of three possible values for the descriptorQUERY_JOINS
. Indicates that inner and outer joins are supported.- Since:
- JCR 2.0
- See Also:
-
LEVEL_1_SUPPORTED
Deprecated.As of JCR 2.0.Key to aboolean
descriptor. Returnstrue
if and only ifOPTION_XML_EXPORT_SUPPORTED = true
andQUERY_LANGUAGES
is of non-zero length.
- See Also:
-
LEVEL_2_SUPPORTED
Deprecated.As of JCR 2.0.Key to aboolean
descriptor. Returnstrue
if and only ifLEVEL_1_SUPPORTED = true
,WRITE_SUPPORTED = true
andOPTION_XML_IMPORT_SUPPORTED = true
.
- See Also:
-
OPTION_QUERY_SQL_SUPPORTED
Deprecated.As of JCR 2.0.Key to aboolean
descriptor. Returnstrue
if and only if the (deprecated) JCR 1.0 XPath query language is supported. This constant is deprecated.- See Also:
-
QUERY_XPATH_POS_INDEX
Deprecated.As of JCR 2.0.Key to aboolean
descriptor. Returns false unless the (deprecated) JCR 1.0 XPath query language is supported. If JCR 1.0 XPath is supported then this descriptor has the same semantics as in JCR 1.0. This constant is deprecated.- See Also:
-
QUERY_XPATH_DOC_ORDER
Deprecated.As of JCR 2.0.Key to aboolean
descriptor. Returns false unless the (deprecated) JCR 1.0 XPath query language is supported. If JCR 1.0 XPath is supported then this descriptor has the same semantics as in JCR 1.0. This constant is deprecated.- See Also:
-
-
Method Details
-
getDescriptorKeys
String[] getDescriptorKeys()Returns a string array holding all descriptor keys available for this implementation, both the standard descriptors defined by the string constants in this interface and any implementation-specific descriptors. Used in conjunction withgetDescriptorValue(String key)
andgetDescriptorValues(String key)
to query information about this repository implementation.- Returns:
- a string array holding all descriptor keys.
-
isStandardDescriptor
Returnstrue
ifkey
is a standard descriptor defined by the string constants in this interface andfalse
if it is either a valid implementation-specific key or not a valid key.- Parameters:
key
- a descriptor key.- Returns:
- whether
key
is a standard descriptor. - Since:
- JCR 2.0
-
isSingleValueDescriptor
Returnstrue
ifkey
is a valid single-value descriptor; otherwise returnsfalse
.- Parameters:
key
- a descriptor key.- Returns:
- whether the specified desdfriptor is multi-valued.
- Since:
- JCR 2.0
-
getDescriptorValue
The value of a single-value descriptor is found by passing the key for that descriptor to this method. Ifkey
is the key of a multi-value descriptor or not a valid key this method returnsnull
.- Parameters:
key
- a descriptor key.- Returns:
- The value of the indicated descriptor
- Since:
- JCR 2.0
-
getDescriptorValues
The value array of a multi-value descriptor is found by passing the key for that descriptor to this method. Ifkey
is the key of a single-value descriptor then this method returns that value as an array of size one. Ifkey
is not a valid key this method returnsnull
.- Parameters:
key
- a descriptor key.- Returns:
- the value array for the indicated descriptor
- Since:
- JCR 2.0
-
getDescriptor
A convenience method. The call
String s = repository.getDescriptor(key);
is equivalent to
Value v = repository.getDescriptorValue(key);
String s = (v == null) ? null : v.getString();- Parameters:
key
- a descriptor key.- Returns:
- a descriptor value in string form.
-
login
Session login(Credentials credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException Authenticates the user using the suppliedcredentials
. IfworkspaceName
is recognized as the name of an existing workspace in the repository and authorization to access that workspace is granted, then a newSession
object is returned. The format of the stringworkspaceName
depends upon the implementation.If
credentials
isnull
, it is assumed that authentication is handled by a mechanism external to the repository itself (for example, through the JAAS framework) and that the repository implementation exists within a context (for example, an application server) that allows it to handle authorization of the request for access to the specified workspace.If
workspaceName
isnull
, a default workspace is automatically selected by the repository implementation. This may, for example, be the "home workspace" of the user whose credentials were passed, though this is entirely up to the configuration and implementation of the repository. Alternatively, it may be a "null workspace" that serves only to provide the methodWorkspace.getAccessibleWorkspaceNames()
, allowing the client to select from among available "real" workspaces.- Parameters:
credentials
- The credentials of the userworkspaceName
- the name of a workspace.- Returns:
- a valid session for the user to access the repository.
- Throws:
LoginException
- if authentication or authorization for the specified workspace fails.NoSuchWorkspaceException
- if the specifiedworkspaceName
is not recognized.RepositoryException
- if another error occurs.
-
login
Equivalent tologin(credentials, null)
.- Parameters:
credentials
- The credentials of the user- Returns:
- a valid session for the user to access the repository.
- Throws:
LoginException
- if authentication or authorization fails.RepositoryException
- if another error occurs.
-
login
Session login(String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException Equivalent tologin(null, workspaceName)
.- Parameters:
workspaceName
- the name of a workspace.- Returns:
- a valid session for the user to access the repository.
- Throws:
LoginException
- if authentication or authorization for the specified workspace fails.NoSuchWorkspaceException
- if the specifiedworkspaceName
is not recognized.RepositoryException
- if another error occurs.
-
login
Equivalent tologin(null, null)
.- Returns:
- a valid session for the user to access the repository.
- Throws:
LoginException
- if authentication or authorization fails.RepositoryException
- if another error occurs.
-