|
||||||||||
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.AbstractCustomFieldType com.atlassian.jira.issue.customfields.impl.AbstractMultiSettableCFType com.atlassian.jira.issue.customfields.impl.CascadingSelectCFType
public class CascadingSelectCFType
Cascading Select Custom Field Type allows for multiple dependent select lists.
CustomFieldParams
The key in the CustomFieldParams object represents the field depth of the
select list. eg. a key of null is the root parent, and key of "1" is the first level select list. As at JIRA 3.0,
there can only be one level.Option
Field Summary | |
---|---|
static PersistenceFieldType |
CASCADE_VALUE_TYPE
|
protected static java.lang.String |
ENTITY_ISSUE_ID
|
Fields inherited from class com.atlassian.jira.issue.customfields.impl.AbstractMultiSettableCFType |
---|
customFieldPersister, optionsManager |
Constructor Summary | |
---|---|
CascadingSelectCFType(OptionsManager optionsManager,
CustomFieldPersister customFieldPersister)
|
Method Summary | |
---|---|
void |
createValue(CustomField field,
org.ofbiz.core.entity.GenericValue issue,
java.lang.Object value)
These methods take the Transport Object as a parameter |
java.lang.String |
getChangelogValue(CustomField field,
java.lang.Object value)
Returns a String of representing values to be stored in the change log. |
java.lang.Object |
getDefaultValue(CustomField field)
Retrieves the Object representing the default CustomField value for the Custom Field. |
java.util.Set |
getIssueIdsWithValue(CustomField field,
Option option)
Returns a list of Issue Ids matching the "value" note that the value in this instance is the single object |
java.lang.Object |
getSingularObjectFromString(java.lang.String string)
Returns a Singular Object, given the string value as passed by the presentation tier. |
java.lang.String |
getStringFromSingularObject(java.lang.Object optionObject)
Returns the String representation of a single value within the CustomFieldType. |
java.lang.Object |
getValueFromCustomFieldParams(CustomFieldParams relevantParams)
Retrieves the Object representing the CustomField value instance from the CustomFieldParams of Strings. |
java.lang.Object |
getValueFromIssue(CustomField field,
org.ofbiz.core.entity.GenericValue issue)
Retrieves the Object representing the current CustomField value for the given issue. |
java.util.Map |
getVelocityParameters(org.ofbiz.core.entity.GenericValue issue)
The custom field may wish to pass parameters to the velocity context beyond the getValueFromIssue methods (eg managers). |
void |
removeValue(CustomField field,
org.ofbiz.core.entity.GenericValue issue,
Option option)
|
void |
setDefaultValue(CustomField customField,
java.lang.Object value)
Sets the default value for a Custom Field |
void |
updateValue(CustomField field,
org.ofbiz.core.entity.GenericValue issue,
java.lang.Object value)
|
void |
validateFromParams(CustomFieldParams relevantParams,
ErrorCollection errorCollectionToAddTo)
Ensures that the CustomFieldParams of Strings is a valid representation of the Custom Field values. |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractMultiSettableCFType |
---|
getOptions, remove |
Methods inherited from class com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType |
---|
assertObjectImplementsType, getDescription, getDescriptor, getKey, getName, init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.issue.customfields.MultipleCustomFieldType |
---|
getOptions |
Methods inherited from interface com.atlassian.jira.issue.customfields.CustomFieldType |
---|
getDescription, getDescriptor, getKey, getName, init, remove |
Field Detail |
---|
public static final PersistenceFieldType CASCADE_VALUE_TYPE
protected static final java.lang.String ENTITY_ISSUE_ID
Constructor Detail |
---|
public CascadingSelectCFType(OptionsManager optionsManager, CustomFieldPersister customFieldPersister)
Method Detail |
---|
public void validateFromParams(CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo)
CustomFieldType
CustomFieldParams
of Strings is a valid representation of the Custom Field values.
Any errors should be added to the ErrorCollection
under the appropriate key as required.
validateFromParams
in interface CustomFieldType
relevantParams
- parameter object of StringserrorCollectionToAddTo
- errorCollection to which any erros should be added (never null)public void createValue(CustomField field, org.ofbiz.core.entity.GenericValue issue, java.lang.Object value)
CustomFieldType
createValue
in interface CustomFieldType
public void updateValue(CustomField field, org.ofbiz.core.entity.GenericValue issue, java.lang.Object value)
updateValue
in interface CustomFieldType
public void removeValue(CustomField field, org.ofbiz.core.entity.GenericValue issue, Option option)
removeValue
in interface MultipleSettableCustomFieldType
public java.lang.Object getValueFromIssue(CustomField field, org.ofbiz.core.entity.GenericValue issue)
CustomFieldType
CustomFieldType.getValueFromCustomFieldParams(com.atlassian.jira.issue.customfields.view.CustomFieldParams)
for more detailed notes.
getValueFromIssue
in interface CustomFieldType
field
- Custom field for which to retrieve the valueissue
- Issue from which to retrieve the value
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
CustomFieldType.getValueFromCustomFieldParams(com.atlassian.jira.issue.customfields.view.CustomFieldParams)
public java.lang.Object getValueFromCustomFieldParams(CustomFieldParams relevantParams) throws CustomFieldValidationException
CustomFieldType
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
) and Object returned from CustomFieldType.getValueFromIssue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue)
.
getValueFromCustomFieldParams
in interface CustomFieldType
relevantParams
- CustomFieldParams of String objects. Will contain one value for Singular field types.
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
CustomFieldValidationException
- if the String value fails to convert into ObjectsCustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
,
CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
,
CustomFieldType.getValueFromIssue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue)
public java.lang.Object getDefaultValue(CustomField field)
CustomFieldType
CustomFieldType.getValueFromCustomFieldParams(com.atlassian.jira.issue.customfields.view.CustomFieldParams)
for more detailed notes.
getDefaultValue
in interface CustomFieldType
field
- CustomField for default value
CustomFieldType.createValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
, CustomFieldType.updateValue(com.atlassian.jira.issue.fields.CustomField, org.ofbiz.core.entity.GenericValue, java.lang.Object)
public void setDefaultValue(CustomField customField, java.lang.Object value)
CustomFieldType
setDefaultValue
in interface CustomFieldType
customField
- CustomField for which the default is being storedvalue
- Transport Object representing the value instance of the CustomFieldpublic java.lang.String getChangelogValue(CustomField field, java.lang.Object value)
CustomFieldType
getChangelogValue
in interface CustomFieldType
field
- CustomField that the value belongs tovalue
- Transport Object representing the value instance of the CustomField
public java.util.Set getIssueIdsWithValue(CustomField field, Option option)
getIssueIdsWithValue
in interface MultipleSettableCustomFieldType
field
- option
-
public java.lang.String getStringFromSingularObject(java.lang.Object optionObject)
CustomFieldType
String
representation of a single value within the CustomFieldType. This is the value that
will is passed to the presentation tier for editing. For single CustomFieldTypes the Singular Object is
the same as a Transport Object. However, for multi-dimensional CustomFieldTypes, the Singular Object is
the Object contained within the Collection
or CustomFieldParams
getStringFromSingularObject
in interface CustomFieldType
public java.lang.Object getSingularObjectFromString(java.lang.String string) throws CustomFieldValidationException
CustomFieldType
getSingularObjectFromString
in interface CustomFieldType
CustomFieldValidationException
public java.util.Map getVelocityParameters(org.ofbiz.core.entity.GenericValue issue)
CustomFieldType
getVelocityParameters
in interface CustomFieldType
getVelocityParameters
in class AbstractCustomFieldType
issue
- The issue currently in context (Note: this will be null in cases like 'default value')
Map
of parameters to add to the velocity context, or an empty Map otherwise (never null)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |