Class GenericAttributesUtils

java.lang.Object
fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils

public final class GenericAttributesUtils extends Object
Utility class of plugin generic attributes
  • Field Details

    • CONSTANT_EQUAL

      public static final String CONSTANT_EQUAL
      Equals constant
      See Also:
    • CONSTANT_ID_NULL

      public static final int CONSTANT_ID_NULL
      Value to represent a null id
      See Also:
    • CONSTANT_RESPONSE_VALUE_ANONYMIZED

      public static final String CONSTANT_RESPONSE_VALUE_ANONYMIZED
      Value for anonymized responses
      See Also:
  • Method Details

    • findFieldByTitleInTheList

      public static Field findFieldByTitleInTheList(String strTitle, List<Field> listFields)
      Return the field which title is specified in parameter
      Parameters:
      strTitle - the title
      listFields - the list of fields
      Returns:
      the field which title is specified in parameter
    • findFieldByIdInTheList

      public static Field findFieldByIdInTheList(int nIdField, List<Field> listField)
      return the field which key is specified in parameter
      Parameters:
      nIdField - the id of the field who is search
      listField - 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(String strParameter)
      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 a ReferenceItem
      Parameters:
      entry -
      item -
      Returns: