|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.commons.AbstractWorkspace
org.apache.jackrabbit.core.WorkspaceImpl
public class WorkspaceImpl
A WorkspaceImpl
...
Field Summary | |
---|---|
protected CachingHierarchyManager |
hierMgr
The hierarchy mgr that reflects persistent state only (i.e. that is isolated from transient changes made through the session). |
protected LockManager |
lockMgr
The LockManager for this Workspace |
protected ObservationManagerImpl |
obsMgr
The ObservationManager instance for this session. |
protected QueryManagerImpl |
queryManager
The QueryManager for this Workspace . |
protected RepositoryImpl |
rep
The repository that created this workspace instance |
protected SessionImpl |
session
the session that was used to acquire this Workspace |
protected LocalItemStateManager |
stateMgr
The persistent state mgr associated with the workspace represented by this Workspace instance. |
protected JcrVersionManagerImpl |
versionMgr
The API Version manager for this workspace |
protected WorkspaceConfig |
wspConfig
The configuration of this Workspace |
Fields inherited from interface org.apache.jackrabbit.api.jsr283.Workspace |
---|
NAME_ACTIVITIES_NODE, NAME_CONFIGURATIONS_NODE, NAME_JCR_XMLCHARACTERS, NAME_JCR_XMLTEXT, NAME_NODE_TYPES_NODE, NAME_SYSTEM_NODE, NAME_UNFILED_NODE, NAME_VERSION_STORAGE_NODE, NAME_WORKSPACE_ROOT, PATH_ACTIVITIES_NODE, PATH_CONFIGURATIONS_NODE, PATH_NODE_TYPES_NODE, PATH_SYSTEM_NODE, PATH_UNFILED_NODE, PATH_VERSION_STORAGE_NODE, PATH_WORKSPACE_ROOT, RELPATH_JCR_XMLCHARACTERS |
Constructor Summary | |
---|---|
protected |
WorkspaceImpl(WorkspaceConfig wspConfig,
SharedItemStateManager stateMgr,
RepositoryImpl rep,
SessionImpl session)
Protected constructor. |
Method Summary | |
---|---|
void |
clone(String srcWorkspace,
String srcAbsPath,
String destAbsPath,
boolean removeExisting)
|
void |
copy(String srcAbsPath,
String destAbsPath)
|
void |
copy(String srcWorkspace,
String srcAbsPath,
String destAbsPath)
|
EventStateCollection |
createEventStateCollection()
Creates an EventStateCollection . |
protected LocalItemStateManager |
createItemStateManager(SharedItemStateManager shared)
Create the persistent item state manager on top of the shared item state manager. |
void |
createWorkspace(String name)
Creates a new Workspace with the specified
name . |
void |
createWorkspace(String workspaceName,
InputSource configTemplate)
Creates a workspace with the given name and a workspace configuration template. |
void |
createWorkspace(String name,
String srcWorkspace)
Creates a new Workspace with the specified name
initialized with a clone of the content of the workspace
srcWorkspace . |
void |
deleteWorkspace(String name)
Deletes the workspace with the specified name from the
repository, deleting all content within it. |
String[] |
getAccessibleWorkspaceNames()
|
WorkspaceConfig |
getConfig()
Returns the configuration of this workspace. |
EventJournal |
getEventJournal(int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName)
Returns the event journal for this workspace. |
HierarchyManager |
getHierarchyManager()
The hierarchy manager that reflects workspace state only (i.e. that is isolated from transient changes made through the session) |
ContentHandler |
getImportContentHandler(String parentAbsPath,
int uuidBehavior)
|
LockManager |
getInternalLockManager()
Return the lock manager for this workspace. |
LocalItemStateManager |
getItemStateManager()
Returns the item state manager associated with the workspace represented by this WorkspaceImpl instance. |
LockManager |
getLockManager()
Returns the LockManager object, through which locking
methods are accessed. |
String |
getName()
|
NamespaceRegistry |
getNamespaceRegistry()
|
NodeTypeManager |
getNodeTypeManager()
|
ObservationManager |
getObservationManager()
Returns the observation manager of this session. |
QueryManager |
getQueryManager()
|
Session |
getSession()
|
VersionManager |
getVersionManager()
Returns the VersionManager object. |
void |
move(String srcAbsPath,
String destAbsPath)
|
void |
restore(Version[] versions,
boolean removeExisting)
|
void |
sanityCheck()
Performs a sanity check on this workspace and the associated session. |
Methods inherited from class org.apache.jackrabbit.commons.AbstractWorkspace |
---|
importXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jcr.Workspace |
---|
importXML |
Field Detail |
---|
protected final WorkspaceConfig wspConfig
Workspace
protected final RepositoryImpl rep
protected final LocalItemStateManager stateMgr
Workspace
instance.
protected final CachingHierarchyManager hierMgr
protected ObservationManagerImpl obsMgr
ObservationManager
instance for this session.
protected QueryManagerImpl queryManager
QueryManager
for this Workspace
.
protected final SessionImpl session
Workspace
protected LockManager lockMgr
LockManager
for this Workspace
protected JcrVersionManagerImpl versionMgr
Constructor Detail |
---|
protected WorkspaceImpl(WorkspaceConfig wspConfig, SharedItemStateManager stateMgr, RepositoryImpl rep, SessionImpl session)
wspConfig
- The workspace configurationstateMgr
- The shared item state managerrep
- The repositorysession
- The sessionMethod Detail |
---|
public HierarchyManager getHierarchyManager()
public LocalItemStateManager getItemStateManager()
WorkspaceImpl
instance.
public void sanityCheck() throws RepositoryException
RepositoryException
- if this workspace has been rendered invalid
for some reasonpublic void createWorkspace(String name, String srcWorkspace) throws AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException
Workspace
with the specified name
initialized with a clone
of the content of the workspace
srcWorkspace
. Semantically, this method is equivalent to
creating a new workspace and manually cloning srcWorkspace
to it; however, this method may assist some implementations in optimizing
subsequent Node.update
and Node.merge
calls
between the new workspace and its source.
The new workspace can be accessed through a login
specifying its name.
Throws an AccessDeniedException
if the session through which
this Workspace
object was acquired does not have permission
to create the new workspace.
Throws an UnsupportedRepositoryOperationException
if the repository does
not support the creation of workspaces.
A RepositoryException
is thrown if another error occurs.
name
- A String
, the name of the new workspace.srcWorkspace
- The name of the workspace from which the new workspace is to be cloned.
AccessDeniedException
- if the session through which
this Workspace
object was acquired does not have permission
to create the new workspace.
UnsupportedRepositoryOperationException
- if the repository does
not support the creation of workspaces.
RepositoryException
- if another error occurs.public void deleteWorkspace(String name) throws AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException
name
from the
repository, deleting all content within it.
Throws an AccessDeniedException
if the session through which
this Workspace
object was acquired does not have permission
to remove the workspace.
Throws an UnsupportedRepositoryOperationException
if the
repository does not support the removal of workspaces.
name
- A String
, the name of the workspace to be deleted.
AccessDeniedException
- if the session through which
this Workspace
object was acquired does not have permission
to remove the workspace.
UnsupportedRepositoryOperationException
- if the
repository does not support the removal of workspaces.
RepositoryException
- if another error occurs.public LockManager getLockManager() throws UnsupportedRepositoryOperationException, RepositoryException
Workspace
LockManager
object, through which locking
methods are accessed.
LockManager
object.
UnsupportedRepositoryOperationException
- if the implementation
does not support locking.
RepositoryException
- if an error occurs.Workspace.getLockManager()
,
LockManager
public VersionManager getVersionManager() throws UnsupportedRepositoryOperationException, RepositoryException
Workspace
VersionManager
object.
If the implementation does not support versioning, an
UnsupportedRepositoryOperationException
is thrown.
VersionManager
object.
UnsupportedRepositoryOperationException
- if the implementation does
not support versioning.
RepositoryException
- if an error occurs.Workspace.getVersionManager()
public void createWorkspace(String name) throws AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException
Workspace
with the specified
name
. The new workspace is empty, meaning it contains only
root node.
The new workspace can be accessed through a login
specifying its name.
Throws an AccessDeniedException
if the session through which
this Workspace
object was acquired does not have permission
to create the new workspace.
Throws an UnsupportedRepositoryOperationException
if the repository does
not support the creation of workspaces.
A RepositoryException
is thrown if another error occurs.
createWorkspace
in interface JackrabbitWorkspace
name
- A String
, the name of the new workspace.
AccessDeniedException
- if the session through which
this Workspace
object was acquired does not have permission
to create the new workspace.
UnsupportedRepositoryOperationException
- if the repository does
not support the creation of workspaces.
RepositoryException
- if another error occurs.Workspace.getAccessibleWorkspaceNames()
public void createWorkspace(String workspaceName, InputSource configTemplate) throws AccessDeniedException, RepositoryException
createWorkspace
in interface JackrabbitWorkspace
workspaceName
- name of the new workspaceconfigTemplate
- the configuration template of the new workspace
AccessDeniedException
- if the current session is not allowed to
create the workspace
RepositoryException
- if a workspace with the given name
already exists or if another error occursgetAccessibleWorkspaceNames()
public WorkspaceConfig getConfig()
public LockManager getInternalLockManager() throws RepositoryException
RepositoryException
- if an error occurspublic String getName()
getName
in interface Workspace
public Session getSession()
getSession
in interface Workspace
public NamespaceRegistry getNamespaceRegistry() throws RepositoryException
getNamespaceRegistry
in interface Workspace
RepositoryException
public NodeTypeManager getNodeTypeManager() throws RepositoryException
getNodeTypeManager
in interface Workspace
RepositoryException
public void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException
clone
in interface Workspace
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
public void copy(String srcAbsPath, String destAbsPath) throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException
copy
in interface Workspace
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
public void copy(String srcWorkspace, String srcAbsPath, String destAbsPath) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException
copy
in interface Workspace
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
public void move(String srcAbsPath, String destAbsPath) throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException
move
in interface Workspace
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
public ObservationManager getObservationManager() throws RepositoryException
getObservationManager
in interface Workspace
RepositoryException
- if a repository error occurspublic EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) throws RepositoryException
eventTypes
- A combination of one or more event type constants encoded as a bitmask.absPath
- an absolute path.isDeep
- a boolean
.uuid
- array of UUIDs.nodeTypeName
- array of node type names.
UnsupportedRepositoryOperationException
- if this repository does
not support an event journal (cluster journal disabled).
RepositoryException
- if another error occurs.public QueryManager getQueryManager() throws RepositoryException
getQueryManager
in interface Workspace
RepositoryException
public void restore(Version[] versions, boolean removeExisting) throws ItemExistsException, UnsupportedRepositoryOperationException, VersionException, LockException, InvalidItemStateException, RepositoryException
restore
in interface Workspace
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
LockException
InvalidItemStateException
RepositoryException
public String[] getAccessibleWorkspaceNames() throws RepositoryException
getAccessibleWorkspaceNames
in interface Workspace
RepositoryException
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException
getImportContentHandler
in interface Workspace
PathNotFoundException
ConstraintViolationException
VersionException
LockException
RepositoryException
protected LocalItemStateManager createItemStateManager(SharedItemStateManager shared)
shared
- shared item state manager
public EventStateCollection createEventStateCollection() throws RepositoryException
EventStateCollection
.
Implemented in this object and forwarded rather than obsMgr
since creation of the latter is lazy.
createEventStateCollection
in interface EventStateCollectionFactory
EventStateCollection
RepositoryException
- if creation fails for some reason
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |