Class GenericAttributesUtils
java.lang.Object
fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils
Utility class of plugin generic attributes
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intconvertStringToInt(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, String strCode, String strTitle, String strValue) Create or update the entry field identified by its code.static FieldfindFieldByIdInTheList(int nIdField, List<Field> listField) return the field which key is specified in parameterstatic FieldfindFieldByTitleInTheList(String strTitle, List<Field> listFields) Return the field which title is specified in parameterstatic fr.paris.lutece.portal.service.plugin.PluginGets the generic attributes plugin
-
Field Details
-
CONSTANT_EQUAL
Equals constant- See Also:
-
CONSTANT_ID_NULL
public static final int CONSTANT_ID_NULLValue to represent a null id- See Also:
-
CONSTANT_RESPONSE_VALUE_ANONYMIZED
Value for anonymized responses- See Also:
-
-
Method Details
-
findFieldByTitleInTheList
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
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
Convert a string to int- Parameters:
strParameter- the string parameter to convert- Returns:
- the conversion
-
createOrUpdateField
public static Field createOrUpdateField(Entry entry, String strCode, String strTitle, String strValue) Create or update the entry field identified by its code.- Parameters:
entry-strCode-strTitle-strValue-- Returns:
-
createFieldFromReferenceItem
public static Field createFieldFromReferenceItem(Entry entry, fr.paris.lutece.plugins.referencelist.business.ReferenceItem item) Create a Field from aReferenceItem- Parameters:
entry-item-- Returns:
-