public class

CustomFieldUtils

extends Object
java.lang.Object
   ↳ org.mule.module.netsuite.util.CustomFieldUtils

Summary

Public Constructors
CustomFieldUtils()
Public Methods
static void UpdateCustomFieldMapToList(Map<String, Object> attributes)
This method checks if there is a custom field Map used to represent the custom field List and updates the content of the map by creating a custom field list object and overriding the object
static void addCustomFieldToList(List<CustomFieldRef> customFields, CustomizationFieldType rec, String internalId)
static boolean appliesToEntity(RecordType type, ItemCustomField field)
static boolean appliesToEntity(RecordType type, TransactionBodyCustomField field)
static boolean appliesToEntity(RecordType type, EntityCustomField field)
static boolean appliesToEntity(RecordType type, CrmCustomField field)
static boolean appliesToEntity(RecordType type, ItemOptionCustomField field)
static boolean appliesToEntity(RecordType type, TransactionColumnCustomField field)
static CustomFieldList fromMap(Map<String, Object> customFields)
In order to show meta-data correctly, the customFieldList is being displayed as a MAP of string Object, there the values are instances of the custom fields type.
static CustomizationRef getCustomizationRef(String metaDataKey)
static Class<?> getFromCustomizationFieldClass(CustomizationFieldType type)
static String getInternalId(CustomFieldRef custom)
static String getMetadataKey(CustomizationRef customField)
Generate a custom key that identifies the custom records.
static CustomRecord getRecordRef(String metaDataKey)
static boolean needsToConvertCustomFieldListField(Map<String, Object> attributes)
Check that the map has a field named customFieldList and that it is a Map that has a CustomFieldRef object
static void setInternalId(CustomFieldRef recordRef, String internalId)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CustomFieldUtils ()

Public Methods

public static void UpdateCustomFieldMapToList (Map<String, Object> attributes)

This method checks if there is a custom field Map used to represent the custom field List and updates the content of the map by creating a custom field list object and overriding the object

Parameters
attributes

public static void addCustomFieldToList (List<CustomFieldRef> customFields, CustomizationFieldType rec, String internalId)

Parameters
customFields
rec
internalId
Throws
IllegalAccessException
InstantiationException

public static boolean appliesToEntity (RecordType type, ItemCustomField field)

Parameters
type
field

public static boolean appliesToEntity (RecordType type, TransactionBodyCustomField field)

Parameters
type
field

public static boolean appliesToEntity (RecordType type, EntityCustomField field)

Parameters
type
field

public static boolean appliesToEntity (RecordType type, CrmCustomField field)

Parameters
type
field

public static boolean appliesToEntity (RecordType type, ItemOptionCustomField field)

Parameters
type
field

public static boolean appliesToEntity (RecordType type, TransactionColumnCustomField field)

Parameters
type
field

public static CustomFieldList fromMap (Map<String, Object> customFields)

In order to show meta-data correctly, the customFieldList is being displayed as a MAP of string Object, there the values are instances of the custom fields type. In order to correctly handle this when un-mapping the attributes we need to convert the entry map to a CustomFieldList.

Parameters
customFields Map that contains CustomFieldRef objects

public static CustomizationRef getCustomizationRef (String metaDataKey)

Parameters
metaDataKey

public static Class<?> getFromCustomizationFieldClass (CustomizationFieldType type)

Parameters
type

public static String getInternalId (CustomFieldRef custom)

Parameters
custom

public static String getMetadataKey (CustomizationRef customField)

Generate a custom key that identifies the custom records. This kill will be used to retrieve the meta-data dynamically

Parameters
customField

public static CustomRecord getRecordRef (String metaDataKey)

Parameters
metaDataKey

public static boolean needsToConvertCustomFieldListField (Map<String, Object> attributes)

Check that the map has a field named customFieldList and that it is a Map that has a CustomFieldRef object

Parameters
attributes

public static void setInternalId (CustomFieldRef recordRef, String internalId)

Parameters
recordRef
internalId