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 URIprotected URIprotected OffsetDateTimeprotected URIprotected URIprotected OffsetDateTimeFields inherited from class com.janeirodigital.sai.core.resources.ReadableResource.Builder
contentType, dataset, exists, jsonLdContext, resource, saiSession, unprotected, uri -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder(URI uri, SaiSession saiSession) Initialize builder withuriandsaiSession -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPopulates the Jena dataset graph with the attributes from the Builderprotected voidPopulates the common fields of theAgentRegistrationbased 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 withuriandsaiSession- Parameters:
uri- URI of theAgentRegistrationto buildsaiSession-SaiSessionto 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 theAgentRegistrationbased on the associated Jena resource.- Throws:
SaiException
-
populateDataset
protected void populateDataset()Populates the Jena dataset graph with the attributes from the Builder
-