Class SessionInfoImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.SessionInfoImpl
-
- All Implemented Interfaces:
Serializable,SessionInfo
- Direct Known Subclasses:
SessionInfoImpl
public class SessionInfoImpl extends Object implements SessionInfo, Serializable
SessionInfoImplis 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 voidaddLockToken(String s)Add the given lock token to thisSessionInfo.String[]getLockTokens()Returns the lock tokens present on thisSessionInfo.StringgetUserData()Return the user data set viasetUserData(String)StringgetUserID()Returns the user id.StringgetWorkspaceName()Returns the workspace name.voidremoveLockToken(String s)Removes the given lock token from thisSessionInfo.voidsetUserData(String userData)Sets the user data used forEvent.getUserData().voidsetUserID(String userId)Sets the userId.voidsetWorkspacename(String workspaceName)Sets the name of the workspace to connect to.
-
-
-
Method Detail
-
setUserID
public void setUserID(String userId)
Sets the userId.- Parameters:
userId- the userId ornullif unknown.
-
setWorkspacename
public void setWorkspacename(String workspaceName)
Sets the name of the workspace to connect to.- Parameters:
workspaceName- the name of the workspace ornullif this session info refers to the default workspace.
-
getUserID
public String getUserID()
Returns the user id.- Specified by:
getUserIDin interfaceSessionInfo- Returns:
- The user identification.
- See Also:
RepositoryService.obtain(javax.jcr.Credentials, String)
-
getWorkspaceName
public String getWorkspaceName()
Returns the workspace name.- Specified by:
getWorkspaceNamein interfaceSessionInfo- Returns:
- The name of the
workspacethis SessionInfo has been built for. - See Also:
RepositoryService.obtain(javax.jcr.Credentials, String),Workspace.getName()
-
getLockTokens
public String[] getLockTokens()
Returns the lock tokens present on thisSessionInfo.- Specified by:
getLockTokensin interfaceSessionInfo- Returns:
- lock tokens present on this
SessionInfo.
-
addLockToken
public void addLockToken(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:
addLockTokenin interfaceSessionInfo- Parameters:
s- to be added.
-
removeLockToken
public void removeLockToken(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 allRepositoryServiceoperations affected by a lock will fail with LockException provided the lock hasn't been released.- Specified by:
removeLockTokenin interfaceSessionInfo- Parameters:
s- to be removed.
-
setUserData
public void setUserData(String userData) throws RepositoryException
Sets the user data used forEvent.getUserData().- Specified by:
setUserDatain interfaceSessionInfo- Throws:
RepositoryException- See Also:
ObservationManager.setUserData(String)
-
getUserData
public String getUserData()
Return the user data set viasetUserData(String)- Returns:
- userData
-
-