Class SuggestConstants
- java.lang.Object
-
- org.nuxeo.ecm.automation.features.SuggestConstants
-
public class SuggestConstants extends Object
Constants used to generate JSON for suggestion in operations.
-
-
Field Summary
Fields Modifier and Type Field Description static StringABSOLUTE_LABELstatic StringCOMPUTED_IDstatic StringDEFAULT_KEY_SEPARATORstatic StringDEFAULT_LANGstatic StringDIRECTORY_DEFAULT_LABEL_COL_NAMEstatic StringDIRECTORY_ORDER_FIELD_NAMEstatic StringDISPLAY_ICONprotected static BooleanforceDisplayEmailInSuggestionstatic StringGROUP_TYPEstatic StringICONstatic StringIDstatic StringLABELstatic StringLANG_TOKENstatic StringOBSOLETE_FIELD_IDstatic StringPARENT_FIELD_IDstatic StringPREFIXED_ID_KEY_NAMEstatic StringTYPE_KEY_NAMEstatic StringUSER_TYPEstatic StringWARN_MESSAGE_LABEL
-
Constructor Summary
Constructors Modifier Constructor Description protectedSuggestConstants()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcomputeGroupLabel(Map<String,Object> obj, String groupId, String groupLabelField, boolean hideFirstLabel)static voidcomputeUserGroupIcon(Map<String,Object> obj, boolean hideIcon)static voidcomputeUserLabel(Map<String,Object> obj, String firstLabelField, String secondLabelField, String thirdLabelField, boolean hideFirstLabel, boolean hideSecondLabel, boolean hideThirdLabel, boolean displayEmailInSuggestion, String userId)static StringgetLabelFieldName(Schema schema, boolean dbl10n, String labelFieldName, String lang)Compute the field name of the directory that holds the value that we want to display.protected static booleanisForceDisplayEmailInSuggestion()
-
-
-
Field Detail
-
LANG_TOKEN
public static final String LANG_TOKEN
- See Also:
- Constant Field Values
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
LABEL
public static final String LABEL
- See Also:
- Constant Field Values
-
ICON
public static final String ICON
- See Also:
- Constant Field Values
-
DEFAULT_LANG
public static final String DEFAULT_LANG
- See Also:
- Constant Field Values
-
USER_TYPE
public static final String USER_TYPE
- See Also:
- Constant Field Values
-
GROUP_TYPE
public static final String GROUP_TYPE
- See Also:
- Constant Field Values
-
TYPE_KEY_NAME
public static final String TYPE_KEY_NAME
- See Also:
- Constant Field Values
-
PREFIXED_ID_KEY_NAME
public static final String PREFIXED_ID_KEY_NAME
- See Also:
- Constant Field Values
-
forceDisplayEmailInSuggestion
protected static Boolean forceDisplayEmailInSuggestion
-
DISPLAY_ICON
public static final String DISPLAY_ICON
- See Also:
- Constant Field Values
-
PARENT_FIELD_ID
public static final String PARENT_FIELD_ID
- See Also:
- Constant Field Values
-
OBSOLETE_FIELD_ID
public static final String OBSOLETE_FIELD_ID
- See Also:
- Constant Field Values
-
ABSOLUTE_LABEL
public static final String ABSOLUTE_LABEL
- See Also:
- Constant Field Values
-
COMPUTED_ID
public static final String COMPUTED_ID
- See Also:
- Constant Field Values
-
WARN_MESSAGE_LABEL
public static final String WARN_MESSAGE_LABEL
- See Also:
- Constant Field Values
-
DIRECTORY_ORDER_FIELD_NAME
public static final String DIRECTORY_ORDER_FIELD_NAME
- See Also:
- Constant Field Values
-
DIRECTORY_DEFAULT_LABEL_COL_NAME
public static final String DIRECTORY_DEFAULT_LABEL_COL_NAME
- See Also:
- Constant Field Values
-
DEFAULT_KEY_SEPARATOR
public static final String DEFAULT_KEY_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
computeGroupLabel
public static void computeGroupLabel(Map<String,Object> obj, String groupId, String groupLabelField, boolean hideFirstLabel)
-
computeUserGroupIcon
public static void computeUserGroupIcon(Map<String,Object> obj, boolean hideIcon)
-
computeUserLabel
public static void computeUserLabel(Map<String,Object> obj, String firstLabelField, String secondLabelField, String thirdLabelField, boolean hideFirstLabel, boolean hideSecondLabel, boolean hideThirdLabel, boolean displayEmailInSuggestion, String userId)
-
getLabelFieldName
public static String getLabelFieldName(Schema schema, boolean dbl10n, String labelFieldName, String lang)
Compute the field name of the directory that holds the value that we want to display.- Parameters:
schema- the directory schemadbl10n- are translations carried by directory fieldslabelFieldName- the name or pattern of the fields that held valueslang- the current language- Returns:
- the final field name where we pick up the value
- Throws:
IllegalArgumentException- when cannot compute label field name- Since:
- 5.7.3
-
isForceDisplayEmailInSuggestion
protected static boolean isForceDisplayEmailInSuggestion()
-
-