com.ibm.commerce.security.commands
Class SecurityCheckCmdImpl

java.lang.Object
  CacheableCommandImpl
      com.ibm.commerce.command.AbstractECTargetableCommand
          com.ibm.commerce.command.ControllerCommandImpl
              com.ibm.commerce.security.commands.SecurityCheckCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, SecurityCheckCmd

public class SecurityCheckCmdImpl
extends ControllerCommandImpl
implements SecurityCheckCmd

Checks the system for potential security violations This is the corresponding command for the SecurityChecker tool found on AdminConsole/Security/Security Checker

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.SecurityCheckCmd
COPYRIGHT, defaultCommandClassName, NAME
Constructor Summary
SecurityCheckCmdImpl()
Method Summary
void deleteBinFiles(java.lang.String s, java.lang.String dir)
Deletes temporary files from the 'Bin' directory.
void deleteInstanceFiles(java.lang.String s, java.lang.String dir)
Deletes temporary files from the 'INSTANCES' directory
void deleteSystemFiles(java.lang.String s)
Deletes temporary SYSTEM files.
void deleteTempFiles(java.lang.String s)
Deletes temporary files from the 'TEMP' directory
java.lang.String getTime()
Gets the current Time
java.lang.String getURL()
Gets the redirect URL Creation date: (08/02/01 2:11:52 PM)
boolean isGeneric()
Whether or not the command can be run by a generic user.
void performExecute()
Execution task within the Security Checks.
java.lang.String replace(java.lang.String base, java.lang.String x, java.lang.String y)
Replaces first occurence of x in base with y.
void setRequestProperties(TypedProperty hshReqParameters)
The only requested property we need to set here is the redirectURL.
void setURL(java.lang.String strURL)
Sets the redirect URL to a specific one the function paramter specified
void validateParameters()
Validate 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
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner

Constructor Detail

SecurityCheckCmdImpl

public SecurityCheckCmdImpl()
Method Detail

deleteBinFiles

public void deleteBinFiles(java.lang.String s,
                           java.lang.String dir)
Deletes temporary files from the 'Bin' directory. Actually, the function is also used to delete temporary files from temp directories other than BIN. The name of the temporary directory could be specified on the 2nd paramater.
Parameters:
s - The name of the file(s) to delete.
dir - The temporary directory.

deleteInstanceFiles

public void deleteInstanceFiles(java.lang.String s,
                                java.lang.String dir)
Deletes temporary files from the 'INSTANCES' directory
Parameters:
s - The name of the file(s) to delete.
dir - The root directory for the temporary files.

deleteSystemFiles

public void deleteSystemFiles(java.lang.String s)
Deletes temporary SYSTEM files.
Parameters:
s - Fully qualified file name.

deleteTempFiles

public void deleteTempFiles(java.lang.String s)
Deletes temporary files from the 'TEMP' directory
Parameters:
s - Name of a file in a directory under c:\temp

getTime

public java.lang.String getTime()
Gets the current Time
Returns:
String Current time.

getURL

public java.lang.String getURL()
Gets the redirect URL Creation date: (08/02/01 2:11:52 PM)
Returns:
java.lang.String

isGeneric

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

performExecute

public void performExecute()
                    throws ECException
Execution task within the Security Checks.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException
See Also:
com.ibm.websphere.command.TargetableCommand#performExecute()

replace

public java.lang.String replace(java.lang.String base,
                                java.lang.String x,
                                java.lang.String y)
Replaces first occurence of x in base with y.
Parameters:
base - Base string for the replacement.
x - String to look for in base.
y - String to use in place of x in base.
Returns:
String Returns a String created by replacing the first occurence of x in base with y.

setRequestProperties

public void setRequestProperties(TypedProperty hshReqParameters)
                          throws ECApplicationException
The only requested property we need to set here is the redirectURL. It is passed by the hshReqParameters Hashtable
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 redirect URL to a specific one the function paramter specified
Parameters:
strURL - The redirect url.

validateParameters

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

Feedback