Class RankCustomFieldServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.rank.RankCustomFieldServiceImpl
- All Implemented Interfaces:
ManagedCustomFieldProvider
,RankCustomFieldService
@Service
public class RankCustomFieldServiceImpl
extends Object
implements RankCustomFieldService, ManagedCustomFieldProvider
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.atlassian.fugue.Option
<com.atlassian.jira.issue.fields.CustomField> Get the global rank custom field that GreenHopper is aware of.Collection
<com.atlassian.jira.issue.fields.CustomField> com.atlassian.jira.issue.fields.CustomField
Get the global rank custom field that GreenHopper is aware of.List
<com.atlassian.jira.issue.fields.CustomField> Get all Rank custom fields.getSortedByRankField
(com.atlassian.query.Query query) Get the sorted by rank fieldisFieldNameInQuerySafe
(com.atlassian.jira.issue.fields.CustomField rankField) Can the field name be used inside a query?boolean
isRankCustomFieldType
(com.atlassian.jira.issue.fields.CustomField customField) Is the passed custom field of type "Global Rank".boolean
isRankField
(long customFieldId) Is the passed custom field id of type "Global Rank"boolean
isRankField
(com.atlassian.jira.issue.fields.CustomField customField) Is the passed custom field of type "Global Rank"validateRankFieldConfiguration
(com.atlassian.jira.issue.fields.CustomField customField) Validates the passed rank custom field configuration
-
Field Details
-
log
-
-
Constructor Details
-
RankCustomFieldServiceImpl
public RankCustomFieldServiceImpl()
-
-
Method Details
-
getDefaultRankField
public io.atlassian.fugue.Option<com.atlassian.jira.issue.fields.CustomField> getDefaultRankField()Description copied from interface:RankCustomFieldService
Get the global rank custom field that GreenHopper is aware of.- Specified by:
getDefaultRankField
in interfaceRankCustomFieldService
- Returns:
- the custom field. If the field does not yet exist, it will NOT be created.
-
getOrCreateDefaultRankField
public com.atlassian.jira.issue.fields.CustomField getOrCreateDefaultRankField()Description copied from interface:RankCustomFieldService
Get the global rank custom field that GreenHopper is aware of.- Specified by:
getOrCreateDefaultRankField
in interfaceRankCustomFieldService
- Returns:
- the custom field. If the field does not yet exist, it will be created.
-
isRankField
public boolean isRankField(long customFieldId) Description copied from interface:RankCustomFieldService
Is the passed custom field id of type "Global Rank"- Specified by:
isRankField
in interfaceRankCustomFieldService
-
isRankField
public boolean isRankField(com.atlassian.jira.issue.fields.CustomField customField) Description copied from interface:RankCustomFieldService
Is the passed custom field of type "Global Rank"- Specified by:
isRankField
in interfaceRankCustomFieldService
-
isRankCustomFieldType
public boolean isRankCustomFieldType(com.atlassian.jira.issue.fields.CustomField customField) Description copied from interface:RankCustomFieldService
Is the passed custom field of type "Global Rank". Does not perform any further checks on the field- Specified by:
isRankCustomFieldType
in interfaceRankCustomFieldService
-
validateRankFieldConfiguration
public ServiceResult validateRankFieldConfiguration(com.atlassian.jira.issue.fields.CustomField customField) Description copied from interface:RankCustomFieldService
Validates the passed rank custom field configuration- Specified by:
validateRankFieldConfiguration
in interfaceRankCustomFieldService
-
getSortedByRankField
@Nonnull public ServiceOutcome<SortedByRankFieldResult> getSortedByRankField(com.atlassian.query.Query query) Description copied from interface:RankCustomFieldService
Get the sorted by rank field- Specified by:
getSortedByRankField
in interfaceRankCustomFieldService
- Returns:
- A SortedByRankFieldResult in case the query is sorted by a rank field. Result can contain warnings, in which case the returned field is *not* valid for use. An error outcome is returned in case the query is not sorted by a rank field
-
isFieldNameInQuerySafe
public ServiceOutcome<Boolean> isFieldNameInQuerySafe(com.atlassian.jira.issue.fields.CustomField rankField) Description copied from interface:RankCustomFieldService
Can the field name be used inside a query? Using the name could be invalid, in case another field with the given name exists.- Specified by:
isFieldNameInQuerySafe
in interfaceRankCustomFieldService
-
getRankFields
Description copied from interface:RankCustomFieldService
Get all Rank custom fields.- Specified by:
getRankFields
in interfaceRankCustomFieldService
- Returns:
- a list of rank fields.
-
getManagedFields
- Specified by:
getManagedFields
in interfaceManagedCustomFieldProvider
- Returns:
- all custom fields managed by this provider
-