* @param map
* @return
*/
public static final CustomField getCustomField( Map<String, Object> map )
{
CustomField customField = null;
if ( map != null && map.size() > 0 )
{
// Sometimes we are working with CFs without ID
customField = new CustomField();
customField.setId( getInteger( map, TestLinkResponseParams.id.toString()) );
customField.setDefaultValue( getString(map, TestLinkResponseParams.defaultValue.toString()) );
customField.setDisplayOrder( getInteger(map, TestLinkResponseParams.displayOrder.toString()) );
customField.setEnableOnDesign( getBoolean(map, TestLinkResponseParams.enableOnDesign.toString()) );
customField.setEnableOnExecution( getBoolean(map, TestLinkResponseParams.enableOnExecution.toString()) );
customField.setEnableOnTestPlanDesign( getBoolean(map, TestLinkResponseParams.enableOnTestPlanDesign.toString()) );
customField.setLabel( getString(map, TestLinkResponseParams.label.toString()) );
customField.setLengthMax( getInteger(map, TestLinkResponseParams.lengthMax.toString()) );
customField.setLengthMin( getInteger(map, TestLinkResponseParams.lengthMin.toString()) );
customField.setLocation( getInteger(map, TestLinkResponseParams.location.toString()) );
customField.setName( getString(map, TestLinkResponseParams.name.toString()) );
customField.setPossibleValues( getString(map, TestLinkResponseParams.possibleValues.toString()) );
customField.setShowOnDesign( getBoolean(map, TestLinkResponseParams.showOnDesign.toString()) );
customField.setShowOnExecution( getBoolean(map, TestLinkResponseParams.showOnExecution.toString()) );
customField.setShowOnTestPlanDesign( getBoolean(map, TestLinkResponseParams.showOnTestPlanDesign.toString()) );
customField.setType( getInteger(map, TestLinkResponseParams.type.toString()) );
customField.setValidRegexp( getString(map, TestLinkResponseParams.validRegexp.toString()) );
customField.setValue( getString(map, TestLinkResponseParams.value.toString() ));
}
return customField;
}