Adaptive Framework
0.9.0
|
Files | |
file | afw_object_options.h |
Header file for Adaptive Framework object processing options. | |
Data Structures | |
struct | afw_object_options_s |
Struct for object processing options. More... | |
Macros | |
#define | AFW_OBJECT_OPTION_checkRequired (1 << 0) |
Indicates that object should checked for missing required properties. More... | |
#define | AFW_OBJECT_OPTION_composite (1 << 1) |
Include all inherited properties. More... | |
#define | AFW_OBJECT_OPTION_includeDefaultValues (1 << 3) |
Indicates that object should include default property values. More... | |
#define | AFW_OBJECT_OPTION_includeDescendentObjectTypes (1 << 4) |
Include objects with descendent object types on retrieve. More... | |
#define | AFW_OBJECT_OPTION_inheritedFrom (1 << 5) |
Include inheritedFrom property for all inherited properties. More... | |
#define | AFW_OBJECT_OPTION_integersAsString (1 << 6) |
Cause all data type integer values to be converted to string. More... | |
#define | AFW_OBJECT_OPTION_largeIntegersAsString (1 << 7) |
Cause all large data type integer values to be converted to string. More... | |
#define | AFW_OBJECT_OPTION_metaFull (1 << 8) |
Include full meta. More... | |
#define | AFW_OBJECT_OPTION_metaLimited (1 << 9) |
Include only requested meta. More... | |
#define | AFW_OBJECT_OPTION_normalize (1 << 10) |
Indicates that object should be normalized based on object type. More... | |
#define | AFW_OBJECT_OPTION_objectId (1 << 11) |
Include meta objectId for entity objects. More... | |
#define | AFW_OBJECT_OPTION_objectType (1 << 12) |
Include meta objectType (object id of adaptive object type). More... | |
#define | AFW_OBJECT_OPTION_objectTypes (1 << 13) |
Include meta objectTypes. More... | |
#define | AFW_OBJECT_OPTION_path (1 << 14) |
Include meta path for entity objects. More... | |
#define | AFW_OBJECT_OPTION_pathEmbedded (1 << 15) |
Include meta path for embedded objects. More... | |
#define | AFW_OBJECT_OPTION_reconcilable (1 << 16) |
Include meta reconcilable to entity's meta. More... | |
#define | AFW_OBJECT_OPTION_resolvedParentPaths (1 << 17) |
Include meta resolvedParentPaths for all objects. More... | |
#define | AFW_OBJECT_OPTION_typedValues (1 << 18) |
Indicates that each value should include type information. More... | |
#define | AFW_OBJECT_OPTION_whitespace (1 << 19) |
Indicates content type should include whitespace characters. More... | |
#define | AFW_OBJECT_OPTION_IS(_options, _option) ((_options) && (((((_options)->mask) & (AFW_OBJECT_OPTION_ ## _option))) != 0)) |
Test mask. | |
#define | AFW_OBJECT_OPTION_SET_ON(_options, _option) (_options)->mask |= AFW_OBJECT_OPTION_ ## _option |
Set option on. | |
#define | AFW_OBJECT_OPTION_SET_OFF(_options, _option) (_options)->mask &= ~(AFW_OBJECT_OPTION_ ## _option) |
Set option off. | |
#define | AFW_OBJECT_OPTION_SET(_options, _option, _bool_value) |
Set option. More... | |
Functions | |
const afw_object_options_t * | afw_object_options_set_from_object (const afw_object_options_t *initial_options, const afw_object_t *options_object, const afw_pool_t *p, afw_xctx_t *xctx) |
Set object processing options from options object. More... | |
const afw_object_options_t * | afw_object_options_create (const afw_object_options_t *initial_options, const afw_object_options_t *options, const afw_pool_t *p, afw_xctx_t *xctx) |
Create a options. More... | |
Variables | |
afw_object_options_none | |
Object processing options - no options set. | |
afw_object_options_objectType | |
Object processing options - objectType. | |
afw_object_options_composite | |
Object processing options - composite only. | |
afw_object_options_composite_normalize_defaults_required | |
afw_object_options_composite_and_defaults | |
Object processing options - composite only and defaults. | |
afw_object_options_essential | |
Object processing options - metaLimited. | |
afw_object_options_essential_with_whitespace | |
Object processing options - metaLimited + whitespace. | |
afw_object_options_reconcilable_meta_property | |
Object processing options to produce reconcilable meta property. | |
afw_object_options_composite_inheritedFrom_resolvedParentPaths | |
Object processing options - composite + inheritance related. | |
afw_object_options_whitespace | |
Whitespace only. | |
Adaptive Framework object processing options.
#define AFW_OBJECT_OPTION_checkRequired (1 << 0) |
Indicates that object should checked for missing required properties.
This option implies the normalize option.
Definition at line 52 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_composite (1 << 1) |
Include all inherited properties.
This indicates that both direct and embedded inheritance should be performed.
Definition at line 61 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_includeDefaultValues (1 << 3) |
Indicates that object should include default property values.
This indicates that default property values should be included. This option implies the normalize option.
Definition at line 71 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_includeDescendentObjectTypes (1 << 4) |
Include objects with descendent object types on retrieve.
This only applies to retrieve objects requests and indicates that objects with the supplied object type along with objects with any of its descendent object types should be included in the search.
Definition at line 82 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_inheritedFrom (1 << 5) |
Include inheritedFrom property for all inherited properties.
This option is ignored unless composite option is also set.
The inheritedFrom property in meta properties.<propertyName>
where <propertyName>
is the associated property name will be set.
Definition at line 94 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_integersAsString (1 << 6) |
Cause all data type integer values to be converted to string.
This is a mask for afw_object_options_t common option.
This overrides the large_integers_as_string option. If neither the integers_as_string or large_integer_as_string is specified, integers will remain integers. If this option is specified, all data type integer values will be converted to the string data type.
This options is useful if a content type is used that represents integers as double (floating point) values.
Definition at line 111 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_largeIntegersAsString (1 << 7) |
Cause all large data type integer values to be converted to string.
This is a mask for afw_object_options_t common option.
This option is overridden by the integers_as_string option.
If this option is specified, all integers that have a magnitude that exceeds plus or minus 9007199254740991 (2^53-1) will be converted to the string data type.
This options is useful if a content type is used that represents integers as double (floating point) values, but integers are normally small enough to be represented properly.
Definition at line 130 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_metaFull (1 << 8) |
Include full meta.
This indicates that all meta, including properties that are not part of delta from object type, are to be included. This overrides AFW_OBJECT_OPTION_metaLimited.
Definition at line 141 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_metaLimited (1 << 9) |
Include only requested meta.
This indicates that only the requested meta is returned plus essential meta (parentPaths when composite is not specified).
Definition at line 151 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_normalize (1 << 10) |
Indicates that object should be normalized based on object type.
This options is assumed by several options as indicated in their description.
Indicates that each object's object type should be processed, assigning each embedded object's object type, converting any properties to their correct data type, plus computing values when needed.
Use the includeDefaultValues option to include default values.
Definition at line 167 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_objectId (1 << 11) |
Include meta objectId for entity objects.
Indicates that meta objectId should be included for the entity object.
Definition at line 176 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_objectType (1 << 12) |
Include meta objectType (object id of adaptive object type).
Indicates that meta objectType should be included for entity objects.
Definition at line 185 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_objectTypes (1 << 13) |
Include meta objectTypes.
Indicates that the objectTypes property should be added to the meta of the entity containing a property of each object type used by the entity and all of its embedded objects.
Definition at line 196 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_path (1 << 14) |
Include meta path for entity objects.
Indicates that meta path should be included for entity objects.
Definition at line 205 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_pathEmbedded (1 << 15) |
Include meta path for embedded objects.
Indicates that meta path should be included for embedded objects.
Definition at line 214 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_reconcilable (1 << 16) |
Include meta reconcilable to entity's meta.
Indicates that meta reconcilable should be included in entity's meta. If this is specified on a get/retrieve object request and the retrieved object is changed, calling update_object() with the changed object will use the information in meta reconcilable to produce a modify request for only the changes.
Definition at line 226 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_resolvedParentPaths (1 << 17) |
Include meta resolvedParentPaths for all objects.
Indicates that meta resolvedParentPaths should be included with a bag of parentPaths that have already been resolved by the composite option.
Definition at line 236 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_SET | ( | _options, | |
_option, | |||
_bool_value | |||
) |
Set option.
Definition at line 332 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_typedValues (1 << 18) |
Indicates that each value should include type information.
The content type determines how this is represented.
Definition at line 245 of file afw_object_options.h.
#define AFW_OBJECT_OPTION_whitespace (1 << 19) |
Indicates content type should include whitespace characters.
This option can be optionally supported by a content type implementation. In the case of JSON, this indicates that newline, space, and tab characters should be included to make the output more readable.
Definition at line 256 of file afw_object_options.h.
const afw_object_options_t* afw_object_options_create | ( | const afw_object_options_t * | initial_options, |
const afw_object_options_t * | options, | ||
const afw_pool_t * | p, | ||
afw_xctx_t * | xctx | ||
) |
Create a options.
initial_options | or NULL. |
options. | |
p | to use for result. |
xctx | of caller. |
A copy is made of options and initial_options are merged, if specified. The copy will have implied options set such as "normalize" if option "includeDefaultValues" is set.
Definition at line 270 of file afw_object_options.c.
const afw_object_options_t* afw_object_options_set_from_object | ( | const afw_object_options_t * | initial_options, |
const afw_object_t * | options_object, | ||
const afw_pool_t * | p, | ||
afw_xctx_t * | xctx | ||
) |
Set object processing options from options object.
initial_options | or NULL. |
options_object | that contains options. |
p | to use for result. |
xctx | of caller. |
}
Definition at line 92 of file afw_object_options.c.