com.ibm.commerce.scheduler.commands
Class RefreshRegistryCmdImpl

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

public class RefreshRegistryCmdImpl
extends ControllerCommandImpl
implements RefreshRegistryCmd

Refresh the registry information for all clones of the Commerce Server instance.

The command has the following parameters:

Adds a new broadcast job to the Commerce Scheduler that will execute the RefreshLocalRegistry command.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
protected  java.lang.Long itJobId
           
protected  java.lang.Long itJobInstanceId
           
protected  java.lang.String itUrl
           
 
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. RefreshRegistryCmd
defaultCommandClassName, NAME
 
Constructor Summary
RefreshRegistryCmdImpl()
          Creates the RefreshRegistry command object.
 
Method Summary
 java.lang.Long getJobId()
          Gets the job reference number of the broadcast job to refresh the registry.
 java.lang.Long getJobInstanceId()
          Gets the job instance number of when the registry is to be refreshed.
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()
          Calls the AddBroadcast command to create a broadcast command that will run RefreshLocalRegisty.
 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.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, 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, validateParameters
 
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, isGeneric, 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, validateParameters
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.
See Also:
Constant Field Values

itUrl

protected java.lang.String itUrl

itJobId

protected java.lang.Long itJobId

itJobInstanceId

protected java.lang.Long itJobInstanceId
Constructor Detail

RefreshRegistryCmdImpl

public RefreshRegistryCmdImpl()
Creates the RefreshRegistry command object.
Method Detail

getJobId

public java.lang.Long getJobId()
Gets the job reference number of the broadcast job to refresh the registry.
Specified by:
getJobId in interface RefreshRegistryCmd
Returns:
The job reference number.

getJobInstanceId

public java.lang.Long getJobInstanceId()
Gets the job instance number of when the registry is to be refreshed.
Specified by:
getJobInstanceId in interface RefreshRegistryCmd
Returns:
The job instance number.

getRegistryName

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

getUrl

protected java.lang.String getUrl()
Gets the URL to be redirected to at the end of the command.
Returns:
The URL to redirect to.

performExecute

public void performExecute()
                    throws ECException
Calls the AddBroadcast command to create a broadcast command that will run RefreshLocalRegisty. The registry to update will be basic on the registry specified. If not registry is specified, no registry will be specified to the RefreshLocalRegistry command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - if an exception occurs creating the broadcast job.

setRegistryName

public void setRegistryName(java.lang.String name)
Sets the name of the registry to be refreshed.
Specified by:
setRegistryName in interface RefreshRegistryCmd
Parameters:
name - the 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 - the parameters specified to the command.
Throws:
ECApplicationException - if the registry name specified is invalid.

setUrl

public void setUrl(java.lang.String url)
Sets the URL to be redirected to at the end of the command.
Parameters:
url - the URL to redirect to.