Interface CredentialQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, Suppliable

public interface CredentialQuery extends OsidObjectQuery

This is the query for searching credentials. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchLifetime

      void matchLifetime(Duration low, Duration high, boolean match)
      Matches lifetimes between the given range inclusive.
      Parameters:
      low - start of range
      high - end of range
      match - true if a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      NullArgumentException - low or high is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyLifetime

      void matchAnyLifetime(boolean match)
      Matches credentials that have any lifetime.
      Parameters:
      match - true to match credentials with any lifetime, false to match credentials with no lifetime
      Compliance:
      mandatory - This method must be implemented.
    • clearLifetimeTerms

      void clearLifetimeTerms()
      Clears the lifetime Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchProgramId

      void matchProgramId(Id programId, boolean match)
      Sets the program Id for this query to match credentials that have a related program.
      Parameters:
      programId - a program Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - programId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearProgramIdTerms

      void clearProgramIdTerms()
      Clears the program Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsProgramQuery

      boolean supportsProgramQuery()
      Tests if a ProgramQuery is available.
      Returns:
      true if a program query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getProgramQuery

      ProgramQuery getProgramQuery()
      Gets the query for a program. Multiple retrievals produce a nested OR term.
      Returns:
      the program query
      Throws:
      UnimplementedException - supportsProgramQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsProgramQuery()} is {@code true} .
    • matchAnyProgram

      void matchAnyProgram(boolean match)
      Matches credentials that have any program.
      Parameters:
      match - true to match credentials with any related program, false to match credentials with no programs
      Compliance:
      mandatory - This method must be implemented.
    • clearProgramTerms

      void clearProgramTerms()
      Clears the program terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCourseCatalogId

      void matchCourseCatalogId(Id courseCatalogId, boolean match)
      Sets the course catalog Id for this query to match credentials assigned to course catalogs.
      Parameters:
      courseCatalogId - the course catalog Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - courseCatalogId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCourseCatalogIdTerms

      void clearCourseCatalogIdTerms()
      Clears the course catalog Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCourseCatalogQuery

      boolean supportsCourseCatalogQuery()
      Tests if a CourseCatalogQuery is available.
      Returns:
      true if a course catalog query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCourseCatalogQuery

      CourseCatalogQuery getCourseCatalogQuery()
      Gets the query for a course catalog. Multiple retrievals produce a nested OR term.
      Returns:
      the course catalog query
      Throws:
      UnimplementedException - supportsCourseCatalogQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCourseCatalogQuery()} is {@code true} .
    • clearCourseCatalogTerms

      void clearCourseCatalogTerms()
      Clears the course catalog terms.
      Compliance:
      mandatory - This method must be implemented.
    • getCredentialQueryRecord

      CredentialQueryRecord getCredentialQueryRecord(Type credentialRecordType) throws OperationFailedException
      Gets the credential query record corresponding to the given Credential record Type . Multiple record retrievals produce a nested OR term.
      Parameters:
      credentialRecordType - a credential record type
      Returns:
      the credential query record
      Throws:
      NullArgumentException - credentialRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(credentialRecordType) is false
      Compliance:
      mandatory - This method must be implemented.