Interface TodoProducer

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

public interface TodoProducer extends OsidRule

A TodoProducer describes the mason for making Todos.

  • Method Details

    • isCreationRule

      boolean isCreationRule()
      Tests if a todo should be created or destroyed.
      Returns:
      true if a creation rule, false if a destruction rule
      Compliance:
      mandatory - This method must be implemented.
    • isBasedOnTimeCycle

      boolean isBasedOnTimeCycle()
      Tests if a todo should be produced based on a time cycle.
      Returns:
      true if based on a timecycle, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCyclicEventId

      Id getCyclicEventId()
      Gets the cyclic event Id.
      Returns:
      the cyclic event Id
      Throws:
      IllegalStateException - isBasedOnTimeCycle() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCyclicEvent

      CyclicEvent getCyclicEvent() throws OperationFailedException
      Gets the cyclic event.
      Returns:
      the cyclic event
      Throws:
      IllegalStateException - isBasedOnTimeCycle() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isBasedOnStock

      boolean isBasedOnStock()
      Tests if a todo should be produced based on an item level in a stock.
      Returns:
      true if based on a stock, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getStockLevel

      long getStockLevel()
      Gets the stock level.
      Returns:
      the stock level
      Throws:
      IllegalStateException - isBasedOnStock() is false
      Compliance:
      mandatory - This method must be implemented.
    • getStockId

      Id getStockId()
      Gets the stock Id.
      Returns:
      the stock Id
      Throws:
      IllegalStateException - isBasedOnStock() is false
      Compliance:
      mandatory - This method must be implemented.
    • getStock

      Stock getStock() throws OperationFailedException
      Gets the stock.
      Returns:
      the stock
      Throws:
      IllegalStateException - isBasedOnStock() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getTodoProducerRecord

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