Package org.apache.archiva.redback.role
Interface RoleManager
-
- All Known Implementing Classes:
DefaultRoleManager
public interface RoleManager
RoleProfileManager:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assignRole(String roleId, String principal)
Assigns the role indicated by the roleId to the given principalvoid
assignRoleByName(String roleName, String principal)
Assigns the role indicated by the roleName to the given principalvoid
assignTemplatedRole(String templateId, String resource, String principal)
Assigns the templated role indicated by the templateId fails if the templated role has not been createdString
createTemplatedRole(String templateId, String resource)
locate a role with the corresponding name and generate it with the given resource, ${resource} in the model will be replaced with this resource string, if this resource does not exist, it will be created.RedbackRoleModel
getModel()
get the blessed model, the current operating instructions for all things role managementvoid
initialize()
intialize the role managervoid
loadRoleModel(URL resourceLocation)
load the model and create/verify operations, resources, etc exist and make static rolesvoid
loadRoleModel(RedbackRoleModel model)
String
moveTemplatedRole(String templateId, String oldResource, String newResource)
Moves the instance of the templated role from the old resource to the new resource and updates the user assignments.void
removeTemplatedRole(String templateId, String resource)
removes a role corresponding to the role Id that was manufactured with the given resource it also removes any user assignments for that roleboolean
roleExists(String roleId)
true of a role exists with the given roleIdboolean
templatedRoleExists(String templateId, String resource)
true of a role exists with the given roleIdvoid
unassignRole(String roleId, String principal)
Unassigns the role indicated by the role id from the given principalvoid
unassignRoleByName(String roleName, String principal)
Unassigns the role indicated by the role name from the given principalvoid
verifyTemplatedRole(String templateID, String resource)
Check a role template is complete in the RBAC store.
-
-
-
Method Detail
-
loadRoleModel
void loadRoleModel(URL resourceLocation) throws RoleManagerException
load the model and create/verify operations, resources, etc exist and make static roles- Parameters:
resourceLocation
-- Throws:
RoleManagerException
-
loadRoleModel
void loadRoleModel(RedbackRoleModel model) throws RoleManagerException
- Throws:
RoleManagerException
-
createTemplatedRole
String createTemplatedRole(String templateId, String resource) throws RoleManagerException
locate a role with the corresponding name and generate it with the given resource, ${resource} in the model will be replaced with this resource string, if this resource does not exist, it will be created.- Parameters:
templateId
-resource
-- Throws:
RoleManagerException
-
removeTemplatedRole
void removeTemplatedRole(String templateId, String resource) throws RoleManagerException
removes a role corresponding to the role Id that was manufactured with the given resource it also removes any user assignments for that role- Parameters:
templateId
-resource
-- Throws:
RoleManagerException
-
moveTemplatedRole
String moveTemplatedRole(String templateId, String oldResource, String newResource) throws RoleManagerException
Moves the instance of the templated role from the old resource to the new resource and updates the user assignments.- Parameters:
templateId
- the name of the role templateoldResource
- the old resource namenewResource
- the new resource name- Throws:
RoleManagerException
-
assignRole
void assignRole(String roleId, String principal) throws RoleManagerException
Assigns the role indicated by the roleId to the given principal- Parameters:
roleId
-principal
-- Throws:
RoleManagerException
-
assignRoleByName
void assignRoleByName(String roleName, String principal) throws RoleManagerException
Assigns the role indicated by the roleName to the given principal- Parameters:
roleName
-principal
-- Throws:
RoleManagerException
-
assignTemplatedRole
void assignTemplatedRole(String templateId, String resource, String principal) throws RoleManagerException
Assigns the templated role indicated by the templateId fails if the templated role has not been created- Parameters:
templateId
-resource
-principal
-- Throws:
RoleManagerException
-
unassignRole
void unassignRole(String roleId, String principal) throws RoleManagerException
Unassigns the role indicated by the role id from the given principal- Parameters:
roleId
-principal
-- Throws:
RoleManagerException
-
unassignRoleByName
void unassignRoleByName(String roleName, String principal) throws RoleManagerException
Unassigns the role indicated by the role name from the given principal- Parameters:
roleName
-principal
-- Throws:
RoleManagerException
-
roleExists
boolean roleExists(String roleId) throws RoleManagerException
true of a role exists with the given roleId- Parameters:
roleId
-- Returns:
- Throws:
RoleManagerException
-
templatedRoleExists
boolean templatedRoleExists(String templateId, String resource) throws RoleManagerException
true of a role exists with the given roleId- Parameters:
templateId
-resource
-- Returns:
- Throws:
RoleManagerException
-
getModel
RedbackRoleModel getModel()
get the blessed model, the current operating instructions for all things role management
-
verifyTemplatedRole
void verifyTemplatedRole(String templateID, String resource) throws RoleManagerException
Check a role template is complete in the RBAC store.- Parameters:
templateID
- the templated roleresource
- the resource to verify- Throws:
RoleManagerException
-
initialize
void initialize()
intialize the role manager- Since:
- 2.1
-
-