Class RightHome
- java.lang.Object
-
- fr.paris.lutece.portal.business.right.RightHome
-
public final class RightHome extends Object
This class provides instances management methods (create, find, ...) for Right objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intchangeRightOrder(Right right, int nNewOrder)Change the order in aRightstatic booleancheckFeatureOrders(String strFeatureGroup)Check feature orders and return false if at least one order is twicestatic Rightcreate(Right right)Creation of an instance of an admin rightstatic voiddeleteEntryFromList(String strFeatureGroup, int nOrderId)Delete entry (specify by nOrderId)static RightfindByPrimaryKey(String strKey)Returns an instance of an admin right whose identifier is specified in parameterstatic Collection<Right>getExternalRightList()static Collection<Right>getRightsList()Loads the data of all the rights and returns them in form of a collectionstatic Collection<Right>getRightsList(int nLevel)Loads the data of all the rights with level greater or equal than nLevel and returns them in form of a collectionstatic Collection<Right>getRightsList(String strFeatureGroup)Loads the data of all the rights with the specified feature group and returns them in form of a collectionstatic voidreinitFeatureOrders(String strFeatureGroup)Reinitialize feature order groupsstatic voidremove(String strId)Remove the admin right whose identifier is specified in parameterstatic Rightupdate(Right right)Update of the admin right which is specified
-
-
-
Method Detail
-
create
public static Right create(Right right)
Creation of an instance of an admin right- Parameters:
right- An instance of an admin right which contains the informations to store- Returns:
- The instance of an admin right which has been created with its primary key.
-
update
public static Right update(Right right)
Update of the admin right which is specified- Parameters:
right- The instance of the admin right which contains the data to store- Returns:
- The instance of the admin right which has been updated
-
remove
public static void remove(String strId)
Remove the admin right whose identifier is specified in parameter- Parameters:
strId- The identifier of the admin right to remove
-
findByPrimaryKey
public static Right findByPrimaryKey(String strKey)
Returns an instance of an admin right whose identifier is specified in parameter- Parameters:
strKey- The admin right primary key- Returns:
- an instance of an admin right
-
getRightsList
public static Collection<Right> getRightsList()
Loads the data of all the rights and returns them in form of a collection- Returns:
- the collection which contains the data of all the rights
-
getRightsList
public static Collection<Right> getRightsList(int nLevel)
Loads the data of all the rights with level greater or equal than nLevel and returns them in form of a collection- Parameters:
nLevel- The right's level- Returns:
- the collection which contains the data of all the rights
-
getRightsList
public static Collection<Right> getRightsList(String strFeatureGroup)
Loads the data of all the rights with the specified feature group and returns them in form of a collection- Parameters:
strFeatureGroup- the name of the feature group- Returns:
- the collection which contains the data of all the rights
-
changeRightOrder
public static int changeRightOrder(Right right, int nNewOrder)
Change the order in aRight- Parameters:
right- The right to update ordernNewOrder- The new place in the list or END_OF_LIST to place Right at the end- Returns:
- The new order
-
deleteEntryFromList
public static void deleteEntryFromList(String strFeatureGroup, int nOrderId)
Delete entry (specify by nOrderId)- Parameters:
strFeatureGroup- TheFeatureGroupimpactednOrderId- The order to delete
-
reinitFeatureOrders
public static void reinitFeatureOrders(String strFeatureGroup)
Reinitialize feature order groups- Parameters:
strFeatureGroup- The feature group key
-
checkFeatureOrders
public static boolean checkFeatureOrders(String strFeatureGroup)
Check feature orders and return false if at least one order is twice- Parameters:
strFeatureGroup- The feature group key- Returns:
- true if order list is ok, false else.
-
getExternalRightList
public static Collection<Right> getExternalRightList()
-
-