public class TransformationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Map<String,String>> |
documentCustomListsToMap(Document document)
GetList operation from Netsuite return all lists for all custom picklist.
|
static Map<String,String> |
getStandardList(String recordType,
String fieldName,
NetSuiteSoapConfig config,
NetSuiteSoapConnection connection)
Get all values for particular field.
|
static InputStream |
inputStreamToNetsuiteXml(InputStream input,
String recordType,
String id,
String idType,
String operation,
NetSuiteSoapConfig config,
NetSuiteSoapConnection connection,
Behavior behavior)
Transformation of all custom connector entities(fields, ids, namespaces or objects) to valid Netsuite xml.
|
static boolean |
isPositiveNumber(String value)
Boolean function for recognizing integer in the string and return true if number is greater than 0
|
static void |
setCustomListsToValidNetsuiteXML(Node node,
Document document,
NetSuiteSoapConfig config,
NetSuiteSoapConnection connection,
Map<Node,String> customLists)
Custom list has custom structure as : FieldType__scriptId__internalID__customListInternalId Method convert custom structure
to valid xml structure for Netsuite
|
static void |
transformFieldToNetsuiteXml(Node node,
Document document,
NetSuiteSoapConfig config,
Map<Node,String> customLists,
String recordType,
Behavior behavior,
org.mule.metadata.api.model.ObjectType parentType,
org.mule.metadata.api.model.ObjectType greatParentType)
Connector could use invalid field for netsuite as custom fields or standard picklists.
|
static void |
transformStandardList(Node node,
Document document,
String recordType,
NetSuiteSoapConfig config,
NetSuiteSoapConnection connection)
Converting node to list node with references.
|
public static InputStream inputStreamToNetsuiteXml(InputStream input, String recordType, String id, String idType, String operation, NetSuiteSoapConfig config, NetSuiteSoapConnection connection, Behavior behavior)
input - Input connector requestrecordType - Type of recordid - Record identifieridType - Type of identifier: external/internaloperation - Name of operationconfig - Netsuite configurationconnection - Netsuite connectionbehavior - Object to change the default operation behaviourpublic static void transformFieldToNetsuiteXml(Node node, Document document, NetSuiteSoapConfig config, Map<Node,String> customLists, String recordType, Behavior behavior, org.mule.metadata.api.model.ObjectType parentType, org.mule.metadata.api.model.ObjectType greatParentType) throws org.mule.runtime.api.metadata.MetadataResolvingException
node - Field nodedocument - Root documentconfig - Netsuite configurationcustomLists - List of values for particular picklistrecordType - Type of recordbehavior - Object to change the default operation behaviourparentType - metadata parent type to the processed node parametergreatParentType - metadata great parent type to the processed node parameter - used in case of the custom fieldsorg.mule.runtime.api.metadata.MetadataResolvingException - if it failed to build the metadatapublic static void transformStandardList(Node node, Document document, String recordType, NetSuiteSoapConfig config, NetSuiteSoapConnection connection)
node - Node of picklistdocument - Root documentrecordType - Type of recordconfig - Netsuite configurationconnection - Netsuite connectionpublic static Map<String,Map<String,String>> documentCustomListsToMap(Document document)
document - Document of lists;public static void setCustomListsToValidNetsuiteXML(Node node, Document document, NetSuiteSoapConfig config, NetSuiteSoapConnection connection, Map<Node,String> customLists) throws ParserConfigurationException, TransformerException
node - Node of picklistdocument - Root documentconfig - Netsuite configconnection - Netsuite connectioncustomLists - List of values for picklistParserConfigurationException - if something goes wrong while parsing the XMLTransformerException - if something goes wrong while parsing the XMLpublic static boolean isPositiveNumber(String value)
value - Input stringpublic static Map<String,String> getStandardList(String recordType, String fieldName, NetSuiteSoapConfig config, NetSuiteSoapConnection connection)
recordType - Type of recordfieldName - Name of picklist fieldconfig - Configuration of connectorconnection - Connection of connectorCopyright © 2025 MuleSoft, Inc.. All rights reserved.