public interface Repository
Modifier and Type | Field and Description |
---|---|
static String |
LEVEL_1_SUPPORTED
The presence of this key indicates that this implementation supports
all level 1 features.
|
static String |
LEVEL_2_SUPPORTED
The presence of this key indicates that this implementation supports
all level 2 features.
|
static String |
OPTION_LOCKING_SUPPORTED
The presence of this key indicates that this implementation supports locking.
|
static String |
OPTION_OBSERVATION_SUPPORTED
The presence of this key indicates that this implementation supports observation.
|
static String |
OPTION_QUERY_SQL_SUPPORTED
The presence of this key indicates that this implementation supports the SQL query language.
|
static String |
OPTION_TRANSACTIONS_SUPPORTED
The presence of this key indicates that this implementation supports transactions.
|
static String |
OPTION_VERSIONING_SUPPORTED
The presence of this key indicates that this implementation supports versioning.
|
static String |
QUERY_XPATH_DOC_ORDER
The presence of this key indicates that XPath queries return results in document order.
|
static String |
QUERY_XPATH_POS_INDEX
The presence of this key indicates that the index position notation for
same-name siblings is supported within XPath queries.
|
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.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescriptor(String key)
Returns the descriptor for the specified key.
|
String[] |
getDescriptorKeys()
Returns a string array holding all descriptor keys available for this implementation.
|
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
static final String SPEC_NAME_DESC
static final String REP_VENDOR_DESC
static final String REP_VENDOR_URL_DESC
static final String REP_NAME_DESC
static final String REP_VERSION_DESC
static final String LEVEL_1_SUPPORTED
static final String LEVEL_2_SUPPORTED
static final String OPTION_TRANSACTIONS_SUPPORTED
static final String OPTION_VERSIONING_SUPPORTED
static final String OPTION_OBSERVATION_SUPPORTED
static final String OPTION_LOCKING_SUPPORTED
static final String OPTION_QUERY_SQL_SUPPORTED
static final String QUERY_XPATH_POS_INDEX
static final String QUERY_XPATH_DOC_ORDER
String[] getDescriptorKeys()
getDescriptor(String name)
to query information about this repository implementation.String getDescriptor(String key)
getDescriptorKeys()
. If the specifed key is not found, null
is returned.key
- a string corresponding to a descriptor for this repository implementation.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.
If authentication or authorization for the specified workspace fails, a LoginException
is
thrown.
If workspaceName
is not recognized, a NoSuchWorkspaceException
is thrown.
credentials
- The credentials of the userworkspaceName
- the name of a workspace.LoginException
- If the login 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 userLoginException
- If the login authentication fails.RepositoryException
- if another error occurs.Session login(String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException
login(null, workspaceName)
.workspaceName
- the name of a workspace.LoginException
- If the login authentication fails.NoSuchWorkspaceException
- If the specified workspaceName
is not recognized.RepositoryException
- if another error occurs.Session login() throws LoginException, RepositoryException
login(null, null)
.LoginException
- If the login authentication fails.RepositoryException
- if another error occurs.Copyright © 2004–2013 Day Management AG. All rights reserved.