Class UnitAttributeManager
java.lang.Object
fr.paris.lutece.plugins.unittree.service.unit.UnitAttributeManager
UnitAttributeManager
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanCreateSubUnit(int nIdUnit) Check if the given id unit can creabe sub unitsstatic voiddoCreateUnit(Unit unit, jakarta.servlet.http.HttpServletRequest request) Do create the additional attributes of the given unitstatic voiddoModifyUnit(Unit unit, jakarta.servlet.http.HttpServletRequest request) Do modify the additional attributes of the given unitstatic voiddoRemoveUnit(int nIdUnit, jakarta.servlet.http.HttpServletRequest request) Do remove the additional attributesstatic voidfillModel(jakarta.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.business.user.AdminUser adminUser, Map<String, Object> model, String strMark) Fill the model for the unit user attribute componentstatic List<IUnitAttributeComponent>Get the list of unit attribute componentsstatic List<IUnitAttributeService>Get the list of unit attribute servicesstatic voidmoveSubTree(Unit unitToMove, Unit newUnitParent) Update attributes to change the parent of a unit.static voidPopulate an unit additionnal attributes with the data of the databasestatic voidPopulate an unit with the data of the request
-
Method Details
-
getListUnitAttributeComponents
Get the list of unit attribute components- Returns:
- a list of
IUnitAttributeComponent
-
fillModel
public static void fillModel(jakarta.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.business.user.AdminUser adminUser, Map<String, Object> model, String strMark) Fill the model for the unit user attribute component- Parameters:
request- the HTTP requestadminUser- the current usermodel- the modelstrMark- the marker
-
getListUnitAttributeService
Get the list of unit attribute services- Returns:
- a list of
IUnitUserAttributeService
-
populate
public static void populate(Unit unit, jakarta.servlet.http.HttpServletRequest request) throws UnitErrorException Populate an unit with the data of the request- Parameters:
unit- the unit to populaterequest- the HTTP request- Throws:
UnitErrorException- exception if there is an error (ex: mandatory field)
-
populate
Populate an unit additionnal attributes with the data of the database- Parameters:
unit- the unit to populate
-
doCreateUnit
Do create the additional attributes of the given unit- Parameters:
unit- the unitrequest- the HTTP request
-
doModifyUnit
Do modify the additional attributes of the given unit- Parameters:
unit- the unitrequest- the HTTP request
-
doRemoveUnit
public static void doRemoveUnit(int nIdUnit, jakarta.servlet.http.HttpServletRequest request) Do remove the additional attributes- Parameters:
nIdUnit- the id unitrequest- 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
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
-