@Internal public class DefaultValueOperationsCF<T> extends Object implements DefaultValueOperations<T>
NOT_SUPPORTED
Constructor and Description |
---|
DefaultValueOperationsCF(CustomFieldType<T,?> customFieldType) |
Modifier and Type | Method and Description |
---|---|
T |
getDefaultValue(FieldConfig fieldConfig)
Retrieves the Object representing the default field value for the Field and
FieldConfig . |
String |
getEditHtml(FieldConfig config,
Map customFieldValuesHolder,
webwork.action.Action action,
Map displayParameters,
FieldLayoutItem fieldLayoutItem)
Used during editing default value to render field.
|
String |
getViewHtml(FieldConfig fieldConfig,
FieldLayoutItem fieldLayoutItem)
Gets view html used on
ConfigureCustomField page (manage field contexts)
to display field configuration items for "default value". |
boolean |
isSupport()
Returns true if default values are supported, false otherwise.
|
void |
populateDefaults(FieldConfig fieldConfig,
Map<String,Object> fieldValuesHolder)
Populate the
fieldValuesHolder with a value that should be shown by default when the edit default value page is shown. |
void |
setDefaultValue(FieldConfig fieldConfig,
T value)
Sets the default value for a FieldConfig
|
void |
validateFromActionParams(FieldConfig config,
Map actionParameters,
ErrorCollection errorCollection)
Validate action parameters prior to saving default value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
notSupported
public DefaultValueOperationsCF(@Nonnull CustomFieldType<T,?> customFieldType)
@Nullable public T getDefaultValue(@Nonnull FieldConfig fieldConfig)
DefaultValueOperations
FieldConfig
.getDefaultValue
in interface DefaultValueOperations<T>
fieldConfig
- for default valueCustomFieldType.getDefaultValue(com.atlassian.jira.issue.fields.config.FieldConfig)
,
FieldConfig
public void setDefaultValue(@Nonnull FieldConfig fieldConfig, @Nullable T value)
DefaultValueOperations
setDefaultValue
in interface DefaultValueOperations<T>
fieldConfig
- for which the default is being storedvalue
- Transport Object representing the value instance of the CustomFieldEditCustomFieldDefaults.doExecute()
,
CustomFieldType.setDefaultValue(com.atlassian.jira.issue.fields.config.FieldConfig, java.lang.Object)
,
FieldConfig
public void populateDefaults(@Nonnull FieldConfig fieldConfig, @Nonnull Map<String,Object> fieldValuesHolder)
DefaultValueOperations
fieldValuesHolder
with a value that should be shown by default when the edit default value page is shown.
Used together with DefaultValueOperations.getEditHtml(FieldConfig, Map, Action, Map, FieldLayoutItem)
}populateDefaults
in interface DefaultValueOperations<T>
DefaultValueOperations.getEditHtml(FieldConfig, Map, Action, Map, FieldLayoutItem)
,
EditCustomFieldDefaults.getCustomFieldHtml()
public void validateFromActionParams(@Nonnull FieldConfig config, @Nonnull Map actionParameters, @Nonnull ErrorCollection errorCollection)
DefaultValueOperations
public String getViewHtml(@Nonnull FieldConfig fieldConfig, @Nullable FieldLayoutItem fieldLayoutItem)
DefaultValueOperations
ConfigureCustomField
page (manage field contexts)
to display field configuration items for "default value".getViewHtml
in interface DefaultValueOperations<T>
FieldConfigItemImpl.getViewHtml(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem)
,
FieldConfigItemType.getViewHtml(com.atlassian.jira.issue.fields.config.FieldConfig, com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem)
,
DefaultValueConfigItem.getViewHtml(com.atlassian.jira.issue.fields.config.FieldConfig, com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem)
,
DefaultValueConfigItem.getViewHtml(com.atlassian.jira.issue.fields.config.FieldConfig, com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem)
,
CustomFieldTypeModuleDescriptor.getDefaultViewHtml(com.atlassian.jira.issue.fields.config.FieldConfig, com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem)
public String getEditHtml(@Nonnull FieldConfig config, @Nonnull Map customFieldValuesHolder, webwork.action.Action action, Map displayParameters, FieldLayoutItem fieldLayoutItem)
DefaultValueOperations
DefaultValueOperations.populateDefaults(FieldConfig, Map)
called prior to this method.getEditHtml
in interface DefaultValueOperations<T>
DefaultValueOperations.populateDefaults(FieldConfig, Map)
,
EditCustomFieldDefaults.getCustomFieldHtml()
public boolean isSupport()
DefaultValueOperations
isSupport
in interface DefaultValueOperations<T>
Copyright © 2002-2021 Atlassian. All Rights Reserved.