org.apache.jackrabbit.spi.commons
Class SessionInfoImpl

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.SessionInfoImpl
All Implemented Interfaces:
Serializable, SessionInfo

public class SessionInfoImpl
extends Object
implements SessionInfo, Serializable

SessionInfoImpl is a searializable bean based implementation of SessionInfo.

See Also:
Serialized Form

Constructor Summary
SessionInfoImpl()
          Default constructor
 
Method Summary
 void addLockToken(String s)
          Add the given lock token to this SessionInfo.
 String[] getLockTokens()
          Returns the lock tokens present on this SessionInfo.
 String getUserID()
          Returns the user id.
 String getWorkspaceName()
          Returns the workspace name.
 void removeLockToken(String s)
          Removes the given lock token from this SessionInfo.
 void setUserID(String userId)
          Sets the userId.
 void setWorkspacename(String workspaceName)
          Sets the name of the workspace to connect to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionInfoImpl

public SessionInfoImpl()
Default constructor

Method Detail

setUserID

public void setUserID(String userId)
Sets the userId.

Parameters:
userId - the userId or null if unknown.

setWorkspacename

public void setWorkspacename(String workspaceName)
Sets the name of the workspace to connect to.

Parameters:
workspaceName - the name of the workspace or null if this session info refers to the default workspace.

getUserID

public String getUserID()
Returns the user id.

Specified by:
getUserID in interface SessionInfo
Returns:
The user identification.
See Also:
RepositoryService.obtain(javax.jcr.Credentials, String)

getWorkspaceName

public String getWorkspaceName()
Returns the workspace name.

Specified by:
getWorkspaceName in interface SessionInfo
Returns:
The name of the workspace this 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 this SessionInfo.

Specified by:
getLockTokens in interface SessionInfo
Returns:
lock tokens present on this SessionInfo.

addLockToken

public void addLockToken(String s)
Add the given lock token to this SessionInfo. 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 interface SessionInfo
Parameters:
s - to be added.

removeLockToken

public void removeLockToken(String s)
Removes the given lock token from this 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.

Specified by:
removeLockToken in interface SessionInfo
Parameters:
s - to be removed.


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.