|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.beans.config.ContentRepository
public final class ContentRepository
TODO needs serious refactoring and cleanup.
Field Summary | |
---|---|
static String |
CONFIG
|
static String |
DEFAULT_WORKSPACE
|
static String |
NAMESPACE_PREFIX
magnolia namespace. |
static String |
NAMESPACE_URI
|
static String |
REPOSITORY_PSWD
repository default password. |
static String |
REPOSITORY_USER
repository user. |
static String |
USER_GROUPS
|
static String |
USER_ROLES
|
static String |
USERS
|
static String |
VERSION_STORE
|
static String |
WEBSITE
default repository ID's. |
Method Summary | |
---|---|
static void |
addMappedRepositoryName(String name,
String repositoryName)
Add a mapped repository name. |
static void |
addMappedRepositoryName(String name,
String repositoryName,
String workspaceName)
Add a mapped repository name. |
static boolean |
checkIfInitialized()
Verify the initialization state of all the repositories. |
static boolean |
checkIfInitialized(String repository)
|
static Iterator |
getAllRepositoryNames()
Gets repository names array as configured in repositories.xml. |
static String |
getDefaultWorkspace(String repositoryId)
Get default workspace name. |
static String |
getInternalWorkspaceName(String workspaceName)
get internal workspace name. |
static String |
getMappedRepositoryName(String name)
Get mapped repository name. |
static String |
getMappedWorkspaceName(String name)
Get mapped workspace name. |
static String |
getParentRepositoryName(String workspaceName)
Returns magnolia specific Repository name where this workspace is registered within |
static javax.jcr.Repository |
getRepository(String repositoryID)
Returns repository specified by the repositoryID as configured in repository config. |
static RepositoryMapping |
getRepositoryMapping(String repositoryID)
returns repository mapping as configured. |
static Provider |
getRepositoryProvider(String repositoryID)
Returns repository provider specified by the repositoryID as configured in repository config. |
static boolean |
hasRepositoryMapping(String repositoryID)
Returns true if a mapping for the given repository name does exist. |
static void |
init()
loads all configured repository using ID as Key, as configured in repositories.xml. |
static void |
loadRepository(RepositoryMapping map)
This method initializes the repository. |
static void |
loadWorkspace(String repositoryId,
String workspaceId)
|
static void |
reload()
Re-load all configured repositories. |
static void |
shutdown()
Shuts down all repositories (through Provider instances) and clears all mappings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WEBSITE
public static final String USERS
public static final String USER_ROLES
public static final String USER_GROUPS
public static final String CONFIG
public static final String DEFAULT_WORKSPACE
public static final String VERSION_STORE
public static final String NAMESPACE_PREFIX
public static final String NAMESPACE_URI
public static String REPOSITORY_USER
public static String REPOSITORY_PSWD
Method Detail |
---|
public static void init()
<Repository name="website" id="website" provider="info.magnolia.jackrabbit.ProviderImpl" loadOnStartup="true" > <param name="configFile" value="WEB-INF/config/repositories/website.xml"/> <param name="repositoryHome" value="repositories/website"/> <param name="contextFactoryClass" value="org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory"/> <param name="providerURL" value="localhost"/> <param name="id" value="website"/> </Repository>
public static void shutdown()
public static boolean checkIfInitialized() throws AccessDeniedException, javax.jcr.RepositoryException
false
only if
all the repositories are empty (no node else than the root one).
false
if all the repositories are empty, true
if at least one of them has
content.
AccessDeniedException
- repository authentication failed
javax.jcr.RepositoryException
- exception while accessing the repositorypublic static boolean checkIfInitialized(String repository) throws javax.jcr.RepositoryException, AccessDeniedException
repository
-
javax.jcr.RepositoryException
AccessDeniedException
public static void reload()
init()
public static void loadRepository(RepositoryMapping map) throws RepositoryNotInitializedException, InstantiationException, IllegalAccessException, ClassNotFoundException
map
-
RepositoryNotInitializedException
InstantiationException
IllegalAccessException
ClassNotFoundException
public static void loadWorkspace(String repositoryId, String workspaceId) throws javax.jcr.RepositoryException
repositoryId
- workspaceId
-
javax.jcr.RepositoryException
public static String getParentRepositoryName(String workspaceName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static String getMappedRepositoryName(String name)
name
-
public static String getMappedWorkspaceName(String name)
name
-
public static void addMappedRepositoryName(String name, String repositoryName)
name
- repositoryName
- public static void addMappedRepositoryName(String name, String repositoryName, String workspaceName)
name
- repositoryName
- workspaceName
- public static String getDefaultWorkspace(String repositoryId)
public static javax.jcr.Repository getRepository(String repositoryID)
repositoryID
as configured in repository config.
public static Provider getRepositoryProvider(String repositoryID)
repositoryID
as configured in repository config.
public static RepositoryMapping getRepositoryMapping(String repositoryID)
public static boolean hasRepositoryMapping(String repositoryID)
true
if a mapping for the given repository name does exist.
public static Iterator getAllRepositoryNames()
public static String getInternalWorkspaceName(String workspaceName)
workspaceName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |