public class

FieldLayoutImpl

extends AbstractGVBean
implements FieldLayout
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.screen.AbstractGVBean
     ↳ com.atlassian.jira.issue.fields.layout.field.FieldLayoutImpl
Known Direct Subclasses
Known Indirect Subclasses

Summary

Fields
protected Map<StringFieldLayoutItem> fieldLayoutItemByFieldId
Public Constructors
FieldLayoutImpl(GenericValue genericValue, List<FieldLayoutItem> fieldLayoutItems)
Public Methods
boolean equals(Object o)
String getDescription()
The description of the field configuration.
FieldLayoutItem getFieldLayoutItem(OrderableField orderableField)
Returns the field layout item for a given orderable field, if this orderable field is part of this field configuration.
FieldLayoutItem getFieldLayoutItem(String fieldId)
Returns the field layout item for a given field if, if this field is part of this field configuration.
List<FieldLayoutItem> getFieldLayoutItems()
A list of field layout item of this field configuration.
List<Field> getHiddenFields(Project project, List<String> issueTypeIds)
Returns all hidden fields (system fields and custom fields) for a given project and issue type(s).
Long getId()
The id of the field configuration.
String getName()
The name of the field configuration
String getRendererTypeForField(String fieldId)
Returns the render type for a given field in this field configuration.
List<FieldLayoutItem> getRequiredFieldLayoutItems(Project project, List<String> issueTypes)
Returns the list of required fields for an issue type in a project.
String getType()
List<FieldLayoutItem> getVisibleCustomFieldLayoutItems(Project project, List<String> issueTypes)
Returns the list of Custom Fields in this Field Layout that are both visible and applicable to the given context (of project and Issue types).
List<FieldLayoutItem> getVisibleLayoutItems(Project project, List<String> issueTypes)
Returns all visible field layout items (system fields and custom fields) for a given project and issue type(s).
List<FieldLayoutItem> getVisibleLayoutItems(ApplicationUser remoteUser, Project project, List<String> issueTypes)
Returns all visible field layout items (system fields and custom fields) for a given project and issue type(s).
int hashCode()
boolean isDefault()
Returns true if this is the default FieldLayout.
boolean isFieldHidden(String fieldId)
Checks if a field is hidden in this field configuration.
Protected Methods
FieldManager getFieldManager()
HackyFieldRendererRegistry getHackyFieldRendererRegistry()
List<FieldLayoutItem> getInternalList()
void init()
void setId(Long id)
void setInternalDescription(String description)
void setInternalName(String name)
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.fields.screen.AbstractGVBean
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.layout.field.FieldLayout

Fields

protected Map<StringFieldLayoutItem> fieldLayoutItemByFieldId

Public Constructors

public FieldLayoutImpl (GenericValue genericValue, List<FieldLayoutItem> fieldLayoutItems)

Public Methods

public boolean equals (Object o)

public String getDescription ()

The description of the field configuration.

Returns
  • the description

public FieldLayoutItem getFieldLayoutItem (OrderableField orderableField)

Returns the field layout item for a given orderable field, if this orderable field is part of this field configuration.

Parameters
orderableField the orderable field to find in this field configuration.
Returns
  • the field layout item if this field is part of this field configuration, otherwise null.

public FieldLayoutItem getFieldLayoutItem (String fieldId)

Returns the field layout item for a given field if, if this field is part of this field configuration.

Parameters
fieldId the id of the field.
Returns
  • the field layout item if this field is part of this field configuration, otherwise null.

public List<FieldLayoutItem> getFieldLayoutItems ()

A list of field layout item of this field configuration.

Returns
  • a list of field layout items of this field configuration.

public List<Field> getHiddenFields (Project project, List<String> issueTypeIds)

Returns all hidden fields (system fields and custom fields) for a given project and issue type(s).

Parameters
project the project
issueTypeIds issueTypes a list of issue types to use when checking for HIDDEN CUSTOM FIELDS.
Returns
  • all hidden fields (system fields and custom fields).

public Long getId ()

The id of the field configuration.

Returns
  • the id

public String getName ()

The name of the field configuration

Returns
  • the name

public String getRendererTypeForField (String fieldId)

Returns the render type for a given field in this field configuration.

Parameters
fieldId the id of the field.
Returns
  • the type of the renderer e.g. DefaultTextRenderer.RENDERER_TYPE ("jira-text-renderer")

public List<FieldLayoutItem> getRequiredFieldLayoutItems (Project project, List<String> issueTypes)

Returns the list of required fields for an issue type in a project.

Parameters
project the project
issueTypes the issue type.
Returns
  • the list of required fields. System fields and custom fields.

public String getType ()

public List<FieldLayoutItem> getVisibleCustomFieldLayoutItems (Project project, List<String> issueTypes)

Returns the list of Custom Fields in this Field Layout that are both visible and applicable to the given context (of project and Issue types).

Parameters
project The project context
issueTypes The Issue Types for context
Returns
  • the list of visible Custom Fields applicable to the given context (of project and Issue types).

public List<FieldLayoutItem> getVisibleLayoutItems (Project project, List<String> issueTypes)

Returns all visible field layout items (system fields and custom fields) for a given project and issue type(s).

Parameters
project the project
issueTypes a list of issue types to use when checking for VISIBLE CUSTOM FIELDS.
Returns
  • all visible field layout items for the given project and it's issue type(s).

public List<FieldLayoutItem> getVisibleLayoutItems (ApplicationUser remoteUser, Project project, List<String> issueTypes)

Returns all visible field layout items (system fields and custom fields) for a given project and issue type(s).

Parameters
remoteUser the user TODO: User is not used! We should remove it!
project the project
issueTypes a list of issue types to use when checking for VISIBLE CUSTOM FIELDS.
Returns
  • all visible field layout items for the given project and it's issue type(s).

public int hashCode ()

public boolean isDefault ()

Returns true if this is the default FieldLayout. This means that the "type" field holds "value".

Returns
  • true if this is the default FieldLayout.

public boolean isFieldHidden (String fieldId)

Checks if a field is hidden in this field configuration.

Parameters
fieldId the field id.
Returns
  • true if the field is hidden, otherwise false.

Protected Methods

protected FieldManager getFieldManager ()

protected HackyFieldRendererRegistry getHackyFieldRendererRegistry ()

protected List<FieldLayoutItem> getInternalList ()

protected void init ()

protected void setId (Long id)

protected void setInternalDescription (String description)

protected void setInternalName (String name)