Interface AgencyQuery

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

public interface AgencyQuery extends OsidCatalogQuery

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

  • Method Details

    • matchAgentId

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

      void clearAgentIdTerms()
      Clears the agent Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAgentQuery

      boolean supportsAgentQuery()
      Tests if an AgentQuery is available.
      Returns:
      true if an agent query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAgentQuery

      AgentQuery getAgentQuery()
      Gets the query for an agent. Multiple retrievals produce a nested OR term.
      Returns:
      the agent query
      Throws:
      UnimplementedException - supportsAgentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAgentQuery()} is {@code true} .
    • matchAnyAgent

      void matchAnyAgent(boolean match)
      Matches agencies with any agent.
      Parameters:
      match - true to match agencies with any agent. false to match agencies with no agents
      Compliance:
      mandatory - This method must be implemented.
    • clearAgentTerms

      void clearAgentTerms()
      Clears the agent terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorAgencyId

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

      void clearAncestorAgencyIdTerms()
      Clears the ancestor agency Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorAgencyQuery

      boolean supportsAncestorAgencyQuery()
      Tests if an AgencyQuery is available.
      Returns:
      true if an agency query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorAgencyQuery

      AgentQuery getAncestorAgencyQuery()
      Gets the query for an agency. Multiple retrievals produce a nested OR term.
      Returns:
      the agency query
      Throws:
      UnimplementedException - supportsAncestorAgencyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorAgencyQuery()} is {@code true} .
    • matchAnyAncestorAgency

      void matchAnyAncestorAgency(boolean match)
      Matches agencies with any ancestor.
      Parameters:
      match - true to match agencies with any ancestor, false to match root agencies
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorAgencyTerms

      void clearAncestorAgencyTerms()
      Clears the ancestor agency terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantAgencyId

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

      void clearDescendantAgencyIdTerms()
      Clears the descendant agency Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantAgencyQuery

      boolean supportsDescendantAgencyQuery()
      Tests if an AgencyQuery is available.
      Returns:
      true if an agency query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantAgencyQuery

      AgentQuery getDescendantAgencyQuery()
      Gets the query for an agency. Multiple retrievals produce a nested OR term.
      Returns:
      the agency query
      Throws:
      UnimplementedException - supportsDescendantAgencyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantAgencyQuery()} is {@code true} .
    • matchAnyDescendantAgency

      void matchAnyDescendantAgency(boolean match)
      Matches agencies with any descendant.
      Parameters:
      match - true to match agencies with any descendant, false to match leaf agencies
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantAgencyTerms

      void clearDescendantAgencyTerms()
      Clears the descendant agency terms.
      Compliance:
      mandatory - This method must be implemented.
    • getAgencyQueryRecord

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