Interface Check

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

public interface Check extends OsidRule

A Check is something that needs to checked. Some basic checks are baked into this interface but can be extended through a check record or it can reference an external rule evaluation. Each type of check is unique and should not be combined.

Checks come in a variety of flavors indicated by the boolean methods in this interface. Each type of Check may be accompanied by data required to evaluate the check.
  • Fail Check
  • Time Check By Date
  • Time Check by Event
  • Time Check By Cyclic Event
  • Hold Check
  • Authorization Check
  • Inquiry Check
  • Process Check
  • LoggingCheck
  • Method Details

    • isFailCheck

      boolean isFailCheck()
      Tests if this check is a placeholder check that always fails when evaluated. A failure check can be used to block certain conditions specified in an Instruction . If isFailCheck() is true , then isTimeCheckByDate() , isTimeCheckByEvent() , isTimeCheckByCyclicEvent() , isHoldCheck(), isAuthorizationCheck(), isInquiryCheck() , isProcessCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this is a fail check, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • isTimeCheckByDate

      boolean isTimeCheckByDate()
      Tests if this check is for a time check specified by a date. If isTimeCheckByDate() is true , then isFailCheck() , isTimeCheckByEvent() , isTimeCheckByCyclicEvent() , isHoldCheck() , isAuthorizationCheck() , isInquiryCheck() , and isProcessCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this check is for a time specified by date, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getTimeCheckStartDate

      DateTime getTimeCheckStartDate()
      Gets the time check start date. The check passes if the current time is within the time interval inclusive. If the start time of the interval is undefined, then the check for the start time always passes. If the end time of the interval is undefined, then the check for the deadline always passes.
      Returns:
      the start of the time period
      Throws:
      IllegalStateException - isTimeCheckByDate() is false
      Compliance:
      mandatory - This method must be implemented.
    • getTimeCheckEndDate

      DateTime getTimeCheckEndDate()
      Gets the time check end date. The check passes if the current time is within the time interval inclusive. If the start time of the interval is undefined, then the check for the start time always passes. If the end time of the interval is undefined, then the check for the deadline always passes.
      Returns:
      the end of the time period
      Throws:
      IllegalStateException - isTimeCheckByDate() is false
      Compliance:
      mandatory - This method must be implemented.
    • isTimeCheckByEvent

      boolean isTimeCheckByEvent()
      Tests if this check is for a time check specified by an event. The starting and ending times of the event are used as a time interval to perform the time check. If isTimeCheckByEvent() is true , then isFailCheck() , isTimeCheckByDate() , isTimeCheckByCyclicEvent() , isHoldCheck() , isAuthorizationCheck() , isInquiryCheck() , and isProcessCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this check is for a time speciifed by event, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getTimeCheckEventId

      Id getTimeCheckEventId()
      Gets the time check event Id .
      Returns:
      the event Id
      Throws:
      IllegalStateException - isTimeCheckByEvent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getTimeCheckEvent

      Event getTimeCheckEvent() throws OperationFailedException
      Gets the time check event.
      Returns:
      the event
      Throws:
      IllegalStateException - isTimeCheckByEvent() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isTimeCheckByCyclicEvent

      boolean isTimeCheckByCyclicEvent()
      Tests if this check is for a time check specified by a cyclic event. The time check is performed using the starting and ending dates of the derived event. If the event is a rceurring event, the time must be within the starting and ending dates of at least one of the events in the series. If isTimeCheckByCyclicEvent() is true , then isFailCheck() , isTimeCheckByDate() , isTimeCheckByEvent() , isHoldCheck(), isAuthorizationCheck(), isInquiryCheck() , isProcessCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this check is for a time check specified by cyclic event, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getTimeCheckCyclicEventId

      Id getTimeCheckCyclicEventId()
      Gets the time check cyclic event Id .
      Returns:
      the cyclic event Id
      Throws:
      IllegalStateException - isTimeCheckByCyclicEvent() is false
      Compliance:
      mandatory - This method must be implemented.
    • getTimeCheckCyclicEvent

      CyclicEvent getTimeCheckCyclicEvent() throws OperationFailedException
      Gets the time check cyclic event.
      Returns:
      the cyclic event
      Throws:
      IllegalStateException - isTimeCheckByCyclicEvent() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isHoldCheck

      boolean isHoldCheck()
      Tests if this check is for a hold service block. If a block exists for the agent being checked, the check fails. If isHoldCheck() is true , then isFailCheck() , isTimeCheckByDate() , isTimeCheckByEvent() , isTimeCheckByCyclicEvent() , isAuthorizationCheck() , isInquiryCheck() , and isProcessCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this check is for a block, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getHoldCheckBlockId

      Id getHoldCheckBlockId()
      Gets the Block Id for this check.
      Returns:
      the Block Id
      Throws:
      IllegalStateException - isHoldCheck() is false
      Compliance:
      mandatory - This method must be implemented.
    • getHoldCheckBlock

      Block getHoldCheckBlock() throws OperationFailedException
      Gets the Block for this check.
      Returns:
      the Block
      Throws:
      IllegalStateException - isHoldCheck() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isAuthorizationCheck

      boolean isAuthorizationCheck()
      Tests if this check is for an authorization. If isAuthorizationCheck() is true , then isFailCheck() , isTimeCheckByDate() , isTimeCheckByEvent() , isTimeCheckByCyclicEvent() , isHoldCheck() , isInquiryCheck() , isProcessCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this check is for an authorization, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAuthorizationCheckFunctionId

      Id getAuthorizationCheckFunctionId()
      Gets the Function Id for this check.
      Returns:
      the Function Id
      Throws:
      IllegalStateException - isFunctionCheck() is false
      Compliance:
      mandatory - This method must be implemented.
    • getAuthorizationCheckFunction

      Function getAuthorizationCheckFunction() throws OperationFailedException
      Gets the Function for this check.
      Returns:
      the Function
      Throws:
      IllegalStateException - isFunctionCheck() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isInquiryCheck

      boolean isInquiryCheck()
      Tests if this check is for a hold service block. If a block exists for the agent being checked, the check fails. If isInquiryCheck() is true , then isFailCheck() , isTimeCheckByDate() , isTimeCheckByEvent() , isTimeCheckByCyclicEvent() , isHoldCheck() , isAuthorizationCheck() , isProcessCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this check is for a block, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getInquiryCheckAuditId

      Id getInquiryCheckAuditId()
      Gets the Audit Id for this check,
      Returns:
      the Block Id
      Throws:
      IllegalStateException - isInquiryCheck() is false
      Compliance:
      mandatory - This method must be implemented.
    • getInquiryCheckAudit

      Audit getInquiryCheckAudit() throws OperationFailedException
      Gets the Audit for this check.
      Returns:
      the Audit
      Throws:
      IllegalStateException - isInquiryCheck() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isProcessCheck

      boolean isProcessCheck()
      Tests if this check is for an agenda. The agenda for the specified agenda is retrieved and processed before continuing with the checks in this agenda. If isProcessCheck() is true , then isFailCheck() , isTimeCheckByDate() , isTimeCheckByEvent() , isTimeCheckByCyclicEvent() , isHoldCheck() , isAuthorizationCheck() , isInquiryCheck() , and isLoggingCheck() must be false .
      Returns:
      true if this check is for another agenda, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getProcessCheckAgendaId

      Id getProcessCheckAgendaId()
      Gets the Agenda Id for this check.
      Returns:
      the Block Id
      Throws:
      IllegalStateException - isProcessCheck() is false
      Compliance:
      mandatory - This method must be implemented.
    • getProcessCheckAgenda

      Agenda getProcessCheckAgenda() throws OperationFailedException
      Gets the Agenda for this check.
      Returns:
      the Agenda
      Throws:
      IllegalStateException - isProcessCheck() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isLoggingCheck

      boolean isLoggingCheck()
      Tests if this check logs an action. If isLoggingCheck() is true , then isFailCheck() , isTimeCheckByDate() , isTimeCheckByEvent() , isTimeCheckByCyclicEvent() , isHoldCheck() , isAuthorizationCheck() , isInquiryCheck() , and isProcessCheck() must be false .
      Returns:
      true if this check is for logging, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLoggingCheckTextId

      Id getLoggingCheckTextId()
      Gets the Text Id for this check.
      Returns:
      the Text Id
      Throws:
      IllegalStateException - isLoggingCheck() is false
      Compliance:
      mandatory - This method must be implemented.
    • getLoggingCheckText

      Text getLoggingCheckText() throws OperationFailedException
      Gets the Text for this check.
      Returns:
      the Text
      Throws:
      IllegalStateException - isLoggingCheck() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getCheckRecord

      CheckRecord getCheckRecord(Type checkRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the check record corresponding to the given Check record Type .This method is used to retrieve an object implementing the requested record. The checkRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(checkRecordType) is true .
      Parameters:
      checkRecordType - the type of check record to retrieve
      Returns:
      the check record
      Throws:
      NullArgumentException - checkRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - hasRecordType(checkRecordType) is false
      Compliance:
      mandatory - This method must be implemented.