|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.greenhopper.web.rapid.issue.fields.FieldHelper
@Service public class FieldHelper
Contains methods which are useful for the Field classes in rendering and updating their values.
| Constructor Summary | |
|---|---|
FieldHelper()
|
|
| Method Summary | ||
|---|---|---|
HtmlFieldEntry |
createDateFieldViewEntry(I18n2 i18n,
com.atlassian.crowd.embedded.api.User user,
java.sql.Timestamp date,
java.lang.String id,
java.lang.String labelKey)
Factory method for creating FieldEntry's for date fields. |
|
java.lang.String |
getRenderedText(com.atlassian.jira.issue.Issue issue,
java.lang.String fieldId,
java.lang.String value)
Renders a text using the field layout defined for the given field/issue. |
|
static
|
renderListField(java.util.Collection<T> values,
com.google.common.base.Function<T,java.lang.String> toStringFunction)
Transforms a list of values into a comma-separated string representation |
|
ServiceOutcome<java.lang.Void> |
updateField(com.atlassian.crowd.embedded.api.User user,
com.atlassian.jira.issue.Issue issue,
SimpleEditableField editableField,
java.lang.String newValue)
Updates the value of a SimpleEditableField for the specified Issue using the IssueUpdateService. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FieldHelper()
| Method Detail |
|---|
public static <T> java.lang.String renderListField(java.util.Collection<T> values,
com.google.common.base.Function<T,java.lang.String> toStringFunction)
T - a property of an issue e.g. Version, ProjectComponentvalues - the value objectstoStringFunction - the function which converts the value object to its String representation
public java.lang.String getRenderedText(com.atlassian.jira.issue.Issue issue,
java.lang.String fieldId,
java.lang.String value)
issue - the issue containing this fieldfieldId - the ID of the field to rendervalue - the value to render
@NotNull
public ServiceOutcome<java.lang.Void> updateField(com.atlassian.crowd.embedded.api.User user,
com.atlassian.jira.issue.Issue issue,
SimpleEditableField editableField,
java.lang.String newValue)
SimpleEditableField for the specified Issue using the IssueUpdateService.
user - the user performing the updateissue - the issue to be updatededitableField - the field we are updatingnewValue - the new value for that field
public HtmlFieldEntry createDateFieldViewEntry(I18n2 i18n,
com.atlassian.crowd.embedded.api.User user,
java.sql.Timestamp date,
java.lang.String id,
java.lang.String labelKey)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||