public static class ResourceModel.Builder extends Object
resource model
instances.Constructor and Description |
---|
Builder(boolean subResourceModel)
Create new builder with empty resources.
|
Builder(List<Resource> resources,
boolean subResourceModel)
Create new builder pre initialized with
resource . |
Builder(ResourceModel resourceModel,
boolean subResourceModel)
Create new builder pre initialized with
resourceModel . |
Modifier and Type | Method and Description |
---|---|
ResourceModel.Builder |
addResource(Resource resource)
Add a resource to the builder.
|
ResourceModel |
build()
Build the
resource model . |
public Builder(ResourceModel resourceModel, boolean subResourceModel)
resourceModel
.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.public Builder(List<Resource> resources, boolean subResourceModel)
resource
.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.public Builder(boolean subResourceModel)
subResourceModel
- true
if resource model created by this builder will be sub resource model,
false
if it is a application root resource model.public ResourceModel.Builder addResource(Resource resource)
resource
- Resource to be added to the builder (root or non root resource).public ResourceModel build()
resource model
. Resources with the same path are merged.Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.