java.lang.Object | +--com.ibm.commerce.command.CommandFactory
This is the CommandFactory for instantiating Commands
Field Summary | |
---|---|
protected
static java.util.Hashtable |
commandClassesCache |
protected
static CommandRegistry |
commandRegistry |
protected
static java.util.Hashtable |
viewCommandClassesCache |
protected
static ViewRegistry |
viewRegistry |
Constructor Summary | |
---|---|
CommandFactory() CommandFactory constructor. |
Method Summary | |
---|---|
static
ECCommand |
createBusinessPolicyCommand(java.lang.Long policyId) This method searches the command registry for an entry correspnding to the specified command (interface) name and storeId. |
static
ECCommand |
createBusinessPolicyCommand(java.lang.Long policyId,
java.lang.String interfaceName) This method searches the policy command registry for an entry correspnding to the specified command (interface) name and policy id. |
static
ECCommand |
createCommand(
CommandRegistryEntry cmdEntry) This method instantiate an instance of a command based on the commandRegistryEntry information. |
static
ECCommand |
createCommand(
CommandRegistryEntry cmdEntry, java.lang.Integer storeId) This method instantiate an instance of a command based on the commandRegistryEntry information. |
static
ECCommand |
createCommand(java.lang.String cmdRefKey,
java.lang.Integer storeId) This method searches the command registry for an entry correspnding to the specified command (interface) name and storeId. |
static
ECCommand |
createCommand(java.lang.String cmdRefKey, java.lang.Integer storeId,
boolean exceptionNeeded) This method searches the command registry for an entry correspnding to the specified command (interface) name and storeId. |
static
ECCommand |
createViewCommand(
ViewRegistryEntry cmdEntry) |
static
ECCommand |
createViewCommand(
ViewRegistryEntry cmdEntry, java.lang.Integer storeId) |
static java.lang.String |
getCommandClassNameFromInterface(java.lang.String commandInterfaceName) This method returns the default implementation of an interface. |
static
CommandRegistryEntry |
locateCommandEntry(java.lang.String cmdRefKey,
java.lang.Integer storeId) |
static
CommandRegistryEntry |
locateCommandEntry(java.lang.String cmdRefKey,
java.lang.Integer storeId, boolean exceptionNeeded) |
static
ViewRegistryEntry |
locateViewCommandEntry(java.lang.String cmdRefKey,
java.lang.Integer storeId, java.lang.Integer deviceFmt) |
static
ViewRegistryEntry |
locateViewCommandEntry(java.lang.String cmdRefKey,
java.lang.Integer storeId, java.lang.Integer deviceFmt,
boolean exceptionNeeded) |
static
ViewRegistryEntry |
locateViewCommandEntry(java.lang.String cmdRefKey,
java.lang.Integer storeId, java.lang.Integer deviceFmt,
java.lang.Integer dftDeviceFmt) |
static
ViewRegistryEntry |
locateViewCommandEntry(java.lang.String cmdRefKey,
java.lang.Integer storeId, java.lang.Integer deviceFmt,
java.lang.Integer dftDeviceFmt, boolean exceptionNeeded) |
static void |
setCommandRegistry(
CommandRegistry newValue) This method set the command registry to be used by the command factory to locate commands. |
static void |
setViewRegistry(
ViewRegistry newValue) This method set the view registry to be used by the command factory to locate commands. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
protected static CommandRegistry commandRegistry
protected static java.util.Hashtable commandClassesCache
protected static ViewRegistry viewRegistry
protected static java.util.Hashtable viewCommandClassesCache
Constructor Detail |
---|
public CommandFactory()
Method Detail |
---|
public static ECCommand createBusinessPolicyCommand(java.lang.Long policyId) throws ECException
ECException
public static ECCommand createBusinessPolicyCommand(java.lang.Long policyId, java.lang.String interfaceName) throws ECException
policyId
- Long - policy IdECException
public static ECCommand createCommand(CommandRegistryEntry cmdEntry) throws ECException
ECException
public static ECCommand createCommand(CommandRegistryEntry cmdEntry, java.lang.Integer storeId) throws ECException
storeId
- Integer - the storeId associated with the
commandECException
public static ECCommand createCommand(java.lang.String cmdRefKey, java.lang.Integer storeId) throws ECException
storeId
- Integer - store IdECException
public static ECCommand createViewCommand(ViewRegistryEntry cmdEntry) throws ECException
ECException
public static ECCommand createViewCommand(ViewRegistryEntry cmdEntry, java.lang.Integer storeId) throws ECException
ECException
public static java.lang.String getCommandClassNameFromInterface(java.lang.String commandInterfaceName)
public static CommandRegistryEntry locateCommandEntry(java.lang.String cmdRefKey, java.lang.Integer storeId) throws ECException
ECException
public static void setCommandRegistry(CommandRegistry newValue)
public static void setViewRegistry(ViewRegistry newValue)
public static ViewRegistryEntry locateViewCommandEntry(java.lang.String cmdRefKey, java.lang.Integer storeId, java.lang.Integer deviceFmt, java.lang.Integer dftDeviceFmt, boolean exceptionNeeded) throws ECException
ECException
public static ViewRegistryEntry locateViewCommandEntry(java.lang.String cmdRefKey, java.lang.Integer storeId, java.lang.Integer deviceFmt, boolean exceptionNeeded) throws ECException
ECException
public static ECCommand createCommand(java.lang.String cmdRefKey, java.lang.Integer storeId, boolean exceptionNeeded) throws ECException
storeId
- Integer - store Id $param exceptionNeeded boolean -
indicates whether exception should be thrown when command implementation cannot
be found the default behaviour is to throw an exceptionECException
public static CommandRegistryEntry locateCommandEntry(java.lang.String cmdRefKey, java.lang.Integer storeId, boolean exceptionNeeded) throws ECException
ECException
public static ViewRegistryEntry locateViewCommandEntry(java.lang.String cmdRefKey, java.lang.Integer storeId, java.lang.Integer deviceFmt) throws ECException
ECException
public static ViewRegistryEntry locateViewCommandEntry(java.lang.String cmdRefKey, java.lang.Integer storeId, java.lang.Integer deviceFmt, java.lang.Integer dftDeviceFmt) throws ECException
ECException