|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.commons.AbstractSession
org.apache.jackrabbit.core.SessionImpl
public class SessionImpl
A SessionImpl ...
| Field Summary | |
|---|---|
protected AccessManager |
accessMgr
the AccessManager associated with this session |
static java.lang.String |
ADD_NODE_ACTION
TODO deprecate as soon as present with Session interface (JSR 283) |
protected boolean |
alive
flag indicating whether this session is alive |
protected java.util.HashMap |
attributes
the attributes of this session |
protected HierarchyManager |
hierMgr
the HierarchyManager associated with this session |
protected ItemManager |
itemMgr
the item mgr associated with this session |
protected SessionItemStateManager |
itemStateMgr
the item state mgr associated with this session |
protected java.util.Map |
listeners
Listeners (weak references) |
protected java.util.Set |
lockTokens
Lock tokens |
protected AuthContext |
loginContext
the AuthContext of this session (can be null if this session was not instantiated through a login process) |
protected NamePathResolver |
namePathResolver
Name and Path resolver |
protected NodeTypeManagerImpl |
ntMgr
the node type manager |
static java.lang.String |
READ_ACTION
TODO deprecate as soon as present with Session interface (JSR 283) |
static java.lang.String |
REMOVE_ACTION
TODO deprecate as soon as present with Session interface (JSR 283) |
protected RepositoryImpl |
rep
the repository that issued this session |
static java.lang.String |
SET_PROPERTY_ACTION
TODO deprecate as soon as present with Session interface (JSR 283) |
protected javax.security.auth.Subject |
subject
the Subject of this session |
protected java.lang.String |
userId
the user ID that was used to acquire this session |
protected javax.jcr.ValueFactory |
valueFactory
value factory |
protected VersionManager |
versionMgr
The version manager for this session |
protected WorkspaceImpl |
wsp
the Workspace associated with this session |
| Constructor Summary | |
|---|---|
protected |
SessionImpl(RepositoryImpl rep,
AuthContext loginContext,
WorkspaceConfig wspConfig)
Protected constructor. |
protected |
SessionImpl(RepositoryImpl rep,
javax.security.auth.Subject subject,
WorkspaceConfig wspConfig)
Protected constructor. |
| Method Summary | |
|---|---|
void |
addListener(SessionListener listener)
Add a SessionListener |
void |
addLockToken(java.lang.String lt)
|
void |
addLockToken(java.lang.String lt,
boolean notify)
Internal implementation of addLockToken(String). |
void |
checkPermission(java.lang.String absPath,
java.lang.String actions)
|
protected AccessManager |
createAccessManager(javax.security.auth.Subject subject,
HierarchyManager hierarchyManager)
Create the access manager. |
GarbageCollector |
createDataStoreGarbageCollector()
Create a data store garbage collector for this repository. |
protected ItemManager |
createItemManager(SessionItemStateManager itemStateMgr,
HierarchyManager hierMgr)
Create the item manager. |
javax.jcr.Session |
createSession(java.lang.String workspaceName)
Creates a new session with the same subject as this sessions but to a different workspace. |
protected SessionItemStateManager |
createSessionItemStateManager(LocalItemStateManager manager)
Create the session item state manager. |
protected VersionManager |
createVersionManager(RepositoryImpl rep)
Create the version manager. |
protected void |
createWorkspace(java.lang.String workspaceName)
Creates a workspace with the given name. |
protected void |
createWorkspace(java.lang.String workspaceName,
org.xml.sax.InputSource configTemplate)
Creates a workspace with the given name and a workspace configuration template. |
protected WorkspaceImpl |
createWorkspaceInstance(WorkspaceConfig wspConfig,
SharedItemStateManager stateMgr,
RepositoryImpl rep,
SessionImpl session)
Creates the workspace instance backing this session. |
void |
dump(java.io.PrintStream ps)
Dumps the state of this instance in a human readable format for diagnostic purposes. |
void |
finalize()
Finalize the session. |
AccessControlManager |
getAccessControlManager()
|
AccessManager |
getAccessManager()
Returns the AccessManager associated with this session. |
java.lang.Object |
getAttribute(java.lang.String name)
|
java.lang.String[] |
getAttributeNames()
|
HierarchyManager |
getHierarchyManager()
Returns the HierarchyManager associated with this session. |
org.xml.sax.ContentHandler |
getImportContentHandler(java.lang.String parentAbsPath,
int uuidBehavior)
|
javax.jcr.Item |
getItem(java.lang.String absPath)
Returns the node or property at the given path. |
ItemManager |
getItemManager()
Returns the ItemManager of this session. |
protected SessionItemStateManager |
getItemStateManager()
Returns the SessionItemStateManager associated with this session. |
java.lang.String |
getJCRName(Name name)
Returns the prefixed JCR name for the given qualified name. |
java.lang.String |
getJCRPath(Path path)
Returns the prefixed JCR path for the given qualified path. |
LockManager |
getLockManager()
Return the lock manager for this session. |
javax.jcr.lock.Lock[] |
getLocks()
Returns all locks owned by this session. |
java.lang.String[] |
getLockTokens()
|
javax.jcr.Node |
getNode(java.lang.String absPath)
Returns the node at the specified absolute path in the workspace. |
NodeImpl |
getNodeById(NodeId id)
Retrieves the Node with the given id. |
javax.jcr.Node |
getNodeByIdentifier(java.lang.String id)
Returns the node specified by the given identifier. |
javax.jcr.Node |
getNodeByUUID(java.lang.String uuid)
|
javax.jcr.Node |
getNodeByUUID(UUID uuid)
Retrieves the referenceable node with the given UUID. |
NodeTypeManagerImpl |
getNodeTypeManager()
Returns the NodeTypeManager. |
java.lang.String |
getPrefix(java.lang.String uri)
Returns the prefix which is mapped to the given URI. |
PrincipalManager |
getPrincipalManager()
Returns the PrincipalManager for the current Session. |
javax.jcr.Property |
getProperty(java.lang.String absPath)
Returns the property at the specified absolute path in the workspace. |
Name |
getQName(java.lang.String name)
Returns the qualified name for the given prefixed JCR name. |
Path |
getQPath(java.lang.String path)
Returns the qualified path for the given prefixed JCR path. |
javax.jcr.Repository |
getRepository()
|
RetentionManager |
getRetentionManager()
|
javax.jcr.Node |
getRootNode()
|
javax.security.auth.Subject |
getSubject()
Returns the Subject associated with this session. |
java.lang.String |
getURI(java.lang.String prefix)
Returns the URI to which the given prefix is mapped. |
java.lang.String |
getUserID()
|
UserManager |
getUserManager()
Returns the UserManager for the current Session. |
javax.jcr.ValueFactory |
getValueFactory()
|
VersionManager |
getVersionManager()
Returns the VersionManager associated with this session. |
javax.jcr.Workspace |
getWorkspace()
|
protected java.lang.String[] |
getWorkspaceNames()
Returns the names of all workspaces of this repository with respect of the access rights of this session. |
boolean |
hasPendingChanges()
|
boolean |
hasPermission(java.lang.String absPath,
java.lang.String actions)
|
javax.jcr.Session |
impersonate(javax.jcr.Credentials otherCredentials)
Logs in the same workspace with the given credentials. |
boolean |
isLive()
|
boolean |
itemExists(java.lang.String absPath)
Calls AbstractSession.getItem(String) with the given path and returns
true if the call succeeds. |
void |
logout()
Clears the local namespace mappings. |
void |
move(java.lang.String srcAbsPath,
java.lang.String destAbsPath)
|
boolean |
nodeExists(java.lang.String absPath)
Returns true if a node exists at absPath
and this Session has read access to it; otherwise returns
false. |
protected void |
notifyLoggedOut()
Notify the listeners that this session has been closed. |
protected void |
notifyLoggingOut()
Notify the listeners that this session is about to be closed. |
boolean |
propertyExists(java.lang.String absPath)
Returns true if a property exists at absPath
and this Session has read access to it; otherwise returns
false. |
void |
refresh(boolean keepChanges)
|
void |
removeListener(SessionListener listener)
Remove a SessionListener |
void |
removeLockToken(java.lang.String lt)
|
void |
removeLockToken(java.lang.String lt,
boolean notify)
Internal implementation of removeLockToken(String). |
protected java.lang.String |
retrieveUserId(javax.security.auth.Subject subject)
Retrieve the userID from the specified subject. |
protected void |
sanityCheck()
Performs a sanity check on this session. |
void |
save()
|
void |
setNamespacePrefix(java.lang.String prefix,
java.lang.String uri)
Modifies the session local namespace mappings to contain the given prefix to URI mapping. |
| Methods inherited from class org.apache.jackrabbit.commons.AbstractSession |
|---|
exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, importXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jcr.Session |
|---|
exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, importXML |
| Field Detail |
|---|
public static final java.lang.String READ_ACTION
public static final java.lang.String REMOVE_ACTION
public static final java.lang.String ADD_NODE_ACTION
public static final java.lang.String SET_PROPERTY_ACTION
protected boolean alive
protected final RepositoryImpl rep
protected AuthContext loginContext
protected final javax.security.auth.Subject subject
protected final java.lang.String userId
protected final java.util.HashMap attributes
protected final NodeTypeManagerImpl ntMgr
protected AccessManager accessMgr
protected final SessionItemStateManager itemStateMgr
protected final HierarchyManager hierMgr
protected final ItemManager itemMgr
protected final WorkspaceImpl wsp
protected NamePathResolver namePathResolver
protected final VersionManager versionMgr
protected final java.util.Map listeners
protected final java.util.Set lockTokens
protected javax.jcr.ValueFactory valueFactory
| Constructor Detail |
|---|
protected SessionImpl(RepositoryImpl rep,
AuthContext loginContext,
WorkspaceConfig wspConfig)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
rep - loginContext - wspConfig -
javax.jcr.AccessDeniedException - if the subject of the given login context
is not granted access to the specified
workspace
javax.jcr.RepositoryException - if another error occurs
protected SessionImpl(RepositoryImpl rep,
javax.security.auth.Subject subject,
WorkspaceConfig wspConfig)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
rep - subject - wspConfig -
javax.jcr.AccessDeniedException - if the given subject is not granted access
to the specified workspace
javax.jcr.RepositoryException - if another error occurs| Method Detail |
|---|
protected java.lang.String retrieveUserId(javax.security.auth.Subject subject)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected SessionItemStateManager createSessionItemStateManager(LocalItemStateManager manager)
protected WorkspaceImpl createWorkspaceInstance(WorkspaceConfig wspConfig,
SharedItemStateManager stateMgr,
RepositoryImpl rep,
SessionImpl session)
wspConfig - The workspace configurationstateMgr - The shared item state managerrep - The repositorysession - The session
WorkspaceImpl class or an extension
thereof.
protected ItemManager createItemManager(SessionItemStateManager itemStateMgr,
HierarchyManager hierMgr)
protected VersionManager createVersionManager(RepositoryImpl rep)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected AccessManager createAccessManager(javax.security.auth.Subject subject,
HierarchyManager hierarchyManager)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
subject - hierarchyManager -
javax.jcr.AccessDeniedException - if the current subject is not granted access
to the current workspace
javax.jcr.RepositoryException - if the access manager cannot be instantiated
protected void sanityCheck()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if this session has been rendered invalid
for some reason (e.g. if this session has
been closed explicitly or if it has expired)public javax.security.auth.Subject getSubject()
Subject associated with this session.
Subject associated with this session
public javax.jcr.Session createSession(java.lang.String workspaceName)
throws javax.jcr.AccessDeniedException,
javax.jcr.NoSuchWorkspaceException,
javax.jcr.RepositoryException
workspaceName - name of the workspace to acquire a session for.
javax.jcr.AccessDeniedException - in case the current Subject is not allowed
to access the requested Workspace
javax.jcr.NoSuchWorkspaceException - If the named workspace does not exist.
javax.jcr.RepositoryException - in any other exceptional statepublic AccessManager getAccessManager()
AccessManager associated with this session.
AccessManager associated with this sessionpublic NodeTypeManagerImpl getNodeTypeManager()
NodeTypeManager.
NodeTypeManagerpublic ItemManager getItemManager()
ItemManager of this session.
ItemManagerprotected SessionItemStateManager getItemStateManager()
SessionItemStateManager associated with this session.
SessionItemStateManager associated with this sessionpublic HierarchyManager getHierarchyManager()
HierarchyManager associated with this session.
HierarchyManager associated with this sessionpublic VersionManager getVersionManager()
VersionManager associated with this session.
VersionManager associated with this session
public javax.jcr.Node getNodeByUUID(UUID uuid)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
UUID.
uuid - uuid of the node to be retrieved
javax.jcr.ItemNotFoundException - if no node exists with the given uuid or
if the existing node is not referenceable.
javax.jcr.RepositoryException - if another error occurs.getNodeByUUID(String),
getNodeById(NodeId)
public NodeImpl getNodeById(NodeId id)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
Node with the given id.
id - id of node to be retrieved
NodeId.
javax.jcr.ItemNotFoundException - if no such node exists or if this
Session does not have permission to access the node.
javax.jcr.RepositoryException - if another error occurs.
protected java.lang.String[] getWorkspaceNames()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if an error occurs
protected void createWorkspace(java.lang.String workspaceName)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
workspaceName - name 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 occurs
protected void createWorkspace(java.lang.String workspaceName,
org.xml.sax.InputSource configTemplate)
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
workspaceName - 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 occursprotected void notifyLoggingOut()
protected void notifyLoggedOut()
public void addListener(SessionListener listener)
SessionListener
listener - the new listener to be informed on modificationspublic void removeListener(SessionListener listener)
SessionListener
listener - an existing listener
public GarbageCollector createDataStoreGarbageCollector()
throws javax.jcr.RepositoryException,
ItemStateException
ItemStateException
javax.jcr.RepositoryException
public java.lang.String getPrefix(java.lang.String uri)
throws javax.jcr.NamespaceException
NamespaceResolver
getPrefix in interface NamespaceResolveruri - namespace URI
javax.jcr.NamespaceException - if the URI is unknown.
public java.lang.String getURI(java.lang.String prefix)
throws javax.jcr.NamespaceException
NamespaceResolver
getURI in interface NamespaceResolverprefix - namespace prefix
javax.jcr.NamespaceException - if the prefix is unknown.
public java.lang.String getJCRName(Name name)
throws javax.jcr.NamespaceException
NameResolver
getJCRName in interface NameResolvername - qualified name
javax.jcr.NamespaceException - if the namespace URI can not be resolved
public Name getQName(java.lang.String name)
throws IllegalNameException,
javax.jcr.NamespaceException
NameResolver
getQName in interface NameResolvername - prefixed JCR name
IllegalNameException - if the JCR name format is invalid
javax.jcr.NamespaceException - if the namespace prefix can not be resolved
public java.lang.String getJCRPath(Path path)
throws javax.jcr.NamespaceException
PathResolver
getJCRPath in interface PathResolverpath - qualified path
javax.jcr.NamespaceException - if a namespace URI can not be resolved
public Path getQPath(java.lang.String path)
throws MalformedPathException,
IllegalNameException,
javax.jcr.NamespaceException
PathResolver
getQPath in interface PathResolverpath - prefixed JCR path
MalformedPathException - if the JCR path format is invalid.
IllegalNameException - if any of the JCR names contained in the path are invalid.
javax.jcr.NamespaceException - if a namespace prefix can not be resolved.
public PrincipalManager getPrincipalManager()
throws javax.jcr.RepositoryException,
javax.jcr.AccessDeniedException
JackrabbitSessionPrincipalManager for the current Session.
getPrincipalManager in interface JackrabbitSessionjavax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException - If principal management
is not supported.
javax.jcr.RepositoryExceptionJackrabbitSession.getPrincipalManager()
public UserManager getUserManager()
throws javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
JackrabbitSessionUserManager for the current Session.
getUserManager in interface JackrabbitSessionjavax.jcr.AccessDeniedException - If this session is not allowed to
to access user data.
javax.jcr.UnsupportedRepositoryOperationException - If user management is
not supported.
javax.jcr.RepositoryException - If another error occurs.JackrabbitSession.getUserManager()
public void checkPermission(java.lang.String absPath,
java.lang.String actions)
throws java.security.AccessControlException,
javax.jcr.RepositoryException
checkPermission in interface javax.jcr.Sessionjava.security.AccessControlException
javax.jcr.RepositoryExceptionpublic javax.jcr.Workspace getWorkspace()
getWorkspace in interface javax.jcr.Session
public javax.jcr.Session impersonate(javax.jcr.Credentials otherCredentials)
throws javax.jcr.LoginException,
javax.jcr.RepositoryException
The default implementation:
Repository instance using
Session.getRepository()
Session.getWorkspace()
Workspace.getName()
Repository.login(Credentials, String) on the
retrieved repository with the given credentials and the retrieved
workspace name.
impersonate in interface javax.jcr.Sessionimpersonate in class AbstractSessionotherCredentials - login credentials
javax.jcr.RepositoryException - if an error occurs
javax.jcr.LoginException
public javax.jcr.Node getRootNode()
throws javax.jcr.RepositoryException
getRootNode in interface javax.jcr.Sessionjavax.jcr.RepositoryException
public javax.jcr.Node getNodeByUUID(java.lang.String uuid)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
getNodeByUUID in interface javax.jcr.Sessionjavax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
public javax.jcr.Item getItem(java.lang.String absPath)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
The default implementation:
PathNotFoundException if the given path
does not start with a slash.
Node.getNode(String) on the root node with the
part of the given path after the first slash
Node.getProperty(String) similarly in case the
above call fails with a PathNotFoundException
getItem in interface javax.jcr.SessiongetItem in class AbstractSessionabsPath - absolute path
javax.jcr.PathNotFoundException - if the given path is invalid or not found
javax.jcr.RepositoryException - if another error occurs
public boolean itemExists(java.lang.String absPath)
throws javax.jcr.RepositoryException
AbstractSession.getItem(String) with the given path and returns
true if the call succeeds. Returns false
if a PathNotFoundException was thrown. Other exceptions are
passed through.
itemExists in interface javax.jcr.SessionitemExists in class AbstractSessionabsPath - absolute path
true if an item exists at the given path,
false otherwise
javax.jcr.RepositoryException - if an error occurs
public void save()
throws javax.jcr.AccessDeniedException,
javax.jcr.ItemExistsException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.InvalidItemStateException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.nodetype.NoSuchNodeTypeException,
javax.jcr.RepositoryException
save in interface javax.jcr.Sessionjavax.jcr.AccessDeniedException
javax.jcr.ItemExistsException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.InvalidItemStateException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.RepositoryException
public void refresh(boolean keepChanges)
throws javax.jcr.RepositoryException
refresh in interface javax.jcr.Sessionjavax.jcr.RepositoryException
public boolean hasPendingChanges()
throws javax.jcr.RepositoryException
hasPendingChanges in interface javax.jcr.Sessionjavax.jcr.RepositoryException
public void move(java.lang.String srcAbsPath,
java.lang.String destAbsPath)
throws javax.jcr.ItemExistsException,
javax.jcr.PathNotFoundException,
javax.jcr.version.VersionException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
move in interface javax.jcr.Sessionjavax.jcr.ItemExistsException
javax.jcr.PathNotFoundException
javax.jcr.version.VersionException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.lock.LockException
javax.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.Sessionjavax.jcr.PathNotFoundException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.RepositoryExceptionpublic boolean isLive()
isLive in interface javax.jcr.Sessionpublic void logout()
super.logout() when overriding this method to avoid
namespace mappings to be carried over to a new session.
logout in interface javax.jcr.Sessionlogout in class AbstractSessionpublic javax.jcr.Repository getRepository()
getRepository in interface javax.jcr.Session
public javax.jcr.ValueFactory getValueFactory()
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
getValueFactory in interface javax.jcr.Sessionjavax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionpublic java.lang.String getUserID()
getUserID in interface javax.jcr.Sessionpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.jcr.Sessionpublic java.lang.String[] getAttributeNames()
getAttributeNames in interface javax.jcr.Session
public void setNamespacePrefix(java.lang.String prefix,
java.lang.String uri)
throws javax.jcr.NamespaceException,
javax.jcr.RepositoryException
This behaviour is based on JSR 283 (JCR 2.0), but remains backwards compatible with JCR 1.0.
setNamespacePrefix in interface javax.jcr.SessionsetNamespacePrefix in class AbstractSessionprefix - namespace prefixuri - namespace URI
javax.jcr.NamespaceException - if the mapping is illegal
javax.jcr.RepositoryException - if a repository error occurspublic void addLockToken(java.lang.String lt)
addLockToken in interface javax.jcr.Session
public void addLockToken(java.lang.String lt,
boolean notify)
addLockToken(String). Additionally
takes a parameter indicating whether the lock manager needs to be
informed.
public java.lang.String[] getLockTokens()
getLockTokens in interface javax.jcr.Sessionpublic void removeLockToken(java.lang.String lt)
removeLockToken in interface javax.jcr.Session
public void removeLockToken(java.lang.String lt,
boolean notify)
removeLockToken(String). Additionally
takes a parameter indicating whether the lock manager needs to be
informed.
public LockManager getLockManager()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic javax.jcr.lock.Lock[] getLocks()
Locks
public javax.jcr.Node getNodeByIdentifier(java.lang.String id)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
ItemNotFoundException is thrown if no node with the
specified identifier exists. This exception is also thrown if this
Session does not have read access to the node with the
specified identifier.
A RepositoryException is thrown if another error occurs.
- Parameters:
id - An identifier.
- Returns:
- A
Node.
- Throws:
javax.jcr.ItemNotFoundException - if the specified identifier is not found.
javax.jcr.RepositoryException - if another error occurs.- Since:
- JCR 2.0
public javax.jcr.Node getNode(java.lang.String absPath)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
PathNotFoundException is thrown.
absPath - An absolute path.
Node.
javax.jcr.PathNotFoundException - If no node exists.
javax.jcr.RepositoryException - If another error occurs.
public javax.jcr.Property getProperty(java.lang.String absPath)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
PathNotFoundException is thrown.
absPath - An absolute path.
Property.
javax.jcr.PathNotFoundException - If no property exists.
javax.jcr.RepositoryException - if another error occurs.
public boolean nodeExists(java.lang.String absPath)
throws javax.jcr.RepositoryException
true if a node exists at absPath
and this Session has read access to it; otherwise returns
false.
Throws a RepositoryException if absPath
is not a well-formed absolute path.
absPath - An absolute path.
boolean
javax.jcr.RepositoryException - if absPath is not a well-formed
absolute path.
public boolean propertyExists(java.lang.String absPath)
throws javax.jcr.RepositoryException
true if a property exists at absPath
and this Session has read access to it; otherwise returns
false.
Throws a RepositoryException if absPath
is not a well-formed absolute path.
absPath - An absolute path.
boolean
javax.jcr.RepositoryException - if absPath is not a well-formed
absolute path.
public boolean hasPermission(java.lang.String absPath,
java.lang.String actions)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionSession#hasPermission(String, String)
public AccessControlManager getAccessControlManager()
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionSession#getAccessControlManager()
public RetentionManager getRetentionManager()
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionSession#getRetentionManager()public void dump(java.io.PrintStream ps)
dump in interface Dumpableps - stream to dump state topublic void finalize()
finalize in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||