@PublicApi public interface

FieldLayout

com.atlassian.jira.issue.fields.layout.field.FieldLayout
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

NOTE: This is referred to as Field Configuration in the UI.

Summary

Public Methods
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.
GenericValue getGenericValue()
The generic value which represents this field configuration.
List<Field> getHiddenFields(User remoteUser, GenericValue project, List<String> issueTypeIds)
This method is deprecated. Use getHiddenFields(com.atlassian.jira.project.Project, java.util.List). Since v4.3
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).
List<Field> getHiddenFields(User remoteUser, Project project, List<String> issueTypeIds)
This method is deprecated. Use getHiddenFields(com.atlassian.jira.project.Project, java.util.List). Since v4.3
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.
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(User remoteUser, Project project, List<String> issueTypes)
This method is deprecated. Use getVisibleLayoutItems(com.atlassian.jira.project.Project, java.util.List) instead. Since v6.2.
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).
boolean isDefault()
Returns true if this is the default FieldLayout.
boolean isFieldHidden(String fieldId)
Checks if a field is hidden in this field configuration.

Public Methods

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 GenericValue getGenericValue ()

The generic value which represents this field configuration.

Returns
  • the generic value

public List<Field> getHiddenFields (User remoteUser, GenericValue project, List<String> issueTypeIds)

This method is deprecated.
Use getHiddenFields(com.atlassian.jira.project.Project, java.util.List). Since v4.3

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 List<Field> getHiddenFields (User remoteUser, Project project, List<String> issueTypeIds)

This method is deprecated.
Use getHiddenFields(com.atlassian.jira.project.Project, java.util.List). Since v4.3

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 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 (User remoteUser, Project project, List<String> issueTypes)

This method is deprecated.
Use getVisibleLayoutItems(com.atlassian.jira.project.Project, java.util.List) instead. Since v6.2.

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 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 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.