Class RBACHome
java.lang.Object
fr.paris.lutece.portal.business.rbac.RBACHome
This class provides instances management methods (create, find, ...) for RBAC objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic RBACCreation of an instance of rBACstatic Collection<RBAC>findAll()Returns a collection of rBACs objectsstatic Collection<RBAC>findByPermissionAndRoles(String strPermission, Collection<String> roles) Find all entries for a given permission and collection of rolesstatic Collection<RBAC>findByPermissionsAndRoles(Collection<String> permissions, Collection<String> roles) Find all entries for a given collection of permissions and rolesstatic RBACfindByPrimaryKey(int nKey) Returns an instance of a rBAC whose identifier is specified in parameterstatic Collection<RBAC>findResourcesByCode(String strRoleKey) Find all the entries for a given role keystatic Collection<String>findRoleKeys(String strTypeCode, String strId, String strPermission) Gets all role keysstatic voidremove(int nKey) Remove the RBAC whose identifier is specified in parameterstatic voidremoveForResource(String strResourceType, String strResourceId) Remove all the entries of the given resource type and the given resource idstatic voidremoveForRoleKey(String strRoleKey) Remove all the entries of the given role keystatic RBACUpdate of the rBAC which is specified in parameterstatic voidupdateRoleKey(String strOldRoleKey, String strNewRoleKey) Update the role key of all the entries of a given role key
-
Method Details
-
create
Creation of an instance of rBAC- Parameters:
rBAC- The instance of the rBAC which contains the informations to store- Returns:
- The instance of rBAC which has been created with its primary key.
-
update
Update of the rBAC which is specified in parameter- Parameters:
rBAC- The instance of the rBAC which contains the data to store- Returns:
- The instance of the rBAC which has been updated
-
remove
public static void remove(int nKey) Remove the RBAC whose identifier is specified in parameter- Parameters:
nKey- The Primary key of the rBAC to remove
-
findByPrimaryKey
Returns an instance of a rBAC whose identifier is specified in parameter- Parameters:
nKey- The Primary key of the rBAC- Returns:
- An instance of rBAC
-
findAll
Returns a collection of rBACs objects- Returns:
- A collection of rBACs
-
findResourcesByCode
Find all the entries for a given role key- Parameters:
strRoleKey- the role key to search for- Returns:
- A collection of rBACs
-
updateRoleKey
Update the role key of all the entries of a given role key- Parameters:
strOldRoleKey- the role key to updatestrNewRoleKey- the new role key
-
findRoleKeys
public static Collection<String> findRoleKeys(String strTypeCode, String strId, String strPermission) Gets all role keys- Parameters:
strTypeCode- The code typestrId- The IDstrPermission- The permission- Returns:
- A collection of role keys
-
findByPermissionAndRoles
public static Collection<RBAC> findByPermissionAndRoles(String strPermission, Collection<String> roles) Find all entries for a given permission and collection of roles- Parameters:
strPermission- the permissionroles- the roles- Returns:
- a collection of matching RBACs
-
findByPermissionsAndRoles
public static Collection<RBAC> findByPermissionsAndRoles(Collection<String> permissions, Collection<String> roles) Find all entries for a given collection of permissions and roles- Parameters:
permissions- the permissionsroles- the roles- Returns:
- a collection of matching RBACs
-
removeForRoleKey
Remove all the entries of the given role key- Parameters:
strRoleKey- the role key of the entries to remove
-
removeForResource
Remove all the entries of the given resource type and the given resource id- Parameters:
strResourceType- the type of the resourcestrResourceId- the id of the resource
-