com.atlassian.greenhopper.web.field
Class BacklogField
java.lang.Object
com.pyxis.greenhopper.jira.fields.AbstractIssueField
com.pyxis.greenhopper.jira.fields.AbstractSelectField
com.atlassian.greenhopper.web.field.BacklogField
- All Implemented Interfaces:
- IssueField
public class BacklogField
- extends AbstractSelectField
This whole thing is quite a mess. It's a renderer / view model instance that can fetch data (depending on the current user) and present formatted /
translated values. At the same time, it provides facilities to update values, so it's also a kind of service. It has dependencies, but no real DI
going on, as instances are getting created by IssueFieldManagerImpl
.
This should be split up, the model part belongs to the regular view model structure and the update part to a service layer. JIRA's field
implementations are not something to be followed, but a first refactoring step done quite a while ago to group similar functionality.
- Author:
- ahennecke
Fields inherited from class com.pyxis.greenhopper.jira.fields.AbstractIssueField |
GREENHOPPER_PLUGIN, GROUP_PICKER, id, idLong, label, MULTI_GROUP_PICKER, MULTI_SELECT, MULTI_USER_PICKER, NUMBER, SELECT, TEXT, TEXT_AREA, TEXT_FIELD, USER_PICKER |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
BacklogField
public BacklogField(com.atlassian.jira.issue.fields.CustomField field,
BacklogCustomFieldService backlogCustomFieldService,
BacklogService backlogService,
XProjectService xProjectService,
WebUtilities webUtilities,
BacklogRenderer backlogRenderer)
getDisplayValue
public java.lang.String getDisplayValue(BoardIssue boardIssue)
getAllAvailableValuesForSelect
public java.util.LinkedList<FieldOption> getAllAvailableValuesForSelect(BoardIssue boardIssue)
- Build a hierarchically sorted list of
FieldOption
s for populating the select box
- Specified by:
getAllAvailableValuesForSelect
in class AbstractSelectField
getValue
public java.lang.Object getValue(BoardIssue boardIssue)
getValueFromString
public java.lang.Object getValueFromString(java.lang.String values)
- Load the backlog for the given ID. Expects values (sic) to be a single long ID of the backlog we care about.
- Specified by:
getValueFromString
in interface IssueField
- Overrides:
getValueFromString
in class AbstractSelectField
getDefaultDisplayValue
public java.lang.String getDefaultDisplayValue(BoardIssue boardIssue)
- used in select-create.vm
getDefaultValue
public java.lang.Object getDefaultValue(BoardIssue boardIssue)
getTooltipValue
public java.lang.String getTooltipValue(BoardIssue boardIssue)
updateValue
public void updateValue(BoardIssue boardIssue,
java.lang.String newValue)
throws GreenHopperException,
java.lang.Exception
- Throws:
GreenHopperException
java.lang.Exception
canEdit
public boolean canEdit(BoardIssue boardIssue)
isCustomField
public boolean isCustomField()
- Specified by:
isCustomField
in interface IssueField
- Overrides:
isCustomField
in class AbstractIssueField
getLink
public java.lang.String getLink(BoardIssue boardIssue,
java.lang.String value)
- Specified by:
getLink
in interface IssueField
- Overrides:
getLink
in class AbstractIssueField
isClickable
public boolean isClickable(BoardIssue boardIssue)
- Specified by:
isClickable
in interface IssueField
- Overrides:
isClickable
in class AbstractIssueField
Copyright © 2007-2011 Atlassian. All Rights Reserved.