com.ibm.commerce.security.commands
Class LogoffCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.security.commands.LogoffCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, LogoffCmd

public class LogoffCmdImpl
extends ControllerCommandImpl
implements LogoffCmd

The user is logged off the system by setting the identity under which further execution will be performed to that of the Generic user. View Task: LogoffView

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.security.commands. LogoffCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Constructor Summary
LogoffCmdImpl()
           
 
Method Summary
 java.lang.String getURL()
          Gets the URL specified.
 boolean isGeneric()
          Whether or not this command can be invoked by a generic user.
 void performExecute()
          Executes the command.
 void setRequestProperties( TypedProperty hshReqParameters)
          Sets the request properties.
 void setURL(java.lang.String strURL)
          Sets the URL to redirect to after logging off the user.
protected  void updateCmdContext()
          Switches the current user identity to the identity associated with the Generic user.
 void validateParameters()
          Validates the parameters.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Constructor Detail

LogoffCmdImpl

public LogoffCmdImpl()
Method Detail

getURL

public java.lang.String getURL()
Gets the URL specified.
Returns:
String The URL to redirect to after invoking the command.

isGeneric

public boolean isGeneric()
Whether or not this command can be invoked by a generic user.
Specified by:
isGeneric in interface ControllerCommand
Overrides:
isGeneric in class ControllerCommandImpl
Returns:
boolean Returns true.

performExecute

public void performExecute()
                    throws ECException
Executes the command. Switches the user identity to the identity of the generic shopper, and redirects to either the specified URL (if specified) or the generic LogoffView otherwise.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setRequestProperties

public void setRequestProperties(TypedProperty hshReqParameters)
                          throws ECApplicationException
Sets the request properties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
hshReqParameters - The request parameters.
Throws:
ECApplicationException

setURL

public void setURL(java.lang.String strURL)
Sets the URL to redirect to after logging off the user.
Parameters:
strURL - The URL to redirect to after logging off the user.

updateCmdContext

protected void updateCmdContext()
Switches the current user identity to the identity associated with the Generic user. The session manager should able to recognize this switch and kill the session associated with the pre-logoff identity.

validateParameters

public void validateParameters()
                        throws ECException
Validates the parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException