com.atlassian.jira.bc.scheme.mapper
Class DefaultSchemeGroupsToRoleTransformerService

java.lang.Object
  extended by com.atlassian.jira.bc.scheme.mapper.DefaultSchemeGroupsToRoleTransformerService
All Implemented Interfaces:
SchemeGroupsToRoleTransformerService

public class DefaultSchemeGroupsToRoleTransformerService
extends Object
implements SchemeGroupsToRoleTransformerService

Created by IntelliJ IDEA. User: detkin Date: Jun 23, 2006 Time: 3:50:27 PM To change this template use File | Settings | File Templates.


Constructor Summary
DefaultSchemeGroupsToRoleTransformerService(SchemeGroupsToRolesTransformer schemeGroupsToRolesTransformer, PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext, GlobalPermissionManager globalPermissionManager)
           
 
Method Summary
 SchemeTransformResults doTransform(com.atlassian.crowd.embedded.api.User currentUser, List schemes, Set groupRoleMappings, ErrorCollection errorCollection)
           
 Collection getGroupsWithGlobalUsePermission(Collection groups)
          Accepts a Collection of group names and returns a sub-Collection containing the groups that have been granted the global Permissions.USE permission.
 Collection getGroupsWithoutGlobalUsePermission(Collection groups)
          Accepts a Collection of group names and returns a sub-Collection containing the groups that have NOT been granted the global Permissions.USE permission.
 boolean isAnyGroupGrantedGlobalUsePermission(Collection groupNames)
          Determines whether one or more of the supplied group names matches a group that's been granted the global Permissions.USE permission
 boolean isGroupGrantedGlobalUsePermission(String groupName)
          Determines whether supplied group name matches a group that's been granted the global Permissions.USE permission
 void persistTransformationResults(com.atlassian.crowd.embedded.api.User currentUser, SchemeTransformResults schemeTransformResults, ErrorCollection errorCollection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSchemeGroupsToRoleTransformerService

public DefaultSchemeGroupsToRoleTransformerService(SchemeGroupsToRolesTransformer schemeGroupsToRolesTransformer,
                                                   PermissionManager permissionManager,
                                                   JiraAuthenticationContext jiraAuthenticationContext,
                                                   GlobalPermissionManager globalPermissionManager)
Method Detail

doTransform

public SchemeTransformResults doTransform(com.atlassian.crowd.embedded.api.User currentUser,
                                          List schemes,
                                          Set groupRoleMappings,
                                          ErrorCollection errorCollection)
Specified by:
doTransform in interface SchemeGroupsToRoleTransformerService

persistTransformationResults

public void persistTransformationResults(com.atlassian.crowd.embedded.api.User currentUser,
                                         SchemeTransformResults schemeTransformResults,
                                         ErrorCollection errorCollection)
Specified by:
persistTransformationResults in interface SchemeGroupsToRoleTransformerService

isGroupGrantedGlobalUsePermission

public boolean isGroupGrantedGlobalUsePermission(String groupName)
Description copied from interface: SchemeGroupsToRoleTransformerService
Determines whether supplied group name matches a group that's been granted the global Permissions.USE permission

Specified by:
isGroupGrantedGlobalUsePermission in interface SchemeGroupsToRoleTransformerService
Parameters:
groupName - a group name
Returns:
true if the group specified by the name has been granted the USE permission, false otherwise

isAnyGroupGrantedGlobalUsePermission

public boolean isAnyGroupGrantedGlobalUsePermission(Collection groupNames)
Description copied from interface: SchemeGroupsToRoleTransformerService
Determines whether one or more of the supplied group names matches a group that's been granted the global Permissions.USE permission

Specified by:
isAnyGroupGrantedGlobalUsePermission in interface SchemeGroupsToRoleTransformerService
Parameters:
groupNames - a Collection of group names (not null, may be empty)
Returns:
true if the Collection contains the name of a group that has the USE permission, false otherwise

getGroupsWithGlobalUsePermission

public Collection getGroupsWithGlobalUsePermission(Collection groups)
Description copied from interface: SchemeGroupsToRoleTransformerService
Accepts a Collection of group names and returns a sub-Collection containing the groups that have been granted the global Permissions.USE permission.

Specified by:
getGroupsWithGlobalUsePermission in interface SchemeGroupsToRoleTransformerService
Parameters:
groups - a Collection of group names (not null, may be empty)
Returns:
a Collection of group names that is a subset of the argument collection, containing only those groups with the USE permission

getGroupsWithoutGlobalUsePermission

public Collection getGroupsWithoutGlobalUsePermission(Collection groups)
Description copied from interface: SchemeGroupsToRoleTransformerService
Accepts a Collection of group names and returns a sub-Collection containing the groups that have NOT been granted the global Permissions.USE permission.

Specified by:
getGroupsWithoutGlobalUsePermission in interface SchemeGroupsToRoleTransformerService
Parameters:
groups - a Collection of group names (not null, may be empty)
Returns:
a Collection of group names that is a subset of the argument collection, containing only those groups without the USE permission


Copyright © 2002-2011 Atlassian. All Rights Reserved.