com.atlassian.jira.web.util
Class SubTaskQuickCreationConfigImpl

java.lang.Object
  extended by com.atlassian.jira.web.util.SubTaskQuickCreationConfigImpl
All Implemented Interfaces:
SubTaskQuickCreationConfig

public class SubTaskQuickCreationConfigImpl
extends Object
implements SubTaskQuickCreationConfig

Used to provide the SubTaskQuickCreationWebComponent with configuration parameters. For example, what fields should be displayed


Constructor Summary
SubTaskQuickCreationConfigImpl(ApplicationProperties applicationProperties, FieldManager fieldManager)
           
 
Method Summary
 Collection getDisplayFieldIds()
          Returns a collection of field ids taht shodu be shown on the sub task quick creation form.
 String getFieldI18nLabelKey(String fieldId)
          Returns the i18n key for the given field id if such label for such field was defined, otherwise null.
 Collection getFieldIds()
          Same as SubTaskQuickCreationConfig.getDisplayFieldIds(), only all the emty strings are stripped out of the returned collection.
 String getPreset(String fieldId)
          Returns the default field value
 Collection getPresetFieldIds()
          Returns a collection of field ids that have default values.
 String getVelocityTemplate()
          Returns the path to the template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubTaskQuickCreationConfigImpl

public SubTaskQuickCreationConfigImpl(ApplicationProperties applicationProperties,
                                      FieldManager fieldManager)
Method Detail

getDisplayFieldIds

public Collection getDisplayFieldIds()
Description copied from interface: SubTaskQuickCreationConfig
Returns a collection of field ids taht shodu be shown on the sub task quick creation form. The collection uses empty strings to denote that an empty cell should be shown instead of a field. See IssueFieldConstants for possible field ids.

Specified by:
getDisplayFieldIds in interface SubTaskQuickCreationConfig
Returns:
collection of display field ids as String objects

getFieldIds

public Collection getFieldIds()
Description copied from interface: SubTaskQuickCreationConfig
Same as SubTaskQuickCreationConfig.getDisplayFieldIds(), only all the emty strings are stripped out of the returned collection. This method is used by validation code.

Specified by:
getFieldIds in interface SubTaskQuickCreationConfig
Returns:
collection of field ids as String objects

getPresetFieldIds

public Collection getPresetFieldIds()
Description copied from interface: SubTaskQuickCreationConfig
Returns a collection of field ids that have default values.

Specified by:
getPresetFieldIds in interface SubTaskQuickCreationConfig
Returns:
a collection of field ids that have default values.

getFieldI18nLabelKey

public String getFieldI18nLabelKey(String fieldId)
Description copied from interface: SubTaskQuickCreationConfig
Returns the i18n key for the given field id if such label for such field was defined, otherwise null.

Specified by:
getFieldI18nLabelKey in interface SubTaskQuickCreationConfig
Parameters:
fieldId - field id
Returns:
the i18n key or null

getPreset

public String getPreset(String fieldId)
Description copied from interface: SubTaskQuickCreationConfig
Returns the default field value

Specified by:
getPreset in interface SubTaskQuickCreationConfig
Parameters:
fieldId - field id
Returns:
the default field value

getVelocityTemplate

public String getVelocityTemplate()
Description copied from interface: SubTaskQuickCreationConfig
Returns the path to the template. The value comes from application properties.

Specified by:
getVelocityTemplate in interface SubTaskQuickCreationConfig
Returns:
the path to the template
See Also:
APKeys.JIRA_SUBTASK_QUICKCREATE_TEMPLATE


Copyright © 2002-2012 Atlassian. All Rights Reserved.