Keel 2.1RC2

org.keel.services.persist.hibernate
Class TempUserEnvironment

java.lang.Object
  extended byorg.keel.services.persist.hibernate.TempUserEnvironment
All Implemented Interfaces:
UserEnvironment

class TempUserEnvironment
extends java.lang.Object
implements UserEnvironment

Author:
root To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Field Summary
private  java.util.Map attributes
           
private  java.util.List groups
           
private  java.lang.String loginName
           
private  int uid
           
 
Fields inherited from interface org.keel.services.authentication.UserEnvironment
ANONYMOUS_DOMAIN, ANONYMOUS_GROUPNAME, ANONYMOUS_LOGINNAME, ANONYMOUS_UID, ANONYMOUS_USERDESC, CONTEXT_KEY
 
Constructor Summary
TempUserEnvironment()
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
           
 java.lang.String getDomain()
          Get the DomainPrincipal
 java.util.List getGroups()
          Get the GroupPrincipals
 javax.security.auth.login.LoginContext getLoginContext()
          The login context in this env.
 java.lang.String getLoginName()
          Get the LoginPrincipal
 javax.security.auth.Subject getSubject()
          The JAAS subject from the login context
 int getUid()
          Get the UidPrincipal
 java.lang.String getUserDescrip()
          Get the UserDescripPrincipal
 void reset()
          Used by logout functions to reset the SUbject back to "anonymous"
 void setAttribute(java.lang.String attributeName, java.lang.Object attributeContents)
           
 void setGroups(java.util.List newGroups)
           
 void setLoginContext(javax.security.auth.login.LoginContext lc)
          After succsful login, store the login context for later use by at least the logout function.
 void setLoginName(java.lang.String newName)
           
 void setUid(int newUid)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributes

private java.util.Map attributes

loginName

private java.lang.String loginName

groups

private java.util.List groups

uid

private int uid
Constructor Detail

TempUserEnvironment

public TempUserEnvironment()
Method Detail

toString

public java.lang.String toString()

setLoginContext

public void setLoginContext(javax.security.auth.login.LoginContext lc)
                     throws AuthorizationException
Description copied from interface: UserEnvironment
After succsful login, store the login context for later use by at least the logout function.

Specified by:
setLoginContext in interface UserEnvironment
Parameters:
lc - The user's JAAS login context
Throws:
AuthorizationException

getLoginContext

public javax.security.auth.login.LoginContext getLoginContext()
                                                       throws AuthorizationException
Description copied from interface: UserEnvironment
The login context in this env.

Specified by:
getLoginContext in interface UserEnvironment
Returns:
The login context
Throws:
AuthorizationException

getSubject

public javax.security.auth.Subject getSubject()
                                       throws AuthorizationException
Description copied from interface: UserEnvironment
The JAAS subject from the login context

Specified by:
getSubject in interface UserEnvironment
Returns:
JAAS Subject
Throws:
AuthorizationException

getLoginName

public java.lang.String getLoginName()
                              throws AuthorizationException
Description copied from interface: UserEnvironment
Get the LoginPrincipal

Specified by:
getLoginName in interface UserEnvironment
Returns:
the login name
Throws:
AuthorizationException

setLoginName

public void setLoginName(java.lang.String newName)

getDomain

public java.lang.String getDomain()
                           throws AuthorizationException
Description copied from interface: UserEnvironment
Get the DomainPrincipal

Specified by:
getDomain in interface UserEnvironment
Returns:
The Keel domain name
Throws:
AuthorizationException

getUserDescrip

public java.lang.String getUserDescrip()
                                throws AuthorizationException
Description copied from interface: UserEnvironment
Get the UserDescripPrincipal

Specified by:
getUserDescrip in interface UserEnvironment
Returns:
A description of the user
Throws:
AuthorizationException

getUid

public int getUid()
           throws AuthorizationException
Description copied from interface: UserEnvironment
Get the UidPrincipal

Specified by:
getUid in interface UserEnvironment
Returns:
The UID
Throws:
AuthorizationException

setUid

public void setUid(int newUid)

getGroups

public java.util.List getGroups()
                         throws AuthorizationException
Description copied from interface: UserEnvironment
Get the GroupPrincipals

Specified by:
getGroups in interface UserEnvironment
Returns:
The list of groups user belongs to
Throws:
AuthorizationException

setGroups

public void setGroups(java.util.List newGroups)

reset

public void reset()
           throws AuthorizationException
Description copied from interface: UserEnvironment
Used by logout functions to reset the SUbject back to "anonymous"

Specified by:
reset in interface UserEnvironment
Throws:
AuthorizationException

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.Object attributeContents)
Specified by:
setAttribute in interface UserEnvironment
See Also:
UserEnvironment.setAttribute(java.lang.String, java.lang.Object)

getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)
Specified by:
getAttribute in interface UserEnvironment
See Also:
UserEnvironment.getAttribute(java.lang.String)

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.