com.ibm.commerce.scheduler.commands
Class UpdateRegistryCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.scheduler.commands.UpdateRegistryCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RefreshRegistryCmd, UpdateRegistryCmd

public class UpdateRegistryCmdImpl
extends ControllerCommandImpl
implements UpdateRegistryCmd

Command to update the registry.


Field Summary
protected  java.lang.String action
           
protected  java.lang.Long jobId
           
protected  java.lang.Long jobInstanceId
           
protected  java.lang.String key
           
protected  Registry registry
           
protected  java.lang.String registryName
           
protected  java.lang.String url
           
 
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.scheduler.commands.UpdateRegistryCmd
COPYRIGHT, defaultCommandClassName, URLNAME
 
Fields inherited from interface com.ibm.commerce.scheduler.commands.RefreshRegistryCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
UpdateRegistryCmdImpl()
          UpdateRgistryCmdImpl constructor comment.
 
Method Summary
protected  java.lang.String getItemKey()
          Gets the name of the registry to be refreshed.
 java.lang.Long getJobId()
          Gets the job id.
 java.lang.Long getJobInstanceId()
          Gets the job instance id.
protected  java.lang.String getRegistryName()
          Gets the name of the registry to be refreshed.
 AccessVector getResources()
          Gets the access vector accessed by this command.
protected  java.lang.String getUrl()
          Gets the url to be redirected to at the end of the command.
 void performExecute()
          This method contains the main business logic of this command.
 void setAction(java.lang.String action)
          Sets the action.
 void setItemKey(java.lang.String key)
          Sets the Item Key.
 void setRegistryName(java.lang.String name)
          Sets the name of the registry to be refreshed.
 void setRequestProperties(TypedProperty reqParms)
          This method extracts the required parameters from the request properties and sets it locally in the command.
 void setUrl(java.lang.String url)
          Sets the url to be redirected to at the end of the command.
 void validateParameters()
          This is where parameter checking is done.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

action

protected java.lang.String action

jobId

protected java.lang.Long jobId

jobInstanceId

protected java.lang.Long jobInstanceId

key

protected java.lang.String key

registry

protected Registry registry

registryName

protected java.lang.String registryName

url

protected java.lang.String url
Constructor Detail

UpdateRegistryCmdImpl

public UpdateRegistryCmdImpl()
UpdateRgistryCmdImpl constructor comment.
Method Detail

getItemKey

protected java.lang.String getItemKey()
Gets the name of the registry to be refreshed.

Returns:
String - registry name

getJobId

public java.lang.Long getJobId()
Gets the job id.

Specified by:
getJobId in interface RefreshRegistryCmd
Returns:
Long

getJobInstanceId

public java.lang.Long getJobInstanceId()
Gets the job instance id.

Specified by:
getJobInstanceId in interface RefreshRegistryCmd
Returns:
Long

getRegistryName

protected java.lang.String getRegistryName()
Gets the name of the registry to be refreshed.

Returns:
String - registry name

getResources

public AccessVector getResources()
                          throws ECException
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command. It is the responsibilities of the command writer to return the protectable primary resource(s) and the corresponding actions accessed by this command.

Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
AccessVector - a vector of resource action pairs

getUrl

protected java.lang.String getUrl()
Gets the url to be redirected to at the end of the command.

Returns:
String - url

performExecute

public void performExecute()
                    throws ECException
This method contains the main business logic of this command.

Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException -  

setAction

public void setAction(java.lang.String action)
Sets the action.
Specified by:
setAction in interface UpdateRegistryCmd
Parameters:
action - java.lang.String

setItemKey

public void setItemKey(java.lang.String key)
Sets the Item Key.
Specified by:
setItemKey in interface UpdateRegistryCmd
Parameters:
key - java.lang.String

setRegistryName

public void setRegistryName(java.lang.String name)
Sets the name of the registry to be refreshed.

Specified by:
setRegistryName in interface UpdateRegistryCmd
Parameters:
name - String - registry name

setRequestProperties

public void setRequestProperties(TypedProperty reqParms)
                          throws ECApplicationException
This method extracts the required parameters from the request properties and sets it locally in the command. It throws an ECApplicationException if a required parameter is missing.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
reqParms - com.ibm.commerce.datatype.TypedProperty
Throws:
ECApplicationException -  

setUrl

public void setUrl(java.lang.String url)
Sets the url to be redirected to at the end of the command.

Parameters:
url - String - url

validateParameters

public void validateParameters()
                        throws ECException
This is where parameter checking is done. This method replaces checkParameters() in 5.1. The default implementation of validateParameters() will be a no op. It is the responsibility of the command writers to implements this method if they want to perform server side parameter checking.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException. -