Interface PackageQuery

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

public interface PackageQuery extends OsidObjectQuery, OsidSourceableQuery

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

  • Method Details

    • matchVersion

      void matchVersion(Version version, boolean match)
      Matches a version.
      Parameters:
      version - the version
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - version or stringMatchType is null
      UnsupportedException - version type not supported
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyVersion

      void matchAnyVersion(boolean match)
      Matches packages with any version.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearVersionTerms

      void clearVersionTerms()
      Clears the version query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchVersionSince

      void matchVersionSince(Version version, boolean match)
      Matches packages with versions including and more recent than the given version.
      Parameters:
      version - the version
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - version or stringMatchType is null
      UnsupportedException - version type not supported
      Compliance:
      mandatory - This method must be implemented.
    • clearVersionSinceTerms

      void clearVersionSinceTerms()
      Clears the version since query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCopyright

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

      void matchAnyCopyright(boolean match)
      Matches packages with any copyright.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearCopyrightTerms

      void clearCopyrightTerms()
      Clears the copyright query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRequiresLicenseAcknowledgement

      void matchRequiresLicenseAcknowledgement(boolean match)
      Matches packages that require license acknowledgement.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyRequiresLicenseAcknowledgement

      void matchAnyRequiresLicenseAcknowledgement(boolean match)
      Matches packages that have any acknowledgement value.
      Parameters:
      match - true to match packages that have any acknowledgement value, false for to match packages that have no value
      Compliance:
      mandatory - This method must be implemented.
    • clearRequiresLicenseAcknowledgementTerms

      void clearRequiresLicenseAcknowledgementTerms()
      Clears the license acknowledgement query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCreatorId

      void matchCreatorId(Id resourceId, boolean match)
      Sets the creator resource Id for this query.
      Parameters:
      resourceId - a resource Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCreatorIdTerms

      void clearCreatorIdTerms()
      Clears the creator Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCreatorQuery

      boolean supportsCreatorQuery()
      Tests if a ResourceQuery is available for querying creators.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCreatorQuery

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

      void matchAnyCreator(boolean match)
      Matches packages with any creator.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearCreatorTerms

      void clearCreatorTerms()
      Clears the creator query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchReleaseDate

      void matchReleaseDate(DateTime from, DateTime to, boolean match)
      Matches the release date between the given times inclusive.
      Parameters:
      from - starting range
      to - ending range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - to is less than from
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyReleaseDate

      void matchAnyReleaseDate(boolean match)
      Matches packages that have any release date.
      Parameters:
      match - true to match packages with any release date, false to match packages with no release date
      Compliance:
      mandatory - This method must be implemented.
    • clearReleaseDateTerms

      void clearReleaseDateTerms()
      Clears the release date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDependencyId

      void matchDependencyId(Id packageId, boolean match)
      Sets the package Id to match packages on which a package depends.
      Parameters:
      packageId - a state Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - stateId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDependencyIdTerms

      void clearDependencyIdTerms()
      Clears the dependency Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDependencyQuery

      boolean supportsDependencyQuery()
      Tests if a PackageQuery is available.
      Returns:
      true if a package query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDependencyQuery

      PackageQuery getDependencyQuery()
      Gets the query for a dependency. Multiple retrievals produce a nested OR term.
      Returns:
      the package query
      Throws:
      UnimplementedException - supportsDependencyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDependencyQuery()} is {@code true} .
    • matchAnyDependency

      void matchAnyDependency(boolean match)
      Matches packages that have any dependency.
      Parameters:
      match - true to match packages with any dependency, false to match packages with no dependencies
      Compliance:
      mandatory - This method must be implemented.
    • clearDependencyTerms

      void clearDependencyTerms()
      Clears the dependency query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchURL

      void matchURL(String url, Type stringMatchType, boolean match)
      Sets the url for this query. Supplying multiple strings behaves like a boolean OR among the elements each which must correspond to the stringMatchType .
      Parameters:
      url - url string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - url not of stringMatchType
      NullArgumentException - url or stringMatchType is null
      UnsupportedException - supportsStringMatchType(url) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyURL

      void matchAnyURL(boolean match)
      Matches packages that have any url.
      Parameters:
      match - true to match packages with any url, false to match packages with no url
      Compliance:
      mandatory - This method must be implemented.
    • clearURLTerms

      void clearURLTerms()
      Clears the url query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchInstallationId

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

      void clearInstallationIdTerms()
      Clears the installation Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsInstallationQuery

      boolean supportsInstallationQuery()
      Tests if an InstallationQuery is available.
      Returns:
      true if an installation query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getInstallationQuery

      InstallationQuery getInstallationQuery()
      Gets the query for an installation. Multiple retrievals produce a nested OR term.
      Returns:
      the installation query
      Throws:
      UnimplementedException - supportsInstallationQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsInstallationQuery()} is {@code true} .
    • matchAnyInstallation

      void matchAnyInstallation(boolean match)
      Matches any packages that are installed.
      Parameters:
      match - true to match installed packages, false for uninstalled packages
      Compliance:
      mandatory - This method must be implemented.
    • clearInstallationTerms

      void clearInstallationTerms()
      Clears the installation query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDependentId

      void matchDependentId(Id packageId, boolean match)
      Sets the package Id to match packages on which other packages depend.
      Parameters:
      packageId - a package Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - stateId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDependentIdTerms

      void clearDependentIdTerms()
      Clears the dependent Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDependentQuery

      boolean supportsDependentQuery()
      Tests if a PackageQuery is available.
      Returns:
      true if a package query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDependentQuery

      PackageQuery getDependentQuery()
      Gets the query for a dependent. Multiple retrievals produce a nested OR term.
      Returns:
      the package query
      Throws:
      UnimplementedException - supportsDependentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDependentQuery()} is {@code true} .
    • matchAnyDependent

      void matchAnyDependent(boolean match)
      Matches packages that have any depenents.
      Parameters:
      match - true to match packages with any dependents, false to match packages with no dependents
      Compliance:
      mandatory - This method must be implemented.
    • clearDependentTerms

      void clearDependentTerms()
      Clears the dependent query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchVersionedPackageId

      void matchVersionedPackageId(Id packageId, boolean match)
      Sets the package Id to match packages in the version chain.
      Parameters:
      packageId - a state Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - packageId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearVersionedPackageIdTerms

      void clearVersionedPackageIdTerms()
      Clears the versioned package Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsVersionedPackageQuery

      boolean supportsVersionedPackageQuery()
      Tests if a PackageQuery is available.
      Returns:
      true if a package query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getVersionedPackageQuery

      PackageQuery getVersionedPackageQuery()
      Gets the query for a version chain. Multiple retrievals produce a nested OR term.
      Returns:
      the package query
      Throws:
      UnimplementedException - supportsVersionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsVersionQuery()} is {@code true} .
    • matchAnyVersionedPackage

      void matchAnyVersionedPackage(boolean match)
      Matches packages that have any versions.
      Parameters:
      match - true to match packages with any versions, false to match packages with no versions
      Compliance:
      mandatory - This method must be implemented.
    • clearVersionedPackageTerms

      void clearVersionedPackageTerms()
      Clears the versioned package query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchInstallationContentId

      void matchInstallationContentId(Id installationContentId, boolean match)
      Sets the installation content Id for this query.
      Parameters:
      installationContentId - the installation content Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - installationContentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearInstallationContentIdTerms

      void clearInstallationContentIdTerms()
      Clears the installation content Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsInstallationContentQuery

      boolean supportsInstallationContentQuery()
      Tests if an InstallationContentQuery is available.
      Returns:
      true if an installation content query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getInstallationContentQuery

      InstallationContentQuery getInstallationContentQuery()
      Gets the query for the installation content. Multiple queries can be retrieved for a nested OR term.
      Returns:
      the installation content query
      Throws:
      UnimplementedException - supportsInstallationContentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsInstallationContentQuery()} is {@code true} .
    • matchAnyInstallationContent

      void matchAnyInstallationContent(boolean match)
      Matches packages with any content.
      Parameters:
      match - true to match packages with any content, false to match packages with no content
      Compliance:
      mandatory - This method must be implemented.
    • clearInstallationContentTerms

      void clearInstallationContentTerms()
      Clears the installation content terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDepotId

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

      void clearDepotIdTerms()
      Clears the depot Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDepotQuery

      boolean supportsDepotQuery()
      Tests if a DepotQuery is available for querying resources.
      Returns:
      true if a depot query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDepotQuery

      DepotQuery getDepotQuery()
      Gets the query for a depot. Multiple retrievals produce a nested OR term.
      Returns:
      the depot query
      Throws:
      UnimplementedException - supportsDepotQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDepotQuery()} is {@code true} .
    • clearDepotTerms

      void clearDepotTerms()
      Clears the depot query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getPackageQueryRecord

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