planetj.dataengine.security.http
Class SignOnReceipt

java.lang.Object
  extended byplanetj.dataengine.security.http.SignOnReceipt
All Implemented Interfaces:
java.util.EventListener, IRowEventListener, IUser, java.security.Principal, java.io.Serializable

public class SignOnReceipt
extends java.lang.Object
implements IUser, IRowEventListener, java.io.Serializable

A SignOnReceipt is created when a user signs on to a secured application. It is used to store information about how the user signed on.

See Also:
Serialized Form

Field Summary
static java.lang.String USER_ID
           
 
Constructor Summary
SignOnReceipt(ISignOn pSignOn)
          SignOnReceipt constructor
 
Method Summary
 java.lang.String checkForSpecialWindowsParam(java.lang.String paramKey)
           
 java.lang.Object getDisplayValueByUsageId(int usageId)
          Get a display value from this user for the given usage id.
 long getElapsedTime()
          Gets the time elapsed since this method was last invoked.
 java.lang.String getFirstName()
          Gets the name for this user, which should uniquely identify the user in the current context.
 java.lang.String getGlobalSignOnValue()
          Returns the key value that is stored as a shared session attribute of either connection alias, or operation id If mGlobalSignOnKey is not set, this SignOnReceipt will not be stored in the Shared Session We should be storeing OperatingSystemSignon Receipts keyed by System Alias, and SQLOperationSignOn Receipts by Operation This is used for single signon to multiple applications Creation date: (8/14/2003 6:23:57 PM)
 int getId()
          Gets the id of the application that was signed on to
 java.lang.String getLastName()
          Gets the name for this user, which should uniquely identify the user in the current context.
 java.lang.String getName()
          Gets the name of the user.
 int getOwnerId()
          Insert the method's description here.
 Row getPropertiesRow()
          Gets the row stored in this SignOnReceipt during sign on.
 java.lang.String getPropertyDisplayValue(java.lang.String fieldName)
          Gets a Field's value from a row stored in this SignOnReceipt during sign on.
 java.lang.Object getPropertyValue(java.lang.String fieldName)
          Gets a Field's value from a row stored in this SignOnReceipt during sign on.
 java.lang.String getPropertyValueAsString(java.lang.String fieldName)
          Gets a Field's value from a row stored in this SignOnReceipt during sign on.
 java.util.Map getReplacementLibraries()
          Get the library list for the current user.
 int getSecurityLevel()
          Gets the security level of the user
 ISignOn getSignOn()
          Gets the SignOn object for this receipt
 java.util.Map getSignOnReplacementLibraries()
          Gets the replacement libraries as they existed at signon time
 long getSignOnTimestamp()
          Gets the sign on time
 java.lang.String getSignOnUserLibrary()
          Gets the user library in use at signon time
 java.lang.String getSystemAlias()
          Gets the system alias that was signed on to.
 int getThemeId()
          Gets the theme id of this user
 int getTimeoutSeconds()
          Gets the number of seconds for which this sign on can remain inactive and still be valid
 long getTimestamp()
          Gets the sign on time
 java.lang.Object getUserDisplayValue(java.lang.String key)
          Gets the display value from the user for the specified key
 java.lang.String getUserId()
          Gets the userId that was used to sign on
 java.lang.String getUserMode()
          Gets the MODE of the user.
 java.lang.String getUserName()
          Gets the name of the user.
 java.lang.Object getUserSQLValue(java.lang.String key)
          Gets the value of the specified user field as an Object for use as an SQL parameter
 java.lang.Object getUserValue(java.lang.String key)
          Gets the value of the specified user field as an Object
 java.lang.Object getValueByFieldClass(java.lang.Class pClass)
           
 java.lang.Object getValueByUsageId(int usageId)
          Get a value from this user for the given usage id.
 boolean handleRowEvent(RowEvent pEvent)
          This will handle the RowEvent accordingly (7/11/2002 1:37:05 PM)
 boolean hasSecurityLevel()
          Method that can be used to determine if the user has a security level.
 boolean isAdmin()
          !!A WK (9/4/2002 3:26:12 PM) Admin has not yet been implemented.
 boolean isExpired()
          Tests if this receipt is still valid or if it has expired.
protected  boolean isIgnoreUnbind()
          Gets whether or not session unbind events will be ignored
 boolean isPJAdmin()
          !!A WK (9/4/2002 3:26:12 PM) PJ Admin has not yet been implemented.
 void setGlobalSignOnKey(byte newGlobalSignOnKey)
          Must be set to one of the values stored in ISignOn.
 void setId(int newId)
          Sets the id of the application that was signed on to
