|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.model.Resource.Builder
public static final class Resource.Builder
Resource model component builder.
| Method Summary | |
|---|---|
void |
addChildResource(Resource resource)
Add an existing Resource as a child resource of current resource. |
Resource.Builder |
addChildResource(String relativePath)
Add a new child resource to the resource. |
ResourceMethod.Builder |
addMethod()
Add a new arbitrary method model to the resource. |
ResourceMethod.Builder |
addMethod(String httpMethod)
Add a new method model to the resource for processing requests of the specified HTTP method. |
Resource |
build()
Build a new resource model. |
Resource.Builder |
mergeWith(Resource.Builder resourceBuilder)
Merge methods from a given resource model builder into this resource model builder. |
Resource.Builder |
mergeWith(Resource resource)
Merge methods from a given resource model into this resource model builder. |
Resource.Builder |
name(String name)
Define a new name of the built resource. |
Resource.Builder |
path(String path)
Define a new path for the built resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Resource.Builder name(String name)
name - new name of the resource.
Resource.getName()public Resource.Builder path(String path)
path - new path for the resource.
public ResourceMethod.Builder addMethod(String httpMethod)
build()
method on the method builder after setting all the data. This will be
done automatically when the resource is built.
httpMethod - HTTP method that will be processed by the method.
public ResourceMethod.Builder addMethod()
build()
method on the method builder after setting all the data. This will be
done automatically when the resource is built.
public Resource.Builder addChildResource(String relativePath)
build()
method on the resource builder after setting all the data. This will be
done automatically when the resource is built.
relativePath - The path of the new child resource relative to this resource.
public void addChildResource(Resource resource)
resource - Resource to be added as child resource.public Resource.Builder mergeWith(Resource resource)
resource - to be merged into this resource model builder.
public Resource.Builder mergeWith(Resource.Builder resourceBuilder)
NOTE: Any "open" method builders in the supplied resourceBuilder that have
not been explicitly converted to method models will be closed as part of this merge operation
before merging the resource builder instances.
resourceBuilder - to be merged into this resource model builder.
public Resource build()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||