com.atlassian.jira.issue.fields.renderer
Class DefaultHackyFieldRendererRegistry
java.lang.Object
com.atlassian.jira.issue.fields.renderer.DefaultHackyFieldRendererRegistry
- All Implemented Interfaces:
- HackyFieldRendererRegistry
public class DefaultHackyFieldRendererRegistry
- extends Object
- implements HackyFieldRendererRegistry
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultHackyFieldRendererRegistry
public DefaultHackyFieldRendererRegistry()
shouldOverrideDefaultRenderers
public boolean shouldOverrideDefaultRenderers(OrderableField field)
- Description copied from interface:
HackyFieldRendererRegistry
- If 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 of
HackyFieldRendererRegistry.getRendererTypes(com.atlassian.jira.issue.fields.OrderableField)
and will override any pluggable renderer types defined.
Fields that don't implement the RenderableField
interface (or that do but but return false
for RenderableField.isRenderable()
, e.g., custom
fields) can still return true here to signify that they should have the option to choose renderers.
- Specified by:
shouldOverrideDefaultRenderers
in interface HackyFieldRendererRegistry
- Parameters:
field
- the field
- Returns:
- true if the field has custom renderer types
getRendererTypes
public Set<HackyRendererType> getRendererTypes(OrderableField field)
- Description copied from interface:
HackyFieldRendererRegistry
- The set of renderer types for the field. Should only be used if
HackyFieldRendererRegistry.shouldOverrideDefaultRenderers(com.atlassian.jira.issue.fields.OrderableField)
returns true.
- Specified by:
getRendererTypes
in interface HackyFieldRendererRegistry
- 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
public HackyRendererType getDefaultRendererType(OrderableField field)
- Description copied from interface:
HackyFieldRendererRegistry
- Given 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 by
HackyFieldRendererRegistry.getRendererTypes(com.atlassian.jira.issue.fields.OrderableField)
.
You should only call this if HackyFieldRendererRegistry.shouldOverrideDefaultRenderers(com.atlassian.jira.issue.fields.OrderableField)
returns true, otherwise
this will return null.
- Specified by:
getDefaultRendererType
in interface HackyFieldRendererRegistry
- Parameters:
field
- the field
- Returns:
- the default renderer type or null if the field doesn't override renderers
Copyright © 2002-2013 Atlassian. All Rights Reserved.