|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.customfields.impl.rest.AbstractCustomFieldOperationsHandler<T>
@PublicSpi public abstract class AbstractCustomFieldOperationsHandler<T>
Field Summary | |
---|---|
protected CustomField |
field
|
protected I18nHelper |
i18nHelper
|
Constructor Summary | |
---|---|
AbstractCustomFieldOperationsHandler(CustomField field)
Deprecated. @since 5.0-RC2 Use the constructor AbstractCustomFieldOperationsHandler(CustomField field, I18nHelper i18nHelper) |
|
AbstractCustomFieldOperationsHandler(CustomField field,
I18nHelper i18nHelper)
Constructor. |
Method Summary | |
---|---|
protected T |
applyOperation(IssueContext issueCtx,
Issue issue,
StandardOperation operation,
T currentFieldValue,
JsonData operationValue,
ErrorCollection errors)
gets called (perhaps multiple times) to apply the given operation to the given currentValuye, retyrning the new value |
protected abstract void |
finaliseOperation(T finalValue,
IssueInputParameters parameters,
ErrorCollection errors)
takes the value returnd by a call to applyOperation() and puts it into the inputparams |
protected abstract T |
getInitialCreateValue(IssueContext issueCtx)
compute the "currentValue" to be passed to applyOperation() |
protected abstract T |
getInitialValue(Issue issue,
ErrorCollection errors)
compute the "currentValue" to be passed to applyOperation() |
Set<String> |
getSupportedOperations()
Returns a list of operation names which are supported by this field. |
protected T |
handleAddOperation(IssueContext issueCtx,
Issue issue,
T currentFieldValue,
JsonData operationValue,
ErrorCollection errors)
|
protected T |
handleRemoveOperation(IssueContext issueCtx,
Issue issue,
T currentFieldValue,
JsonData operationValue,
ErrorCollection errors)
|
protected T |
handleSetOperation(IssueContext issueCtx,
Issue issue,
T currentFieldValue,
JsonData operationValue,
ErrorCollection errors)
|
ErrorCollection |
updateIssueInputParameters(IssueContext issueCtx,
Issue issue,
String fieldId,
IssueInputParameters inputParameters,
List<FieldOperationHolder> operations)
This method has to set the field value(s) in the IssueInputParameters based on the operations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final CustomField field
protected final I18nHelper i18nHelper
Constructor Detail |
---|
public AbstractCustomFieldOperationsHandler(CustomField field, I18nHelper i18nHelper)
field
- Field the handler is for.i18nHelper
- I18nHelperpublic AbstractCustomFieldOperationsHandler(CustomField field)
AbstractCustomFieldOperationsHandler(CustomField field, I18nHelper i18nHelper)
field
- Field the handler is for.Method Detail |
---|
public Set<String> getSupportedOperations()
RestFieldOperationsHandler
getSupportedOperations
in interface RestFieldOperationsHandler
protected abstract T getInitialValue(Issue issue, ErrorCollection errors)
protected abstract T getInitialCreateValue(IssueContext issueCtx)
protected abstract void finaliseOperation(T finalValue, IssueInputParameters parameters, ErrorCollection errors)
public ErrorCollection updateIssueInputParameters(IssueContext issueCtx, Issue issue, String fieldId, IssueInputParameters inputParameters, List<FieldOperationHolder> operations)
RestFieldOperationsHandler
IssueInputParameters
based on the operations.
The issue service will validate the new field values in the IssueInputParameters, thus all permission checks are done by the issue service.
updateIssueInputParameters
in interface RestFieldOperationsHandler
issueCtx
- the Issue Context , i.e. Project IssueTypeissue
- the issue (may be null when creating an issue)fieldId
- The Id of the field being processed.inputParameters
- the inputparameters containing all updatd field values.operations
- the operations to perform for this field. Has to be one of the supported operations.
protected T handleSetOperation(IssueContext issueCtx, Issue issue, T currentFieldValue, JsonData operationValue, ErrorCollection errors)
protected T handleRemoveOperation(IssueContext issueCtx, Issue issue, T currentFieldValue, JsonData operationValue, ErrorCollection errors)
protected T handleAddOperation(IssueContext issueCtx, Issue issue, T currentFieldValue, JsonData operationValue, ErrorCollection errors)
protected T applyOperation(IssueContext issueCtx, Issue issue, StandardOperation operation, T currentFieldValue, JsonData operationValue, ErrorCollection errors)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |