|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.ocm.nodemanagement.impl.RepositoryUtil
public class RepositoryUtil
Utility class for managing JCR repositories. Note: most of the utility methods in this class can be used only with Jackrabbit.
| Field Summary | |
|---|---|
static java.lang.String |
OCM_NAMESPACE
namespace constant |
static java.lang.String |
OCM_NAMESPACE_PREFIX
namespace prefix constant |
static java.lang.String |
PATH_SEPARATOR
Item path separator |
| Constructor Summary | |
|---|---|
RepositoryUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
encodePath(java.lang.String path)
Encode a path |
static javax.jcr.Repository |
getRepository(java.lang.String repositoryName)
Get a repository |
static javax.jcr.Session |
login(javax.jcr.Repository repository,
java.lang.String user,
java.lang.String password)
Connect to a JCR repository |
static void |
registerRepository(java.lang.String repositoryName,
java.lang.String configFile,
java.lang.String homeDir)
Register a new repository |
static void |
setupSession(javax.jcr.Session session)
Setup the session. |
static void |
unRegisterRepository(java.lang.String repositoryName)
Unregister a repository |
| 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 OCM_NAMESPACE_PREFIX
public static final java.lang.String OCM_NAMESPACE
public static final java.lang.String PATH_SEPARATOR
| Constructor Detail |
|---|
public RepositoryUtil()
| Method Detail |
|---|
public static void registerRepository(java.lang.String repositoryName,
java.lang.String configFile,
java.lang.String homeDir)
repositoryName - The repository unique nameconfigFile - The JCR config filehomeDir - The directory containing the complete repository settings (workspace, node types, ...)
RepositoryException - when it is not possible to register the repository
public static void unRegisterRepository(java.lang.String repositoryName)
throws RepositoryException
repositoryName - The repository unique name
RepositoryException - when it is not possible to unregister the repository
public static javax.jcr.Repository getRepository(java.lang.String repositoryName)
throws RepositoryException
repositoryName - The repository name
RepositoryException - when it is not possible to get the repository.
Before calling this method, the repository has to be registered (@see RepositoryUtil#registerRepository(String, String, String)
public static javax.jcr.Session login(javax.jcr.Repository repository,
java.lang.String user,
java.lang.String password)
throws RepositoryException
repository - The JCR repositoryuser - The user namepassword - The password
RepositoryException - when it is not possible to connect to the JCR repository
public static void setupSession(javax.jcr.Session session)
throws RepositoryException
RepositoryExceptionpublic static java.lang.String encodePath(java.lang.String path)
path - the path to encode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||