info.magnolia.cms.beans.config
Class ContentRepository

java.lang.Object
  extended by info.magnolia.cms.beans.config.ContentRepository

Deprecated. since 4.5 - Use RepositoryConstants, WorkspaceMapping, SessionProviderRegistry instead.

public final class ContentRepository
extends Object

Legacy type - will be dropped with one of the next release.

Version:
$Id$

Field Summary
static String CONFIG
          Deprecated. Use RepositoryConstants.CONFIG instead
static String DEFAULT_WORKSPACE
          Deprecated.  
static String NAMESPACE_PREFIX
          Deprecated. Use RepositoryConstants.NAMESPACE_PREFIX instead
static String NAMESPACE_URI
          Deprecated. Use RepositoryConstants.NAMESPACE_URI instead
static String REPOSITORY_PSWD
          Deprecated. since 4.5 - do not use
static String REPOSITORY_USER
          Deprecated. since 4.5 - do not use
static String USER_GROUPS
          Deprecated. Use RepositoryConstants.USER_GROUPS instead
static String USER_ROLES
          Deprecated. Use RepositoryConstants.USER_ROLES instead
static String USERS
          Deprecated. Use RepositoryConstants.USERS instead
static String VERSION_STORE
          Deprecated. Use RepositoryConstants.VERSION_STORE instead
static String WEBSITE
          Deprecated. Use RepositoryConstants.WEBSITE instead
 
Method Summary
static void addMappedRepositoryName(String logicalWorkspaceName, String repositoryName)
          Deprecated. since 4.5 - use RepositoryManager.addWorkspaceMapping(info.magnolia.repository.definition.WorkspaceMappingDefinition) directly.
static void addMappedRepositoryName(String logicalWorkspaceName, String repositoryName, String workspaceName)
          Deprecated. since 4.5 - use RepositoryManager.addWorkspaceMapping(info.magnolia.repository.definition.WorkspaceMappingDefinition) directly.
static boolean checkIfInitialized()
          Deprecated. since 4.5 - use RepositoryManager.checkIfInitialized() directly.
static boolean checkIfInitialized(String logicalWorkspaceName)
          Deprecated. since 4.5 - use RepositoryManager.checkIfInitialized(String) directly.
static Iterator<String> getAllRepositoryNames()
          Deprecated. since 4.5 - use RepositoryManager.getWorkspaceNames() directly.
static String getDefaultWorkspace(String repositoryId)
          Deprecated. Get default workspace name.
static String getInternalWorkspaceName(String physicalWorkspaceName)
          Deprecated. since 4.5 - do not use.
static String getMappedRepositoryName(String logicalWorkspaceName)
          Deprecated. since 4.5 - use RepositoryManager.getWorkspaceMapping(String).
static String getMappedWorkspaceName(String logicalWorkspaceName)
          Deprecated. since 4.5 - use RepositoryManager.getWorkspaceMapping(String).
static String getParentRepositoryName(String physicalWorkspaceName)
          Deprecated. since 4.5 - do not use.
static javax.jcr.Repository getRepository(String repositoryOrLogicalWorkspace)
          Deprecated. since 4.5 - use RepositoryManager.getRepository(String) directly.
static RepositoryDefinition getRepositoryMapping(String repositoryOrLogicalWorkspace)
          Deprecated. since 4.5 - use RepositoryManager.getRepositoryDefinition(String) directly.
static Provider getRepositoryProvider(String repositoryOrLogicalWorkspace)
          Deprecated. since 4.5 - use RepositoryManager.getRepositoryProvider(String) directly.
static boolean hasRepositoryMapping(String repositoryOrLogicalWorkspace)
          Deprecated. since 4.5 - use RepositoryManager.hasRepository(String) directly.
static void init()
          Deprecated. since 4.5 - use RepositoryManager.init() directly.
static void loadRepository(RepositoryDefinition repositoryDefinition)
          Deprecated. since 4.5 - use RepositoryManager.loadRepository(info.magnolia.repository.definition.RepositoryDefinition) directly.
