info.magnolia.repository
Class WorkspaceMapping

java.lang.Object
  extended by info.magnolia.repository.WorkspaceMapping

public class WorkspaceMapping
extends Object

Maintains a registry of repositories and a list of mappings from logical workspaces to the real workspaces in the repositories. It also keeps lookup maps of providers and Repository instances for each repository.

Version:
$Id$

Constructor Summary
WorkspaceMapping()
           
 
Method Summary
 void addRepositoryDefinition(RepositoryDefinition repositoryDefinition)
           
 void addWorkspaceMapping(WorkspaceMappingDefinition mapping)
          Adds workspace mapping, if the physical workspace doesn't exist it is added.
 void addWorkspaceMappingDefinition(WorkspaceMappingDefinition definition)
           
 void clearAll()
           
 void clearRepositories()
           
 Collection<String> getLogicalWorkspaceNames()
           
 javax.jcr.Repository getRepository(String repositoryId)
          Returns repository specified by the repositoryID as configured in repository config.
 RepositoryDefinition getRepositoryDefinition(String repositoryId)
          Returns a configured repository definition.
 Collection<RepositoryDefinition> getRepositoryDefinitions()
           
 Provider getRepositoryProvider(String repositoryId)
          Returns repository provider specified by the repositoryID as configured in repository config.
 WorkspaceMappingDefinition getWorkspaceMapping(String logicalWorkspaceName)
           
 Collection<WorkspaceMappingDefinition> getWorkspaceMappings()
           
 void setRepository(String repositoryId, javax.jcr.Repository repository)
           
 void setRepositoryProvider(String repositoryId, Provider provider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceMapping

public WorkspaceMapping()
Method Detail

clearRepositories

public void clearRepositories()

clearAll

public void clearAll()

addRepositoryDefinition

public void addRepositoryDefinition(RepositoryDefinition repositoryDefinition)

addWorkspaceMapping

public void addWorkspaceMapping(WorkspaceMappingDefinition mapping)
Adds workspace mapping, if the physical workspace doesn't exist it is added.


addWorkspaceMappingDefinition

public void addWorkspaceMappingDefinition(WorkspaceMappingDefinition definition)

getRepositoryDefinition

public RepositoryDefinition getRepositoryDefinition(String repositoryId)
Returns a configured repository definition.


getLogicalWorkspaceNames

public Collection<String> getLogicalWorkspaceNames()

getWorkspaceMapping

public WorkspaceMappingDefinition getWorkspaceMapping(String logicalWorkspaceName)

getWorkspaceMappings

public Collection<WorkspaceMappingDefinition> getWorkspaceMappings()

setRepository

public void setRepository(String repositoryId,
                          javax.jcr.Repository repository)

setRepositoryProvider

public void setRepositoryProvider(String repositoryId,
                                  Provider provider)

getRepository

public javax.jcr.Repository getRepository(String repositoryId)
Returns repository specified by the repositoryID as configured in repository config.


getRepositoryProvider

public Provider getRepositoryProvider(String repositoryId)
Returns repository provider specified by the repositoryID as configured in repository config.


getRepositoryDefinitions

public Collection<RepositoryDefinition> getRepositoryDefinitions()


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