org.mmbase.security.implementation.context
Class ContextUserContext

java.lang.Object
  extended byorg.mmbase.security.BasicUser
      extended byorg.mmbase.security.implementation.context.ContextUserContext
All Implemented Interfaces:
Serializable, UserContext

public class ContextUserContext
extends BasicUser
implements Serializable

This UserContext class provides a storage for the authentication and authorization, so that information can be shared. This class is NOT a container class for client related stuff, altrough this is possible.

Version:
$Id: ContextUserContext.java,v 1.10 2006/02/13 18:19:55 michiel Exp $
Author:
Eduard Witteveen
See Also:
Serialized Form

Field Summary
protected  MMBaseCop manager
          The SecurityManager, who (eventually) created this instance
 
Fields inherited from class org.mmbase.security.BasicUser
authenticationType
 
Constructor Summary
ContextUserContext(String username, Rank rank, long key, MMBaseCop manager, String app)
           
 
Method Summary
 boolean equals(Object o)
           
 String getIdentifier()
          Gets the unique identifier for this user.
 String getOwnerField()
          Gets the owner field value of new objects created by this user.
 Rank getRank()
          Gets the rank of this user.
 
Methods inherited from class org.mmbase.security.BasicUser
getAuthenticationType, hashCode, isValid, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

manager

protected MMBaseCop manager
The SecurityManager, who (eventually) created this instance

Constructor Detail

ContextUserContext

public ContextUserContext(String username,
                          Rank rank,
                          long key,
                          MMBaseCop manager,
                          String app)
Method Detail

getIdentifier

public String getIdentifier()
Description copied from class: BasicUser
Gets the unique identifier for this user. This should be unique for every different user on the system.

Specified by:
getIdentifier in interface UserContext
Overrides:
getIdentifier in class BasicUser
Returns:
A unique identifier for this user.

getOwnerField

public String getOwnerField()
Description copied from class: BasicUser
Gets the owner field value of new objects created by this user. The default implementation returns the user's identifier. This can be changed if the authorization implementation does not attribute rights to users directly ('context' implementations).

Specified by:
getOwnerField in interface UserContext
Overrides:
getOwnerField in class BasicUser
Returns:
A possible value for the owner field

getRank

public Rank getRank()
Description copied from class: BasicUser
Gets the rank of this user.

Specified by:
getRank in interface UserContext
Overrides:
getRank in class BasicUser
Returns:
the user rank

equals

public boolean equals(Object o)
Overrides:
equals in class BasicUser


MMBase build 1.8.1.20060716