com.ibm.commerce.scheduler.commands
Class UpdateLocalRegistryCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.scheduler.commands.UpdateLocalRegistryCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RefreshLocalRegistryCmd, UpdateLocalRegistryCmd
- public class UpdateLocalRegistryCmdImpl
- extends ControllerCommandImpl
- implements UpdateLocalRegistryCmd
Refresh the local copy of the runtime cache command implementation.
This is invoked by the scheduler as an asynchronize command.
Method Summary |
protected java.lang.String |
getAction()
Gets the name of the registry to be refreshed. |
protected java.lang.String |
getItemKey()
Gets the name of the registry to be refreshed. |
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.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
action
protected java.lang.String action
itUrl
protected java.lang.String itUrl
key
protected java.lang.String key
registry
protected Registry registry
registryName
protected java.lang.String registryName
UpdateLocalRegistryCmdImpl
public UpdateLocalRegistryCmdImpl()
- RefreshRegistryImpl constructor.
getAction
protected java.lang.String getAction()
- Gets the name of the registry to be refreshed.
- Returns:
- String - registry name
getItemKey
protected java.lang.String getItemKey()
- Gets the name of the registry to be refreshed.
- Returns:
- String - registry name
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. If a scheduler exists, then it will
schedule another thread to perform the registry update.
- 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 UpdateLocalRegistryCmd
- Parameters:
action
- java.lang.String
setItemKey
public void setItemKey(java.lang.String key)
- Sets the Item Key.
- Specified by:
setItemKey
in interface UpdateLocalRegistryCmd
- 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 UpdateLocalRegistryCmd
- Parameters:
name
- String - registry name
setRequestProperties
public void setRequestProperties(TypedProperty reqParms)
throws ECException
- 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.
-