protected  void setIgnoreUnbind(boolean newIgnoreUnbind)
          Sets whether or not session unbind events will be ignored
 void setOwnerId(int newOwnerId)
          Insert the method's description here.
 void setPropertiesRow(Row row)
          Sets the row stored in this SignOnReceipt during sign on.
 void setPropertyValue(java.lang.String fieldName, java.lang.Object value)
          Sets the given value on the property row if there is one.
 void setSystemAlias(java.lang.String newSystemAlias)
          Sets the system alias that was signed on to.
 void setTimeoutSeconds(int seconds)
          Sets the number of seconds for which this sign on is valid
 void setUserId(java.lang.String newUserId)
          Sets the userId that was used to sign on
 void setUserMode(java.lang.String pUserMode)
          Sets the MODE of this user
 void setUserValue(java.lang.String key, java.lang.Object value)
          sets the value of the specified user field as an Object
 void valueBound(HttpSessionBindingEvent arg1)
          Invoked whenever the receipt is added to a session
 void valueUnbound(HttpSessionBindingEvent pEvent)
          Invoked whenever the receipt is removed from a session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Field Detail

USER_ID

public static final java.lang.String USER_ID
See Also:
Constant Field Values
Constructor Detail

SignOnReceipt

public SignOnReceipt(ISignOn pSignOn)
SignOnReceipt constructor

Method Detail

checkForSpecialWindowsParam

public java.lang.String checkForSpecialWindowsParam(java.lang.String paramKey)

getDisplayValueByUsageId

public java.lang.Object getDisplayValueByUsageId(int usageId)
                                          throws CMException
Description copied from interface: IUser
Get a display value from this user for the given usage id.

Specified by:
getDisplayValueByUsageId in interface IUser
Throws:
CMException

getElapsedTime

public long getElapsedTime()
Gets the time elapsed since this method was last invoked. If this method has never been invoked, then the time elapsed since this object was created is returned.


getFirstName

public java.lang.String getFirstName()
Gets the name for this user, which should uniquely identify the user in the current context.

Specified by:
getFirstName in interface IUser

getGlobalSignOnValue

public java.lang.String getGlobalSignOnValue()
Returns the key value that is stored as a shared session attribute of either connection alias, or operation id If mGlobalSignOnKey is not set, this SignOnReceipt will not be stored in the Shared Session We should be storeing OperatingSystemSignon Receipts keyed by System Alias, and SQLOperationSignOn Receipts by Operation This is used for single signon to multiple applications Creation date: (8/14/2003 6:23:57 PM)


getId

public int getId()
Gets the id of the application that was signed on to


getLastName

public java.lang.String getLastName()
Gets the name for this user, which should uniquely identify the user in the current context.

Specified by:
getLastName in interface IUser

getName

public java.lang.String getName()
Gets the name of the user.

Specified by:
getName in interface java.security.Principal

getOwnerId

public int getOwnerId()
Insert the method's description here. Creation date: (7/2/2002 2:18:30 AM)

Specified by:
getOwnerId in interface IUser
Returns:
int

getPropertiesRow

public Row getPropertiesRow()
Gets the row stored in this SignOnReceipt during sign on. If no row was stored, then null is returned.

Specified by:
getPropertiesRow in interface IUser
Returns:

getPropertyDisplayValue

public java.lang.String getPropertyDisplayValue(java.lang.String fieldName)
Gets a Field's value from a row stored in this SignOnReceipt during sign on. If no row was stored, then null is returned.


getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String fieldName)
Gets a Field's value from a row stored in this SignOnReceipt during sign on. If no row was stored, then null is returned.


getPropertyValueAsString

public java.lang.String getPropertyValueAsString(java.lang.String fieldName)
Gets a Field's value from a row stored in this SignOnReceipt during sign on. If no row was stored, then null is returned.


getReplacementLibraries

public java.util.Map getReplacementLibraries()
Get the library list for the current user.

Specified by:
getReplacementLibraries in interface IUser

getSecurityLevel

public int getSecurityLevel()
Gets the security level of the user

Specified by:
getSecurityLevel in interface IUser

getSignOn

public final ISignOn getSignOn()
Gets the SignOn object for this receipt


getSignOnReplacementLibraries

public java.util.Map getSignOnReplacementLibraries()
Gets the replacement libraries as they existed at signon time


getSignOnTimestamp

public long getSignOnTimestamp()
Gets the sign on time


getSignOnUserLibrary

public java.lang.String getSignOnUserLibrary()
Gets the user library in use at signon time


getSystemAlias

public java.lang.String getSystemAlias()
Gets the system alias that was signed on to.

Specified by:
getSystemAlias in interface IUser

getThemeId

public int getThemeId()
Gets the theme id of this user

Specified by:
getThemeId in interface IUser

getTimeoutSeconds

public int getTimeoutSeconds()
Gets the number of seconds for which this sign on can remain inactive and still be valid


getTimestamp

public long getTimestamp()
Gets the sign on time


getUserDisplayValue

public java.lang.Object getUserDisplayValue(java.lang.String key)
Description copied from interface: IUser
Gets the display value from the user for the specified key

Specified by:
getUserDisplayValue in interface IUser

