|
||||||||||
| 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. |
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 WorkspaceConfig |
wspConfig
The configuration of this Workspace |
| Constructor Summary | |
|---|---|
protected |
WorkspaceImpl(WorkspaceConfig wspConfig,
SharedItemStateManager stateMgr,
RepositoryImpl rep,
SessionImpl session)
Protected constructor. |
| Method Summary | |
|---|---|
void |
clone(java.lang.String srcWorkspace,
java.lang.String srcAbsPath,
java.lang.String destAbsPath,
boolean removeExisting)
|
void |
copy(java.lang.String srcAbsPath,
java.lang.String destAbsPath)
|
void |
copy(java.lang.String srcWorkspace,
java.lang.String srcAbsPath,
java.lang.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(java.lang.String name)
Creates a new Workspace with the specified
name. |
void |
createWorkspace(java.lang.String workspaceName,
org.xml.sax.InputSource configTemplate)
Creates a workspace with the given name and a workspace configuration template. |
void |
createWorkspace(java.lang.String name,
java.lang.String srcWorkspace)
Creates a new Workspace with the specified name
initialized with a clone of the content of the workspace
srcWorkspace. |
void |
deleteWorkspace(java.lang.String name)
Deletes the workspace with the specified name from the
repository, deleting all content within it. |
java.lang.String[] |
getAccessibleWorkspaceNames()
|
WorkspaceConfig |
getConfig()
Returns the configuration of this workspace. |
HierarchyManager |
getHierarchyManager()
The hierarchy manager that reflects workspace state only (i.e. |
org.xml.sax.ContentHandler |
getImportContentHandler(java.lang.String parentAbsPath,
int uuidBehavior)
|
LocalItemStateManager |
getItemStateManager()
Returns the item state manager associated with the workspace represented by this WorkspaceImpl instance. |
LockManager |
getLockManager()
Return the lock manager for this workspace. |
java.lang.String |
getName()
|
javax.jcr.NamespaceRegistry |
getNamespaceRegistry()
|
javax.jcr.nodetype.NodeTypeManager |
getNodeTypeManager()
|
javax.jcr.observation.ObservationManager |
getObservationManager()
Returns the observation manager of this session. |
javax.jcr.query.QueryManager |
getQueryManager()
|
javax.jcr.Session |
getSession()
|
void |
move(java.lang.String srcAbsPath,
java.lang.String destAbsPath)
|
void |
restore(javax.jcr.version.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
| Constructor Detail |
|---|
protected WorkspaceImpl(WorkspaceConfig wspConfig,
SharedItemStateManager stateMgr,
RepositoryImpl rep,
SessionImpl session)
wspConfig - The workspace configurationstateMgr - The shared item state managerrep - The repositorysession - The session| Method Detail |
|---|
public HierarchyManager getHierarchyManager()
public LocalItemStateManager getItemStateManager()
WorkspaceImpl instance.
public void sanityCheck()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if this workspace has been rendered invalid
for some reason
public void createWorkspace(java.lang.String name,
java.lang.String srcWorkspace)
throws javax.jcr.AccessDeniedException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.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.
javax.jcr.AccessDeniedException - if the session through which
this Workspace object was acquired does not have permission
to create the new workspace.
javax.jcr.UnsupportedRepositoryOperationException - if the repository does
not support the creation of workspaces.
javax.jcr.RepositoryException - if another error occurs.
public void deleteWorkspace(java.lang.String name)
throws javax.jcr.AccessDeniedException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.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.
javax.jcr.AccessDeniedException - if the session through which
this Workspace object was acquired does not have permission
to remove the workspace.
javax.jcr.UnsupportedRepositoryOperationException - if the
repository does not support the removal of workspaces.
javax.jcr.RepositoryException - if another error occurs.
public void createWorkspace(java.lang.String name)
throws javax.jcr.AccessDeniedException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.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 JackrabbitWorkspacename - A String, the name of the new workspace.
javax.jcr.AccessDeniedException - if the session through which
this Workspace object was acquired does not have permission
to create the new workspace.
javax.jcr.UnsupportedRepositoryOperationException - if the repository does
not support the creation of workspaces.
javax.jcr.RepositoryException - if another error occurs.Workspace.getAccessibleWorkspaceNames()
public void createWorkspace(java.lang.String workspaceName,
org.xml.sax.InputSource configTemplate)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
createWorkspace in interface JackrabbitWorkspaceworkspaceName - name of the new workspaceconfigTemplate - the configuration template of the new workspace
javax.jcr.AccessDeniedException - if the current session is not allowed to
create the workspace
javax.jcr.RepositoryException - if a workspace with the given name
already exists or if another error occursgetAccessibleWorkspaceNames()public WorkspaceConfig getConfig()
public LockManager getLockManager()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if an error occurspublic java.lang.String getName()
getName in interface javax.jcr.Workspacepublic javax.jcr.Session getSession()
getSession in interface javax.jcr.Workspace
public javax.jcr.NamespaceRegistry getNamespaceRegistry()
throws javax.jcr.RepositoryException
getNamespaceRegistry in interface javax.jcr.Workspacejavax.jcr.RepositoryException
public javax.jcr.nodetype.NodeTypeManager getNodeTypeManager()
throws javax.jcr.RepositoryException
getNodeTypeManager in interface javax.jcr.Workspacejavax.jcr.RepositoryException
public void clone(java.lang.String srcWorkspace,
java.lang.String srcAbsPath,
java.lang.String destAbsPath,
boolean removeExisting)
throws javax.jcr.NoSuchWorkspaceException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.version.VersionException,
javax.jcr.AccessDeniedException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
clone in interface javax.jcr.Workspacejavax.jcr.NoSuchWorkspaceException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
public void copy(java.lang.String srcAbsPath,
java.lang.String destAbsPath)
throws javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.version.VersionException,
javax.jcr.AccessDeniedException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
copy in interface javax.jcr.Workspacejavax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
public void copy(java.lang.String srcWorkspace,
java.lang.String srcAbsPath,
java.lang.String destAbsPath)
throws javax.jcr.NoSuchWorkspaceException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.version.VersionException,
javax.jcr.AccessDeniedException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
copy in interface javax.jcr.Workspacejavax.jcr.NoSuchWorkspaceException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
public void move(java.lang.String srcAbsPath,
java.lang.String destAbsPath)
throws javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.version.VersionException,
javax.jcr.AccessDeniedException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
move in interface javax.jcr.Workspacejavax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
public javax.jcr.observation.ObservationManager getObservationManager()
throws javax.jcr.RepositoryException
getObservationManager in interface javax.jcr.Workspacejavax.jcr.RepositoryException - if a repository error occurs
public javax.jcr.query.QueryManager getQueryManager()
throws javax.jcr.RepositoryException
getQueryManager in interface javax.jcr.Workspacejavax.jcr.RepositoryException
public void restore(javax.jcr.version.Version[] versions,
boolean removeExisting)
throws javax.jcr.ItemExistsException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
restore in interface javax.jcr.Workspacejavax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
public java.lang.String[] getAccessibleWorkspaceNames()
throws javax.jcr.RepositoryException
getAccessibleWorkspaceNames in interface javax.jcr.Workspacejavax.jcr.RepositoryException
public org.xml.sax.ContentHandler getImportContentHandler(java.lang.String parentAbsPath,
int uuidBehavior)
throws javax.jcr.PathNotFoundException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
getImportContentHandler in interface javax.jcr.Workspacejavax.jcr.PathNotFoundException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.RepositoryExceptionprotected LocalItemStateManager createItemStateManager(SharedItemStateManager shared)
shared - shared item state manager
public EventStateCollection createEventStateCollection()
throws javax.jcr.RepositoryException
EventStateCollection.
Implemented in this object and forwarded rather than obsMgr
since creation of the latter is lazy.
createEventStateCollection in interface EventStateCollectionFactoryEventStateCollection
javax.jcr.RepositoryException - if creation fails for some reason
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||