Package com.inrupt.client.accessgrant
Class CredentialFilter<T extends AccessCredential>
java.lang.Object
com.inrupt.client.accessgrant.CredentialFilter<T>
- Type Parameters:
T
- the credential type
A class for representing Access Grant query filters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The CredentialFilter builder.static enum
The duration values for filtering access credentials.static enum
The status values for filtering access credentials. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default size of result pages.static final int
The maximum result page size. -
Method Summary
Modifier and TypeMethodDescriptionConvert the filter to a URI.A filter for an agent that issued credentials.A filter for credential issuance.getPage()
A filter for a result page.int
The page size for result sets.A filter for a target purpose.A filter for a target resource.A filter for credential revocation.A filter for credential status.A filter for an agent that is the target of credentials.static CredentialFilter.Builder
Create a new CredentialFilter builder.static <T extends AccessCredential>
CredentialFilter.BuildernewBuilder
(CredentialFilter<T> filter) Create a new CredentialFilter builder from an existing filter.
-
Field Details
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZEThe default size of result pages.- See Also:
-
MAX_PAGE_SIZE
public static final int MAX_PAGE_SIZEThe maximum result page size.- See Also:
-
-
Method Details
-
getFromAgent
A filter for an agent that issued credentials.- Returns:
- the agent issuer, if present
-
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
A filter for a target resource.- Returns:
- the credential target resource, if present
-
getPurpose
A filter for a target purpose.- Returns:
- the credential target purpose, if present
-
getIssuedWithin
A filter for credential issuance.- Returns:
- the credential issuance filter, if present
-
getRevokedWithin
A filter for credential revocation.- Returns:
- the credential revocation filter, if present
-
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
Convert the filter to a URI.- Parameters:
baseUrl
- the base URL for the filter- Returns:
- the formatted URI
-
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
-