Interface ProgramQuery

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

public interface ProgramQuery extends OsidObjectQuery, OsidOperableQuery

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

  • Method Details

    • matchTitle

      void matchTitle(String title, Type stringMatchType, boolean match)
      Adds a title for this query.
      Parameters:
      title - title string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - title not of stringMatchType
      NullArgumentException - title or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyTitle

      void matchAnyTitle(boolean match)
      Matches a title that has any value.
      Parameters:
      match - true to match programs with any title, false to match programs with no title
      Compliance:
      mandatory - This method must be implemented.
    • clearTitleTerms

      void clearTitleTerms()
      Clears the title terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchNumber

      void matchNumber(String number, Type stringMatchType, boolean match)
      Adds a programs number for this query.
      Parameters:
      number - programs number string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - number not of stringMatchType
      NullArgumentException - number or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyNumber

      void matchAnyNumber(boolean match)
      Matches a programs number that has any value.
      Parameters:
      match - true to match programs with any number, false to match programs with no title
      Compliance:
      mandatory - This method must be implemented.
    • clearNumberTerms

      void clearNumberTerms()
      Clears the number terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSponsorId

      void matchSponsorId(Id resourceId, boolean match)
      Sets the resource Id for this query to match programs that have a sponsor.
      Parameters:
      resourceId - a resource Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSponsorIdTerms

      void clearSponsorIdTerms()
      Clears the sponsor Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSponsorQuery

      boolean supportsSponsorQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSponsorQuery

      ResourceQuery getSponsorQuery()
      Gets the query for a sponsor. Multiple retrievals produce a nested OR term.
      Returns:
      a resource query
      Throws:
      UnimplementedException - supportsSponsorQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSponsorQuery()} is {@code true} .
    • matchAnySponsor

      void matchAnySponsor(boolean match)
      Matches programs that have any sponsor.
      Parameters:
      match - true to match programs with any sponsor, false to match programs with no sponsors
      Compliance:
      mandatory - This method must be implemented.
    • clearSponsorTerms

      void clearSponsorTerms()
      Clears the sponsor terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchParentProgramId

      void matchParentProgramId(Id ruleId, boolean match)
      Sets the parent program Id for this query.
      Parameters:
      ruleId - a rule Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - ruleId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearParentProgramIdTerms

      void clearParentProgramIdTerms()
      Clears the parent program Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsParentProgramQuery

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

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

      void matchAnyParentProgram(boolean match)
      Matches programs that have any parent.
      Parameters:
      match - true to match programs with parent, false to match programs with no parent
      Compliance:
      mandatory - This method must be implemented.
    • clearParentProgramTerms

      void clearParentProgramTerms()
      Clears the parent program terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchLearningObjectiveId

      void matchLearningObjectiveId(Id objectiveId, boolean match)
      Sets the objective Id for this query.
      Parameters:
      objectiveId - an objective Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - objectiveId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearLearningObjectiveIdTerms

      void clearLearningObjectiveIdTerms()
      Clears the learning objective Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsLearningObjectiveQuery

      boolean supportsLearningObjectiveQuery()
      Tests if an ObjectiveQuery is available.
      Returns:
      true if an objective query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLearningObjectiveQuery

      ObjectiveQuery getLearningObjectiveQuery()
      Gets the query for a learning objective. Multiple retrievals produce a nested OR term.
      Returns:
      a learning objective query
      Throws:
      UnimplementedException - supportsLearningObjectiveQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsLearningObjectiveQuery()} is {@code true} .
    • matchAnyLearningObjective

      void matchAnyLearningObjective(boolean match)
      Matches programs that have any learning objective.
      Parameters:
      match - true to match programs with any learning objective, false to match programs with no learning objectives
      Compliance:
      mandatory - This method must be implemented.
    • clearLearningObjectiveTerms

      void clearLearningObjectiveTerms()
      Clears the learning objective terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchTargetAudienceId

      void matchTargetAudienceId(Id resourceId, boolean match)
      Sets the resource Id for this query to match programs that have a target audience.
      Parameters:
      resourceId - a resource Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearTargetAudienceIdTerms

      void clearTargetAudienceIdTerms()
      Clears the target audience Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsTargetAudienceQuery

      boolean supportsTargetAudienceQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getTargetAudienceQuery

      ResourceQuery getTargetAudienceQuery()
      Gets the query for a target audience. Multiple retrievals produce a nested OR term.
      Returns:
      a resource query
      Throws:
      UnimplementedException - supportsTargetAudienceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsTargetAudienceQuery()} is {@code true} .
    • matchAnyTargetAudience

      void matchAnyTargetAudience(boolean match)
      Matches programs that have any target audience.
      Parameters:
      match - true to match programs with any target audience, false to match programs with no target audiences
      Compliance:
      mandatory - This method must be implemented.
    • clearTargetAudienceTerms

      void clearTargetAudienceTerms()
      Clears the target audience terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCompletionRequirementsInfo

      void matchCompletionRequirementsInfo(String requirementsInfo, Type stringMatchType, boolean match)
      Matches programs with the prerequisites informational string.
      Parameters:
      requirementsInfo - completion requirements string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - requirementsInfo not of stringMatchType
      NullArgumentException - requirementsInfo or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCompletionRequirementsInfo

      void matchAnyCompletionRequirementsInfo(boolean match)
      Matches a program that has any completion requirements information assigned.
      Parameters:
      match - true to match programs with any completion requirements information, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • clearCompletionRequirementsInfoTerms

      void clearCompletionRequirementsInfoTerms()
      Clears the completion requirements info terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCompletionRequirementsId

      void matchCompletionRequirementsId(Id ruleId, boolean match)
      Sets the requisite Id for this query.
      Parameters:
      ruleId - a rule Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - ruleId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCompletionRequirementsIdTerms

      void clearCompletionRequirementsIdTerms()
      Clears the requisite Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCompletionRequirementsQuery

      boolean supportsCompletionRequirementsQuery()
      Tests if a RequisiteQuery is available.
      Returns:
      true if a requisite query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCompletionRequirementsQuery

      RequisiteQuery getCompletionRequirementsQuery()
      Gets the query for a requisite. Multiple retrievals produce a nested OR term.
      Returns:
      a requisite query
      Throws:
      UnimplementedException - supportsCompletionRequirementsQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCompletionRequirementsQuery()} is {@code true} .
    • matchAnyCompletionRequirements

      void matchAnyCompletionRequirements(boolean match)
      Matches programs that have any completion requirement requisite.
      Parameters:
      match - true to match programs with any requisite, false to match programs with no requisites
      Compliance:
      mandatory - This method must be implemented.
    • clearCompletionRequirementsTerms

      void clearCompletionRequirementsTerms()
      Clears the requisite terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCredentialId

      void matchCredentialId(Id credentialId, boolean match)
      Sets the credential Id for this query.
      Parameters:
      credentialId - a credential Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - credentialId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCredentialIdTerms

      void clearCredentialIdTerms()
      Clears the credential Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCredentialQuery

      boolean supportsCredentialQuery()
      Tests if a CredentialQuery is available.
      Returns:
      true if a credential query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCredentialQuery

      CredentialQuery getCredentialQuery()
      Gets the query for a credential. Multiple retrievals produce a nested OR term.
      Returns:
      a credential query
      Throws:
      UnimplementedException - supportsCredentialQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCredentialQuery()} is {@code true} .
    • matchAnyCredential

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

      void clearCredentialTerms()
      Clears the credential 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 programs 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.
    • getProgramQueryRecord

      ProgramQueryRecord getProgramQueryRecord(Type programRecordType) throws OperationFailedException
      Gets the program query record corresponding to the given Program record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      programRecordType - a programs record type
      Returns:
      the program query record
      Throws:
      NullArgumentException - programRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(programRecordType) is false
      Compliance:
      mandatory - This method must be implemented.