Newer Version Available
IndustriesContext Class
Namespace
IndustriesContext Methods
The IndustriesContext class includes these methods.
addRecordsToContext(input)
Signature
public Map<String,Object> addRecordsToContext(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
-
- contextId
- Type: String
- ID of the Context to which record described in inputData is added.
- overWriteExistingRecords
- Type: Boolean
- Indicates if an already existing record with same ID as being added through inputData must be overriden.
- inputData
- Type: String
- Record data to be added to the context, hierarchical data in stringified format.
- isTaggedData
- Type: Boolean
- Describes if the inputData structure is using the taggedData Format.
Return Value
Type: Map<String,Object>
buildContext(input)
Signature
public Map<String,Object> buildContext(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
- Metadata about the context and payload data required to create a context.
Return Value
Type: Map<String,Object>
Details containing the context ID that’s created.
deleteContext(input)
Signature
public void deleteContext(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
- Details containing the ID of the context to be deleted.
Return Value
Type: void
evictContextDefinition(input)
Signature
public void evictContextDefinition(Map<String,ANY> input)
Example
Parameters
- input
- Type: Map<String,ANY>
- API name of the context definition to remove the details of the context definition from cache.
Return Value
Type: void
filteringContext(input)
Signature
public Map<String, Object> industriesContexts.filteringContext(buildWithFilter);
Example
Type: BUILD
Type: QUERYRECORDANDCHILDREN or QUERYRECORDS
Parameters
- input
- Type: Enum
- Object defining the type of operation. Operation Metadata along with filter criteria to be applied on the operation. Valid values are: BUILD,QUERYRECORDANDCHILDREN and QUERYRECORDS
- filter: String
- Metadata about the filter object.
- build: Map<String,Object>
- Metadata to build the context. Only for type with value BUILD.
- query: Map<String,Object>
- Metadata to query records in the context. Only for type with value QUERYRECORDANDCHILDREN and QUERYRECORDS.
Return Value
Type: Map<String,Object>
Mapping of the contextId or queryResults with the requested operation type.
getContext(input)
Signature
public Map<String,Object> getContext(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
- Details containing the ID of the context to be retrieved.
Return Value
Type: Map<String,Object>
Details of the retrieved context.
getContextTranslation(input)
Signature
public Map<String,Object> getContextTranslation(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
- Details of the request parameters to retrieve context mappings. The details include list of persisted attributes and settings to indicate whether any dependencies are established or restricted fields are removed.
Return Value
Type: Map<String,Object>
Details of the retrieved context mappings.
persistContext(input)
Signature
public Map<String,Object> persistContext(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
- Details to persist context such as context ID and target mapping ID.
Return Value
Type: Map<String,Object>
Reference ID for the persisted context.
queryContextRecordsAndChildren(input)
Signature
Map<String, Object> industriesContexts.queryContextRecordsAndChildren(input: Map<String, Object>);
Example
Parameters
- input
- contextId: String
- ID of the context to be queried.
- queryPaths: Map<String,Object>
- List of dataPath to be queried.
Return Value
queryResults: Map<String,Object>
Result containing the record data.
queryRecordStatus(input)
Signature
public Map<String,Object> queryRecordStatus(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
- Details containing the context ID and list of record paths for context data to query the status for.
Return Value
Type: Map<String,Object>
Details containing the results of the query.
queryTags(input)
Signature
public Map<String,Object> queryTags(Map<String,Object> input)
Example
Parameters
- input
- Type: Map<String,Object>
- Details containing the context ID and tags to be queried.
Return Value
Type: Map<String,Object>
Details containing the results of the query.
updateContextAttributes(input)
Signature
public Map<String,Object> updateContextAttributes(Map<String,Object> input)
Usage
Use this method to update the attributes of a context.
- This method works only with the names of the canonical structure, and not with tags.
- The dataType of the values must match the dataType in the canonical structure. Also, it must match the dataType of the field if persistence is expected later.
- The method supports attribute updates at different level. Pass an attributeMap corresponding to the given dataPath.
- The API works at the per-record level.
Example
Parameters
- input
- Type: Map<String,Object>
- Details containing the context ID and node path. The node path contains the path of the context record and list of attributes to be updated with their values.
Return Value
Type: Map<String,Object>
Details containing the updated attribute list.