public class IssueUtilities extends Object
Modifier and Type | Field | Description |
---|---|---|
static int |
FIELD_ATTACHMENTDESCRIPTION |
|
static int |
FIELD_ATTACHMENTFILENAME |
|
static int |
FIELD_COMPONENTS |
|
static int |
FIELD_CREATEDATE |
|
static int |
FIELD_CREATOR |
|
static int |
FIELD_DESCRIPTION |
|
static int |
FIELD_HISTORY |
|
static int |
FIELD_ID |
|
static int |
FIELD_LASTMODIFIED |
|
static int |
FIELD_OWNER |
|
static int |
FIELD_PROJECT |
|
static int |
FIELD_RESOLUTION |
|
static int |
FIELD_SEVERITY |
|
static int |
FIELD_STATUS |
|
static int |
FIELD_TARGET_VERSION |
|
static int |
FIELD_TYPE_INDEXED |
|
static int |
FIELD_TYPE_MAP |
|
static int |
FIELD_TYPE_SINGLE |
|
static int |
FIELD_VERSIONS |
|
static int |
HISTORY_STATUS_AVAILABLE |
|
static int |
HISTORY_STATUS_REMOVED |
|
static int |
NUM_RELATION_TYPES |
|
static int |
RELATION_TYPE_CLONED_C |
Defines a cloned issue.
|
static int |
RELATION_TYPE_CLONED_P |
Defines a cloned issue.
|
static int |
RELATION_TYPE_DEPENDENT_C |
Defines a dependent issue.
|
static int |
RELATION_TYPE_DEPENDENT_P |
Defines a dependent issue.
|
static int |
RELATION_TYPE_DUPLICATE_C |
Defines a duplicate issue.
|
static int |
RELATION_TYPE_DUPLICATE_P |
Defines a duplicate issue.
|
static int |
RELATION_TYPE_RELATED_C |
Defines a related issue.
|
static int |
RELATION_TYPE_RELATED_P |
Defines a related issue.
|
static int |
RELATION_TYPE_SPLIT_C |
Defines a split issue.
|
static int |
RELATION_TYPE_SPLIT_P |
Defines a split issue.
|
protected static int[] |
STANDARD_FIELDS |
|
static int |
STATUS_ASSIGNED |
|
static int |
STATUS_CLOSED |
|
static int |
STATUS_END |
|
static int |
STATUS_NEW |
|
static int |
STATUS_RESOLVED |
|
static int |
STATUS_UNASSIGNED |
Constructor | Description |
---|---|
IssueUtilities() |
Modifier and Type | Method | Description |
---|---|---|
static boolean |
canBeAssignedIssue(Issue issue,
Integer userId,
Map<Integer,Set<PermissionType>> permissions) |
Deprecated.
|
static boolean |
canEditIssue(Issue issue,
Integer userId,
Map<Integer,Set<PermissionType>> permissions) |
Deprecated.
|
static boolean |
canUnassignIssue(Issue issue,
Integer userId,
Map<Integer,Set<PermissionType>> permissions) |
Returns true if the user can unassign themselves from the issue.
|
static boolean |
canViewIssue(Issue issue,
Integer userId,
Map<Integer,Set<PermissionType>> permissions) |
Returns true if the user has permission to view the requested issue.
|
static boolean |
canViewIssue(Issue issue,
User user,
Map<Integer,Set<PermissionType>> permissions) |
Returns true if the user has permission to view the requested issue.
|
static String |
checkResolutionName(String value,
Locale locale) |
|
static int |
compareSeverity(Issue issueA,
Issue issueB) |
Compares the severity of two issues.
|
static String |
componentsToString(Issue issue) |
|
static String |
getActivityName(IssueActivityType type) |
|
static String |
getActivityName(IssueActivityType type,
Locale locale) |
|
static CustomField |
getCustomField(Integer id) |
Returns the custom field with the supplied id.
|
static CustomField |
getCustomField(Integer id,
Locale locale) |
Returns the custom field with the supplied id value.
|
static List<CustomField> |
getCustomFields() |
Returns the cached array of CustomFieldModels.
|
static String |
getFieldName(Integer fieldId) |
|
static String |
getFieldName(Integer fieldId,
List<CustomField> customFields,
Locale locale) |
|
static int |
getFieldType(Integer fieldId) |
|
static URL |
getIssueURL(Issue issue,
String baseURL) |
|
static URL |
getIssueURL(Issue issue,
URL base) |
|
static IssueRelation.Type |
getMatchingRelationType(IssueRelation.Type relationType) |
|
static int |
getNumberCustomFields() |
Returns the total number of defined custom fields
|
static int |
getNumberSeverities() |
|
static int |
getNumberStatuses() |
|
static String |
getOwnerName(User owner,
Locale locale) |
|
static String |
getRelationName(IssueRelation.Type value) |
|
static String |
getRelationName(IssueRelation.Type value,
Locale locale) |
|
static String |
getResolutionName(int value) |
|
static String |
getResolutionName(int value,
Locale locale) |
|
static String |
getResolutionName(String value,
Locale locale) |
|
static List<NameValuePair> |
getResolutions(Locale locale) |
Returns the list of predefined resolutions in the system.
|
static List<NameValuePair> |
getSeverities(Locale locale) |
Returns the list of the defined issue severities in the system.
|
static String |
getSeverityName(Integer value) |
|
static String |
getSeverityName(Integer value,
Locale locale) |
|
static String |
getSeverityName(String value,
Locale locale) |
|
static String |
getStandardFieldKey(int fieldId) |
|
static NameValuePair[] |
getStandardFields(Locale locale) |
|
static List<Configuration> |
getStatuses() |
getStatuses() needs to get implemented..
|
static List<NameValuePair> |
getStatuses(Locale locale) |
|
static String |
getStatusName(Integer value) |
|
static String |
getStatusName(Integer value,
Locale locale) |
|
static String |
getStatusName(String value,
Locale locale) |
|
static boolean |
hasHardNotification(Issue issue,
Project project,
Integer userId) |
|
static boolean |
hasIssueNotification(Issue issue,
Integer userId) |
|
static boolean |
hasIssueNotification(Issue issue,
Project project,
Integer userId) |
Evaluate if a certain user is notified on issue change.
|
static boolean |
hasIssueRelation(Issue issue,
Integer relatedIssueId) |
|
static String |
historyToString(Issue issue,
SimpleDateFormat sdf) |
|
static void |
setCustomFields(List<CustomField> value) |
Sets the cached array of CustomFieldModels.
|
static void |
setResolutions(List<Configuration> value) |
Sets the cached list of predefined resolutions.
|
static void |
setSeverities(List<Configuration> value) |
|
static void |
setStatuses(List<Configuration> value) |
|
static String |
versionsToString(Issue issue) |
public static final int FIELD_TYPE_SINGLE
public static final int FIELD_TYPE_INDEXED
public static final int FIELD_TYPE_MAP
public static final int FIELD_ID
public static final int FIELD_DESCRIPTION
public static final int FIELD_STATUS
public static final int FIELD_RESOLUTION
public static final int FIELD_SEVERITY
public static final int FIELD_CREATOR
public static final int FIELD_CREATEDATE
public static final int FIELD_OWNER
public static final int FIELD_LASTMODIFIED
public static final int FIELD_PROJECT
public static final int FIELD_TARGET_VERSION
public static final int FIELD_COMPONENTS
public static final int FIELD_VERSIONS
public static final int FIELD_ATTACHMENTDESCRIPTION
public static final int FIELD_ATTACHMENTFILENAME
public static final int FIELD_HISTORY
protected static final int[] STANDARD_FIELDS
public static final int STATUS_NEW
public static final int STATUS_UNASSIGNED
public static final int STATUS_ASSIGNED
public static final int STATUS_RESOLVED
public static final int STATUS_CLOSED
public static final int STATUS_END
public static final int HISTORY_STATUS_REMOVED
public static final int HISTORY_STATUS_AVAILABLE
public static final int RELATION_TYPE_RELATED_P
public static final int RELATION_TYPE_RELATED_C
public static final int RELATION_TYPE_DUPLICATE_P
public static final int RELATION_TYPE_DUPLICATE_C
public static final int RELATION_TYPE_CLONED_P
public static final int RELATION_TYPE_CLONED_C
public static final int RELATION_TYPE_SPLIT_P
public static final int RELATION_TYPE_SPLIT_C
public static final int RELATION_TYPE_DEPENDENT_P
public static final int RELATION_TYPE_DEPENDENT_C
public static final int NUM_RELATION_TYPES
public static int getFieldType(Integer fieldId)
public static String getFieldName(Integer fieldId, List<CustomField> customFields, Locale locale)
public static String getStandardFieldKey(int fieldId)
public static NameValuePair[] getStandardFields(Locale locale)
public static String getRelationName(IssueRelation.Type value)
public static String getRelationName(IssueRelation.Type value, Locale locale)
public static IssueRelation.Type getMatchingRelationType(IssueRelation.Type relationType)
public static String historyToString(Issue issue, SimpleDateFormat sdf)
public static List<Configuration> getStatuses()
public static List<NameValuePair> getStatuses(Locale locale)
public static void setStatuses(List<Configuration> value)
public static int getNumberStatuses()
public static List<NameValuePair> getSeverities(Locale locale)
locale
- the locale to return the severities aspublic static void setSeverities(List<Configuration> value)
public static int getNumberSeverities()
public static int compareSeverity(Issue issueA, Issue issueB)
issueA
- IssueModel AissueB
- IssueModel Bpublic static String getResolutionName(int value)
public static String checkResolutionName(String value, Locale locale) throws MissingResourceException
MissingResourceException
public static List<NameValuePair> getResolutions(Locale locale)
locale
- the locale to return the resolutions aspublic static void setResolutions(List<Configuration> value)
public static String getActivityName(IssueActivityType type)
public static String getActivityName(IssueActivityType type, Locale locale)
public static List<CustomField> getCustomFields()
public static void setCustomFields(List<CustomField> value)
public static CustomField getCustomField(Integer id)
id
- the id of the field to returnpublic static CustomField getCustomField(Integer id, Locale locale)
id
- the id of the field to returnlocale
- the locale to initialize any labels withpublic static int getNumberCustomFields()
public static boolean canViewIssue(Issue issue, User user, Map<Integer,Set<PermissionType>> permissions)
issue
- an IssueModel of the issue to check view permission foruser
- a User for the user to check permission forpermissions
- a HashMap of the users permissionspublic static boolean canViewIssue(Issue issue, Integer userId, Map<Integer,Set<PermissionType>> permissions)
issue
- an IssueModel of the issue to check view permission foruserId
- the userId of the user to check permission forpermissions
- a HashMap of the users permissions@Deprecated public static boolean canEditIssue(Issue issue, Integer userId, Map<Integer,Set<PermissionType>> permissions)
issue
- an IssueModel of the issue to check edit permission foruserId
- the userId of the user to check permission forpermissions
- a HashMap of the users permissions@Deprecated public static boolean canBeAssignedIssue(Issue issue, Integer userId, Map<Integer,Set<PermissionType>> permissions)
issue
- an IssueModel of the issue to check assign permission foruserId
- the userId of the user to check permission forpermissions
- a HashMap of the users permissionspublic static boolean canUnassignIssue(Issue issue, Integer userId, Map<Integer,Set<PermissionType>> permissions)
issue
- an IssueModel of the issue to check assign permission foruserId
- the userId of the user to check permission forpermissions
- a HashMap of the users permissionspublic static boolean hasHardNotification(Issue issue, Project project, Integer userId)
public static boolean hasIssueNotification(Issue issue, Project project, Integer userId)
public static URL getIssueURL(Issue issue, String baseURL) throws MalformedURLException
MalformedURLException
Copyright © 2002–2019 itracker. All rights reserved.