Class DefaultRoleTemplateProcessor
- java.lang.Object
-
- org.apache.archiva.redback.role.template.DefaultRoleTemplateProcessor
-
- All Implemented Interfaces:
RoleTemplateProcessor
@Service("roleTemplateProcessor") public class DefaultRoleTemplateProcessor extends Object implements RoleTemplateProcessor
DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager
-
-
Constructor Summary
Constructors Constructor Description DefaultRoleTemplateProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
create(RedbackRoleModel model, String templateId, String resource)
Creates a role instance from a template for the given resource and returns the id of the new role.RBACManager
getRbacManager()
String
getRoleId(String templateId, String resource)
Returns the role id that identifies the role that is a instance of the given template for the given resource.void
remove(RedbackRoleModel model, String templateId, String resource)
Removes the role instance that belongs to the template from the datastorevoid
setRbacManager(RBACManager rbacManager)
-
-
-
Constructor Detail
-
DefaultRoleTemplateProcessor
public DefaultRoleTemplateProcessor()
-
-
Method Detail
-
create
public String create(RedbackRoleModel model, String templateId, String resource) throws RoleManagerException
Description copied from interface:RoleTemplateProcessor
Creates a role instance from a template for the given resource and returns the id of the new role.- Specified by:
create
in interfaceRoleTemplateProcessor
- Parameters:
model
- the modeltemplateId
- the template identifierresource
- the resource to which the role is applied- Returns:
- the id of the role
- Throws:
RoleManagerException
- if the access to the backend datastore failed
-
remove
public void remove(RedbackRoleModel model, String templateId, String resource) throws RoleManagerException
Description copied from interface:RoleTemplateProcessor
Removes the role instance that belongs to the template from the datastore- Specified by:
remove
in interfaceRoleTemplateProcessor
- Parameters:
model
- the modeltemplateId
- the template identifierresource
- the resource to which the role is applied- Throws:
RoleManagerException
- if the access to the backend datastore failed
-
getRoleId
public String getRoleId(String templateId, String resource)
Description copied from interface:RoleTemplateProcessor
Returns the role id that identifies the role that is a instance of the given template for the given resource.- Specified by:
getRoleId
in interfaceRoleTemplateProcessor
- Parameters:
templateId
- the template identifierresource
- the resource- Returns:
- the role identifier
-
getRbacManager
public RBACManager getRbacManager()
-
setRbacManager
public void setRbacManager(RBACManager rbacManager)
-
-