Class DefaultHackyFieldRendererRegistry
java.lang.Object
com.atlassian.jira.issue.fields.renderer.DefaultHackyFieldRendererRegistry
- All Implemented Interfaces:
HackyFieldRendererRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGiven the field, return the default renderer type that can be used to initilize the field layout item for this field.getRendererTypes(OrderableField field) The set of renderer types for the field.booleanIf this method returns true then users will be able to choose renderers in the field configuration for the field.
-
Constructor Details
-
DefaultHackyFieldRendererRegistry
public DefaultHackyFieldRendererRegistry()
-
-
Method Details
-
shouldOverrideDefaultRenderers
Description copied from interface:HackyFieldRendererRegistryIf this method returns true then users will be able to choose renderers in the field configuration for the field. The set of renders to choose from are determined by the result ofHackyFieldRendererRegistry.getRendererTypes(com.atlassian.jira.issue.fields.OrderableField)and will override any pluggable renderer types defined.Fields that don't implement the
RenderableFieldinterface (or that do but but returnfalseforRenderableField.isRenderable(), e.g., custom fields) can still return true here to signify that they should have the option to choose renderers.- Specified by:
shouldOverrideDefaultRenderersin interfaceHackyFieldRendererRegistry- Parameters:
field- the field- Returns:
- true if the field has custom renderer types
-
getRendererTypes
Description copied from interface:HackyFieldRendererRegistryThe set of renderer types for the field. Should only be used ifHackyFieldRendererRegistry.shouldOverrideDefaultRenderers(com.atlassian.jira.issue.fields.OrderableField)returns true.- Specified by:
getRendererTypesin interfaceHackyFieldRendererRegistry- Parameters:
field- the field- Returns:
- the set of renderer types, or the empty set if the field doesn't have custom renderer types defined
-
getDefaultRendererType
Description copied from interface:HackyFieldRendererRegistryGiven the field, return the default renderer type that can be used to initilize the field layout item for this field. The return value must be in the set returned byHackyFieldRendererRegistry.getRendererTypes(com.atlassian.jira.issue.fields.OrderableField). You should only call this ifHackyFieldRendererRegistry.shouldOverrideDefaultRenderers(com.atlassian.jira.issue.fields.OrderableField)returns true, otherwise this will return null.- Specified by:
getDefaultRendererTypein interfaceHackyFieldRendererRegistry- Parameters:
field- the field- Returns:
- the default renderer type or null if the field doesn't override renderers
-