public class SessionInfoImpl extends java.lang.Object implements SessionInfo, java.io.Serializable
SessionInfoImpl
is a serializable bean based implementation of
SessionInfo
.Constructor and Description |
---|
SessionInfoImpl()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addLockToken(java.lang.String s)
Add the given lock token to this
SessionInfo . |
java.lang.String[] |
getLockTokens()
Returns the lock tokens present on this
SessionInfo . |
java.lang.String |
getUserData()
Return the user data set via
setUserData(String) |
java.lang.String |
getUserID()
Returns the user id.
|
java.lang.String |
getWorkspaceName()
Returns the workspace name.
|
void |
removeLockToken(java.lang.String s)
Removes the given lock token from this
SessionInfo . |
void |
setUserData(java.lang.String userData)
Sets the user data used for
Event.getUserData() . |
void |
setUserID(java.lang.String userId)
Sets the userId.
|
void |
setWorkspacename(java.lang.String workspaceName)
Sets the name of the workspace to connect to.
|
public void setUserID(java.lang.String userId)
userId
- the userId or null
if unknown.public void setWorkspacename(java.lang.String workspaceName)
workspaceName
- the name of the workspace or null
if
this session info refers to the default workspace.public java.lang.String getUserID()
getUserID
in interface SessionInfo
RepositoryService.obtain(javax.jcr.Credentials, String)
public java.lang.String getWorkspaceName()
getWorkspaceName
in interface SessionInfo
workspace
this
SessionInfo has been built for.RepositoryService.obtain(javax.jcr.Credentials, String)
,
Workspace.getName()
public java.lang.String[] getLockTokens()
SessionInfo
.getLockTokens
in interface SessionInfo
SessionInfo
.public void addLockToken(java.lang.String s)
SessionInfo
. The token will
enable the SessionInfo to operate on Items that are affected by the
lock identified by the given token.addLockToken
in interface SessionInfo
s
- to be added.public void removeLockToken(java.lang.String s)
SessionInfo
.
This must happen if the associated Session successfully removes the Lock
from a Node or if the token is removed from the Session itself by calling
Session.removeLockToken(String)
. Consequently all
RepositoryService
operations affected by a lock will fail
with LockException provided the lock hasn't been released.removeLockToken
in interface SessionInfo
s
- to be removed.public void setUserData(java.lang.String userData) throws RepositoryException
Event.getUserData()
.setUserData
in interface SessionInfo
RepositoryException
ObservationManager.setUserData(String)
public java.lang.String getUserData()
setUserData(String)
Copyright © 2010 - 2020 Adobe. All Rights Reserved