static void loadWorkspace(String repositoryId, String workspaceName)
          Deprecated. since 4.5 - use RepositoryManager.loadWorkspace(String, String) directly.
static void reload()
          Deprecated. since 4.5 - use RepositoryManager.reload() directly.
static void shutdown()
          Deprecated. since 4.5 - use RepositoryManager.shutdown() directly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEBSITE

public static final String WEBSITE
Deprecated. Use RepositoryConstants.WEBSITE instead
See Also:
Constant Field Values

USERS

public static final String USERS
Deprecated. Use RepositoryConstants.USERS instead
See Also:
Constant Field Values

USER_ROLES

public static final String USER_ROLES
Deprecated. Use RepositoryConstants.USER_ROLES instead
See Also:
Constant Field Values

USER_GROUPS

public static final String USER_GROUPS
Deprecated. Use RepositoryConstants.USER_GROUPS instead
See Also:
Constant Field Values

CONFIG

public static final String CONFIG
Deprecated. Use RepositoryConstants.CONFIG instead
See Also:
Constant Field Values

VERSION_STORE

public static final String VERSION_STORE
Deprecated. Use RepositoryConstants.VERSION_STORE instead
See Also:
Constant Field Values

NAMESPACE_PREFIX

public static final String NAMESPACE_PREFIX
Deprecated. Use RepositoryConstants.NAMESPACE_PREFIX instead
magnolia namespace.

See Also:
Constant Field Values

NAMESPACE_URI

public static final String NAMESPACE_URI
Deprecated. Use RepositoryConstants.NAMESPACE_URI instead
See Also:
Constant Field Values

DEFAULT_WORKSPACE

public static final String DEFAULT_WORKSPACE
Deprecated. 
See Also:
Constant Field Values

REPOSITORY_USER

public static String REPOSITORY_USER
Deprecated. since 4.5 - do not use
Name of the repository admin user.


REPOSITORY_PSWD

public static String REPOSITORY_PSWD
Deprecated. since 4.5 - do not use
Password for the repository admin user.

Method Detail

init

public static void init()
Deprecated. since 4.5 - use RepositoryManager.init() directly.

Loads all configured repositories.


shutdown

public static void shutdown()
Deprecated. since 4.5 - use RepositoryManager.shutdown() directly.

Shuts down all repositories (through Provider instances) and clears all mappings.


checkIfInitialized

public static boolean checkIfInitialized()
                                  throws AccessDeniedException,
                                         javax.jcr.RepositoryException
Deprecated. since 4.5 - use RepositoryManager.checkIfInitialized() directly.

Verify the initialization state of all the workspaces. This methods returns false only if all the workspaces are empty (no node else than the root one).

Returns:
false if all the workspaces are empty, true if at least one of them has content.
Throws:
AccessDeniedException - repository authentication failed
javax.jcr.RepositoryException - exception while accessing the repository

checkIfInitialized

public static boolean checkIfInitialized(String logicalWorkspaceName)
                                  throws javax.jcr.RepositoryException,
                                         AccessDeniedException
Deprecated. since 4.5 - use RepositoryManager.checkIfInitialized(String) directly.

Checks if a workspace has been initialized.

Throws:
javax.jcr.RepositoryException
AccessDeniedException
RuntimeException - if the workspace doesn't exist or has not yet been loaded

reload

public static void reload()
Deprecated. since 4.5 - use RepositoryManager.reload() directly.

Reload all configured repositories.

See Also:
init()

loadRepository

public static void loadRepository(RepositoryDefinition repositoryDefinition)
                           throws RepositoryNotInitializedException,
                                  InstantiationException,
                                  IllegalAccessException,
                                  ClassNotFoundException
Deprecated. since 4.5 - use RepositoryManager.loadRepository(info.magnolia.repository.definition.RepositoryDefinition) directly.

Adds a repository definition and loads it. You must not call this method twice.

Parameters:
repositoryDefinition -
Throws:
RepositoryNotInitializedException
InstantiationException
IllegalAccessException
ClassNotFoundException

