Package org.apache.jackrabbit.test
Class JNDIRepositoryStub
- java.lang.Object
-
- org.apache.jackrabbit.test.RepositoryStub
-
- org.apache.jackrabbit.test.JNDIRepositoryStub
-
public class JNDIRepositoryStub extends RepositoryStub
Implements the abstract classRepositoryStub
and uses JNDI to obtain ajavax.jcr.Repository
instance.
-
-
Field Summary
Fields Modifier and Type Field Description static String
REPOSITORY_LOOKUP_PROP
-
Fields inherited from class org.apache.jackrabbit.test.RepositoryStub
environment, PROP_HOLD_NAME, PROP_LOCK_OWNER, PROP_LOCK_TIMEOUT, PROP_NAMESPACES, PROP_NODE_NAME1, PROP_NODE_NAME2, PROP_NODE_NAME3, PROP_NODE_NAME4, PROP_NODETYPE, PROP_NODETYPENOCHILDREN, PROP_NODETYPETESTROOT, PROP_OPEN_SCOPED_LOCK_MULTIPLE, PROP_PREFIX, PROP_PROP_NAME1, PROP_PROP_NAME2, PROP_PROP_TYPE1, PROP_PROP_TYPE2, PROP_PROP_VALUE1, PROP_PROP_VALUE2, PROP_READONLY_NAME, PROP_READONLY_PWD, PROP_READWRITE_NAME, PROP_READWRITE_PWD, PROP_STUB_IMPL_CLASS, PROP_SUPERUSER_NAME, PROP_SUPERUSER_PWD, PROP_TESTROOT, PROP_WORKSPACE_NAME, readonly, readwrite, REPOSITORY_FACTORY, RETENTION_POLICY_HOLDER, STUB_IMPL_PROPS, STUB_IMPL_SYS_PROPS, superuser
-
-
Constructor Summary
Constructors Constructor Description JNDIRepositoryStub(Properties env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Principal
getKnownPrincipal(Session session)
Returns aPrincipal
identifiying a known user (not group)Repository
getRepository()
Returns a reference to theRepository
provided by thisRepositoryStub
.Principal
getUnknownPrincipal(Session session)
Returns aPrincipal
identifiying an unknown user.-
Methods inherited from class org.apache.jackrabbit.test.RepositoryStub
getInstance, getProperty, getReadOnlyCredentials, getReadWriteCredentials, getSuperuserCredentials
-
-
-
-
Field Detail
-
REPOSITORY_LOOKUP_PROP
public static final String REPOSITORY_LOOKUP_PROP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JNDIRepositoryStub
public JNDIRepositoryStub(Properties env)
-
-
Method Detail
-
getRepository
public Repository getRepository() throws RepositoryStubException
Returns a reference to theRepository
provided by thisRepositoryStub
.- Specified by:
getRepository
in classRepositoryStub
- Returns:
- Throws:
RepositoryStubException
-
getKnownPrincipal
public Principal getKnownPrincipal(Session session) throws RepositoryException
Description copied from class:RepositoryStub
Returns aPrincipal
identifiying a known user (not group)- Specified by:
getKnownPrincipal
in classRepositoryStub
- Throws:
RepositoryException
-
getUnknownPrincipal
public Principal getUnknownPrincipal(Session session) throws RepositoryException, NotExecutableException
Description copied from class:RepositoryStub
Returns aPrincipal
identifiying an unknown user.- Specified by:
getUnknownPrincipal
in classRepositoryStub
- Throws:
NotExecutableException
- if the implementation can not provide an instance of Principal for unkwnown usersRepositoryException
-
-