Class ApplicationProfile.Builder
java.lang.Object
com.janeirodigital.sai.core.resources.ReadableResource.Builder<T>
com.janeirodigital.sai.core.resources.CRUDResource.Builder<ApplicationProfile.Builder>
com.janeirodigital.sai.core.agents.ApplicationProfile.Builder
- Enclosing class:
- ApplicationProfile
public static class ApplicationProfile.Builder
extends CRUDResource.Builder<ApplicationProfile.Builder>
Builder for
ApplicationProfile
instances.-
Field Summary
Fields inherited from class com.janeirodigital.sai.core.resources.ReadableResource.Builder
contentType, dataset, exists, jsonLdContext, resource, saiSession, unprotected, uri
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(URI uri, SaiSession saiSession) Initialize builder withuri
andsaiSession
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theApplicationProfile
using attributes from the Builder.getThis()
Ensures that don't get an unchecked cast warning when returning from setterssetAccessNeedGroupUris
(List<URI> accessNeedGroupUris) Set the access need groups requested by the applicationsetAuthorUri
(URI authorUri) Set the author of the applicationsetClientUri
(URI clientUri) Set the client_uri of the Solid-OIDC client identifier documentsetDataset
(org.apache.jena.rdf.model.Model dataset) Set the Jena model and use it to populate attributes of theApplicationProfile.Builder
.setDefaultMaxAge
(int defaultMaxAge) Set the default_max_age for the Solid-OIDC client identifier documentsetDescription
(String description) Set the description of the applicationsetGrantType
(List<String> grantTypes) Set the Solid-OIDC grant_types with the provided grant typessetLogoUri
(URI logoUri) Set the thumbnail of the applicationSet the name of the applicationsetRedirectUris
(List<URI> redirectUris) Set the Solid-OIDC redirect_uris with the provided URI list;setRequireAuthTime
(boolean requireAuthTime) Set require_auth_time for the Solid-OIDC client identifier documentsetResponseTypes
(List<String> responseTypes) Set the Solid-OIDC response_types with the provided response typesSet the Solid-OIDC scopes with the provided list of scopesSet the tos_uri of the Solid-OIDC client identifier documentMethods inherited from class com.janeirodigital.sai.core.resources.ReadableResource.Builder
setContentType, setDataset, setJsonLdContext, setUnprotected
-
Constructor Details
-
Builder
Initialize builder withuri
andsaiSession
- Parameters:
uri
- URI of theApplicationProfile
to buildsaiSession
-SaiSession
to assign
-
-
Method Details
-
getThis
Ensures that don't get an unchecked cast warning when returning from setters- Specified by:
getThis
in classReadableResource.Builder<ApplicationProfile.Builder>
- Returns:
RegistrySet.Builder
-
setDataset
public ApplicationProfile.Builder setDataset(org.apache.jena.rdf.model.Model dataset) throws SaiException Set the Jena model and use it to populate attributes of theApplicationProfile.Builder
. Assumption is made that the corresponding resource exists.- Overrides:
setDataset
in classReadableResource.Builder<ApplicationProfile.Builder>
- Parameters:
dataset
- Jena model to populate the Builder attributes with- Returns:
ApplicationProfile.Builder
- Throws:
SaiException
-
setName
Set the name of the application- Parameters:
name
- name of application
-
setDescription
Set the description of the application- Parameters:
description
- description of application
-
setAuthorUri
Set the author of the application- Parameters:
authorUri
- URI of application author
-
setLogoUri
Set the thumbnail of the application- Parameters:
logoUri
- URI of application thumbnail
-
setAccessNeedGroupUris
Set the access need groups requested by the application- Parameters:
accessNeedGroupUris
- List of access need group URIs- See Also:
-
setRedirectUris
Set the Solid-OIDC redirect_uris with the provided URI list;- Parameters:
redirectUris
- List of redirect URIs
-
setClientUri
Set the client_uri of the Solid-OIDC client identifier document- Parameters:
clientUri
- client URI
-
setTosUri
Set the tos_uri of the Solid-OIDC client identifier document- Parameters:
tosUri
- Terms of service URI
-
setScopes
Set the Solid-OIDC scopes with the provided list of scopes- Parameters:
scopes
- Scopes to add
-
setGrantType
Set the Solid-OIDC grant_types with the provided grant types- Parameters:
grantTypes
- Grant types to add
-
setResponseTypes
Set the Solid-OIDC response_types with the provided response types- Parameters:
responseTypes
- Response types to add
-
setDefaultMaxAge
Set the default_max_age for the Solid-OIDC client identifier document- Parameters:
defaultMaxAge
- Default max age
-
setRequireAuthTime
Set require_auth_time for the Solid-OIDC client identifier document- Parameters:
requireAuthTime
- Require auth time
-
build
Build theApplicationProfile
using attributes from the Builder. If no Jena dataset has been provided, then the dataset will be populated using the attributes from the Builder withpopulateDataset()
.- Returns:
ApplicationProfile
- Throws:
SaiException
-