Copyright© 2008-2022 Sitevision AB, all rights reserved.
public interface Repository
Repository
object is usually acquired through the RepositoryFactory
.Modifier and Type | Field and Description |
---|---|
static String |
IDENTIFIER_STABILITY
Key to a
String descriptor. |
static String |
IDENTIFIER_STABILITY_INDEFINITE_DURATION
One of four possible values for the descriptor
IDENTIFIER_STABILITY . |
static String |
IDENTIFIER_STABILITY_METHOD_DURATION
One of four possible values for the descriptor
IDENTIFIER_STABILITY . |
static String |
IDENTIFIER_STABILITY_SAVE_DURATION
One of four possible values for the descriptor
IDENTIFIER_STABILITY . |
static String |
IDENTIFIER_STABILITY_SESSION_DURATION
One of four possible values for the descriptor
IDENTIFIER_STABILITY . |
static String |
LEVEL_1_SUPPORTED
Deprecated.
As of JCR 2.0.
|
static String |
LEVEL_2_SUPPORTED
Deprecated.
As of JCR 2.0.
|
static String |
NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_INHERITANCE
Key to
String descriptor. |
static String |
NODE_TYPE_MANAGEMENT_INHERITANCE_MINIMAL
One of three possible values for the descriptor
NODE_TYPE_MANAGEMENT_INHERITANCE . |
static String |
NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE
One of three possible values for the descriptor
NODE_TYPE_MANAGEMENT_INHERITANCE . |
static String |
NODE_TYPE_MANAGEMENT_INHERITANCE_SINGLE
One of three possible values for the descriptor
NODE_TYPE_MANAGEMENT_INHERITANCE . |
static String |
NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_PROPERTY_TYPES
Key to a
long[] descriptor. |
static String |
NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED
Key to a
boolean descriptor. |
static String |
NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_ACCESS_CONTROL_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_ACTIVITIES_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_BASELINES_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_JOURNALED_OBSERVATION_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_LIFECYCLE_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_LOCKING_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_OBSERVATION_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_QUERY_SQL_SUPPORTED
Deprecated.
As of JCR 2.0.
|
static String |
OPTION_RETENTION_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_SHAREABLE_NODES_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_SIMPLE_VERSIONING_SUPPORTED |
static String |
OPTION_TRANSACTIONS_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_UNFILED_CONTENT_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_VERSIONING_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_WORKSPACE_MANAGEMENT_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_XML_EXPORT_SUPPORTED
Key to a
boolean descriptor. |
static String |
OPTION_XML_IMPORT_SUPPORTED
Key to a
boolean descriptor. |
static String |
QUERY_FULL_TEXT_SEARCH_SUPPORTED
Key to a
boolean descriptor. |
static String |
QUERY_JOINS
Key to
String descriptor. |
static String |
QUERY_JOINS_INNER
One of three possible values for the descriptor
QUERY_JOINS
. |
static String |
QUERY_JOINS_INNER_OUTER
One of three possible values for the descriptor
QUERY_JOINS
. |
static String |
QUERY_JOINS_NONE
One of three possible values for the descriptor
QUERY_JOINS
. |
static String |
QUERY_LANGUAGES
Key to a
String[] descriptor. |
static String |
QUERY_STORED_QUERIES_SUPPORTED
Key to a
boolean descriptor. |
static String |
QUERY_XPATH_DOC_ORDER
Deprecated.
As of JCR 2.0.
|
static String |
QUERY_XPATH_POS_INDEX
Deprecated.
As of JCR 2.0.
|
static String |
REP_NAME_DESC
The descriptor key for the name of this repository implementation.
|
static String |
REP_VENDOR_DESC
The descriptor key for the name of the repository vendor.
|
static String |
REP_VENDOR_URL_DESC
The descriptor key for the URL of the repository vendor.
|
static String |
REP_VERSION_DESC
The descriptor key for the version of this repository implementation.
|
static String |
SPEC_NAME_DESC
The descriptor key for the name of the specification that this repository
implements.
|
static String |
SPEC_VERSION_DESC
The descriptor key for the version of the specification that this
repository implements.
|
static String |
WRITE_SUPPORTED
Key to a
boolean descriptor. |
Modifier and Type | Method and Description |
---|---|
String |
getDescriptor(String key)
A convenience method.
|
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(String key)
The value of a single-value descriptor is found by passing the key for
that descriptor to this method.
|
Value[] |
getDescriptorValues(String key)
The value array of a multi-value descriptor is found by passing the key
for that descriptor to this method.
|
boolean |
isSingleValueDescriptor(String key)
Returns
true if key is a valid single-value
descriptor; otherwise returns false . |
boolean |
isStandardDescriptor(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,
String workspaceName)
Authenticates the user using the supplied
credentials . |
Session |
login(String workspaceName)
Equivalent to
login(null, workspaceName) . |
static final String SPEC_VERSION_DESC
String
"2.0".static final String SPEC_NAME_DESC
String
"Content Repository for Java Technology API".static final String REP_VENDOR_DESC
String
.static final String REP_VENDOR_URL_DESC
String
.static final String REP_NAME_DESC
String
.static final String REP_VERSION_DESC
String
.static final 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 String IDENTIFIER_STABILITY
String
descriptor. Returns one of the following
javax.jcr.Repository
constants indicating the stability of
identifiers:
static final String IDENTIFIER_STABILITY_METHOD_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers may change between method calls.static final String IDENTIFIER_STABILITY_SAVE_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers are guaranteed stable within a single
save/refresh cycle.static final String IDENTIFIER_STABILITY_SESSION_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers are guaranteed stable within a single
session.static final String IDENTIFIER_STABILITY_INDEFINITE_DURATION
IDENTIFIER_STABILITY
.
Indicates that identifiers are guaranteed to be stable forever.static final String OPTION_XML_EXPORT_SUPPORTED
boolean
descriptor. Returns true
if
and only if XML export is supported.static final String OPTION_XML_IMPORT_SUPPORTED
boolean
descriptor. Returns true
if
and only if XML import is supported.static final String OPTION_UNFILED_CONTENT_SUPPORTED
boolean
descriptor. Returns true
if
and only if unfiled content is supported.static final String OPTION_VERSIONING_SUPPORTED
boolean
descriptor. Returns true
if
and only if full versioning is supported.static final String OPTION_SIMPLE_VERSIONING_SUPPORTED
static final String OPTION_ACTIVITIES_SUPPORTED
boolean
descriptor. Returns true
if
and only if activities are supported.static final String OPTION_BASELINES_SUPPORTED
boolean
descriptor. Returns true
if
and only if configurations and baselines are supported.static final String OPTION_ACCESS_CONTROL_SUPPORTED
boolean
descriptor. Returns true
if
and only if access control is supported.static final String OPTION_LOCKING_SUPPORTED
boolean
descriptor. Returns true
if
and only if locking is supported.static final String OPTION_OBSERVATION_SUPPORTED
boolean
descriptor. Returns true
if
and only if asynchronous observation is supported.static final String OPTION_JOURNALED_OBSERVATION_SUPPORTED
boolean
descriptor. Returns true
if
and only if journaled observation is supported.static final String OPTION_RETENTION_SUPPORTED
boolean
descriptor. Returns true
if
and only if retention and hold are supported.static final String OPTION_LIFECYCLE_SUPPORTED
boolean
descriptor. Returns true
if
and only if lifecycles are supported.static final String OPTION_TRANSACTIONS_SUPPORTED
boolean
descriptor. Returns true
if
and only if transactions are supported.static final String OPTION_WORKSPACE_MANAGEMENT_SUPPORTED
boolean
descriptor. Returns true
if
and only if workspace management is supported.static final 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 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 String OPTION_SHAREABLE_NODES_SUPPORTED
boolean
descriptor. Returns true
if
and only if the creation of shareable nodes is supported.static final String OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED
boolean
descriptor. Returns true
if
and only if node type management is supported.static final 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 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 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 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 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 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 String NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED
boolean
descriptor. Returns true
if
and only if primary items are supported.static final 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 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 String NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED
boolean
descriptor. Returns true
if
and only if autocreated properties and child nodes are supported.static final 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 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 String NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED
boolean
descriptor. Returns true
if
and only if multivalue properties are supported.static final 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 String NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED
boolean
descriptor. Returns true if and only
value-constraints are supported.static final 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 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 String QUERY_STORED_QUERIES_SUPPORTED
boolean
descriptor. Returns true
if
and only if stored queries are supported.static final String QUERY_FULL_TEXT_SEARCH_SUPPORTED
boolean
descriptor. Returns true
if
and only if full-text search is supported.static final 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 String QUERY_JOINS_NONE
QUERY_JOINS
. Indicates that joins are not supported. Queries are limited to a
single selector.static final String QUERY_JOINS_INNER
QUERY_JOINS
. Indicates that inner joins are supported.static final String QUERY_JOINS_INNER_OUTER
QUERY_JOINS
. Indicates that inner and outer joins are supported.@Deprecated static final String LEVEL_1_SUPPORTED
boolean
descriptor. Returns true
if
and only if OPTION_XML_EXPORT_SUPPORTED = true
andQUERY_LANGUAGES
is of non-zero length.@Deprecated static final String LEVEL_2_SUPPORTED
boolean
descriptor. Returns true
if
and only if LEVEL_1_SUPPORTED = true
,WRITE_SUPPORTED = true
andOPTION_XML_IMPORT_SUPPORTED
= true
.@Deprecated static final 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.@Deprecated static final 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.@Deprecated static final 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.String[] getDescriptorKeys()
getDescriptorValue(String key)
and
getDescriptorValues(String key)
to query information about this
repository implementation.boolean isStandardDescriptor(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.
Sitevision note: Unsupported operation
key
- a descriptor key.key
is a standard descriptor.boolean isSingleValueDescriptor(String key)
true
if key
is a valid single-value
descriptor; otherwise returns false
.
Sitevision note: Unsupported operation
key
- a descriptor key.Value getDescriptorValue(String key)
key
is the key of a
multi-value descriptor or not a valid key this method returns
null
.
Sitevision note: Unsupported operation
key
- a descriptor key.Value[] getDescriptorValues(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
.
Sitevision note: Unsupported operation
key
- a descriptor key.String getDescriptor(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, 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.
Sitevision note: Unsupported operation
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)
.
Sitevision note: Unsupported operation
credentials
- The credentials of the userLoginException
- if authentication or authorization fails.RepositoryException
- if another error occurs.Session login(String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException
login(null, workspaceName)
.
Sitevision note: Unsupported operation
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.Sitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2022 Sitevision AB, all rights reserved.