public abstract class BaseResourceDefinition extends Object implements ResourceDefinition
Modifier and Type | Class and Description |
---|---|
static class |
BaseResourceDefinition.DirectiveType |
ResourceDefinition.PostProcessor
Constructor and Description |
---|
BaseResourceDefinition(Resource.Type resourceType)
Constructor.
|
BaseResourceDefinition(Resource.Type resourceType,
Collection<Resource.Type> subTypes,
Map<BaseResourceDefinition.DirectiveType,? extends Collection<String>> directives)
Constructor.
|
BaseResourceDefinition(Resource.Type resourceType,
Resource.Type... subTypes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Collection<String> |
getCreateDirectives()
Obtain the set of create directives for the resource.
|
Collection<String> |
getDeleteDirectives()
Obtain the set of delete directives for the resource.
|
List<ResourceDefinition.PostProcessor> |
getPostProcessors()
Obtain any resource post processors.
|
Collection<String> |
getReadDirectives()
Obtain the set of read directives for the resource.
|
Renderer |
getRenderer(String name)
Obtain the associated renderer based on name.
|
Set<SubResourceDefinition> |
getSubResourceDefinitions()
Obtain a set of all child resource types.
|
Resource.Type |
getType()
Obtain the type of resource.
|
Collection<String> |
getUpdateDirectives()
Obtain the set of update directives for the resource.
|
int |
hashCode() |
boolean |
isCreatable()
Defines if resource is actually created on the server side during POST
operation.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getPluralName, getSingularName
public BaseResourceDefinition(Resource.Type resourceType)
resourceType
- resource typepublic BaseResourceDefinition(Resource.Type resourceType, Resource.Type... subTypes)
resourceType
- the resource typesubTypes
- the sub-resource typespublic BaseResourceDefinition(Resource.Type resourceType, Collection<Resource.Type> subTypes, Map<BaseResourceDefinition.DirectiveType,? extends Collection<String>> directives)
resourceType
- the resource typesubTypes
- the sub-resource typesdirectives
- a map of directives for request types for this resourcepublic Resource.Type getType()
ResourceDefinition
Resource.Type
.getType
in interface ResourceDefinition
public Set<SubResourceDefinition> getSubResourceDefinitions()
ResourceDefinition
getSubResourceDefinitions
in interface ResourceDefinition
public List<ResourceDefinition.PostProcessor> getPostProcessors()
ResourceDefinition
ResultPostProcessor
while post processing a result.getPostProcessors
in interface ResourceDefinition
public Renderer getRenderer(String name)
ResourceDefinition
getRenderer
in interface ResourceDefinition
name
- name of the renderer to obtainpublic Collection<String> getReadDirectives()
ResourceDefinition
getReadDirectives
in interface ResourceDefinition
public Collection<String> getCreateDirectives()
ResourceDefinition
getCreateDirectives
in interface ResourceDefinition
public Collection<String> getUpdateDirectives()
ResourceDefinition
getUpdateDirectives
in interface ResourceDefinition
public Collection<String> getDeleteDirectives()
ResourceDefinition
getDeleteDirectives
in interface ResourceDefinition
public boolean isCreatable()
ResourceDefinition
isCreatable
in interface ResourceDefinition
true
if resource is creatable, false
otherwiseCopyright © 2022 Apache Software Foundation. All rights reserved.