|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.test.RepositoryStub
public abstract class RepositoryStub
The RepositoryStub is the entry point to the JCR Repository
for the TCK Test harness.
Implementors of the JCR specification need to provide an implementation for the abstract methods defined in this class.
| Field Summary | |
|---|---|
protected java.util.Properties |
environment
|
static java.lang.String |
PROP_HOLD_NAME
|
static java.lang.String |
PROP_LOCK_OWNER
|
static java.lang.String |
PROP_LOCK_TIMEOUT
|
static java.lang.String |
PROP_NAMESPACES
|
static java.lang.String |
PROP_NODE_NAME1
|
static java.lang.String |
PROP_NODE_NAME2
|
static java.lang.String |
PROP_NODE_NAME3
|
static java.lang.String |
PROP_NODE_NAME4
|
static java.lang.String |
PROP_NODETYPE
|
static java.lang.String |
PROP_NODETYPENOCHILDREN
|
static java.lang.String |
PROP_PREFIX
|
static java.lang.String |
PROP_PROP_NAME1
|
static java.lang.String |
PROP_PROP_NAME2
|
static java.lang.String |
PROP_PROP_TYPE1
|
static java.lang.String |
PROP_PROP_TYPE2
|
static java.lang.String |
PROP_PROP_VALUE1
|
static java.lang.String |
PROP_PROP_VALUE2
|
static java.lang.String |
PROP_READONLY_NAME
|
static java.lang.String |
PROP_READONLY_PWD
|
static java.lang.String |
PROP_READWRITE_NAME
|
static java.lang.String |
PROP_READWRITE_PWD
|
static java.lang.String |
PROP_STUB_IMPL_CLASS
|
static java.lang.String |
PROP_SUPERUSER_NAME
|
static java.lang.String |
PROP_SUPERUSER_PWD
|
static java.lang.String |
PROP_TESTROOT
|
static java.lang.String |
PROP_WORKSPACE_NAME
|
protected SimpleCredentials |
readonly
|
protected SimpleCredentials |
readwrite
|
static java.lang.String |
REPOSITORY_FACTORY
|
static java.lang.String |
RETENTION_POLICY_HOLDER
|
static java.lang.String |
STUB_IMPL_PROPS
|
static java.lang.String |
STUB_IMPL_SYS_PROPS
|
protected SimpleCredentials |
superuser
|
| Constructor Summary | |
|---|---|
protected |
RepositoryStub(java.util.Properties env)
Implementations of this class must overwrite this constructor. |
| Method Summary | |
|---|---|
static RepositoryStub |
getInstance(java.util.Map configuration)
Creates and/or returns the configured RepositryStub
implementation. |
abstract java.security.Principal |
getKnownPrincipal(Session session)
Returns a Principal identifiying a known user (not group) |
java.lang.String |
getProperty(java.lang.String name)
Returns the property with the specified name. |
Credentials |
getReadOnlyCredentials()
Returns a Credentials object, that can be used to login
to the Repository returned by getRepository(). |
Credentials |
getReadWriteCredentials()
Returns a Credentials object, that can be used to login
to the Repository returned by getRepository(). |
abstract Repository |
getRepository()
Returns a reference to the Repository provided by this
RepositoryStub. |
Credentials |
getSuperuserCredentials()
Returns a Credentials object, that can be used to login
to the Repository returned by getRepository(). |
abstract java.security.Principal |
getUnknownPrincipal(Session session)
Returns a Principal identifiying an unknown user. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STUB_IMPL_PROPS
public static final java.lang.String PROP_PREFIX
public static final java.lang.String STUB_IMPL_SYS_PROPS
public static final java.lang.String PROP_STUB_IMPL_CLASS
public static final java.lang.String PROP_SUPERUSER_PWD
public static final java.lang.String PROP_SUPERUSER_NAME
public static final java.lang.String PROP_READONLY_PWD
public static final java.lang.String PROP_READONLY_NAME
public static final java.lang.String PROP_READWRITE_PWD
public static final java.lang.String PROP_READWRITE_NAME
public static final java.lang.String PROP_NODETYPE
public static final java.lang.String PROP_NODETYPENOCHILDREN
public static final java.lang.String PROP_TESTROOT
public static final java.lang.String PROP_NODE_NAME1
public static final java.lang.String PROP_NODE_NAME2
public static final java.lang.String PROP_NODE_NAME3
public static final java.lang.String PROP_NODE_NAME4
public static final java.lang.String PROP_PROP_NAME1
public static final java.lang.String PROP_PROP_NAME2
public static final java.lang.String PROP_PROP_VALUE1
public static final java.lang.String PROP_PROP_VALUE2
public static final java.lang.String PROP_PROP_TYPE1
public static final java.lang.String PROP_PROP_TYPE2
public static final java.lang.String PROP_WORKSPACE_NAME
public static final java.lang.String PROP_NAMESPACES
public static final java.lang.String PROP_LOCK_TIMEOUT
public static final java.lang.String PROP_LOCK_OWNER
public static final java.lang.String PROP_HOLD_NAME
public static final java.lang.String RETENTION_POLICY_HOLDER
public static final java.lang.String REPOSITORY_FACTORY
protected final java.util.Properties environment
protected SimpleCredentials superuser
protected SimpleCredentials readonly
protected SimpleCredentials readwrite
| Constructor Detail |
|---|
protected RepositoryStub(java.util.Properties env)
env - the environment variables. This parameter must not be null.| Method Detail |
|---|
public static RepositoryStub getInstance(java.util.Map configuration)
throws RepositoryStubException
RepositryStub
implementation.
The property file is located in the following sequence:
-Djavax.jcr.tck.properties is
set, then the accroding file is used as configuration.-Djavax.jcr.tck.properties is
not set, then the TCK tries to load the file repositoryStubImpl.properties
as a resource from the ClassLoader of this RepositryStub class.configuration map.
configuration - a Map of additional configuration entries.
RepositoryStub implementation.
RepositoryStubException
public abstract Repository getRepository()
throws RepositoryStubException
Repository provided by this
RepositoryStub.
RepositoryStubExceptionpublic Credentials getSuperuserCredentials()
Credentials object, that can be used to login
to the Repository returned by getRepository().
The Credentials returned has 'superuser' rights. That
is, the Session object returned by Repository.login(Credentials)
has read write access to the whole Content Repository.
Credentials object, that allows to login to the
Repository as 'superuser'.public Credentials getReadWriteCredentials()
Credentials object, that can be used to login
to the Repository returned by getRepository().
The Credentials returned has read/write rights. That
is, the Session object returned by Repository.login(Credentials)
has read write access to the Node configured in the
JCR TCK Interview.
For details, see: JCR TCK User Guide.
Credentials object, that allows to login to the
Repository with read/write right.public Credentials getReadOnlyCredentials()
Credentials object, that can be used to login
to the Repository returned by getRepository().
The Credentials returned must have read-only rights. That
is, the Session object returned by Repository.login()
has read-only access to the Node configured in the
JCR TCK Interview.
For details, see: JCR TCK User Guide.
Credentials object, that allows to login to the
Repository with read-only right.public java.lang.String getProperty(java.lang.String name)
name. If a
property with the given name does not exist, null is
returned.
name - the name of the property.
null if the property does not
exist.
public abstract java.security.Principal getKnownPrincipal(Session session)
throws RepositoryException
Principal identifiying a known user (not group)
session -
RepositoryException
public abstract java.security.Principal getUnknownPrincipal(Session session)
throws RepositoryException,
NotExecutableException
Principal identifiying an unknown user.
session -
NotExecutableException - if the implementation can not provide an
instance of Principal for unkwnown users
RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||