|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.security.util.GroupSelectorUtils
public class GroupSelectorUtils
Hacky methods to support mapping a display name to a group name. A "display" name is a user-friendly equivalent of a regular group name, eg. "JIRA Developers" instead of "jira-developers". In addition, a group name ("Admins") may resolve to multiple groups ("jira-admins, qa-admins" etc).
This code is used in groupnames.jsp,
GroupCF
and InGroupCFCondition
Constructor Summary | |
---|---|
GroupSelectorUtils(org.ofbiz.core.entity.GenericDelegator genericDelegator,
FieldManager fieldManager)
|
Method Summary | |
---|---|
List |
getCustomFieldsSpecifyingGroups()
Get all custom fields that could possibly be identifying a group. |
String |
getGroupDisplayName(Group group)
Deprecated. since v3.8 this is a very short term method as it will not work with external User/Group management. |
Set |
getGroups(Object cfValue)
Given an object (usually a custom field value) find the associated group. |
Set |
getGroupsFromDisplayName(String groupDisplayName)
Deprecated. since v3.8 this is a very short term method as it will not work with external User/Group management. |
Set |
getUsers(Issue issue,
String customFieldId)
Get users from a group chosen by a Group Selector custom field, in a certain issue. |
boolean |
isUserInCustomFieldGroup(Issue issue,
CustomField field,
User user)
Determines if a user is a member of a group specified by a custom field value. |
String |
printGroups(Collection groups)
Print a comma-separated list of groups. |
boolean |
updateGroupName(Group group,
String oldVal,
String newVal)
Deprecated. since v3.8 this is a very short term method as it will not work with external User/Group management. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroupSelectorUtils(org.ofbiz.core.entity.GenericDelegator genericDelegator, FieldManager fieldManager)
Method Detail |
---|
public Set getUsers(Issue issue, String customFieldId)
issue
- customFieldId
- Id of GroupSelectorField
.
User
s.public List getCustomFieldsSpecifyingGroups()
public boolean isUserInCustomFieldGroup(Issue issue, CustomField field, User user)
issue
- The current issuefield
- The custom field specifying the group(s). Eg. a select-list.user
- The user we wish to check for
public Set getGroups(Object cfValue)
cfValue
- A String
(eg. "JIRA Developers" or "jira-developers") Group
or Collection
of String
s or Group
s.
Group
s.public String printGroups(Collection groups)
public Set getGroupsFromDisplayName(String groupDisplayName) throws org.ofbiz.core.entity.GenericEntityException
groupDisplayName
- Eg. "JIRA Developers"
Group
s, eg. [jira-developers], or null if none exists for the given display name.
org.ofbiz.core.entity.GenericEntityException
public final String getGroupDisplayName(Group group) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public boolean updateGroupName(Group group, String oldVal, String newVal) throws org.ofbiz.core.entity.GenericEntityException
group
- Group to updateoldVal
- The old value, if any (can be null)newVal
- New display name
org.ofbiz.core.entity.GenericEntityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |