import OlapicEntitiesHandler from 'OlapicDevKit-ES6/src/core/interfaces/handler.js'
OlapicEntitiesHandler
Direct Subclass:
This is an abstract class that all the entities handler will extend and implement.
Static Member Summary
Static Public Members | ||
public static get |
DevKit: OlapicDevKit: * A quick shortcut to get access to the DevKit singleton. |
Static Method Summary
Static Public Methods | ||
public static |
getFormsFromObject(obj: Object): Object This will be used when creating an entity to parse any list of action forms and returns them with a better format. |
|
public static |
getResourcesFromObject(obj: Object): Object This will be used when creating an entity to parse any list of linked entities and returns them with a better format. |
Static Public Members
public static get DevKit: OlapicDevKit: * source
A quick shortcut to get access to the DevKit singleton.
Static Public Methods
public static getFormsFromObject(obj: Object): Object source
This will be used when creating an entity to parse any list of action forms and returns them with a better format.
Params:
Name | Type | Attribute | Description |
obj | Object | The object to parse. |
Example:
// This will return {streams:{search:{method:'GET}}}
.getFormsFromObject({
'streams:search': {
method: 'GET',
},
});
public static getResourcesFromObject(obj: Object): Object source
This will be used when creating an entity to parse any list of linked entities and returns them with a better format.
Params:
Name | Type | Attribute | Description |
obj | Object | The object to parse. |
Example:
// This will return {media:{recent:{link:'...'}}}
.getResourcesFromObject({
'media:recent': {
_links: {
self: {
href: '...',
},
},
},
});