Interface ActivityQuery

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

public interface ActivityQuery extends OsidObjectQuery, OsidSubjugateableQuery

This is the query for searching activities. Each method match request produces an AND term while multiple invocations of a method produces a nested OR .

  • Method Details

    • matchObjectiveId

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

      void clearObjectiveIdTerms()
      Clears the objective Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsObjectiveQuery

      boolean supportsObjectiveQuery()
      Tests if an ObjectiveQuery is available for querying objectives.
      Returns:
      true if an objective query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getObjectiveQuery

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

      void clearObjectiveTerms()
      Clears the objective terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAssetId

      void matchAssetId(Id assetId, boolean match)
      Sets the asset Id for this query.
      Parameters:
      assetId - an asset Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - assetId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetIdTerms

      void clearAssetIdTerms()
      Clears the asset Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAssetQuery

      boolean supportsAssetQuery()
      Tests if an AssetQuery is available for querying objectives.
      Returns:
      true if an asset query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAssetQuery

      AssetQuery getAssetQuery()
      Gets the query for an asset. Multiple retrievals produce a nested OR term.
      Returns:
      the asset query
      Throws:
      UnimplementedException - supportsAssetQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsObjectiveQuery()} is {@code true} .
    • matchAnyAsset

      void matchAnyAsset(boolean match)
      Matches an activity that has any objective assigned.
      Parameters:
      match - true to match activities with any asset, false to match activities with no asset
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetTerms

      void clearAssetTerms()
      Clears the asset terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCourseId

      void matchCourseId(Id courseId, boolean match)
      Sets the course Id for this query.
      Parameters:
      courseId - a course Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - courseId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCourseIdTerms

      void clearCourseIdTerms()
      Clears the course Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCourseQuery

      boolean supportsCourseQuery()
      Tests if a CourseQuery is available for querying courses.
      Returns:
      true if a course query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCourseQuery

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

      void matchAnyCourse(boolean match)
      Matches an activity that has any course assigned.
      Parameters:
      match - true to match activities with any courses, false to match activities with no courses
      Compliance:
      mandatory - This method must be implemented.
    • clearCourseTerms

      void clearCourseTerms()
      Clears the course terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAssessmentId

      void matchAssessmentId(Id assessmentId, boolean match)
      Sets the assessment Id for this query.
      Parameters:
      assessmentId - an assessment Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - assessmentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAssessmentIdTerms

      void clearAssessmentIdTerms()
      Clears the assessment Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAssessmentQuery

      boolean supportsAssessmentQuery()
      Tests if an AssessmentQuery is available for querying assessments.
      Returns:
      true if an assessment query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAssessmentQuery

      AssessmentQuery getAssessmentQuery()
      Gets the query for an assessment. Multiple retrievals produce a nested OR term.
      Returns:
      the assessment query
      Throws:
      UnimplementedException - supportsAssessmentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAssessmentQuery()} is {@code true} .
    • matchAnyAssessment

      void matchAnyAssessment(boolean match)
      Matches an activity that has any assessment assigned.
      Parameters:
      match - true to match activities with any assessments, false to match activities with no assessments
      Compliance:
      mandatory - This method must be implemented.
    • clearAssessmentTerms

      void clearAssessmentTerms()
      Clears the assessment terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchObjectiveBankId

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

      void clearObjectiveBankIdTerms()
      Clears the objective bank Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsObjectiveBankQuery

      boolean supportsObjectiveBankQuery()
      Tests if a ObjectiveBankQuery is available for querying resources.
      Returns:
      true if an objective bank query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getObjectiveBankQuery

      ObjectiveBankQuery getObjectiveBankQuery()
      Gets the query for an objective bank. Multiple retrievals produce a nested OR term.
      Returns:
      the objective bank query
      Throws:
      UnimplementedException - supportsObjectiveBankQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsObjectiveBankQuery()} is {@code true} .
    • clearObjectiveBankTerms

      void clearObjectiveBankTerms()
      Clears the objective bank terms.
      Compliance:
      mandatory - This method must be implemented.
    • getActivityQueryRecord

      ActivityQueryRecord getActivityQueryRecord(Type activityRecordType) throws OperationFailedException
      Gets the activity query record corresponding to the given Activity record Type .Multiple retrievals produce a nested OR term.
      Parameters:
      activityRecordType - an activity query record type
      Returns:
      the activity query record
      Throws:
      NullArgumentException - activityRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(activityRecordType) is false
      Compliance:
      mandatory - This method must be implemented.