public class CustomFieldHelper
extends java.lang.Object
| Constructor and Description |
|---|
CustomFieldHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear(CustomFieldValueForSearchDTO customFieldValueForSearchField)
Clear the given CustomFieldValueForSearchDTO
|
static void |
fillNewFieldValue(CustomFieldDetailedVO field,
CustomFieldValueDTO customValue)
Fills-in a new custom field value instance for a new value on the given field.
|
static UserProfileFieldActions |
findActions(ProfileField profileField,
java.lang.Iterable<UserProfileFieldActions> actions)
Returns the actions collection for the given profile field
|
static <PV extends ICustomFieldPossibleValue<?>> |
findPossibleValue(java.lang.String value,
java.util.List<PV> possibleValues)
Finds the possible value with a given value, or returns null if not found
|
static <V extends ICustomFieldValue> |
findValue(ICustomField field,
java.util.Collection<? extends V> values)
Finds a custom field value inside a collection
|
static CustomFieldValueDTO |
findValueOrNew(CustomFieldDetailedVO field,
java.util.Collection<CustomFieldValueDTO> customValues)
Finds a custom field value inside a collection.
|
static java.util.List<CustomFieldDetailedVO> |
getCustomFields(java.lang.Iterable<UserProfileFieldActions> actions)
Returns the custom fields in the given collection of actions
|
static java.lang.Object |
getCustomFieldValue(CustomFieldType type,
ICustomFieldValue value)
Returns the property used to retrieve the value of a field given it's type
|
static java.lang.Object |
getCustomFieldValue(ICustomFieldValue value)
Returns the property used to retrieve the value of a field given it's type
|
static java.lang.Object |
getDefaultValue(CustomFieldDetailedVO field)
Returns the default value for the given field
|
static ProfileField |
getProfileField(UserProfileFieldActions actions)
Returns the profile field for the given actions collection
|
static java.lang.Object |
getValue(java.lang.Long customFieldId,
java.util.Collection<? extends ICustomFieldValue> customValues)
Returns the value of a custom field from a collection, finding the value by internal name.
|
static java.lang.Object |
getValue(java.lang.String internalName,
java.util.Collection<? extends ICustomFieldValue> customValues)
Returns the value of a custom field from a collection, finding the value by internal name.
|
static java.lang.Object |
getValue(UserWithFieldsVO user,
ProfileField profileField)
Returns a profile field value for a given
UserWithFieldsVO |
static boolean |
hasAnyFieldWithInformation(java.util.Collection<UserProfileFieldActions> profileFieldActions)
Returns whether at least one of the given fields have information text
|
static CustomFieldValueDTO |
newFieldValue(CustomFieldDetailedVO field)
Creates a new custom field value for the given field
|
static <PV extends ICustomFieldPossibleValue<C>,C> |
setCustomFieldValue(ICustomFieldValue fieldValue,
java.lang.Object value)
Returns the property used to retrieve the value of a field given it's type
|
static boolean |
setValue(java.lang.String internalName,
java.util.Collection<? extends ICustomFieldValue> customValues,
java.lang.Object value)
Sets the value of a custom field given the values collection, finding by field internal name
|
static java.util.Map<ICustomField,ICustomFieldValue> |
toMap(java.util.Collection<? extends ICustomFieldValue> customValues)
Returns a Map, keyed by the custom field , whose values are the custom field values of the received collection.
|
public static void clear(CustomFieldValueForSearchDTO customFieldValueForSearchField)
public static void fillNewFieldValue(CustomFieldDetailedVO field, CustomFieldValueDTO customValue)
CustomFieldValueDTO and newFieldValue(CustomFieldDetailedVO) is not enough. Sets the field
reference and the default value.public static UserProfileFieldActions findActions(ProfileField profileField, java.lang.Iterable<UserProfileFieldActions> actions)
public static <PV extends ICustomFieldPossibleValue<?>> PV findPossibleValue(java.lang.String value, java.util.List<PV> possibleValues)
public static <V extends ICustomFieldValue> V findValue(ICustomField field, java.util.Collection<? extends V> values)
public static CustomFieldValueDTO findValueOrNew(CustomFieldDetailedVO field, java.util.Collection<CustomFieldValueDTO> customValues)
public static java.util.List<CustomFieldDetailedVO> getCustomFields(java.lang.Iterable<UserProfileFieldActions> actions)
public static java.lang.Object getCustomFieldValue(CustomFieldType type, ICustomFieldValue value)
public static java.lang.Object getCustomFieldValue(ICustomFieldValue value)
public static java.lang.Object getDefaultValue(CustomFieldDetailedVO field)
public static ProfileField getProfileField(UserProfileFieldActions actions)
public static java.lang.Object getValue(java.lang.Long customFieldId,
java.util.Collection<? extends ICustomFieldValue> customValues)
public static java.lang.Object getValue(java.lang.String internalName,
java.util.Collection<? extends ICustomFieldValue> customValues)
public static java.lang.Object getValue(UserWithFieldsVO user, ProfileField profileField)
UserWithFieldsVOpublic static boolean hasAnyFieldWithInformation(java.util.Collection<UserProfileFieldActions> profileFieldActions)
public static CustomFieldValueDTO newFieldValue(CustomFieldDetailedVO field)
public static <PV extends ICustomFieldPossibleValue<C>,C> void setCustomFieldValue(ICustomFieldValue fieldValue, java.lang.Object value)
public static boolean setValue(java.lang.String internalName,
java.util.Collection<? extends ICustomFieldValue> customValues,
java.lang.Object value)
public static java.util.Map<ICustomField,ICustomFieldValue> toMap(java.util.Collection<? extends ICustomFieldValue> customValues)