Class GenericAttributesUtils
- java.lang.Object
-
- fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils
-
public final class GenericAttributesUtils extends java.lang.ObjectUtility class of plugin generic attributes
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONSTANT_EQUALEquals constantstatic intCONSTANT_ID_NULLValue to represent a null idstatic java.lang.StringCONSTANT_RESPONSE_VALUE_ANONYMIZEDValue for anonymized responses
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intconvertStringToInt(java.lang.String strParameter)Convert a string to intstatic FieldcreateFieldFromReferenceItem(Entry entry, fr.paris.lutece.plugins.referencelist.business.ReferenceItem item)Create a Field from aReferenceItemstatic FieldcreateOrUpdateField(Entry entry, java.lang.String strCode, java.lang.String strTitle, java.lang.String strValue)Create or update the entry field identified by its code.static FieldfindFieldByIdInTheList(int nIdField, java.util.List<Field> listField)return the field which key is specified in parameterstatic FieldfindFieldByTitleInTheList(java.lang.String strTitle, java.util.List<Field> listFields)Return the field which title is specified in parameterstatic fr.paris.lutece.portal.service.plugin.PlugingetPlugin()Gets the generic attributes plugin
-
-
-
Field Detail
-
CONSTANT_EQUAL
public static final java.lang.String CONSTANT_EQUAL
Equals constant- See Also:
- Constant Field Values
-
CONSTANT_ID_NULL
public static final int CONSTANT_ID_NULL
Value to represent a null id- See Also:
- Constant Field Values
-
CONSTANT_RESPONSE_VALUE_ANONYMIZED
public static final java.lang.String CONSTANT_RESPONSE_VALUE_ANONYMIZED
Value for anonymized responses- See Also:
- Constant Field Values
-
-
Method Detail
-
findFieldByTitleInTheList
public static Field findFieldByTitleInTheList(java.lang.String strTitle, java.util.List<Field> listFields)
Return the field which title is specified in parameter- Parameters:
strTitle- the titlelistFields- the list of fields- Returns:
- the field which title is specified in parameter
-
findFieldByIdInTheList
public static Field findFieldByIdInTheList(int nIdField, java.util.List<Field> listField)
return the field which key is specified in parameter- Parameters:
nIdField- the id of the field who is searchlistField- the list of field- Returns:
- the field which key is specified in parameter
-
getPlugin
public static fr.paris.lutece.portal.service.plugin.Plugin getPlugin()
Gets the generic attributes plugin- Returns:
- the plugin
-
convertStringToInt
public static int convertStringToInt(java.lang.String strParameter)
Convert a string to int- Parameters:
strParameter- the string parameter to convert- Returns:
- the conversion
-
createOrUpdateField
public static Field createOrUpdateField(Entry entry, java.lang.String strCode, java.lang.String strTitle, java.lang.String strValue)
Create or update the entry field identified by its code.- Parameters:
entry-strCode-strTitle-strValue-- Returns:
-
-