|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Repository
The entry point into the content repository. The Repository
object is usually acquired through the RepositoryFactory
.
Field Summary | |
---|---|
static java.lang.String |
IDENTIFIER_STABILITY
Key to a String descriptor. |
static java.lang.String |
IDENTIFIER_STABILITY_INDEFINITE_DURATION
One of four possible values for the descriptor IDENTIFIER_STABILITY . |
static java.lang.String |
IDENTIFIER_STABILITY_METHOD_DURATION
One of four possible values for the descriptor IDENTIFIER_STABILITY . |
static java.lang.String |
IDENTIFIER_STABILITY_SAVE_DURATION
One of four possible values for the descriptor IDENTIFIER_STABILITY . |
static java.lang.String |
IDENTIFIER_STABILITY_SESSION_DURATION
One of four possible values for the descriptor IDENTIFIER_STABILITY . |
static java.lang.String |
LEVEL_1_SUPPORTED
Deprecated. As of JCR 2.0. |
static java.lang.String |
LEVEL_2_SUPPORTED
Deprecated. As of JCR 2.0. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_INHERITANCE
Key to String descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_INHERITANCE_MINIMAL
One of three possible values for the descriptor NODE_TYPE_MANAGEMENT_INHERITANCE . |
static java.lang.String |
NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE
One of three possible values for the descriptor NODE_TYPE_MANAGEMENT_INHERITANCE . |
static java.lang.String |
NODE_TYPE_MANAGEMENT_INHERITANCE_SINGLE
One of three possible values for the descriptor NODE_TYPE_MANAGEMENT_INHERITANCE . |
static java.lang.String |
NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_PROPERTY_TYPES
Key to a long[] descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED
Key to a boolean descriptor. |
static java.lang.String |
NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_ACCESS_CONTROL_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_ACTIVITIES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_BASELINES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_JOURNALED_OBSERVATION_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_LIFECYCLE_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_LOCKING_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_OBSERVATION_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_QUERY_SQL_SUPPORTED
Deprecated. As of JCR 2.0. |
static java.lang.String |
OPTION_RETENTION_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_SHAREABLE_NODES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_SIMPLE_VERSIONING_SUPPORTED
|
static java.lang.String |
OPTION_TRANSACTIONS_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_UNFILED_CONTENT_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_VERSIONING_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_WORKSPACE_MANAGEMENT_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_XML_EXPORT_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
OPTION_XML_IMPORT_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
QUERY_FULL_TEXT_SEARCH_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
QUERY_JOINS
Key to String descriptor. |
static java.lang.String |
QUERY_JOINS_INNER
One of three possible values for the descriptor QUERY_JOINS
. |
static java.lang.String |
QUERY_JOINS_INNER_OUTER
One of three possible values for the descriptor QUERY_JOINS
. |
static java.lang.String |
QUERY_JOINS_NONE
One of three possible values for the descriptor QUERY_JOINS
. |
static java.lang.String |
QUERY_LANGUAGES
Key to a String[] descriptor. |
static java.lang.String |
QUERY_STORED_QUERIES_SUPPORTED
Key to a boolean descriptor. |
static java.lang.String |
QUERY_XPATH_DOC_ORDER
Deprecated. As of JCR 2.0. |
static java.lang.String |
QUERY_XPATH_POS_INDEX
Deprecated. As of JCR 2.0. |
static java.lang.String |
REP_NAME_DESC
The descriptor key for the name of this repository implementation. |
static java.lang.String |
REP_VENDOR_DESC
The descriptor key for the name of the repository vendor. |
static java.lang.String |
REP_VENDOR_URL_DESC
The descriptor key for the URL of the repository vendor. |
static java.lang.String |
REP_VERSION_DESC
The descriptor key for the version of this repository implementation. |
static java.lang.String |
SPEC_NAME_DESC
The descriptor key for the name of the specification that this repository implements. |
static java.lang.String |
SPEC_VERSION_DESC
The descriptor key for the version of the specification that this repository implements. |
static java.lang.String |
WRITE_SUPPORTED
Key to a boolean descriptor. |
Method Summary | |
---|---|
java.lang.String |
getDescriptor(java.lang.String key)
A convenience method. |
java.lang.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. |
Value |
getDescriptorValue(java.lang.String key)
The value of a single-value descriptor is found by passing the key for that descriptor to this method. |
Value[] |
getDescriptorValues(java.lang.String key)
The value array of a multi-value descriptor is found by passing the key for that descriptor to this method. |
boolean |
isSingleValueDescriptor(java.lang.String key)
Returns true if key is a valid single-value
descriptor; otherwise returns false . |
boolean |
isStandardDescriptor(java.lang.String key)
Returns true if key is a standard descriptor
defined by the string constants in this interface and false
if it is either a valid implementation-specific key or not a valid key. |
Session |
login()
Equivalent to login(null, null) . |
Session |
login(Credentials credentials)
Equivalent to login(credentials, null) . |
Session |
login(Credentials credentials,
java.lang.String workspaceName)
Authenticates the user using the supplied credentials . |
Session |
login(java.lang.String workspaceName)
Equivalent to login(null, workspaceName) . |
Field Detail |
---|
static final java.lang.String SPEC_VERSION_DESC
String
"2.0".
static final java.lang.String SPEC_NAME_DESC
String
"Content Repository for Java Technology API".
static final java.lang.String REP_VENDOR_DESC
String
.
static final java.lang.String REP_VENDOR_URL_DESC
String
.
static final java.lang.String REP_NAME_DESC
String
.
static final java.lang.String REP_VERSION_DESC
String
.
static final java.lang.String WRITE_SUPPORTED
boolean
descriptor. Returns true
if
and only if repository content can be updated through the JCR API (as
opposed to having read-only access).
static final java.lang.String IDENTIFIER_STABILITY
String
descriptor. Returns one of the following
javax.jcr.Repository
constants indicating the stability of
identifiers:
static final java.lang.String IDENTIFIER_STABILITY_METHOD_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers may change between method calls.
static final java.lang.String IDENTIFIER_STABILITY_SAVE_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers are guaranteed stable within a single
save/refresh cycle.
static final java.lang.String IDENTIFIER_STABILITY_SESSION_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers are guaranteed stable within a single
session.
static final java.lang.String IDENTIFIER_STABILITY_INDEFINITE_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers are guaranteed to be stable forever.
static final java.lang.String OPTION_XML_EXPORT_SUPPORTED
boolean
descriptor. Returns true
if
and only if XML export is supported.
static final java.lang.String OPTION_XML_IMPORT_SUPPORTED
boolean
descriptor. Returns true
if
and only if XML import is supported.
static final java.lang.String OPTION_UNFILED_CONTENT_SUPPORTED
boolean
descriptor. Returns true
if
and only if unfiled content is supported.
static final java.lang.String OPTION_VERSIONING_SUPPORTED
boolean
descriptor. Returns true
if
and only if full versioning is supported.
static final java.lang.String OPTION_SIMPLE_VERSIONING_SUPPORTED
static final java.lang.String OPTION_ACTIVITIES_SUPPORTED
boolean
descriptor. Returns true
if
and only if activities are supported.
static final java.lang.String OPTION_BASELINES_SUPPORTED
boolean
descriptor. Returns true
if
and only if configurations and baselines are supported.
static final java.lang.String OPTION_ACCESS_CONTROL_SUPPORTED
boolean
descriptor. Returns true
if
and only if access control is supported.
static final java.lang.String OPTION_LOCKING_SUPPORTED
boolean
descriptor. Returns true
if
and only if locking is supported.
static final java.lang.String OPTION_OBSERVATION_SUPPORTED
boolean
descriptor. Returns true
if
and only if asynchronous observation is supported.
static final java.lang.String OPTION_JOURNALED_OBSERVATION_SUPPORTED
boolean
descriptor. Returns true
if
and only if journaled observation is supported.
static final java.lang.String OPTION_RETENTION_SUPPORTED
boolean
descriptor. Returns true
if
and only if retention and hold are supported.
static final java.lang.String OPTION_LIFECYCLE_SUPPORTED
boolean
descriptor. Returns true
if
and only if lifecycles are supported.
static final java.lang.String OPTION_TRANSACTIONS_SUPPORTED
boolean
descriptor. Returns true
if
and only if transactions are supported.
static final java.lang.String OPTION_WORKSPACE_MANAGEMENT_SUPPORTED
boolean
descriptor. Returns true
if
and only if workspace management is supported.
static final java.lang.String OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED
boolean
descriptor. Returns true
if
and only if the primary node type of an existing node can be updated.
static final java.lang.String OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED
boolean
descriptor. Returns true
if
and only if the mixin node types of an existing node can be added and
removed.
static final java.lang.String OPTION_SHAREABLE_NODES_SUPPORTED
boolean
descriptor. Returns true
if
and only if the creation of shareable nodes is supported.
static final java.lang.String OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED
boolean
descriptor. Returns true
if
and only if node type management is supported.
static final java.lang.String OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED
boolean
descriptor. Returns true
if
and only if node and property with same name is supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_INHERITANCE
String
descriptor. Returns one of the following
javax.jcr.Repository
constants indicating the level of
support for node type inheritance:
static final java.lang.String NODE_TYPE_MANAGEMENT_INHERITANCE_MINIMAL
NODE_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.
static final java.lang.String NODE_TYPE_MANAGEMENT_INHERITANCE_SINGLE
NODE_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.
static final java.lang.String NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE
NODE_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.
static final java.lang.String NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED
boolean
descriptor. Returns true
if
and only if override of inherited property or child node definitions is
supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED
boolean
descriptor. Returns true
if
and only if primary items are supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED
boolean
descriptor. Returns true
if
and only if preservation of child node ordering is supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED
boolean
descriptor. Returns true
if
and only if residual property and child node definitions are supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED
boolean
descriptor. Returns true
if
and only if autocreated properties and child nodes are supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED
boolean
descriptor. Returns true
if
and only if same-name sibling child nodes are supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_PROPERTY_TYPES
long[]
descriptor. Returns an array holding the
javax.jcr.PropertyType
constants for the property types
(including UNDEFINED
, if supported) that a registered node
type can specify, or a zero-length array if registered node types cannot
specify property definitions.
static final java.lang.String NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED
boolean
descriptor. Returns true
if
and only if multivalue properties are supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED
boolean
descriptor. Returns true
if
and only if registration of a node types with more than one
BINARY
property is permitted.
static final java.lang.String NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED
boolean
descriptor. Returns true if and only
value-constraints are supported.
static final java.lang.String NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED
boolean
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.
static final java.lang.String QUERY_LANGUAGES
String[]
descriptor. Returns an array holding the
constants representing the supported query languages, or a zero-length if
query is not supported.
static final java.lang.String QUERY_STORED_QUERIES_SUPPORTED
boolean
descriptor. Returns true
if
and only if stored queries are supported.
static final java.lang.String QUERY_FULL_TEXT_SEARCH_SUPPORTED
boolean
descriptor. Returns true
if
and only if full-text search is supported.
static final java.lang.String QUERY_JOINS
String
descriptor. Returns one of the following
javax.jcr.Repository
constants indicating the level of
support for joins in queries:
static final java.lang.String QUERY_JOINS_NONE
QUERY_JOINS
. Indicates that joins are not supported. Queries are limited to a
single selector.
static final java.lang.String QUERY_JOINS_INNER
QUERY_JOINS
. Indicates that inner joins are supported.
static final java.lang.String QUERY_JOINS_INNER_OUTER
QUERY_JOINS
. Indicates that inner and outer joins are supported.
static final java.lang.String LEVEL_1_SUPPORTED
boolean
descriptor. Returns true
if
and only if OPTION_XML_EXPORT_SUPPORTED = true
andQUERY_LANGUAGES
is of non-zero length.
static final java.lang.String LEVEL_2_SUPPORTED
boolean
descriptor. Returns true
if
and only if LEVEL_1_SUPPORTED = true
,WRITE_SUPPORTED = true
andOPTION_XML_IMPORT_SUPPORTED
= true
.
static final java.lang.String OPTION_QUERY_SQL_SUPPORTED
boolean
descriptor. Returns true
if
and only if the (deprecated) JCR 1.0 XPath query language is supported.
This constant is deprecated.
static final java.lang.String QUERY_XPATH_POS_INDEX
boolean
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.
static final java.lang.String QUERY_XPATH_DOC_ORDER
boolean
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.
Method Detail |
---|
java.lang.String[] getDescriptorKeys()
getDescriptorValue(String key)
and
getDescriptorValues(String key)
to query information about this
repository implementation.
boolean isStandardDescriptor(java.lang.String key)
true
if key
is a standard descriptor
defined by the string constants in this interface and false
if it is either a valid implementation-specific key or not a valid key.
key
- a descriptor key.
key
is a standard descriptor.boolean isSingleValueDescriptor(java.lang.String key)
true
if key
is a valid single-value
descriptor; otherwise returns false
.
key
- a descriptor key.
Value getDescriptorValue(java.lang.String key)
key
is the key of a
multi-value descriptor or not a valid key this method returns
null
.
key
- a descriptor key.
Value[] getDescriptorValues(java.lang.String key)
key
is the key of a
single-value descriptor then this method returns that value as an array
of size one. If key
is not a valid key this method returns
null
.
key
- a descriptor key.
java.lang.String getDescriptor(java.lang.String key)
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();
key
- a descriptor key.
Session login(Credentials credentials, java.lang.String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException
credentials
. If
workspaceName
is recognized as the name of an existing
workspace in the repository and authorization to access that workspace is
granted, then a new Session
object is returned. The format
of the string workspaceName
depends upon the
implementation.
If credentials
is null
, 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
is null
, 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 method Workspace.getAccessibleWorkspaceNames()
, allowing the client to select
from among available "real" workspaces.
credentials
- The credentials of the userworkspaceName
- the name of a workspace.
LoginException
- if authentication or authorization for the
specified workspace fails.
NoSuchWorkspaceException
- if the specified
workspaceName
is not recognized.
RepositoryException
- if another error occurs.Session login(Credentials credentials) throws LoginException, RepositoryException
login(credentials, null)
.
credentials
- The credentials of the user
LoginException
- if authentication or authorization fails.
RepositoryException
- if another error occurs.Session login(java.lang.String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException
login(null, workspaceName)
.
workspaceName
- the name of a workspace.
LoginException
- if authentication or authorization for the
specified workspace fails.
NoSuchWorkspaceException
- if the specified
workspaceName
is not recognized.
RepositoryException
- if another error occurs.Session login() throws LoginException, RepositoryException
login(null, null)
.
LoginException
- if authentication or authorization fails.
RepositoryException
- if another error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |