public class SessionImpl extends AbstractSession implements JackrabbitSession, SessionExtensions, NamespaceResolver, NamePathResolver, IdentifierResolver
SessionImpl
...Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
attributes
the attributes of this session
|
static String |
AUTO_FIX_CORRUPTIONS
Name of the session attribute that controls whether repository
inconsistencies should be automatically fixed when traversing over child
nodes, when trying to add a child node, or removing a child node.
|
protected SessionContext |
context
The component context of this session.
|
static String |
DISABLE_CLUSTER_SYNC_ON_REFRESH
Name of the session attribute that controls whether the
refresh(boolean) method will cause the repository to
synchronize itself to changes in other cluster nodes. |
protected Map<SessionListener,SessionListener> |
listeners
Listeners (weak references)
|
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 RepositoryContext |
repositoryContext
The component context of the repository that issued this session.
|
protected Subject |
subject
the Subject of this session
|
protected String |
userId
the user ID that was used to acquire this session
|
protected InternalVersionManager |
versionMgr
The version manager for this session
|
ACTION_ADD_PROPERTY, ACTION_LOCKING, ACTION_MODIFY_ACCESS_CONTROL, ACTION_MODIFY_PROPERTY, ACTION_NODE_TYPE_MANAGEMENT, ACTION_READ_ACCESS_CONTROL, ACTION_REMOVE_NODE, ACTION_REMOVE_PROPERTY, ACTION_USER_MANAGEMENT, ACTION_VERSIONING
Modifier | Constructor and Description |
---|---|
protected |
SessionImpl(RepositoryContext repositoryContext,
AuthContext loginContext,
WorkspaceConfig wspConfig)
Protected constructor.
|
protected |
SessionImpl(RepositoryContext repositoryContext,
Subject subject,
WorkspaceConfig wspConfig)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(SessionListener listener)
Add a
SessionListener |
void |
addLockToken(String lt) |
protected boolean |
autoFixCorruptions()
Checks whether repository inconsistencies should be automatically fixed
when traversing over child nodes, when trying to add a child node, or
when removing a child node.
|
void |
checkFormat(String identifier) |
void |
checkPermission(String absPath,
String actions) |
protected boolean |
clusterSyncOnRefresh()
Checks whether the
refresh(boolean) method should cause
cluster synchronization. |
protected AccessManager |
createAccessManager(Subject subject)
Create the access manager.
|
GarbageCollector |
createDataStoreGarbageCollector()
Create a data store garbage collector for this repository.
|
protected ItemManager |
createItemManager()
Create the item manager.
|
protected ObservationManagerImpl |
createObservationManager(String wspName) |
javax.jcr.Session |
createSession(String workspaceName)
Creates a new session with the same subject as this sessions but to a
different workspace.
|
protected SessionItemStateManager |
createSessionItemStateManager()
Create the session item state manager.
|
protected InternalVersionManager |
createVersionManager()
Create the version manager.
|
void |
finalize()
Finalize the session.
|
javax.jcr.security.AccessControlManager |
getAccessControlManager() |
AccessManager |
getAccessManager()
Returns the
AccessManager associated with this session. |
Object |
getAttribute(String name) |
String[] |
getAttributeNames() |
HierarchyManager |
getHierarchyManager()
Returns the
HierarchyManager associated with this session. |
ContentHandler |
getImportContentHandler(String parentAbsPath,
int uuidBehavior) |
InternalVersionManager |
getInternalVersionManager()
Returns the
InternalVersionManager associated with this session. |
javax.jcr.Item |
getItem(String absPath)
Returns the node or property at the given path.
|
ItemManager |
getItemManager()
Returns the
ItemManager of this session. |
javax.jcr.Item |
getItemOrNull(String absPath)
Returns the node at the specified absolute path in the workspace.
|
String |
getJCRName(Name name)
Returns the qualified JCR name String for the given
Name object. |
String |
getJCRPath(Path path)
Returns the given JCR path string for the given path object.
|
javax.jcr.lock.Lock[] |
getLocks()
Returns all locks owned by this session.
|
String[] |
getLockTokens() |
javax.jcr.Node |
getNode(String absPath)
Returns the node with the given absolute path.
|
NodeImpl |
getNodeById(NodeId id)
Retrieves the
Node with the given id. |
javax.jcr.Node |
getNodeByIdentifier(String id) |
javax.jcr.Node |
getNodeByUUID(String uuid) |
javax.jcr.Node |
getNodeOrNull(String absPath)
Returns the node at the specified absolute path in the workspace or
null if no such node exists. |
NodeTypeManagerImpl |
getNodeTypeManager()
Returns the
NodeTypeManager . |
Path |
getPath(String identifier) |
String |
getPrefix(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(String absPath)
Returns the property with the given absolute path.
|
javax.jcr.Property |
getPropertyOrNull(String absPath)
Returns the property at the specified absolute path in the workspace or
null if no such node exists. |
Name |
getQName(String name)
Returns the
Name for the given JCR name String. |
Path |
getQPath(String path)
Returns the path object for the given JCR path string.
|
Path |
getQPath(String path,
boolean normalizeIdentifier)
Returns the path object for the given JCR path string.
|
javax.jcr.Repository |
getRepository() |
javax.jcr.retention.RetentionManager |
getRetentionManager() |
protected RetentionRegistry |
getRetentionRegistry()
Returns the internal retention manager used for evaluation of effective
retention policies and holds.
|
javax.jcr.Node |
getRootNode() |
Subject |
getSubject()
Returns a read only copy of the
Subject associated with this
session. |
String |
getURI(String prefix)
Returns the URI to which the given prefix is mapped.
|
String |
getUserID() |
UserManager |
getUserManager()
Returns the
UserManager for the current Session . |
javax.jcr.ValueFactory |
getValueFactory() |
javax.jcr.Workspace |
getWorkspace() |
boolean |
hasCapability(String methodName,
Object target,
Object[] arguments) |
boolean |
hasPendingChanges() |
boolean |
hasPermission(String absPath,
String... actions)
Returns
true if this Session has permission to
perform the specified actions at the specified absPath and
false otherwise. |
boolean |
hasPermission(String absPath,
String actions) |
javax.jcr.Session |
impersonate(javax.jcr.Credentials otherCredentials)
Logs in the same workspace with the given credentials.
|
boolean |
isAdmin()
Returns
true if this session has been created for the
administrator. |
boolean |
isLive() |
boolean |
isSystem()
Returns
true if the subject contains a
SystemPrincipal ; false otherwise. |
boolean |
itemExists(String absPath)
Calls
AbstractSession.getItem(String) with the given path and returns
true if the call succeeds. |
void |
logout()
Invalidates this session and releases all associated resources.
|
void |
move(String srcAbsPath,
String destAbsPath) |
boolean |
nodeExists(String absPath)
Checks whether a node with the given absolute path exists.
|
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(String absPath)
Checks whether a property with the given absolute path exists.
|
void |
refresh(boolean keepChanges) |
void |
removeItem(String absPath)
Removes the identified item.
|
void |
removeListener(SessionListener listener)
Remove a
SessionListener |
void |
removeLockToken(String lt) |
protected String |
retrieveUserId(Subject subject,
String workspaceName)
Retrieve the userID from the specified subject.
|
void |
save() |
void |
setAttribute(String name,
Object value)
Sets the named attribute.
|
void |
setNamespacePrefix(String prefix,
String uri)
Modifies the session local namespace mappings to contain the given
prefix to URI mapping.
|
String |
toString()
Returns the unique internal name of this session.
|
exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, importXML
public static final String DISABLE_CLUSTER_SYNC_ON_REFRESH
refresh(boolean)
method will cause the repository to
synchronize itself to changes in other cluster nodes. This cluster
synchronization is enabled by default, unless an attribute with this
name is set (any non-null value) for this session.public static final String AUTO_FIX_CORRUPTIONS
protected final SessionContext context
protected final RepositoryContext repositoryContext
protected AuthContext loginContext
protected final Subject subject
protected final String userId
protected NamePathResolver namePathResolver
protected final InternalVersionManager versionMgr
protected final Map<SessionListener,SessionListener> listeners
protected SessionImpl(RepositoryContext repositoryContext, AuthContext loginContext, WorkspaceConfig wspConfig) throws javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
repositoryContext
- repository contextloginContext
- wspConfig
- javax.jcr.AccessDeniedException
- if the subject of the given login context
is not granted access to the specified
workspacejavax.jcr.RepositoryException
- if another error occursprotected SessionImpl(RepositoryContext repositoryContext, Subject subject, WorkspaceConfig wspConfig) throws javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
repositoryContext
- repository contextsubject
- wspConfig
- javax.jcr.AccessDeniedException
- if the given subject is not granted access
to the specified workspacejavax.jcr.RepositoryException
- if another error occursprotected String retrieveUserId(Subject subject, String workspaceName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected SessionItemStateManager createSessionItemStateManager()
protected ItemManager createItemManager()
protected ObservationManagerImpl createObservationManager(String wspName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected InternalVersionManager createVersionManager() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected AccessManager createAccessManager(Subject subject) throws javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
subject
- javax.jcr.AccessDeniedException
- if the current subject is not granted access
to the current workspacejavax.jcr.RepositoryException
- if the access manager cannot be instantiatedpublic Subject getSubject()
Subject
associated with this
session.Subject
associated with this sessionpublic boolean isSystem()
true
if the subject contains a
SystemPrincipal
; false
otherwise.true
if this is an system session.public boolean isAdmin()
true
if this session has been created for the
administrator. False
otherwise.true
if this is an admin session.public javax.jcr.Session createSession(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 Workspacejavax.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
.NodeTypeManager
public ItemManager getItemManager()
ItemManager
of this session.ItemManager
public HierarchyManager getHierarchyManager()
HierarchyManager
associated with this session.HierarchyManager
associated with this sessionpublic InternalVersionManager getInternalVersionManager()
InternalVersionManager
associated with this session.InternalVersionManager
associated with this sessionprotected RetentionRegistry getRetentionRegistry() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void setAttribute(String name, Object value)
null
, then
the named attribute is removed.setAttribute
in interface SessionExtensions
name
- attribute namevalue
- attribute valuepublic NodeImpl getNodeById(NodeId id) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
Node
with the given id.id
- id of node to be retrievedNodeId
.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 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 listenerpublic GarbageCollector createDataStoreGarbageCollector() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public String getPrefix(String uri) throws javax.jcr.NamespaceException
NamespaceResolver
getPrefix
in interface NamespaceResolver
uri
- namespace URIjavax.jcr.NamespaceException
- if the URI is unknown.public String getURI(String prefix) throws javax.jcr.NamespaceException
NamespaceResolver
getURI
in interface NamespaceResolver
prefix
- namespace prefixjavax.jcr.NamespaceException
- if the prefix is unknown.public String getJCRName(Name name) throws javax.jcr.NamespaceException
NameResolver
Name
object.getJCRName
in interface NameResolver
name
- A Name
object.prefix:localName
or
localName
in case of the empty namespace.javax.jcr.NamespaceException
- if the namespace URI can not be resolvedpublic Name getQName(String name) throws IllegalNameException, javax.jcr.NamespaceException
NameResolver
Name
for the given JCR name String.getQName
in interface NameResolver
name
- A JCR name String.Name
object.IllegalNameException
- if the JCR name format is invalidjavax.jcr.NamespaceException
- if the namespace prefix can not be resolvedpublic String getJCRPath(Path path) throws javax.jcr.NamespaceException
PathResolver
getJCRPath
in interface PathResolver
path
- a Path
object.javax.jcr.NamespaceException
- if a namespace URI can not be resolvedpublic Path getQPath(String path) throws MalformedPathException, IllegalNameException, javax.jcr.NamespaceException
PathResolver
getQPath
in interface PathResolver
path
- prefixed JCR pathPath
object.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 Path getQPath(String path, boolean normalizeIdentifier) throws MalformedPathException, IllegalNameException, javax.jcr.NamespaceException
PathResolver
getQPath
in interface PathResolver
path
- prefixed JCR pathPath
object.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 Path getPath(String identifier) throws MalformedPathException
getPath
in interface IdentifierResolver
MalformedPathException
IdentifierResolver.getPath(String)
public void checkFormat(String identifier) throws MalformedPathException
checkFormat
in interface IdentifierResolver
MalformedPathException
IdentifierResolver.checkFormat(String)
public boolean hasPermission(String absPath, String... actions) throws javax.jcr.RepositoryException
JackrabbitSession
true
if this Session
has permission to
perform the specified actions at the specified absPath
and
false
otherwise.
The actions
parameter is a list of action strings. Apart
from the actions defined on Session
, this variant also allows
to specify the following additional actions to provide better permission
discovery:
{@code add_property}
: If hasPermission(path,
"add_property")
returns true
, then this Session
has
permission to add a new property at path
.{@code modify_property}
: If
hasPermission(path, "modify_property")
returns
true
, then this Session
has permission to change
a property at path
. {@code remove_property}
: If hasPermission(path,
"remove_property")
returns true
, then this Session
has
permission to remove a property at path
. {@code remove_node}
: If
hasPermission(path, "remove_node")
returns true
, then
this Session
has permission to remove a node at path
. {@code node_type_management}
: If
hasPermission(path, "node_type_management")
returns true
, then
this Session
has permission to explicitly set or change the node type
information associated with a node at path
. {@code versioning}
: If
hasPermission(path, "versioning")
returns true
, then
this Session
has permission to perform version related operations
on a node at path
. {@code locking}
: If
hasPermission(path, "locking")
returns true
, then
this Session
has permission to lock and unlock a node at path
. {@code read_access_control}
: If
hasPermission(path, "read_access_control")
returns true
, then
this Session
has permission to read access control content stored
at an item at path
. {@code modify_access_control}
: If
hasPermission(path, "modify_access_control")
returns true
, then
this Session
has permission to modify access control content
at an item at path
. {@code user_management}
: If
hasPermission(path, "user_management")
returns true
, then
this Session
has permission to perform user management operations
at an item at path
. true
if this Session
has permission to perform all
of the listed actions at the specified path.
The information returned through this method will only reflect the permission
status (both JCR defined and implementation-specific) and not
other restrictions that may exist, such as node type or other
implementation enforced constraints. For example, even though
hasPermission
may indicate that a particular Session
may
add a property at /A/B/C
, the node type of the node at /A/B
may prevent the addition of a property called C
.
hasPermission
in interface JackrabbitSession
absPath
- an absolute path.actions
- one or serveral actions.true
if this Session
has permission to
perform the specified actions at the specified
absPath
.javax.jcr.RepositoryException
- if an error occurs.JackrabbitSession.hasPermission(String, String...)
public PrincipalManager getPrincipalManager() throws javax.jcr.RepositoryException, javax.jcr.AccessDeniedException
JackrabbitSession
PrincipalManager
for the current Session
.getPrincipalManager
in interface JackrabbitSession
PrincipalManager
associated with this Session
.javax.jcr.AccessDeniedException
- If the session lacks privileges to access
the principal manager or principals in general.javax.jcr.UnsupportedRepositoryOperationException
- If principal management
is not supported.javax.jcr.RepositoryException
- If another error occurs.JackrabbitSession.getPrincipalManager()
public UserManager getUserManager() throws javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
JackrabbitSession
UserManager
for the current Session
.getUserManager
in interface JackrabbitSession
UserManager
associated with this Session
.javax.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 javax.jcr.Item getItemOrNull(String absPath) throws javax.jcr.RepositoryException
JackrabbitSession
null
.getItemOrNull
in interface JackrabbitSession
absPath
- An absolute path.Item
or null
.javax.jcr.RepositoryException
- if another error occurs.public javax.jcr.Property getPropertyOrNull(String absPath) throws javax.jcr.RepositoryException
JackrabbitSession
null
if no such node exists.getPropertyOrNull
in interface JackrabbitSession
absPath
- An absolute path.Property
or null
.javax.jcr.RepositoryException
- if another error occurs.public javax.jcr.Node getNodeOrNull(String absPath) throws javax.jcr.RepositoryException
JackrabbitSession
null
if no such node exists.getNodeOrNull
in interface JackrabbitSession
absPath
- An absolute path.Node
or null
.javax.jcr.RepositoryException
- If another error occurs.public void checkPermission(String absPath, String actions) throws AccessControlException, javax.jcr.RepositoryException
checkPermission
in interface javax.jcr.Session
AccessControlException
javax.jcr.RepositoryException
public 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.Session
impersonate
in class AbstractSession
otherCredentials
- login credentialsjavax.jcr.RepositoryException
- if an error occursjavax.jcr.LoginException
public javax.jcr.Node getRootNode() throws javax.jcr.RepositoryException
getRootNode
in interface javax.jcr.Session
javax.jcr.RepositoryException
public javax.jcr.Node getNodeByUUID(String uuid) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
getNodeByUUID
in interface javax.jcr.Session
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
public javax.jcr.Item getItem(String absPath) throws javax.jcr.RepositoryException
The default implementation:
Session.getNodeByIdentifier(String)
for identifier
paths
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.Session
getItem
in class AbstractSession
absPath
- absolute pathjavax.jcr.PathNotFoundException
- if the given path is invalid or not foundjavax.jcr.RepositoryException
- if another error occursSession.getItem(String)
public boolean itemExists(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.Session
itemExists
in class AbstractSession
absPath
- absolute pathtrue
if an item exists at the given path,
false
otherwisejavax.jcr.RepositoryException
- if an error occursSession.itemExists(String)
public void save() throws javax.jcr.RepositoryException
save
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
refresh
in interface javax.jcr.Session
javax.jcr.RepositoryException
protected boolean clusterSyncOnRefresh()
refresh(boolean)
method should cause
cluster synchronization.
Subclasses can override this method to implement alternative rules on when cluster synchronization should be done.
true
if the DISABLE_CLUSTER_SYNC_ON_REFRESH
attribute is not set, false
otherwiseprotected boolean autoFixCorruptions()
true
if the AUTO_FIX_CORRUPTIONS
attribute is set, false
otherwisepublic boolean hasPendingChanges() throws javax.jcr.RepositoryException
hasPendingChanges
in interface javax.jcr.Session
javax.jcr.RepositoryException
public void move(String srcAbsPath, String destAbsPath) throws javax.jcr.RepositoryException
move
in interface javax.jcr.Session
javax.jcr.RepositoryException
public ContentHandler getImportContentHandler(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.Session
javax.jcr.PathNotFoundException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
public boolean isLive()
isLive
in interface javax.jcr.Session
public void logout()
logout
in interface javax.jcr.Session
logout
in class AbstractSession
public javax.jcr.Repository getRepository()
getRepository
in interface javax.jcr.Session
public javax.jcr.ValueFactory getValueFactory()
getValueFactory
in interface javax.jcr.Session
public String getUserID()
getUserID
in interface javax.jcr.Session
public Object getAttribute(String name)
getAttribute
in interface javax.jcr.Session
public String[] getAttributeNames()
getAttributeNames
in interface javax.jcr.Session
public void setNamespacePrefix(String prefix, 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.Session
setNamespacePrefix
in class AbstractSession
prefix
- namespace prefixuri
- namespace URIjavax.jcr.NamespaceException
- if the mapping is illegaljavax.jcr.RepositoryException
- if a repository error occurspublic void addLockToken(String lt)
addLockToken
in interface javax.jcr.Session
public String[] getLockTokens()
getLockTokens
in interface javax.jcr.Session
public void removeLockToken(String lt)
removeLockToken
in interface javax.jcr.Session
public javax.jcr.lock.Lock[] getLocks()
Lock
spublic javax.jcr.Node getNodeByIdentifier(String id) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
getNodeByIdentifier
in interface javax.jcr.Session
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
Session.getNodeByIdentifier(String)
public javax.jcr.Node getNode(String absPath) throws javax.jcr.RepositoryException
AbstractSession
getNode
in interface javax.jcr.Session
getNode
in class AbstractSession
absPath
- absolute pathjavax.jcr.RepositoryException
- if the node can not be accessedSession.getNode(String)
public javax.jcr.Property getProperty(String absPath) throws javax.jcr.RepositoryException
AbstractSession
getProperty
in interface javax.jcr.Session
getProperty
in class AbstractSession
absPath
- absolute pathjavax.jcr.RepositoryException
- if the property can not be accessedSession.getProperty(String)
public boolean nodeExists(String absPath) throws javax.jcr.RepositoryException
AbstractSession
nodeExists
in interface javax.jcr.Session
nodeExists
in class AbstractSession
absPath
- absolute pathtrue
if a node with the given path exists,
false
otherwisejavax.jcr.RepositoryException
- if the path is invalidSession.nodeExists(String)
public boolean propertyExists(String absPath) throws javax.jcr.RepositoryException
AbstractSession
propertyExists
in interface javax.jcr.Session
propertyExists
in class AbstractSession
absPath
- absolute pathtrue
if a property with the given path exists,
false
otherwisejavax.jcr.RepositoryException
- if the path is invalidSession.propertyExists(String)
public void removeItem(String absPath) throws javax.jcr.RepositoryException
AbstractSession
Item.remove()
on the item removed by AbstractSession.getItem(String)
.removeItem
in interface javax.jcr.Session
removeItem
in class AbstractSession
absPath
- An absolute path of the item to be removedjavax.jcr.RepositoryException
- if the item can not be removedSession.removeItem(String)
public boolean hasPermission(String absPath, String actions) throws javax.jcr.RepositoryException
hasPermission
in interface javax.jcr.Session
javax.jcr.RepositoryException
Session.hasPermission(String, String)
public boolean hasCapability(String methodName, Object target, Object[] arguments) throws javax.jcr.RepositoryException
hasCapability
in interface javax.jcr.Session
javax.jcr.RepositoryException
Session.hasCapability(String, Object, Object[])
public javax.jcr.security.AccessControlManager getAccessControlManager() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
getAccessControlManager
in interface javax.jcr.Session
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
Session.getAccessControlManager()
public javax.jcr.retention.RetentionManager getRetentionManager() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
getRetentionManager
in interface javax.jcr.Session
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
Session.getRetentionManager()
public String toString()
toString
in class Object
sessionName
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.