com.atlassian.jira.workflow
Class DefaultWorkflowPropertyEditor

java.lang.Object
  extended by com.atlassian.jira.workflow.DefaultWorkflowPropertyEditor
All Implemented Interfaces:
WorkflowPropertyEditor

public final class DefaultWorkflowPropertyEditor
extends Object
implements WorkflowPropertyEditor

Since:
v6.2

Nested Class Summary
static class DefaultWorkflowPropertyEditor.DefaultWorkflowPropertyEditorFactory
           
 
Nested classes/interfaces inherited from interface com.atlassian.jira.workflow.WorkflowPropertyEditor
WorkflowPropertyEditor.Result, WorkflowPropertyEditor.WorkflowPropertyEditorFactory
 
Field Summary
 
Fields inherited from interface com.atlassian.jira.workflow.WorkflowPropertyEditor
DEFAULT_NAME_KEY, DEFAULT_VALUE_KEY
 
Method Summary
 ServiceOutcome<WorkflowPropertyEditor.Result> addProperty(String name, String property)
          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 property)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addProperty

public ServiceOutcome<WorkflowPropertyEditor.Result> addProperty(String name,
                                                                 String property)
Description copied from interface: WorkflowPropertyEditor
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.

Specified by:
addProperty in interface WorkflowPropertyEditor
Parameters:
name - the name of the property.
property - the value of the property.
Returns:
the result of the operation. The ServiceOutcome either contains errors or the WorkflowPropertyEditor.Result of the operation if successful.

updateProperty

public ServiceOutcome<WorkflowPropertyEditor.Result> updateProperty(String name,
                                                                    String property)
Description copied from interface: WorkflowPropertyEditor
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.

Specified by:
updateProperty in interface WorkflowPropertyEditor
Parameters:
name - the name of the property.
property - the value of the property.
Returns:
the result of the operation. The ServiceOutcome either contains errors or the WorkflowPropertyEditor.Result of the operation if successful.

deleteProperty

public ServiceOutcome<WorkflowPropertyEditor.Result> deleteProperty(String name)
Description copied from interface: WorkflowPropertyEditor
Delete a property from the workflow.

Specified by:
deleteProperty in interface WorkflowPropertyEditor
Parameters:
name - the name of the property.
Returns:
the result of the operation. The ServiceOutcome either contains errors or the WorkflowPropertyEditor.Result of the operation if successful.

nameKey

public WorkflowPropertyEditor nameKey(String nameKey)
Description copied from interface: WorkflowPropertyEditor
Set the key used by the editor in the ErrorCollection when reporting errors on the property name. The default is WorkflowPropertyEditor.DEFAULT_NAME_KEY.

Specified by:
nameKey in interface WorkflowPropertyEditor
Parameters:
nameKey - the name of the key to use.
Returns:
the current editor.

valueKey

public WorkflowPropertyEditor valueKey(String valueKey)
Description copied from interface: WorkflowPropertyEditor
Set the key used by the editor in the ErrorCollection when reporting errors on the property value. The default is WorkflowPropertyEditor.DEFAULT_VALUE_KEY.

Specified by:
valueKey in interface WorkflowPropertyEditor
Parameters:
valueKey - the name of the key to use.
Returns:
the current editor.

getNameKey

public String getNameKey()
Description copied from interface: WorkflowPropertyEditor
Return the key used by the editor in the ErrorCollection when reporting errors on the property key.

Specified by:
getNameKey in interface WorkflowPropertyEditor
Returns:
the key used by the editor to report property name errors.

getValueKey

public String getValueKey()
Description copied from interface: WorkflowPropertyEditor
Return the key used by the editor in the ErrorCollection when reporting errors on the property value.

Specified by:
getValueKey in interface WorkflowPropertyEditor
Returns:
the key used by the editor to report property key errors.


Copyright © 2002-2014 Atlassian. All Rights Reserved.