com.ibm.commerce.ubf.commands

Interface GuardCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.TaskCommand


    public interface GuardCmd
    extends com.ibm.commerce.command.TaskCommand
    Task commands used as business logic guards must implement this interface. This interface will allow communication between the command and the BusinessFlowEventListener. Business logic guards commands are optional and executed when a transition is traversed. This type of command can be used to perform some business logic to determine whether a transition is possible by calling isAllowed().
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String NAME
      The name of the Command Interface class.
      • Fields inherited from interface com.ibm.commerce.command.CacheableECCommand

        defaultCommandClassName
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      boolean isAllowed()
      This method will be called after this command is executed.
      void setBusinessFlowEventData(BusinessFlowEventData anEventData)
      The BusinessFlowEventListener will use this method to pass in all data the command needs.
      void setEntityId(java.lang.Long anEntityId)
      Allow UBF passes an entity Id to the entry action command.
      void setEntityObject(java.lang.Object anEntityObject)
      Allow UBF passes an entity object to the entry action command to avoid instantiating another instance of entity object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • NAME

        static final java.lang.String NAME
        The name of the Command Interface class.
        See Also:
        Constant Field Values
    • Method Detail

      • isAllowed

        boolean isAllowed()
        This method will be called after this command is executed. .
        Returns:
        true if the transition is allowed.
      • setBusinessFlowEventData

        void setBusinessFlowEventData(BusinessFlowEventData anEventData)
        The BusinessFlowEventListener will use this method to pass in all data the command needs. .
        Parameters:
        anEventData - The business flow event data which includes all information, including requestPropoerties, commandContext etc.
      • setEntityId

        void setEntityId(java.lang.Long anEntityId)
        Allow UBF passes an entity Id to the entry action command.
        Parameters:
        anEntityId - The entity Id.
      • setEntityObject

        void setEntityObject(java.lang.Object anEntityObject)
        Allow UBF passes an entity object to the entry action command to avoid instantiating another instance of entity object.
        Parameters:
        anEntityObject - The entity object.