|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.jcr2spi.WorkspaceManager
public class WorkspaceManager
WorkspaceManager...
| Field Summary |
|---|
| Fields inherited from interface org.apache.jackrabbit.jcr2spi.security.AccessManager |
|---|
ADD_NODE_ACTION, READ, READ_ACTION, REMOVE, REMOVE_ACTION, SET_PROPERTY_ACTION |
| Constructor Summary | |
|---|---|
WorkspaceManager(RepositoryService service,
SessionInfo sessionInfo,
CacheBehaviour cacheBehaviour,
int pollTimeout,
boolean enableObservation)
|
|
| Method Summary | |
|---|---|
void |
addEventListener(InternalEventListener listener)
Sets the InternalEventListener that gets notifications about
local and external changes. |
void |
addLockToken(java.lang.String lt)
This method succeeds if the lock tokens could be added to the SessionInfo. |
boolean |
canAccess(java.lang.String workspaceName)
Determines whether the subject of the current context is granted access to the given workspace. |
boolean |
canRead(ItemState itemState)
Returns true if the existing item with the given ItemId can
be read. |
boolean |
canRemove(ItemState itemState)
Returns true if the existing item state can be removed. |
java.lang.String[] |
checkQueryStatement(java.lang.String statement,
java.lang.String language,
java.util.Map<java.lang.String,java.lang.String> namespaces)
Checks if the query statement is valid. |
EventFilter |
createEventFilter(int eventTypes,
Path path,
boolean isDeep,
java.lang.String[] uuids,
Name[] nodeTypes,
boolean noLocal)
Creates an event filter based on the parameters available in ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean). |
void |
dispose()
Dispose this WorkspaceManager |
void |
execute(ChangeLog changes)
Creates a new batch from the given ChangeLog and executes it. |
void |
execute(Operation operation)
Creates a new batch from the single workspace operation and executes it. |
QueryInfo |
executeQuery(java.lang.String statement,
java.lang.String language,
java.util.Map<java.lang.String,java.lang.String> namespaces,
long limit,
long offset,
java.util.Map<java.lang.String,QValue> boundValues)
|
EffectiveNodeTypeProvider |
getEffectiveNodeTypeProvider()
|
EventBundle |
getEvents(EventFilter filter,
long after)
Returns the events from the journal that occurred after a given date. |
HierarchyManager |
getHierarchyManager()
|
IdFactory |
getIdFactory()
|
ItemDefinitionProvider |
getItemDefinitionProvider()
|
ItemStateFactory |
getItemStateFactory()
|
LockInfo |
getLockInfo(NodeId nodeId)
|
java.lang.String[] |
getLockTokens()
Returns the lock tokens present with the SessionInfo. |
NameFactory |
getNameFactory()
|
NamespaceRegistryImpl |
getNamespaceRegistryImpl()
|
NodeTypeRegistry |
getNodeTypeRegistry()
|
PathFactory |
getPathFactory()
|
java.lang.String |
getPrefix(java.lang.String uri)
|
java.util.Map<java.lang.String,java.lang.String> |
getRegisteredNamespaces()
|
java.lang.String[] |
getSupportedQueryLanguages()
|
java.lang.String |
getURI(java.lang.String prefix)
|
java.lang.String[] |
getWorkspaceNames()
|
boolean |
isGranted(ItemState itemState,
java.lang.String[] actions)
Determines whether the specified permissions are granted
on the item with the specified path. |
boolean |
isGranted(NodeState parentState,
Path relPath,
java.lang.String[] actions)
Determines whether the specified permissions are granted
on the item with the specified path. |
void |
registerNamespace(java.lang.String prefix,
java.lang.String uri)
|
void |
removeEventListener(InternalEventListener listener)
|
void |
removeLockToken(java.lang.String lt)
Tries to remove the given token from the SessionInfo. |
void |
setUserData(java.lang.String userData)
|
void |
unregisterNamespace(java.lang.String uri)
|
void |
updateEventFilters()
Updates the event filters on the subscription. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorkspaceManager(RepositoryService service,
SessionInfo sessionInfo,
CacheBehaviour cacheBehaviour,
int pollTimeout,
boolean enableObservation)
throws RepositoryException
RepositoryException| Method Detail |
|---|
public NamespaceRegistryImpl getNamespaceRegistryImpl()
public NodeTypeRegistry getNodeTypeRegistry()
public ItemDefinitionProvider getItemDefinitionProvider()
public EffectiveNodeTypeProvider getEffectiveNodeTypeProvider()
public HierarchyManager getHierarchyManager()
public java.lang.String[] getWorkspaceNames()
throws RepositoryException
RepositoryExceptionpublic IdFactory getIdFactory()
public NameFactory getNameFactory()
public PathFactory getPathFactory()
public ItemStateFactory getItemStateFactory()
public LockInfo getLockInfo(NodeId nodeId)
throws RepositoryException
RepositoryException
public java.lang.String[] getLockTokens()
throws UnsupportedRepositoryOperationException,
RepositoryException
SessionInfo.
SessionInfo.
UnsupportedRepositoryOperationException
RepositoryExceptionSessionInfo.getLockTokens()
public void addLockToken(java.lang.String lt)
throws UnsupportedRepositoryOperationException,
LockException,
RepositoryException
SessionInfo.
lt -
UnsupportedRepositoryOperationException
LockException
RepositoryExceptionSessionInfo.addLockToken(String)
public void removeLockToken(java.lang.String lt)
throws UnsupportedRepositoryOperationException,
LockException,
RepositoryException
SessionInfo.
lt -
UnsupportedRepositoryOperationException
LockException
RepositoryExceptionSessionInfo.removeLockToken(String)
public java.lang.String[] getSupportedQueryLanguages()
throws RepositoryException
RepositoryException
public java.lang.String[] checkQueryStatement(java.lang.String statement,
java.lang.String language,
java.util.Map<java.lang.String,java.lang.String> namespaces)
throws InvalidQueryException,
RepositoryException
statement - the query statement.language - the query language.namespaces - the locally remapped namespaces which might be used in
the query statement.
InvalidQueryException - if the query statement is invalid.
RepositoryException - if an error occurs while checking the query
statement.
public QueryInfo executeQuery(java.lang.String statement,
java.lang.String language,
java.util.Map<java.lang.String,java.lang.String> namespaces,
long limit,
long offset,
java.util.Map<java.lang.String,QValue> boundValues)
throws RepositoryException
statement - the query statement.language - the query language.namespaces - the locally remapped namespaces which might be used in
the query statement.limit - offset - boundValues -
RepositoryException
public void addEventListener(InternalEventListener listener)
throws RepositoryException
InternalEventListener that gets notifications about
local and external changes.
listener - the new listener.
RepositoryException - if the listener cannot be registered.
public void updateEventFilters()
throws RepositoryException
RepositoryException
public void removeEventListener(InternalEventListener listener)
throws RepositoryException
listener -
RepositoryException
public EventFilter createEventFilter(int eventTypes,
Path path,
boolean isDeep,
java.lang.String[] uuids,
Name[] nodeTypes,
boolean noLocal)
throws UnsupportedRepositoryOperationException,
RepositoryException
ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean).
eventTypes - A combination of one or more event type constants
encoded as a bitmask.path - an absolute path.isDeep - a boolean.uuids - array of UUIDs.nodeTypes - array of node type names.noLocal - a boolean.
UnsupportedRepositoryOperationException - if this implementation does not support observation.
RepositoryException
public EventBundle getEvents(EventFilter filter,
long after)
throws RepositoryException,
UnsupportedRepositoryOperationException
filter - the event filter to apply.after - a date in milliseconds.
RepositoryException - if an error occurs.
UnsupportedRepositoryOperationException - if the implementation does not support
journaled observation.
public void setUserData(java.lang.String userData)
throws RepositoryException
userData -
RepositoryException
public void execute(Operation operation)
throws RepositoryException
execute in interface UpdatableItemStateManagerRepositoryExceptionUpdatableItemStateManager.execute(Operation)
public void execute(ChangeLog changes)
throws RepositoryException
ChangeLog and executes it.
execute in interface UpdatableItemStateManagerchanges -
RepositoryExceptionpublic void dispose()
WorkspaceManager
dispose in interface UpdatableItemStateManager
public boolean isGranted(NodeState parentState,
Path relPath,
java.lang.String[] actions)
throws ItemNotFoundException,
RepositoryException
AccessManagerpermissions are granted
on the item with the specified path.
isGranted in interface AccessManagerparentState - The node state of the next existing ancestor.relPath - The relative path pointing to the non-existing target item.actions - An array of actions that need to be checked.
true if the actions are granted; otherwise false
ItemNotFoundException - if the target item does not exist
RepositoryException - if another error occursAccessManager.isGranted(NodeState, Path, String[])
public boolean isGranted(ItemState itemState,
java.lang.String[] actions)
throws ItemNotFoundException,
RepositoryException
AccessManagerpermissions are granted
on the item with the specified path.
isGranted in interface AccessManageractions - An array of actions that need to be checked.
true if the actions are granted; otherwise false
ItemNotFoundException - if the target item does not exist
RepositoryException - if another error occursAccessManager.isGranted(ItemState, String[])
public boolean canRead(ItemState itemState)
throws ItemNotFoundException,
RepositoryException
AccessManagerItemId can
be read.
canRead in interface AccessManagerItemNotFoundException
RepositoryExceptionAccessManager.canRead(ItemState)
public boolean canRemove(ItemState itemState)
throws ItemNotFoundException,
RepositoryException
AccessManager
canRemove in interface AccessManagerItemNotFoundException
RepositoryExceptionAccessManager.canRemove(ItemState)
public boolean canAccess(java.lang.String workspaceName)
throws NoSuchWorkspaceException,
RepositoryException
AccessManager
canAccess in interface AccessManagerworkspaceName - name of workspace
true if the subject of the current context is
granted access to the given workspace; otherwise false.
NoSuchWorkspaceException - if a workspace with the given name does not exist.
RepositoryException - if another error occursAccessManager.canAccess(String)
public java.util.Map<java.lang.String,java.lang.String> getRegisteredNamespaces()
throws RepositoryException
getRegisteredNamespaces in interface NamespaceStorageRepositoryException
public java.lang.String getPrefix(java.lang.String uri)
throws NamespaceException,
RepositoryException
getPrefix in interface NamespaceStorageNamespaceException
RepositoryException
public java.lang.String getURI(java.lang.String prefix)
throws NamespaceException,
RepositoryException
getURI in interface NamespaceStorageNamespaceException
RepositoryException
public void registerNamespace(java.lang.String prefix,
java.lang.String uri)
throws NamespaceException,
UnsupportedRepositoryOperationException,
AccessDeniedException,
RepositoryException
registerNamespace in interface NamespaceStorageNamespaceException
UnsupportedRepositoryOperationException
AccessDeniedException
RepositoryException
public void unregisterNamespace(java.lang.String uri)
throws NamespaceException,
UnsupportedRepositoryOperationException,
AccessDeniedException,
RepositoryException
unregisterNamespace in interface NamespaceStorageNamespaceException
UnsupportedRepositoryOperationException
AccessDeniedException
RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||