Interface Action

All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject, OsidRule, Subjugateable

public interface Action extends OsidRule, Subjugateable

An Action executes a Scene, Setting , another ActionGroup , or other Rule . An Action is also an OsidRule that may or may not be active.

  • Method Details

    • getActionGroupId

      Id getActionGroupId()
      Gets the action group Id for this action.
      Returns:
      the action group Id
      Compliance:
      mandatory - This method must be implemented.
    • getActionGroup

      ActionGroup getActionGroup() throws OperationFailedException
      Gets the action group for this action.
      Returns:
      the action group
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getDelay

      Duration getDelay()
      Gets the delay before proceeding with execution.
      Returns:
      the delay
      Compliance:
      mandatory - This method must be implemented.
    • isBlocking

      boolean isBlocking()
      Tests if this action blocks further actions until complete.
      Returns:
      true if blocking, false if subsequent actions can begin before this action completes
      Compliance:
      mandatory - This method must be implemented.
    • executesActionGroup

      boolean executesActionGroup()
      Tests if this rule executes a scene. If executesActionGroup() is true , hasRule(), executesScene(), executesSetting() , and executesMatchingSetting() must be false .
      Returns:
      true if this is a scene execution, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getNextActionGroupId

      Id getNextActionGroupId()
      Gets the action group Id to execute.
      Returns:
      the action group Id
      Throws:
      IllegalStateException - executesActionGroup() is false
      Compliance:
      mandatory - This method must be implemented.
    • getNextActionGroup

      ActionGroup getNextActionGroup() throws OperationFailedException
      Gets the action group to execute,
      Returns:
      the action group
      Throws:
      IllegalStateException - executesActionGroup() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • executesScene

      boolean executesScene()
      Tests if this rule executes a scene. If executesScene() is true , hasRule(), executesActionGroup(), executesSetting() , and executesMatchingSetting() must be false .
      Returns:
      true if this is a scene execution, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSceneId

      Id getSceneId()
      Gets the scene Id .
      Returns:
      the scene Id
      Throws:
      IllegalStateException - executesScene() is false
      Compliance:
      mandatory - This method must be implemented.
    • getScene

      Scene getScene() throws OperationFailedException
      Gets the scene.
      Returns:
      the scene
      Throws:
      IllegalStateException - executesScene() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • executesSetting

      boolean executesSetting()
      Tests if this rule executes a setting. If executesSetting() is true , hasRule(), executesActionGroup(), executesScene() , and executesMatchingSetting() must be false .
      Returns:
      true if this is a setting execution, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSettingId

      Id getSettingId()
      Gets the setting Id .
      Returns:
      the setting Id
      Throws:
      IllegalStateException - executesSetting() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSetting

      Setting getSetting() throws OperationFailedException
      Gets the setting.
      Returns:
      the setting
      Throws:
      IllegalStateException - executesSetting() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • executesMatchingSetting

      boolean executesMatchingSetting()
      Tests if this rule executes a matching setting. If executesMatchingSetting() is true , hasRule() , executesScene(), executesActionGroup() ,and executesSetting() must be false .
      Returns:
      true if this is a setting execution, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getMatchingControllerId

      Id getMatchingControllerId()
      Gets the matching controller Id .
      Returns:
      the controller Id
      Throws:
      IllegalStateException - executesMatchingSetting() is false
      Compliance:
      mandatory - This method must be implemented.
    • getMatchingController

      Controller getMatchingController() throws OperationFailedException
      Gets the matching controller.
      Returns:
      the controller
      Throws:
      IllegalStateException - executesMatchingSetting() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getMatchingAmountFactor

      BigDecimal getMatchingAmountFactor()
      Gets the factor by which the matching amount differs. A factor of 1 matches the amount of the matching controller.
      Returns:
      the factor
      Throws:
      IllegalStateException - executesMatchingSetting() is false
      Compliance:
      mandatory - This method must be implemented.
    • getMatchingRateFactor

      BigDecimal getMatchingRateFactor()
      Gets the factor by which the matching transition rate differs. A factor of 1 matches the ramp rate of the matching controller.
      Returns:
      the factor
      Throws:
      IllegalStateException - executesMatchingSetting() is false
      Compliance:
      mandatory - This method must be implemented.
    • getActionRecord

      ActionRecord getActionRecord(Type actionRecordType) throws OperationFailedException
      Gets the action record corresponding to the given Action record Type .This method is used to retrieve an object implementing the requested record. The actionRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(actionRecordType) is true .
      Parameters:
      actionRecordType - the type of action record to retrieve
      Returns:
      the action record
      Throws:
      NullArgumentException - actionRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(actionRecordType) is false
      Compliance:
      mandatory - This method must be implemented.