Interface ActivityQuery

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

public interface ActivityQuery extends OsidObjectQuery, OsidFederateableQuery, OsidTemporalQuery

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

  • Method Details

    • matchOrganizationId

      void matchOrganizationId(Id organizationId, boolean match)
      Sets the organization Id for this query.
      Parameters:
      organizationId - a resource Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - organizationId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearOrganizationIdTerms

      void clearOrganizationIdTerms()
      Clears the organization Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsOrganizationQuery

      boolean supportsOrganizationQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if an organization query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOrganizationQuery

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

      void matchAnyOrganization(boolean match)
      Matches an activity that has any organization.
      Parameters:
      match - true to match activities with any organization, false to match activities with no organization
      Compliance:
      mandatory - This method must be implemented.
    • clearOrganizationTerms

      void clearOrganizationTerms()
      Clears the organization terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSupervisorId

      void matchSupervisorId(Id supervisorId, boolean match)
      Sets the supervisor Id for this query.
      Parameters:
      supervisorId - a resource Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - supervisorId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSupervisorIdTerms

      void clearSupervisorIdTerms()
      Clears the supervisor Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSupervisorQuery

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

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

      void matchAnySupervisor(boolean match)
      Matches an activity that has any supervisor.
      Parameters:
      match - true to match activities with any supervisor, false to match activities with no supervisor
      Compliance:
      mandatory - This method must be implemented.
    • clearSupervisorTerms

      void clearSupervisorTerms()
      Clears the supervisor terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCode

      void matchCode(String code, Type stringMatchType, boolean match)
      Matches an activity code.
      Parameters:
      code - a code
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - code is not of stringMatchType
      NullArgumentException - code is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCode

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

      void clearCodeTerms()
      Clears the code terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSummaryQuery

      boolean supportsSummaryQuery()
      Tests if a SummaryQuery is available.
      Returns:
      true if a summery query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSummaryQuery

      SummaryQuery getSummaryQuery()
      Gets the query for a summary. Multiple retrievals produce a nested OR term.
      Returns:
      the summery query
      Throws:
      UnimplementedException - supportsSummeryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSupervisorQuery()} is {@code true} .
    • clearSummaryTerms

      void clearSummaryTerms()
      Clears the summary terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorActivityId

      void matchAncestorActivityId(Id activityId, boolean match)
      Sets the activity Id for this query to match activities that have the specified activity as an ancestor.
      Parameters:
      activityId - an activity Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - activityId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorActivityIdTerms

      void clearAncestorActivityIdTerms()
      Clears the ancestor activity Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorActivityQuery

      boolean supportsAncestorActivityQuery()
      Tests if an ActivityQuery is available.
      Returns:
      true if an activity query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorActivityQuery

      ActivityQuery getAncestorActivityQuery()
      Gets the query for an activity. Multiple retrievals produce a nested OR term.
      Returns:
      the activity query
      Throws:
      UnimplementedException - supportsAncestorActivityQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorActivityQuery()} is {@code true} .
    • matchAnyAncestorActivity

      void matchAnyAncestorActivity(boolean match)
      Matches activities with any activity ancestor.
      Parameters:
      match - true to match activities with any ancestor, false to match root activities
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorActivityTerms

      void clearAncestorActivityTerms()
      Clears the ancestor activity query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantActivityId

      void matchDescendantActivityId(Id activityId, boolean match)
      Sets the activity Id for this query to match activities that have the specified activity as a descendant.
      Parameters:
      activityId - an activity Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - activityId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantActivityIdTerms

      void clearDescendantActivityIdTerms()
      Clears the descendant activity Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantActivityQuery

      boolean supportsDescendantActivityQuery()
      Tests if an ActivityQuery is available.
      Returns:
      true if an activity query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantActivityQuery

      ActivityQuery getDescendantActivityQuery()
      Gets the query for an activity. Multiple retrievals produce a nested OR term.
      Returns:
      the activity query
      Throws:
      UnimplementedException - supportsDescendantActivityQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantActivityQuery()} is {@code true} .
    • matchAnyDescendantActivity

      void matchAnyDescendantActivity(boolean match)
      Matches activities with any activity descendant.
      Parameters:
      match - true to match activities with any descendant, false to match leaf activities
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantActivityTerms

      void clearDescendantActivityTerms()
      Clears the descendant activity query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBusinessId

      void matchBusinessId(Id businessId, boolean match)
      Sets the business Id for this query to match activities assigned to businesses.
      Parameters:
      businessId - the business Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - businessId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearBusinessIdTerms

      void clearBusinessIdTerms()
      Clears the business Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBusinessQuery

      boolean supportsBusinessQuery()
      Tests if a BusinessQuery is available.
      Returns:
      true if a business query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBusinessQuery

      BusinessQuery getBusinessQuery()
      Gets the query for a business. Multiple retrievals produce a nested OR term.
      Returns:
      the business query
      Throws:
      UnimplementedException - supportsBusinessQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBusinessQuery()} is {@code true} .
    • clearBusinessTerms

      void clearBusinessTerms()
      Clears the business 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 record retrievals produce a nested OR term.
      Parameters:
      activityRecordType - an activity 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.