Class CredentialFilter<T extends AccessCredential>

java.lang.Object
com.inrupt.client.accessgrant.CredentialFilter<T>
Type Parameters:
T - the credential type

public class CredentialFilter<T extends AccessCredential> extends Object
A class for representing Access Grant query filters.
  • Field Details

    • DEFAULT_PAGE_SIZE

      public static final int DEFAULT_PAGE_SIZE
      The default size of result pages.
      See Also:
    • MAX_PAGE_SIZE

      public static final int MAX_PAGE_SIZE
      The maximum result page size.
      See Also:
  • Method Details

    • getFromAgent

      public Optional<URI> getFromAgent()
      A filter for an agent that issued credentials.
      Returns:
      the agent issuer, if present
    • getToAgent

      public Optional<URI> getToAgent()
      A filter for an agent that is the target of credentials.
      Returns:
      the target agent, if present
    • getStatus

      A filter for credential status.
      Returns:
      the credential status, if present
    • getResource

      public Optional<URI> getResource()
      A filter for a target resource.
      Returns:
      the credential target resource, if present
    • getPurpose

      public Optional<URI> getPurpose()
      A filter for a target purpose.
      Returns:
      the credential target purpose, if present
    • getIssuedWithin

      public Optional<CredentialFilter.CredentialDuration> getIssuedWithin()
      A filter for credential issuance.
      Returns:
      the credential issuance filter, if present
    • getRevokedWithin

      public Optional<CredentialFilter.CredentialDuration> getRevokedWithin()
      A filter for credential revocation.
      Returns:
      the credential revocation filter, if present
    • getPage

      public Optional<String> getPage()
      A filter for a result page.
      Returns:
      the page indicator, if present
    • getPageSize

      public int getPageSize()
      The page size for result sets.
      Returns:
      the result set size
    • asURI

      public URI asURI(URI baseUrl)
      Convert the filter to a URI.
      Parameters:
      baseUrl - the base URL for the filter
      Returns:
      the formatted URI
    • newBuilder

      public static CredentialFilter.Builder newBuilder()
      Create a new CredentialFilter builder.
      Returns:
      the builder
    • newBuilder

      public static <T extends AccessCredential> CredentialFilter.Builder newBuilder(CredentialFilter<T> filter)
      Create a new CredentialFilter builder from an existing filter.
      Type Parameters:
      T - the credential type
      Parameters:
      filter - an existing credential filter
      Returns:
      the builder