com.ibm.commerce.scheduler.commands
Class RefreshLocalRegistryCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.command.AsyncControllerCommandImpl
|
+--com.ibm.commerce.scheduler.commands.RefreshLocalRegistryCmdImpl
- All Implemented Interfaces:
- AccCommand, AsyncCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RefreshLocalRegistryCmd, java.lang.Runnable
- public class RefreshLocalRegistryCmdImpl
- extends AsyncControllerCommandImpl
- implements java.lang.Runnable, AsyncCommand, RefreshLocalRegistryCmd
Refresh the local copy of the runtime cache command implementation.
This is invoked by the scheduler as an asynchronize command.
Field Summary |
protected com.ibm.commerce.scheduler.commands.SchedulerBroadcastAccessBean |
abBroadcast
|
protected com.ibm.commerce.scheduler.commands.SchedulerConfigAccessBean |
abConfig
|
protected com.ibm.commerce.scheduler.commands.SchedulerStatusAccessBean |
abStatus
|
static java.lang.String |
COPYRIGHT
|
protected boolean |
isBroadcast
|
Method Summary |
protected java.lang.String |
getRegistryName()
Gets the name of the registry to be refreshed. |
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 |
refreshRegistry()
This method calls the RegistryManager to refresh one all all registries. |
void |
run()
This method is required by the runnable interface. |
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. |
boolean |
updateState(java.lang.String newState,
java.lang.String excepCode)
Update the state of the broadcast job corresponding to the command. |
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, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
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, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
abBroadcast
protected com.ibm.commerce.scheduler.commands.SchedulerBroadcastAccessBean abBroadcast
abConfig
protected com.ibm.commerce.scheduler.commands.SchedulerConfigAccessBean abConfig
abStatus
protected com.ibm.commerce.scheduler.commands.SchedulerStatusAccessBean abStatus
COPYRIGHT
public static final java.lang.String COPYRIGHT
isBroadcast
protected boolean isBroadcast
RefreshLocalRegistryCmdImpl
public RefreshLocalRegistryCmdImpl()
- RefreshRegistryImpl constructor.
getRegistryName
protected java.lang.String getRegistryName()
- Gets the name of the registry to be refreshed.
- Returns:
- String - registry name
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
-
refreshRegistry
public void refreshRegistry()
- This method calls the RegistryManager to refresh one all all registries. The command is executed within a
transaction. At the end of the refresh, the corresponding entry in the SCHBRDCST table will be updated.
- Throws:
ECException
-
run
public void run()
- This method is required by the runnable interface. This is where the RefreshRegistry method is invoked.
- Specified by:
run
in interface java.lang.Runnable
setRegistryName
public void setRegistryName(java.lang.String name)
- Sets the name of the registry to be refreshed.
- Specified by:
setRegistryName
in interface RefreshLocalRegistryCmd
- 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
updateState
public boolean updateState(java.lang.String newState,
java.lang.String excepCode)
- Update the state of the broadcast job corresponding to the command.
- Parameters:
newState
- String - status of the jobexcepCode
- String - exception code correspond to an error state