|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.unittree.service.unit.UnitService
public class UnitService
UnitService
| Field Summary |
|---|
| Fields inherited from interface fr.paris.lutece.plugins.unittree.service.unit.IUnitService |
|---|
BEAN_UNIT_SERVICE |
| Constructor Summary | |
|---|---|
UnitService()
|
|
| Method Summary | |
|---|---|
boolean |
canCreateSubUnit(int nIdUnit)
Check if the given id unit, we can create sub unit. |
int |
createUnit(Unit unit,
javax.servlet.http.HttpServletRequest request)
Create a unit |
List<Unit> |
findBySectorId(int nIdSector)
Find by sector id |
List<Unit> |
getAllUnits(boolean bGetAdditionalInfos)
Get all units |
List<IAction> |
getListActions(String strActionType,
Locale locale,
Unit unit,
fr.paris.lutece.portal.business.user.AdminUser user)
Get the list of actions |
Unit |
getRootUnit(boolean bGetAdditionalInfos)
Get the root unit |
List<Unit> |
getSubUnits(int nIdUnit,
boolean bGetAdditionalInfos)
Get the sub units from a given id unit |
fr.paris.lutece.util.ReferenceList |
getSubUnitsAsReferenceList(int nIdUnit,
Locale locale)
Get the sub units as a ReferenceList |
Source |
getTreeXsl()
Get the XSL of the tree |
Unit |
getUnit(int nIdUnit,
boolean bGetAdditionalInfos)
Get the unit |
List<Unit> |
getUnitsByIdUser(int nIdUser,
boolean bGetAdditionalInfos)
Get the unit by id user |
List<Unit> |
getUnitsFirstLevel(boolean bGetAdditionalInfos)
Get the units first level |
List<Unit> |
getUnitWithNoChildren()
Return all the Unit with no children (level 0) |
String |
getXMLUnits()
Get the XML units |
boolean |
hasSubUnits(int nIdUnit)
Check if the given id unit has sub units |
boolean |
isAuthorized(String strIdUnit,
String strPermission,
fr.paris.lutece.portal.business.user.AdminUser user)
See IUnitService.isAuthorized(Unit, String, AdminUser) |
boolean |
isAuthorized(Unit unit,
String strPermission,
fr.paris.lutece.portal.business.user.AdminUser user)
Check if the given user is authorized to do the action for a given unit. |
boolean |
isParent(Unit unitParent,
Unit unitRef)
Check if the first unit in parameter is parent of the second unit in parameter |
boolean |
moveSubTree(Unit unitToMove,
Unit newUnitParent)
Change the parent of a unit. |
void |
removeUnit(int nIdUnit,
javax.servlet.http.HttpServletRequest request)
Remove the unit only if the unit does not have sub units |
void |
updateUnit(Unit unit,
javax.servlet.http.HttpServletRequest request)
Update the unit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnitService()
| Method Detail |
|---|
public Unit getUnit(int nIdUnit,
boolean bGetAdditionalInfos)
getUnit in interface IUnitServicenIdUnit - the id unitbGetAdditionalInfos - true if it must get the additional infos
Unitpublic Unit getRootUnit(boolean bGetAdditionalInfos)
getRootUnit in interface IUnitServicebGetAdditionalInfos - true if it must get the ids sector
Unit
public List<Unit> getUnitsByIdUser(int nIdUser,
boolean bGetAdditionalInfos)
getUnitsByIdUser in interface IUnitServicenIdUser - the id userbGetAdditionalInfos - true if it must get the ids sector
Unitpublic List<Unit> getAllUnits(boolean bGetAdditionalInfos)
getAllUnits in interface IUnitServicebGetAdditionalInfos - true if it must get the ids sector
Unitpublic List<Unit> getUnitsFirstLevel(boolean bGetAdditionalInfos)
getUnitsFirstLevel in interface IUnitServicebGetAdditionalInfos - true if it must get the ids sector
Unit
public List<Unit> getSubUnits(int nIdUnit,
boolean bGetAdditionalInfos)
getSubUnits in interface IUnitServicenIdUnit - the id unitbGetAdditionalInfos - true if it must get the ids sector
Unit
public List<IAction> getListActions(String strActionType,
Locale locale,
Unit unit,
fr.paris.lutece.portal.business.user.AdminUser user)
getListActions in interface IUnitServicestrActionType - the action typelocale - the localeunit - the unituser - the user
IAction
public fr.paris.lutece.util.ReferenceList getSubUnitsAsReferenceList(int nIdUnit,
Locale locale)
ReferenceList
getSubUnitsAsReferenceList in interface IUnitServicenIdUnit - the id unitlocale - the locale
ReferenceListpublic String getXMLUnits()
getXMLUnits in interface IUnitServicepublic Source getTreeXsl()
getTreeXsl in interface IUnitServicepublic List<Unit> findBySectorId(int nIdSector)
findBySectorId in interface IUnitServicenIdSector - id sector
public List<Unit> getUnitWithNoChildren()
getUnitWithNoChildren in interface IUnitServicepublic boolean hasSubUnits(int nIdUnit)
hasSubUnits in interface IUnitServicenIdUnit - the id unit
public boolean isParent(Unit unitParent,
Unit unitRef)
isParent in interface IUnitServiceunitParent - the parent unitunitRef - the unit to check
public boolean canCreateSubUnit(int nIdUnit)
canCreateSubUnit in interface IUnitServicenIdUnit - the id unit
public boolean isAuthorized(Unit unit,
String strPermission,
fr.paris.lutece.portal.business.user.AdminUser user)
isAuthorized in interface IUnitServiceunit - the unitstrPermission - the permissionuser - the user
public boolean isAuthorized(String strIdUnit,
String strPermission,
fr.paris.lutece.portal.business.user.AdminUser user)
IUnitService.isAuthorized(Unit, String, AdminUser)
isAuthorized in interface IUnitServicestrIdUnit - the id resourcestrPermission - the permissionuser - the user
@Transactional(value="unittree.transactionManager")
public int createUnit(Unit unit,
javax.servlet.http.HttpServletRequest request)
throws UnitErrorException
createUnit in interface IUnitServiceunit - the unitrequest - the HTTP request
UnitErrorException - exception if there is an application error
@Transactional(value="unittree.transactionManager")
public void removeUnit(int nIdUnit,
javax.servlet.http.HttpServletRequest request)
removeUnit in interface IUnitServicenIdUnit - the id unitrequest - the HTTP request
@Transactional(value="unittree.transactionManager")
public void updateUnit(Unit unit,
javax.servlet.http.HttpServletRequest request)
throws UnitErrorException
updateUnit in interface IUnitServiceunit - the unitrequest - the HTTP request
UnitErrorException - exception if there is an application error
@Transactional(value="unittree.transactionManager")
public boolean moveSubTree(Unit unitToMove,
Unit newUnitParent)
moveSubTree in interface IUnitServiceunitToMove - The unit to change the parent of.newUnitParent - The new parent of the unit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||