public final class Resource extends Object
Resource
s may be either a reference to another Resource
that will be defined elsewhere in the
API Descriptor, or a described resource. If a Reference
is provided, then none of the other fields may
be used, and if any of the other fields are used, a reference may not be provided.
Modifier and Type | Class and Description |
---|---|
static class |
Resource.AnnotatedTypeVariant
The variant of the annotated type.
|
static class |
Resource.Builder
Builder to help construct the Resource.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static Resource |
fromAnnotatedType(Class<?> type,
Resource.AnnotatedTypeVariant variant,
ApiDescription descriptor)
Build a
Resource from an annotated request handler. |
static Resource |
fromAnnotatedType(Class<?> type,
Resource.AnnotatedTypeVariant variant,
Items items,
ApiDescription descriptor,
Parameter... extraParameters)
Build a
Resource from an annotated request handler. |
static Resource |
fromAnnotatedType(Class<?> type,
Resource.AnnotatedTypeVariant variant,
SubResources subResources,
ApiDescription descriptor,
Parameter... extraParameters)
Build a
Resource from an annotated request handler. |
Action[] |
getActions()
Getter of actions.
|
Create |
getCreate()
Getter of Create.
|
Delete |
getDelete()
Getter of Delete.
|
LocalizableString |
getDescription()
Getter of description.
|
Items |
getItems()
Getter of items.
|
Parameter[] |
getParameters()
Getter of the parameters array.
|
Patch |
getPatch()
Getter of Patch.
|
Query[] |
getQueries()
Getter of queries.
|
Read |
getRead()
Getter of Read.
|
Reference |
getReference()
Gets the reference.
|
Schema |
getResourceSchema()
Getter of resource schema.
|
SubResources |
getSubresources()
Getter of sub-resources.
|
LocalizableString |
getTitle()
Getter of title.
|
Update |
getUpdate()
Getter of Update.
|
int |
hashCode() |
Boolean |
isMvccSupported()
Informs if MVCC is supported.
|
static Resource.Builder |
resource()
Create a new Builder for Resoruce.
|
String |
toString() |
public Schema getResourceSchema()
public LocalizableString getTitle()
public LocalizableString getDescription()
public Create getCreate()
public Read getRead()
public Update getUpdate()
public Delete getDelete()
public Patch getPatch()
public Action[] getActions()
public Query[] getQueries()
public SubResources getSubresources()
public Reference getReference()
public Items getItems()
public Boolean isMvccSupported()
true
if MVCC is supported and false
otherwisepublic Parameter[] getParameters()
public static Resource.Builder resource()
public static Resource fromAnnotatedType(Class<?> type, Resource.AnnotatedTypeVariant variant, ApiDescription descriptor)
Resource
from an annotated request handler.type
- The annotated type.variant
- The annotated type variant.descriptor
- The root descriptor to add definitions to.Resource
object.public static Resource fromAnnotatedType(Class<?> type, Resource.AnnotatedTypeVariant variant, SubResources subResources, ApiDescription descriptor, Parameter... extraParameters)
Resource
from an annotated request handler.type
- The annotated type.variant
- The annotated type variant.subResources
- The sub resources object to be included, if any sub-resources exist, or null.descriptor
- The root descriptor to add definitions to.extraParameters
- Extra parameters not from the resource annotation.Resource
object.public static Resource fromAnnotatedType(Class<?> type, Resource.AnnotatedTypeVariant variant, Items items, ApiDescription descriptor, Parameter... extraParameters)
Resource
from an annotated request handler.type
- The annotated type.variant
- The annotated type variant.items
- The items definition for a collection variant, or null.descriptor
- The root descriptor to add definitions to.extraParameters
- Extra parameters not from the resource annotation.Resource
object.Copyright © 2010-2018, ForgeRock All Rights Reserved.