org.codehaus.plexus.redback.role
Interface RoleManager

All Known Implementing Classes:
DefaultRoleManager

public interface RoleManager

RoleProfileManager:


Field Summary
static java.lang.String ROLE
           
 
Method Summary
 void assignRole(java.lang.String roleId, java.lang.String principal)
          Assigns the role indicated by the roleId to the given principal
 void assignTemplatedRole(java.lang.String templateId, java.lang.String resource, java.lang.String principal)
          Assigns the templated role indicated by the templateId fails if the templated role has not been created
 void createTemplatedRole(java.lang.String templateId, java.lang.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 management
 void loadRoleModel(RedbackRoleModel model)
           
 void loadRoleModel(java.net.URL resourceLocation)
          load the model and create/verify operations, resources, etc exist and make static roles
 void removeTemplatedRole(java.lang.String templateId, java.lang.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 role
 boolean roleExists(java.lang.String roleId)
          true of a role exists with the given roleId
 boolean templatedRoleExists(java.lang.String templateId, java.lang.String resource)
          true of a role exists with the given roleId
 void unassignRole(java.lang.String roleId, java.lang.String principal)
          Unassigns the role indicated by the role id from the given principal
 void updateRole(java.lang.String templateId, java.lang.String oldResource, java.lang.String newResource)
          allows for a role coming from a template to be renamed effectively swapping out the bits of it that were labeled with the oldResource with the newResource it also manages any user assignments for that role
 

Field Detail

ROLE

static final java.lang.String ROLE
Method Detail

loadRoleModel

void loadRoleModel(java.net.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

void createTemplatedRole(java.lang.String templateId,
                         java.lang.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:
roleName -
resource -
Throws:
RoleManagerException

removeTemplatedRole

void removeTemplatedRole(java.lang.String templateId,
                         java.lang.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:
roleId -
resource -
Throws:
RoleManagerException

updateRole

void updateRole(java.lang.String templateId,
                java.lang.String oldResource,
                java.lang.String newResource)
                throws RoleManagerException
allows for a role coming from a template to be renamed effectively swapping out the bits of it that were labeled with the oldResource with the newResource it also manages any user assignments for that role

Parameters:
templateId -
oldResource -
newResource -
Throws:
RoleManagerException

assignRole

void assignRole(java.lang.String roleId,
                java.lang.String principal)
                throws RoleManagerException
Assigns the role indicated by the roleId to the given principal

Parameters:
roleId -
principal -
Throws:
RoleManagerException

assignTemplatedRole

void assignTemplatedRole(java.lang.String templateId,
                         java.lang.String resource,
                         java.lang.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(java.lang.String roleId,
                  java.lang.String principal)
                  throws RoleManagerException
Unassigns the role indicated by the role id from the given principal

Parameters:
roleId -
principal -
Throws:
RoleManagerException

roleExists

boolean roleExists(java.lang.String roleId)
                   throws RoleManagerException
true of a role exists with the given roleId

Parameters:
roleId -
Returns:
Throws:
RoleManagerException

templatedRoleExists

boolean templatedRoleExists(java.lang.String templateId,
                            java.lang.String resource)
                            throws RoleManagerException
true of a role exists with the given roleId

Parameters:
roleId -
Returns:
Throws:
RoleManagerException

getModel

RedbackRoleModel getModel()
get the blessed model, the current operating instructions for all things role management



Copyright © 2006-2008 Codehaus. All Rights Reserved.