Modifier and Type | Field and Description |
---|---|
static String |
FIELD_CONTENT
The name of the field which contains the resource content in the JSON
representation.
|
static String |
FIELD_CONTENT_ID
The name of the field in the resource content which contains the resource
ID.
|
static String |
FIELD_CONTENT_REVISION
The name of the field in the resource content which contains the resource
revision.
|
static String |
FIELD_ID
The name of the field which contains the resource ID in the JSON
representation.
|
static String |
FIELD_REVISION
The name of the field which contains the resource version in the JSON
representation.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(JsonPointer... fields)
Adds a field to the list of fields which should be included in this JSON
resource after field filtering has occurred.
|
Promise<ResourceResponse,ResourceException> |
asPromise()
Return this response as a result Promise.
|
boolean |
equals(Object obj)
Returns
true if the provided object is a resource having the same
resource ID and revision as this resource. |
JsonValue |
getContent()
Returns the JSON content of this resource.
|
List<JsonPointer> |
getFields()
Returns the list of fields which should be included in this JSON resource
after field filtering has occurred.
|
String |
getId()
Returns the ID of this resource, if applicable.
|
String |
getRevision()
Returns the revision of this resource, if known.
|
boolean |
hasFields()
Returns true if any fields have been added, indicating that the list of
fields in this response should be included in this JSON resource after
field filtering has occurred, otherwise returns false indicating that the
original list of fields in the request should be used for filtering the
response.
|
int |
hashCode()
Returns the hash code for this resource.
|
getResourceApiVersion, setResourceApiVersion
static final String FIELD_ID
Note: when encoding the resource ID as part of a resource's
content the field name ResourceResponse.FIELD_CONTENT_ID
should be used.
static final String FIELD_REVISION
Note: when encoding the resource revision as part of a resource's
content the field name ResourceResponse.FIELD_CONTENT_REVISION
should be used.
static final String FIELD_CONTENT_ID
ResourceResponse.FIELD_ID
and is
intended for use in cases where a commons REST API wishes to expose the
resource ID as part of the resource content.static final String FIELD_CONTENT_REVISION
ResourceResponse.FIELD_REVISION
and is intended for use in cases where a commons
REST API wishes to expose the resource revision as part of the resource
content.static final String FIELD_CONTENT
JsonValue getContent()
String getId()
null
if this resource does
not have an ID.String getRevision()
null
if the version is
not known.List<JsonPointer> getFields()
boolean hasFields()
void addField(JsonPointer... fields)
fields
- a JsonPointer
representing the field to add.Promise<ResourceResponse,ResourceException> asPromise()
boolean equals(Object obj)
true
if the provided object is a resource having the same
resource ID and revision as this resource.
Copyright © 2010-2018, ForgeRock All Rights Reserved.