Class GenericAttributesUtils


  • public final class GenericAttributesUtils
    extends java.lang.Object
    Utility class of plugin generic attributes
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int convertStringToInt​(java.lang.String strParameter)
      Convert a string to int
      static Field createFieldFromReferenceItem​(Entry entry, fr.paris.lutece.plugins.referencelist.business.ReferenceItem item)
      Create a Field from a ReferenceItem
      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.
      static Field findFieldByIdInTheList​(int nIdField, java.util.List<Field> listField)
      return the field which key is specified in parameter
      static Field findFieldByTitleInTheList​(java.lang.String strTitle, java.util.List<Field> listFields)
      Return the field which title is specified in parameter
      static fr.paris.lutece.portal.service.plugin.Plugin getPlugin()
      Gets the generic attributes plugin
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 title
        listFields - 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 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​(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:
      • 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: