Interface EntryForm

All Superinterfaces:
Extensible, Identifiable, OsidBrowsableForm, OsidExtensibleForm, OsidForm, OsidIdentifiableForm, OsidObjectForm, OsidRelationshipForm, OsidTemporalForm, Suppliable
All Known Subinterfaces:
EntryBatchForm

public interface EntryForm extends OsidRelationshipForm

This is the form for creating and updating Entries. Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the EntryAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.

  • Method Details

    • getQuantityMetadata

      Metadata getQuantityMetadata()
      Gets the metadata for the quantity.
      Returns:
      metadata for the quantity
      Compliance:
      mandatory - This method must be implemented.
    • setQuantity

      void setQuantity(long quantity)
      Sets the quantity.
      Parameters:
      quantity - the new quantity
      Throws:
      InvalidArgumentException - quantity is invalid
      NoAccessException - Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • clearQuantity

      void clearQuantity()
      Removes the quantity.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getAmountMetadata

      Metadata getAmountMetadata()
      Gets the metadata for the amount.
      Returns:
      metadata for the amount
      Compliance:
      mandatory - This method must be implemented.
    • setAmount

      void setAmount(Currency amount)
      Sets the amount.
      Parameters:
      amount - the new amount
      Throws:
      InvalidArgumentException - amount is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - amount is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAmount

      void clearAmount()
      Removes the amount.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getDebitMetadata

      Metadata getDebitMetadata()
      Gets the metadata for the debit flag.
      Returns:
      metadata for the debit flag
      Compliance:
      mandatory - This method must be implemented.
    • setDebit

      void setDebit(boolean debit)
      Sets the debit flag.
      Parameters:
      debit - true if this entry is a debit, false if a credit
      Throws:
      InvalidArgumentException - debit is invalid
      NoAccessException - Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • clearDebit

      void clearDebit()
      Clears the debit flag.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getEntryFormRecord

      EntryFormRecord getEntryFormRecord(Type entryRecordType) throws OperationFailedException
      Gets the EntryFormRecord corresponding to the given entry record Type.
      Parameters:
      entryRecordType - an entry record type
      Returns:
      the entry form record
      Throws:
      NullArgumentException - entryRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(entryRecordType) is false
      Compliance:
      mandatory - This method must be implemented.