Class AgentRegistration.Builder<T extends CRUDResource.Builder<T>>
java.lang.Object
com.janeirodigital.sai.core.resources.ReadableResource.Builder<T>
com.janeirodigital.sai.core.resources.CRUDResource.Builder<T>
com.janeirodigital.sai.core.agents.AgentRegistration.Builder<T>
- Direct Known Subclasses:
ApplicationRegistration.Builder
,SocialAgentRegistration.Builder
- Enclosing class:
- AgentRegistration
protected abstract static class AgentRegistration.Builder<T extends CRUDResource.Builder<T>>
extends CRUDResource.Builder<T>
Abstract builder for
AgentRegistration
instances (used by subclasses). See
SocialAgentRegistration
and ApplicationRegistration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected URI
protected URI
protected OffsetDateTime
protected URI
protected URI
protected OffsetDateTime
Fields inherited from class com.janeirodigital.sai.core.resources.ReadableResource.Builder
contentType, dataset, exists, jsonLdContext, resource, saiSession, unprotected, uri
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Builder
(URI uri, SaiSession saiSession) Initialize builder withuri
andsaiSession
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Populates the Jena dataset graph with the attributes from the Builderprotected void
Populates the common fields of theAgentRegistration
based on the associated Jena resource.setAccessGrant
(URI accessGrantUri) Set the access grant for the agent registrationsetRegisteredAgent
(URI agentUri) Set the registered agent that is the subject of the agent registrationsetRegisteredAt
(OffsetDateTime registeredAt) Set the time that the agent registration was created.setRegisteredBy
(URI socialAgentUri) Set the social agent that registered the agent registration.setRegisteredWith
(URI applicationUri) Set the application that registered the agent registration.setUpdatedAt
(OffsetDateTime updatedAt) Set the time that the agent registration was updated.Methods inherited from class com.janeirodigital.sai.core.resources.ReadableResource.Builder
getThis, setContentType, setDataset, setDataset, setJsonLdContext, setUnprotected
-
Field Details
-
registeredBy
-
registeredWith
-
registeredAt
-
updatedAt
-
registeredAgent
-
accessGrantUri
-
-
Constructor Details
-
Builder
Initialize builder withuri
andsaiSession
- Parameters:
uri
- URI of theAgentRegistration
to buildsaiSession
-SaiSession
to assign
-
-
Method Details
-
setRegisteredBy
Set the social agent that registered the agent registration.- Parameters:
socialAgentUri
- URI of the social agent that added the registration- See Also:
-
setRegisteredWith
Set the application that registered the agent registration.- Parameters:
applicationUri
- URI of the application that was use to add the registration- See Also:
-
setRegisteredAt
Set the time that the agent registration was created.- Parameters:
registeredAt
- when the agent registration was created- See Also:
-
setUpdatedAt
Set the time that the agent registration was updated.- Parameters:
updatedAt
- when the agent registration was updated- See Also:
-
setRegisteredAgent
Set the registered agent that is the subject of the agent registration- Parameters:
agentUri
- URI of the agent that was registered- See Also:
-
setAccessGrant
Set the access grant for the agent registration- Parameters:
accessGrantUri
- URI of the access grant- See Also:
-
populateFromDataset
Populates the common fields of theAgentRegistration
based on the associated Jena resource.- Throws:
SaiException
-
populateDataset
protected void populateDataset()Populates the Jena dataset graph with the attributes from the Builder
-