Package org.forgerock.api.models
Class Resource.Builder
java.lang.Object
org.forgerock.api.models.Resource.Builder
- Enclosing class:
- Resource
Builder to help construct the Resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds one Action to the list of Actions.Set Actions.build()Construct a new instance of Resource.Set create.Set Delete.description(String description) Set the description.description(LocalizableString description) Set the description.Adds items-resource.mvccSupported(Boolean mvccSupported) Setter for MVCC-supported flag.operations(Operation... operations) Allocates the operations given in the parameter by their type.Sets a single supported parameter.parameters(List<Parameter> parameters) Set multiple supported parameters.Set Patch.Set Queries.Adds one Query to the list of queries.Set Read.Set a reference.resourceSchema(Schema resourceSchema) Set the resource schema.subresources(SubResources subresources) Sets the sub-resources for this resource.Set the title.title(LocalizableString title) Set the title.Set Update.
-
Constructor Details
-
Builder
protected Builder()Private default constructor.
-
-
Method Details
-
reference
Set a reference.- Parameters:
reference- The reference.- Returns:
- This builder.
-
resourceSchema
Set the resource schema.- Parameters:
resourceSchema- The schema of the resource for this path. Required when any of create, read, update, delete, patch are supported- Returns:
- Builder
-
title
Set the title.- Parameters:
title- Title of the endpoint- Returns:
- Builder
-
title
Set the title.- Parameters:
title- Title of the endpoint- Returns:
- Builder
-
description
Set the description.- Parameters:
description- A description of the endpoint- Returns:
- Builder
-
description
Set the description.- Parameters:
description- A description of the endpoint- Returns:
- Builder
-
create
Set create.- Parameters:
create- The create operation description, if supported- Returns:
- Builder
-
read
Set Read.- Parameters:
read- The read operation description, if supported- Returns:
- Builder
-
update
Set Update.- Parameters:
update- The update operation description, if supported- Returns:
- Builder
-
delete
Set Delete.- Parameters:
delete- The delete operation description, if supported- Returns:
- Builder
-
patch
Set Patch.- Parameters:
patch- The patch operation description, if supported- Returns:
- Builder
-
actions
Set Actions.- Parameters:
actions- The list of action operation descriptions, if supported- Returns:
- Builder
-
action
Adds one Action to the list of Actions.- Parameters:
action- Action operation description to be added to the list- Returns:
- Builder
-
queries
Set Queries.- Parameters:
queries- The list or query operation descriptions, if supported- Returns:
- Builder
-
query
Adds one Query to the list of queries.- Parameters:
query- Query operation description to be added to the list- Returns:
- Builder
-
subresources
Sets the sub-resources for this resource.- Parameters:
subresources- The sub-reosurces definition.- Returns:
- Builder
-
operations
Allocates the operations given in the parameter by their type.- Parameters:
operations- One or more Operations- Returns:
- Builder
-
mvccSupported
Setter for MVCC-supported flag.- Parameters:
mvccSupported- Whether this resource supports MVCC- Returns:
- Builder
-
items
Adds items-resource.- Parameters:
items- The definition of the collection items- Returns:
- Builder
-
parameters
Set multiple supported parameters.- Parameters:
parameters- Extra parameters supported by the resource- Returns:
- Builder
-
parameter
Sets a single supported parameter.- Parameters:
parameter- Extra parameter supported by the resource- Returns:
- Builder
-
build
Construct a new instance of Resource.- Returns:
- Resource instance
-