|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.UserSession
public class UserSession
Holds info about the User Session
Constructor Summary | |
---|---|
UserSession(String principalName)
Creates a user session for the principal specified in the parameter. |
Method Summary | |
---|---|
void |
addObject(String key,
Object object)
allows adding an arbitrary object to the session with static a string key that can be used to later access this object from the session using the retrieveObject method in this class |
String |
addObjectWithGeneratedKey(Object object)
allows adding an arbitrary object to the session and returns a string key that can be used to later access this object from the session using the retrieveObject method in this class. |
String |
addObjectWithGeneratedKey(Serializable object,
String keyPrefix)
allows adding an arbitrary object to the session and returns a string key that can be used to later access this object from the session using the retrieveObject method in this class. |
void |
clearBackdoorUser()
clear the backdoor user |
void |
clearObjectMap()
clear the objectMap |
Person |
getActualPerson()
Returns the actual current user even if the backdoor is in use. |
List<SessionTicket> |
getAllSessionTickets()
Retrieves all SessionTicket instances currently in the UserSession#objectMap |
List<SessionTicket> |
getAllSessionTicketsByType(String ticketTypeName)
Retrieves all SessionTicket instances currently in the UserSession#objectMap that are of a given ticket type |
String |
getKualiSessionId()
Returns the session id. |
String |
getLoggedInUserPrincipalName()
Returns who is logged in. |
Map<String,Object> |
getObjectMap()
retrieves an unmodifiable view of the objectMap. |
Person |
getPerson()
Returns a Person object for the current user. |
String |
getPrincipalId()
Returns the id of the current user. |
String |
getPrincipalName()
Returns the name of the current user. |
boolean |
hasMatchingSessionTicket(String ticketTypeName,
Map<String,String> matchContext)
Determines if the UserSession contains a ticket of the given type that matches the given context. |
protected void |
initPerson(String principalName)
Loads the Person object from KIM. |
boolean |
isBackdoorInUse()
|
String |
putSessionTicket(SessionTicket ticket)
Adds the given SessionTicket to the objectMap and returns the associated key |
void |
removeObject(String objectKey)
allows for removal of an object from session that has been put into the userSession based on the key that would have been assigned |
void |
removeObjectsByPrefix(String objectKeyPrefix)
allows for removal of an object from session that has been put into the userSession based on a key that starts with the given prefix |
Object |
retrieveObject(String objectKey)
allows for fetching an object that has been put into the userSession based on the key that would have been returned when adding the object |
void |
setBackdoorUser(String principalName)
override the current user in the system by setting the backdoor networkId, which is useful when dealing with routing or other reasons why you would need to assume an identity in the system |
void |
setKualiSessionId(String kualiSessionId)
Sets the session id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserSession(String principalName)
principalName
- Method Detail |
---|
public String getKualiSessionId()
public void setKualiSessionId(String kualiSessionId)
kualiSessionId
- the kualiSessionId to setprotected void initPerson(String principalName)
principalName
- the principalNamepublic String getPrincipalId()
public String getPrincipalName()
public String getLoggedInUserPrincipalName()
public Person getPerson()
public Person getActualPerson()
public void setBackdoorUser(String principalName)
principalName
- public void clearBackdoorUser()
public String addObjectWithGeneratedKey(Serializable object, String keyPrefix)
object
- public String addObjectWithGeneratedKey(Object object)
object
- public void addObject(String key, Object object)
object
- public Object retrieveObject(String objectKey)
objectKey
- public void removeObject(String objectKey)
objectKey
- public void removeObjectsByPrefix(String objectKeyPrefix)
public boolean isBackdoorInUse()
public String putSessionTicket(SessionTicket ticket)
ticket
- - SessionTicket to add
public List<SessionTicket> getAllSessionTickets()
public List<SessionTicket> getAllSessionTicketsByType(String ticketTypeName)
public boolean hasMatchingSessionTicket(String ticketTypeName, Map<String,String> matchContext)
ticketTypeName
- - Name of the ticket type to matchmatchContext
- - Map on context parameters to match on
public Map<String,Object> getObjectMap()
public void clearObjectMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |