com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager |
![]() |
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).
@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).
The FieldLayoutManager is responsible for managing field configurations and field configuration schemes.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | TYPE_DEFAULT | JIRA must have a default field layout. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Associates a
FieldLayoutScheme to the project supplied. | |||||||||||
This method is deprecated.
Use
addSchemeAssociation(com.atlassian.jira.project.Project, Long) instead. Since v5.2.
| |||||||||||
Copies an existing field layout to a new one.
| |||||||||||
Persists a new field Layout scheme (i.e Field Configuration Scheme).
| |||||||||||
Persists a new field Layout scheme (i.e Field Configuration Scheme).
| |||||||||||
Persists a new
FieldLayoutSchemeEntity for a particular FieldLayoutScheme . | |||||||||||
Persists a new
FieldLayoutSchemeEntity for a particular FieldLayoutScheme . | |||||||||||
Deletes a custom
FieldLayout | |||||||||||
Removes the
FieldLayoutScheme supplied. | |||||||||||
Checks if a FieldConfigurationScheme with the given name exists.
| |||||||||||
Returns the default
EditableDefaultFieldLayout . | |||||||||||
Returns an
EditableFieldLayout for the id supplied. | |||||||||||
Retrieves editable (see
EditableFieldLayout versions of the field layouts. | |||||||||||
Retrieves the Field Configuration Scheme associated with the supplied project.
| |||||||||||
Retrieves a
FieldConfigurationScheme by id | |||||||||||
Retrieves the Field Configuration Scheme associated with the supplied project.
| |||||||||||
Returns a collection of
FieldConfigurationScheme s that include the given FieldLayout . | |||||||||||
Used to retrieve
FieldLayout information when rendering a screen. | |||||||||||
This method is deprecated.
Use
getFieldLayout(com.atlassian.jira.issue.Issue) instead. Since v5.0.
| |||||||||||
Used to retrieve
FieldLayout information when rendering a screen given the id
of the field layout. | |||||||||||
Find the FieldLayout for the given Project and IssueType.
| |||||||||||
Returns the fieldLayout for an issue.
| |||||||||||
Returns a collection of
FieldLayoutSchemeEntity s. | |||||||||||
Retries Field Configuration Schemes.
| |||||||||||
Retrieves a mutable
FieldLayoutScheme by id. | |||||||||||
This method is deprecated.
Use
getProjectsUsing(FieldConfigurationScheme) instead. Since v6.4.
| |||||||||||
This method is deprecated.
Use
getProjectsUsing(FieldLayoutScheme) instead. Since v6.4.
| |||||||||||
Finds all projects that use the given
FieldLayout (via the configured FieldConfigurationScheme ). | |||||||||||
Returns all projects that use the given FieldConfigurationScheme.
| |||||||||||
Returns all projects that use the given FieldLayoutScheme.
| |||||||||||
This method is deprecated.
Use
getProjectsUsing(FieldLayout) instead. Since v6.4.
| |||||||||||
Retrieves all the
FieldLayout 's for a project. | |||||||||||
Retrieves all the
FieldLayout 's for a collection of projects and issue types. | |||||||||||
Checks to see if a
FieldLayout entity with type TYPE_DEFAULT exists | |||||||||||
Will determine whether or not two
FieldLayoutScheme s are
"visibly equivalent". | |||||||||||
Will determine whether or not two
FieldLayout s are
"visibly equivalent". | |||||||||||
Clears all local caches.
| |||||||||||
Removes a
FieldLayoutSchemeEntity | |||||||||||
Removes an association between a particular project and field configuration scheme.
| |||||||||||
This method is deprecated.
Use
removeSchemeAssociation(com.atlassian.jira.project.Project, Long) instead. Since v5.2.
| |||||||||||
This method can be used to rollback any changes to the default field configuration.
| |||||||||||
Persists the
EditableFieldLayout provided and returns a new instance as stored
in the database. | |||||||||||
Persist the given default
EditableDefaultFieldLayout | |||||||||||
Persists the
EditableFieldLayout provided. | |||||||||||
Persists the
FieldLayoutScheme supplied. | |||||||||||
Updates a
FieldLayoutSchemeEntity . |
JIRA must have a default field layout. This is used identify the default layout.
Associates a FieldLayoutScheme
to the project supplied.
project | The project |
---|---|
fieldLayoutSchemeId | ID of the FieldLayoutScheme |
IllegalArgumentException | If the project supplied is null. |
---|
This method is deprecated.
Use addSchemeAssociation(com.atlassian.jira.project.Project, Long)
instead. Since v5.2.
Associates a FieldLayoutScheme
to the project supplied.
project | A project GenericValue |
---|---|
fieldLayoutSchemeId | ID of the FieldLayoutScheme |
DataAccessException | If there is an error in the DB layer |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
IllegalArgumentException | If the project supplied is null. |
Copies an existing field layout to a new one.
Persists a new field Layout scheme (i.e Field Configuration Scheme).
Persists a new field Layout scheme (i.e Field Configuration Scheme).
fieldLayoutScheme | The FieldLayoutScheme to persist. |
---|
FieldLayoutScheme
objectDataAccessException | If there is a Data Layer error. |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
Persists a new FieldLayoutSchemeEntity
for a particular FieldLayoutScheme
.
The appropriate scheme is retrieved using getFieldLayoutScheme()
fieldLayoutSchemeEntity | The FieldLayoutSchemeEntity |
---|
UnsupportedOperationException | If this is executed against standard edition |
---|
Persists a new FieldLayoutSchemeEntity
for a particular FieldLayoutScheme
.
The appropriate scheme is retrieved using getFieldLayoutScheme()
fieldLayoutScheme | the FieldLayoutScheme |
---|---|
issueTypeId | the Issue Type |
fieldConfigurationId | the FieldConfig |
UnsupportedOperationException | If this is executed against standard edition |
---|
Deletes a custom FieldLayout
fieldLayout | The FieldLayout |
---|
UnsupportedOperationException | If this is executed against standard edition |
---|
Removes the FieldLayoutScheme
supplied.
fieldLayoutScheme | The FieldLayoutScheme |
---|
DataAccessException | If there is a Data Layer error. |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
Checks if a FieldConfigurationScheme with the given name exists.
schemeName | The scheme name |
---|
true
if a FieldConfigurationScheme with the given name exists.DataAccessException | If there is a DB error. |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
Returns the default EditableDefaultFieldLayout
.
EditableDefaultFieldLayout
.DataAccessException | If there is a Data Layer error. |
---|
Returns an EditableFieldLayout
for the id supplied.
id | If the id is NULL, the default layout is returned. |
---|
UnsupportedOperationException | If this is executed against standard edition |
---|
Retrieves editable (see EditableFieldLayout
versions of the field layouts.
Note: For standard edition this simply returns an editable version of the default field
layout. (see EditableDefaultFieldLayout
)
EditableFieldLayout
and EditableDefaultFieldLayout
Retrieves the Field Configuration Scheme associated with the supplied project.
project | A project |
---|
FieldConfigurationScheme
or null if none exists.
Retrieves a FieldConfigurationScheme
by id
schemeId | FieldConfigurationScheme ID |
---|
FieldConfigurationScheme
instanceDataAccessException | If there is a DB exception. |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
Retrieves the Field Configuration Scheme associated with the supplied project.
projectId | The project ID |
---|
FieldConfigurationScheme
or null if none exists.Returns a collection of FieldConfigurationScheme
s that include the given FieldLayout
.
This is determined by retrieving all FieldLayoutSchemeEntity
s with the FieldLayout
and
calculating a set of FieldConfigurationScheme
s using these entities.
fieldLayout | The FieldLayout. |
---|
FieldConfigurationScheme
sUnsupportedOperationException | If this is executed against standard edition |
---|
project | A project |
---|---|
issueTypeId | The IssueType id of the issue. |
DataAccessException | If there is a Data Layer error. |
---|
Used to retrieve FieldLayout
information when rendering a screen.
DataAccessException | If there is a Data Layer error. |
---|
This method is deprecated.
Use getFieldLayout(com.atlassian.jira.issue.Issue)
instead. Since v5.0.
Returns the fieldLayout for an issue.
issue | An issue GenericValue |
---|
DataAccessException | If there is a Data Layer error. |
---|
Used to retrieve FieldLayout
information when rendering a screen given the id
of the field layout. If the ID is null, the default layout is returned.
id | The FieldLayout ID. |
---|
FieldLayout
UnsupportedOperationException | If this is executed against standard edition |
---|
Find the FieldLayout for the given Project and IssueType.
projectId | the project |
---|---|
issueTypeId | the issue type |
Returns a collection of FieldLayoutSchemeEntity
s. These are used to
record mappings from IssueType
-> FieldLayout
for the FieldLayoutScheme
passed in.
fieldLayoutScheme | The FieldLayoutScheme |
---|
FieldLayoutSchemeEntity
s.UnsupportedOperationException | If this is executed against standard edition |
---|
Retries Field Configuration Schemes. These are used to link field configurations to projects.
FieldLayoutScheme
s.DataAccessException | If there is a Data Layer error. |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
Retrieves a mutable FieldLayoutScheme
by id.
This returns a new copy of the object from the DB, and so will incur some performance penalty.
Please use getFieldConfigurationScheme(Long)
for access to a cached immutable scheme object.
schemeId | the scheme ID |
---|
FieldLayoutScheme
instanceDataAccessException | if an error occurs in the DB layer |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
This method is deprecated.
Use getProjectsUsing(FieldConfigurationScheme)
instead. Since v6.4.
Returns all projects that use the given FieldConfigurationScheme.
fieldConfigurationScheme | the FieldConfigurationScheme |
---|
This method is deprecated.
Use getProjectsUsing(FieldLayoutScheme)
instead. Since v6.4.
Returns all associated projects for the FieldLayoutScheme
supplied.
fieldLayoutScheme | the FieldLayoutScheme |
---|
DataAccessException | If there is a Data Layer error. |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
Finds all projects that use the given FieldLayout
(via the configured FieldConfigurationScheme
).
NOTE: In the case of Standard & Professional, this simply returns ALL projects, as the only fieldlayout is the default field layout.
fieldLayout | The FieldLayout. |
---|
Returns all projects that use the given FieldConfigurationScheme.
fieldConfigurationScheme | the FieldConfigurationScheme |
---|
Returns all projects that use the given FieldLayoutScheme.
fieldLayoutScheme | the FieldLayoutScheme |
---|
This method is deprecated.
Use getProjectsUsing(FieldLayout)
instead. Since v6.4.
Finds all projects that use the given FieldLayout
(via the configured FieldConfigurationScheme
).
NOTE: In the case of Standard & Professional, this simply returns ALL projects, as the only fieldlayout is the default field layout.
fieldLayout | The FieldLayout. |
---|
Retrieves all the FieldLayout
's for a project.
project | a project |
---|
DataAccessException | If there is a Data Layer error. |
---|
Retrieves all the FieldLayout
's for a collection of projects and issue types.
projects | a collection of projects. |
---|---|
issueTypeIds | An collection of issue type ids. |
Checks to see if a FieldLayout
entity with type TYPE_DEFAULT
exists
FieldLayout
exists, false otherwise.DataAccessException | If there is a Data Layer error. |
---|
Will determine whether or not two FieldLayoutScheme
s are
"visibly equivalent".
This can be useful for determining if swapping one field layout scheme for another in a project will have any affect on the visibility of fields in the project's issues. For instance, this will let us know if we need to re-index or not.
Since a scheme is a mapping from issue types to field layouts, two schemes are visibly equivalent if:
Note that equivalence is reflexive - all the associations in scheme1 must have equivalent associations in scheme2, and vice versa.
fieldConfigurationSchemeId1 | the first scheme; can use null for the system default scheme |
---|---|
fieldConfigurationSchemeId2 | the second scheme; can use null for the system default scheme |
DataAccessException | If there is a Data Layer error. |
---|
Will determine whether or not two FieldLayout
s are
"visibly equivalent".
This can be useful for determining if swapping one field layout for another in a project will have any affect on the visibility of fields in the project's issues. For instance, this will let us know if we need to re-index or not.
Two field layouts are visibly equivalent if:
fieldLayoutId1 | the first layout id; null signifies the default field layout in the system |
---|---|
fieldLayoutId2 | the second layout id; null signifies the default field layout in the system |
Clears all local caches.
fieldLayoutScheme | The FieldLayoutScheme |
---|
UnsupportedOperationException | If this is executed against standard edition |
---|
Removes a FieldLayoutSchemeEntity
fieldLayoutSchemeEntity | The FieldLayoutSchemeEntity |
---|
UnsupportedOperationException | If this is executed against standard edition |
---|
Removes an association between a particular project and field configuration scheme.
project | The project |
---|---|
fieldLayoutSchemeId | The fieldLayoutScheme ID |
This method is deprecated.
Use removeSchemeAssociation(com.atlassian.jira.project.Project, Long)
instead. Since v5.2.
Removes an association between a particular project and field configuration scheme.
project | A project GenericValue |
---|---|
fieldLayoutSchemeId | The fieldLayoutScheme ID |
UnsupportedOperationException | If this is executed against standard edition |
---|---|
DataAccessException | If there is an error in the DB layer. |
This method can be used to rollback any changes to the default field configuration.
DataAccessException | If there is a Data Layer error. |
---|
Persists the EditableFieldLayout
provided and returns a new instance as stored
in the database.
editableFieldLayout | the EditableFieldLayout. |
---|
DataAccessException | If there is a Data Layer error. |
---|
Persist the given default EditableDefaultFieldLayout
editableDefaultFieldLayout | The EditableDefaultFieldLayout. |
---|
DataAccessException | If there is a Data Layer error. |
---|
Persists the EditableFieldLayout
provided.
editableFieldLayout | the EditableFieldLayout. |
---|
DataAccessException | If there is a Data Layer error. |
---|
Persists the FieldLayoutScheme
supplied.
fieldLayoutScheme | The FieldLayoutScheme |
---|
DataAccessException | If there is a Data Layer error. |
---|---|
UnsupportedOperationException | If this is executed against standard edition |
Updates a FieldLayoutSchemeEntity
.
fieldLayoutSchemeEntity | The FieldLayoutSchemeEntity |
---|
UnsupportedOperationException | If this is executed against standard edition |
---|