@Override public String getValueFromCustomFieldParams(CustomFieldParams customFieldParams) { Collection<String> normalParams = customFieldParams.getValuesForKey(null); return (normalParams != null && normalParams.contains(WITH_PERFORCE_JOB) ? WITH_PERFORCE_JOB : WITHOUT_PERFORCE_JOB); }
@Nullable private Option extractOptionFromParams(String key, CustomFieldParams relevantParams) throws FieldValidationException { Collection<String> params = relevantParams.getValuesForKey(key); if (params != null && !params.isEmpty()) { String selectValue = params.iterator().next(); if (ObjectUtils.isValueSelected(selectValue) && selectValue != null && !selectValue.equalsIgnoreCase("none")) { return getOptionFromStringValue(selectValue); } } return null; }
@Override public Set<Label> getValueFromCustomFieldParams(CustomFieldParams customFieldParams) throws FieldValidationException { if (customFieldParams == null || customFieldParams.isEmpty()) { return null; } final Collection<String> normalParams = (Collection<String>) customFieldParams.getValuesForKey(null); //single field types should not scope their parameters if (normalParams == null || normalParams.isEmpty()) { return null; } return convertStringsToLabels(normalParams); }
public T getValueFromCustomFieldParams(CustomFieldParams relevantParams) throws FieldValidationException { if (relevantParams == null) { return null; } Collection normalParams = relevantParams.getValuesForKey(null); //single field types should not scope their parameters if (normalParams == null || normalParams.isEmpty()) return null; String singleParam = (String) normalParams.iterator().next(); if (TextUtils.stringSet(singleParam)) //only validate if the value is set { return getSingularObjectFromString(singleParam); } else { return null; } }
final String childStringValue = getValue(customFieldParams.getValuesForKey(CascadingSelectCFType.CHILD_KEY)); final String parentStringValue = getValue(customFieldParams.getValuesForKey(CascadingSelectCFType.PARENT_KEY)); try
List params = new ArrayList(relevantParams.getValuesForKey(null)); Collection valuesForChild = relevantParams.getValuesForKey(CHILD_KEY); if (valuesForChild != null)