public interface

WorkflowPropertyEditor

com.atlassian.jira.workflow.WorkflowPropertyEditor
Known Indirect Subclasses

Class Overview

An editor that can be used to perform CRUD operations on the properties of a workflow.

Summary

Nested Classes
interface WorkflowPropertyEditor.Result Contains the result of a successful operation. 
interface WorkflowPropertyEditor.WorkflowPropertyEditorFactory Factory for WorkflowPropertyEditor instances. 
Constants
String DEFAULT_NAME_KEY
String DEFAULT_VALUE_KEY
Public Methods
ServiceOutcome<WorkflowPropertyEditor.Result> addProperty(String name, String value)
Add a property to the workflow.
ServiceOutcome<WorkflowPropertyEditor.Result> deleteProperty(String name)
Delete a property from the workflow.
String getNameKey()
Return the key used by the editor in the ErrorCollection when reporting errors on the property key.
String getValueKey()
Return the key used by the editor in the ErrorCollection when reporting errors on the property value.
WorkflowPropertyEditor nameKey(String nameKey)
Set the key used by the editor in the ErrorCollection when reporting errors on the property name.
ServiceOutcome<WorkflowPropertyEditor.Result> updateProperty(String name, String value)
Update a property on the workflow.
WorkflowPropertyEditor valueKey(String valueKey)
Set the key used by the editor in the ErrorCollection when reporting errors on the property value.

Constants

public static final String DEFAULT_NAME_KEY

Constant Value: "key"

public static final String DEFAULT_VALUE_KEY

Constant Value: "value"

Public Methods

public ServiceOutcome<WorkflowPropertyEditor.Result> addProperty (String name, String value)

Add a property to the workflow. It is an error to try an update a property that already exists.

The caller must check the returned WorkflowPropertyEditor.Result to work out the actual name and value saved as they may have been transformed during the save.

Parameters
name the name of the property.
value the value of the property.
Returns

public ServiceOutcome<WorkflowPropertyEditor.Result> deleteProperty (String name)

Delete a property from the workflow.

Parameters
name the name of the property.
Returns

public String getNameKey ()

Return the key used by the editor in the ErrorCollection when reporting errors on the property key.

Returns
  • the key used by the editor to report property name errors.

public String getValueKey ()

Return the key used by the editor in the ErrorCollection when reporting errors on the property value.

Returns
  • the key used by the editor to report property key errors.

public WorkflowPropertyEditor nameKey (String nameKey)

Set the key used by the editor in the ErrorCollection when reporting errors on the property name. The default is DEFAULT_NAME_KEY.

Parameters
nameKey the name of the key to use.
Returns
  • the current editor.

public ServiceOutcome<WorkflowPropertyEditor.Result> updateProperty (String name, String value)

Update a property on the workflow. A property that does not exist will be added if necessary.

The caller must check the returned WorkflowPropertyEditor.Result to work out the actual name and value saved as they may have been transformed during the save.

Parameters
name the name of the property.
value the value of the property.
Returns

public WorkflowPropertyEditor valueKey (String valueKey)

Set the key used by the editor in the ErrorCollection when reporting errors on the property value. The default is DEFAULT_VALUE_KEY.

Parameters
valueKey the name of the key to use.
Returns
  • the current editor.