Class SessionInfoImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.SessionInfoImpl
-
- All Implemented Interfaces:
java.io.Serializable
,SessionInfo
public class SessionInfoImpl extends java.lang.Object implements SessionInfo, java.io.Serializable
SessionInfoImpl
is a serializable bean based implementation ofSessionInfo
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SessionInfoImpl()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLockToken(java.lang.String s)
Add the given lock token to thisSessionInfo
.java.lang.String[]
getLockTokens()
Returns the lock tokens present on thisSessionInfo
.java.lang.String
getUserData()
Return the user data set viasetUserData(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 thisSessionInfo
.void
setUserData(java.lang.String userData)
Sets the user data used forEvent.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.
-
-
-
Method Detail
-
setUserID
public void setUserID(java.lang.String userId)
Sets the userId.- Parameters:
userId
- the userId ornull
if unknown.
-
setWorkspacename
public void setWorkspacename(java.lang.String workspaceName)
Sets the name of the workspace to connect to.- Parameters:
workspaceName
- the name of the workspace ornull
if this session info refers to the default workspace.
-
getUserID
public java.lang.String getUserID()
Returns the user id.- Specified by:
getUserID
in interfaceSessionInfo
- Returns:
- The user identification.
- See Also:
RepositoryService.obtain(javax.jcr.Credentials, String)
-
getWorkspaceName
public java.lang.String getWorkspaceName()
Returns the workspace name.- Specified by:
getWorkspaceName
in interfaceSessionInfo
- Returns:
- The name of the
workspace
this SessionInfo has been built for. - See Also:
RepositoryService.obtain(javax.jcr.Credentials, String)
,Workspace.getName()
-
getLockTokens
public java.lang.String[] getLockTokens()
Returns the lock tokens present on thisSessionInfo
.- Specified by:
getLockTokens
in interfaceSessionInfo
- Returns:
- lock tokens present on this
SessionInfo
.
-
addLockToken
public void addLockToken(java.lang.String s)
Add the given lock token to thisSessionInfo
. The token will enable the SessionInfo to operate on Items that are affected by the lock identified by the given token.- Specified by:
addLockToken
in interfaceSessionInfo
- Parameters:
s
- to be added.
-
removeLockToken
public void removeLockToken(java.lang.String s)
Removes the given lock token from thisSessionInfo
. 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 callingSession.removeLockToken(String)
. Consequently allRepositoryService
operations affected by a lock will fail with LockException provided the lock hasn't been released.- Specified by:
removeLockToken
in interfaceSessionInfo
- Parameters:
s
- to be removed.
-
setUserData
public void setUserData(java.lang.String userData) throws RepositoryException
Sets the user data used forEvent.getUserData()
.- Specified by:
setUserData
in interfaceSessionInfo
- Throws:
RepositoryException
- See Also:
ObservationManager.setUserData(String)
-
getUserData
public java.lang.String getUserData()
Return the user data set viasetUserData(String)
- Returns:
- userData
-
-