getUserId

public java.lang.String getUserId()
Gets the userId that was used to sign on


getUserName

public java.lang.String getUserName()
Gets the name of the user.

Specified by:
getUserName in interface IUser

getUserSQLValue

public java.lang.Object getUserSQLValue(java.lang.String key)
                                 throws CMException
Description copied from interface: IUser
Gets the value of the specified user field as an Object for use as an SQL parameter

Specified by:
getUserSQLValue in interface IUser
Throws:
CMException

getUserValue

public java.lang.Object getUserValue(java.lang.String key)
Description copied from interface: IUser
Gets the value of the specified user field as an Object

Specified by:
getUserValue in interface IUser

getValueByFieldClass

public java.lang.Object getValueByFieldClass(java.lang.Class pClass)
                                      throws CMException
Throws:
CMException

getValueByUsageId

public java.lang.Object getValueByUsageId(int usageId)
                                   throws CMException
Description copied from interface: IUser
Get a value from this user for the given usage id.

Specified by:
getValueByUsageId in interface IUser
Throws:
CMException

handleRowEvent

public boolean handleRowEvent(RowEvent pEvent)
Description copied from interface: IRowEventListener
This will handle the RowEvent accordingly (7/11/2002 1:37:05 PM)

Specified by:
handleRowEvent in interface IRowEventListener
Parameters:
pEvent - planetj.database.RowEvent
Returns:
boolean true if everything was a success.
See Also:
IRowEventListener

hasSecurityLevel

public boolean hasSecurityLevel()
Method that can be used to determine if the user has a security level.

Specified by:
hasSecurityLevel in interface IUser
Returns:
true if the user has a security level; false otherwise

isAdmin

public boolean isAdmin()
!!A WK (9/4/2002 3:26:12 PM) Admin has not yet been implemented. This method is just a place holder. Currently, there are no Admins.

Specified by:
isAdmin in interface IUser

isExpired

public boolean isExpired()
Tests if this receipt is still valid or if it has expired.


isIgnoreUnbind

protected boolean isIgnoreUnbind()
Gets whether or not session unbind events will be ignored


isPJAdmin

public boolean isPJAdmin()
!!A WK (9/4/2002 3:26:12 PM) PJ Admin has not yet been implemented. This method is just a place holder. Currently, there are no PJ Admins.

Specified by:
isPJAdmin in interface IUser
Returns:

setGlobalSignOnKey

public void setGlobalSignOnKey(byte newGlobalSignOnKey)
Must be set to one of the values stored in ISignOn. For instance this value could be set to: ISignOn.GLOBAL_SIGNON_KEY_SYSTEM_ALIAS ISignOn.GLOBAL_SIGNON_KEY_OPERATION_ID Creation date: (8/14/2003 6:42:09 PM)

Parameters:
newGlobalSignOnKey - byte

setId

public void setId(int newId)
Sets the id of the application that was signed on to


setIgnoreUnbind

protected void setIgnoreUnbind(boolean newIgnoreUnbind)
Sets whether or not session unbind events will be ignored


setOwnerId

public void setOwnerId(int newOwnerId)
Insert the method's description here. Creation date: (7/2/2002 2:18:30 AM)

Parameters:
newOwnerId - int

setPropertiesRow

public void setPropertiesRow(Row row)
Sets the row stored in this SignOnReceipt during sign on.

Specified by:
setPropertiesRow in interface IUser
Parameters:
row -

setPropertyValue

public void setPropertyValue(java.lang.String fieldName,
                             java.lang.Object value)
                      throws CMException
Sets the given value on the property row if there is one.

Throws:
CMException

setSystemAlias

public void setSystemAlias(java.lang.String newSystemAlias)
Sets the system alias that was signed on to.


setTimeoutSeconds

public void setTimeoutSeconds(int seconds)
Sets the number of seconds for which this sign on is valid


setUserId

public void setUserId(java.lang.String newUserId)
Sets the userId that was used to sign on


valueBound

public void valueBound(HttpSessionBindingEvent arg1)
Invoked whenever the receipt is added to a session


valueUnbound

public void valueUnbound(HttpSessionBindingEvent pEvent)
Invoked whenever the receipt is removed from a session


getUserMode

public java.lang.String getUserMode()
Description copied from interface: IUser
Gets the MODE of the user. This has to do with usability. NOVICE, ADVANCED

Specified by:
getUserMode in interface IUser
See Also:
IUser.getUserMode()

setUserMode

public void setUserMode(java.lang.String pUserMode)
Description copied from interface: IUser
Sets the MODE of this user

Specified by:
setUserMode in interface IUser
See Also:
IUser.setUserMode(java.lang.String)

setUserValue

public void setUserValue(java.lang.String key,
                         java.lang.Object value)
                  throws CMException
Description copied from interface: IUser
sets the value of the specified user field as an Object

Specified by:
setUserValue in interface IUser
Throws:
CMException