Class UnitAttributeManager


  • public final class UnitAttributeManager
    extends java.lang.Object
    UnitAttributeManager
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean canCreateSubUnit​(int nIdUnit)
      Check if the given id unit can creabe sub units
      static void doCreateUnit​(Unit unit, javax.servlet.http.HttpServletRequest request)
      Do create the additional attributes of the given unit
      static void doModifyUnit​(Unit unit, javax.servlet.http.HttpServletRequest request)
      Do modify the additional attributes of the given unit
      static void doRemoveUnit​(int nIdUnit, javax.servlet.http.HttpServletRequest request)
      Do remove the additional attributes
      static void fillModel​(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.business.user.AdminUser adminUser, java.util.Map<java.lang.String,​java.lang.Object> model, java.lang.String strMark)
      Fill the model for the unit user attribute component
      static java.util.List<IUnitAttributeComponent> getListUnitAttributeComponents()
      Get the list of unit attribute components
      static java.util.List<IUnitAttributeService> getListUnitAttributeService()
      Get the list of unit attribute services
      static void moveSubTree​(Unit unitToMove, Unit newUnitParent)
      Update attributes to change the parent of a unit.
      static void populate​(Unit unit)
      Populate an unit additionnal attributes with the data of the database
      static void populate​(Unit unit, javax.servlet.http.HttpServletRequest request)
      Populate an unit with the data of the request
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • fillModel

        public static void fillModel​(javax.servlet.http.HttpServletRequest request,
                                     fr.paris.lutece.portal.business.user.AdminUser adminUser,
                                     java.util.Map<java.lang.String,​java.lang.Object> model,
                                     java.lang.String strMark)
        Fill the model for the unit user attribute component
        Parameters:
        request - the HTTP request
        adminUser - the current user
        model - the model
        strMark - the marker
      • populate

        public static void populate​(Unit unit,
                                    javax.servlet.http.HttpServletRequest request)
                             throws UnitErrorException
        Populate an unit with the data of the request
        Parameters:
        unit - the unit to populate
        request - the HTTP request
        Throws:
        UnitErrorException - exception if there is an error (ex: mandatory field)
      • populate

        public static void populate​(Unit unit)
        Populate an unit additionnal attributes with the data of the database
        Parameters:
        unit - the unit to populate
      • doCreateUnit

        public static void doCreateUnit​(Unit unit,
                                        javax.servlet.http.HttpServletRequest request)
        Do create the additional attributes of the given unit
        Parameters:
        unit - the unit
        request - the HTTP request
      • doModifyUnit

        public static void doModifyUnit​(Unit unit,
                                        javax.servlet.http.HttpServletRequest request)
        Do modify the additional attributes of the given unit
        Parameters:
        unit - the unit
        request - the HTTP request
      • doRemoveUnit

        public static void doRemoveUnit​(int nIdUnit,
                                        javax.servlet.http.HttpServletRequest request)
        Do remove the additional attributes
        Parameters:
        nIdUnit - the id unit
        request - the HTTP request
      • canCreateSubUnit

        public static boolean canCreateSubUnit​(int nIdUnit)
        Check if the given id unit can creabe sub units
        Parameters:
        nIdUnit - the id unit
        Returns:
        true if the unit can create sub unit
      • moveSubTree

        public static void moveSubTree​(Unit unitToMove,
                                       Unit newUnitParent)
        Update attributes to change the parent of a unit.
        Parameters:
        unitToMove - The unit to change the parent of.
        newUnitParent - The new parent of the unit