Class ResourceModel.Builder
java.lang.Object
org.glassfish.jersey.server.model.ResourceModel.Builder
- Enclosing class:
- ResourceModel
Builder used to create
resource model
instances.-
Constructor Summary
ConstructorDescriptionBuilder
(boolean subResourceModel) Create new builder with empty resources.Create new builder pre initialized withresource
.Builder
(ResourceModel resourceModel, boolean subResourceModel) Create new builder pre initialized withresourceModel
. -
Method Summary
Modifier and TypeMethodDescriptionaddResource
(Resource resource) Add a resource to the builder.build()
Build theresource model
.
-
Constructor Details
-
Builder
Create new builder pre initialized withresourceModel
.- Parameters:
resourceModel
- Resource model.subResourceModel
-true
if resource model created by this builder will be sub resource model,false
if it is a application root resource model.
-
Builder
Create new builder pre initialized withresource
.- Parameters:
resources
- Resources (root and non root).subResourceModel
-true
if resource model created by this builder will be sub resource model,false
if it is a application root resource model.
-
Builder
public Builder(boolean subResourceModel) Create new builder with empty resources.- Parameters:
subResourceModel
-true
if resource model created by this builder will be sub resource model,false
if it is a application root resource model.
-
-
Method Details
-
addResource
Add a resource to the builder.- Parameters:
resource
- Resource to be added to the builder (root or non root resource).- Returns:
- Current builder.
-
build
Build theresource model
. Resources with the same path are merged.- Returns:
- Resource model.
-