loadWorkspace

public static void loadWorkspace(String repositoryId,
                                 String workspaceName)
                          throws javax.jcr.RepositoryException
Deprecated. since 4.5 - use RepositoryManager.loadWorkspace(String, String) directly.

Loads a previously not loaded workspace. If there's no logical workspace defined with the name it is added, if there's no physical workspace name by this name it is added.

Throws:
javax.jcr.RepositoryException

getParentRepositoryName

public static String getParentRepositoryName(String physicalWorkspaceName)
                                      throws javax.jcr.RepositoryException
Deprecated. since 4.5 - do not use.

Returns magnolia specific Repository name where this workspace is registered within . Note: if more than one repository has a physical workspace by this name this method is ambigious as to which it returns

Throws:
javax.jcr.RepositoryException - if no physical workspace exists by that name

getMappedRepositoryName

public static String getMappedRepositoryName(String logicalWorkspaceName)
Deprecated. since 4.5 - use RepositoryManager.getWorkspaceMapping(String).

Returns the name of the repository for a logical workspace name.


getMappedWorkspaceName

public static String getMappedWorkspaceName(String logicalWorkspaceName)
Deprecated. since 4.5 - use RepositoryManager.getWorkspaceMapping(String).

Returns the physical workspace name given a logical workspace name.


addMappedRepositoryName

public static void addMappedRepositoryName(String logicalWorkspaceName,
                                           String repositoryName)
Deprecated. since 4.5 - use RepositoryManager.addWorkspaceMapping(info.magnolia.repository.definition.WorkspaceMappingDefinition) directly.

Adds a workspace mapping.


addMappedRepositoryName

public static void addMappedRepositoryName(String logicalWorkspaceName,
                                           String repositoryName,
                                           String workspaceName)
Deprecated. since 4.5 - use RepositoryManager.addWorkspaceMapping(info.magnolia.repository.definition.WorkspaceMappingDefinition) directly.

Adds a workspace mapping.


getDefaultWorkspace

public static String getDefaultWorkspace(String repositoryId)
Deprecated. 
Get default workspace name.

Returns:
default name if there are no workspaces defined or there is no workspace present with name "default", otherwise return same name as repository name.

getRepository

public static javax.jcr.Repository getRepository(String repositoryOrLogicalWorkspace)
Deprecated. since 4.5 - use RepositoryManager.getRepository(String) directly.

Returns the repository for a repository or a workspace.

Throws:
IllegalArgumentException - if there is no repository or workspace by this name

getRepositoryProvider

public static Provider getRepositoryProvider(String repositoryOrLogicalWorkspace)
Deprecated. since 4.5 - use RepositoryManager.getRepositoryProvider(String) directly.

Returns the repository provider for either a repository or the provider for the repository which contains the workspace.

Throws:
IllegalArgumentException - if there is no repository or workspace by this name

getRepositoryMapping

public static RepositoryDefinition getRepositoryMapping(String repositoryOrLogicalWorkspace)
Deprecated. since 4.5 - use RepositoryManager.getRepositoryDefinition(String) directly.

Returns the repository definition for a repository or the repository for a given workspace.


hasRepositoryMapping

public static boolean hasRepositoryMapping(String repositoryOrLogicalWorkspace)
Deprecated. since 4.5 - use RepositoryManager.hasRepository(String) directly.

Returns true if a mapping for the given repository name or workspace name exist.


getAllRepositoryNames

public static Iterator<String> getAllRepositoryNames()
Deprecated. since 4.5 - use RepositoryManager.getWorkspaceNames() directly.

Gets the names of all logical workspaces.


getInternalWorkspaceName

public static String getInternalWorkspaceName(String physicalWorkspaceName)
Deprecated. since 4.5 - do not use.

Returns the logical workspace name given a physical workspace name. Note that this method will return the FIRST physical workspace it finds with this name. If there are more workspaces with this name it is not defined which is returned.

Returns:
the logical workspace name or if no such logical workspace exists returns the physical workspace name given as an argument


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.