Package org.apache.jackrabbit.core
Class JackrabbitRepositoryStub
- java.lang.Object
-
- org.apache.jackrabbit.test.RepositoryStub
-
- org.apache.jackrabbit.core.JackrabbitRepositoryStub
-
public class JackrabbitRepositoryStub extends RepositoryStub
RepositoryStub implementation for Apache Jackrabbit.- Since:
- Apache Jackrabbit 1.6
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROP_REPOSITORY_CONFIG
Property for the repository configuration file.static String
PROP_REPOSITORY_HOME
Property for the repository home directory.-
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 JackrabbitRepositoryStub(Properties settings)
Constructor as required by the JCR TCK.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Repository
createRepository(String dir, String xml)
Principal
getKnownPrincipal(Session session)
protected Repository
getOrCreateRepository(String dir, String xml)
Repository
getRepository()
Returns the configured repository instance.static RepositoryContext
getRepositoryContext(Repository repository)
Principal
getUnknownPrincipal(Session session)
-
Methods inherited from class org.apache.jackrabbit.test.RepositoryStub
getInstance, getProperty, getReadOnlyCredentials, getReadWriteCredentials, getSuperuserCredentials
-
-
-
-
Field Detail
-
PROP_REPOSITORY_CONFIG
public static final String PROP_REPOSITORY_CONFIG
Property for the repository configuration file. Defaults to <repository home>/repository.xml if not specified.- See Also:
- Constant Field Values
-
PROP_REPOSITORY_HOME
public static final String PROP_REPOSITORY_HOME
Property for the repository home directory. Defaults to target/repository for convenience in Maven builds.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JackrabbitRepositoryStub
public JackrabbitRepositoryStub(Properties settings)
Constructor as required by the JCR TCK.- Parameters:
settings
- repository settings
-
-
Method Detail
-
getRepositoryContext
public static RepositoryContext getRepositoryContext(Repository repository)
-
getRepository
public Repository getRepository() throws RepositoryStubException
Returns the configured repository instance.- Specified by:
getRepository
in classRepositoryStub
- Returns:
- the configured repository instance.
- Throws:
RepositoryStubException
- if an error occurs while obtaining the repository instance.
-
createRepository
protected Repository createRepository(String dir, String xml) throws Exception
- Throws:
Exception
-
getOrCreateRepository
protected Repository getOrCreateRepository(String dir, String xml) throws Exception
- Throws:
Exception
-
getKnownPrincipal
public Principal getKnownPrincipal(Session session) throws RepositoryException
- Specified by:
getKnownPrincipal
in classRepositoryStub
- Throws:
RepositoryException
-
getUnknownPrincipal
public Principal getUnknownPrincipal(Session session) throws RepositoryException, NotExecutableException
- Specified by:
getUnknownPrincipal
in classRepositoryStub
- Throws:
RepositoryException
NotExecutableException
-
-