public class BODActionHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
BODActionHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
checkError(commonj.sdo.DataObject dataArea,
java.lang.String noun)
Check error and throw AbstractBusinessObjectDocumentException
|
static BusinessObjectDocumentType |
createBusinessObjectDocument(java.util.Map<java.lang.String,java.lang.Object> requestMap,
java.lang.String resourceName,
java.lang.String urlParamGrpName,
java.lang.String verb,
java.lang.String actionCode)
Create a Business Object Document based on requestMap and BOD mapping configuration.
|
static java.util.Map<java.lang.String,java.lang.String[]> |
transformRequestMap(java.util.Map<java.lang.String,java.lang.Object> requestMap,
java.lang.String prefix)
This recursive method transforms the structured request Map to
a flattened map so that we can easily compare with URLParameter mappings.
|
public static final java.lang.String COPYRIGHT
public static BusinessObjectDocumentType createBusinessObjectDocument(java.util.Map<java.lang.String,java.lang.Object> requestMap, java.lang.String resourceName, java.lang.String urlParamGrpName, java.lang.String verb, java.lang.String actionCode) throws java.lang.Exception
requestMap
- Request mapresourceName
- Resource nameurlParamGrpName
- URLParameterGroup nameverb
- VerbactionCode
- Action codejava.lang.Exception
- Throw an exception is something is wrongpublic static java.util.Map<java.lang.String,java.lang.String[]> transformRequestMap(java.util.Map<java.lang.String,java.lang.Object> requestMap, java.lang.String prefix)
requestMap
- The JSON Map from REST Services requestprefix
- The prefix used to build flattened map.java.util.Map object that represents the request.
The key is a String (e.g., orderItem.0/itemAttributes.0) and the value is String[].
public static void checkError(commonj.sdo.DataObject dataArea, java.lang.String noun) throws AbstractBusinessObjectDocumentException
dataArea
- The response DataObject.noun
- The noun.AbstractBusinessObjectDocumentException
- Throw exception if there is any error in dataArea.