Package com.atlassian.jira.workflow
Interface WorkflowPropertyEditor
- All Known Implementing Classes:
DefaultWorkflowPropertyEditor
public interface WorkflowPropertyEditor
An editor that can be used to perform CRUD operations on the properties of a workflow.
- Since:
- v6.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceContains the result of a successful operation.static interfaceFactory forWorkflowPropertyEditorinstances. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddProperty(String name, String value) Add a property to the workflow.deleteProperty(String name) Delete a property from the workflow.Return the key used by the editor in theErrorCollectionwhen reporting errors on the property key.Return the key used by the editor in theErrorCollectionwhen reporting errors on the property value.Set the key used by the editor in theErrorCollectionwhen reporting errors on the property name.updateProperty(String name, String value) Update a property on the workflow.Set the key used by the editor in theErrorCollectionwhen reporting errors on the property value.
-
Field Details
-
DEFAULT_NAME_KEY
- See Also:
-
DEFAULT_VALUE_KEY
- See Also:
-
-
Method Details
-
addProperty
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.Resultto 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:
- the result of the operation. The
ServiceOutcomeeither contains errors or theWorkflowPropertyEditor.Resultof the operation if successful.
-
updateProperty
Update a property on the workflow. A property that does not exist will be added if necessary.The caller must check the returned
WorkflowPropertyEditor.Resultto 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:
- the result of the operation. The
ServiceOutcomeeither contains errors or theWorkflowPropertyEditor.Resultof the operation if successful.
-
deleteProperty
Delete a property from the workflow.- Parameters:
name- the name of the property.- Returns:
- the result of the operation. The
ServiceOutcomeeither contains errors or theWorkflowPropertyEditor.Resultof the operation if successful.
-
nameKey
Set the key used by the editor in theErrorCollectionwhen reporting errors on the property name. The default isDEFAULT_NAME_KEY.- Parameters:
nameKey- the name of the key to use.- Returns:
- the current editor.
-
valueKey
Set the key used by the editor in theErrorCollectionwhen reporting errors on the property value. The default isDEFAULT_VALUE_KEY.- Parameters:
valueKey- the name of the key to use.- Returns:
- the current editor.
-
getNameKey
String getNameKey()Return the key used by the editor in theErrorCollectionwhen reporting errors on the property key.- Returns:
- the key used by the editor to report property name errors.
-
getValueKey
String getValueKey()Return the key used by the editor in theErrorCollectionwhen reporting errors on the property value.- Returns:
- the key used by the editor to report property key errors.
-