@PublicApi
public interface FieldLayoutManager
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_DEFAULT
JIRA must have a default field layout.
|
Modifier and Type | Method and Description |
---|---|
void |
addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
Deprecated.
Use
addSchemeAssociation(com.atlassian.jira.project.Project, Long) instead. Since v5.2. |
void |
addSchemeAssociation(Project project,
Long fieldLayoutSchemeId)
Associates a
FieldLayoutScheme to the project supplied. |
FieldLayoutScheme |
copyFieldLayoutScheme(FieldLayoutScheme scheme,
String name,
String description)
Copies an existing field layout to a new one.
|
FieldLayoutScheme |
createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Persists a new field Layout scheme (i.e Field Configuration Scheme).
|
FieldLayoutScheme |
createFieldLayoutScheme(String name,
String description)
Persists a new field Layout scheme (i.e Field Configuration Scheme).
|
void |
createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Persists a new
FieldLayoutSchemeEntity for a particular FieldLayoutScheme . |
FieldLayoutSchemeEntity |
createFieldLayoutSchemeEntity(FieldLayoutScheme fieldLayoutScheme,
String issueTypeId,
Long fieldConfigurationId)
Persists a new
FieldLayoutSchemeEntity for a particular FieldLayoutScheme . |
void |
deleteFieldLayout(FieldLayout fieldLayout)
Deletes a custom
FieldLayout |
void |
deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Removes the
FieldLayoutScheme supplied. |
boolean |
fieldConfigurationSchemeExists(String schemeName)
Checks if a FieldConfigurationScheme with the given name exists.
|
EditableDefaultFieldLayout |
getEditableDefaultFieldLayout()
Returns the default
EditableDefaultFieldLayout . |
EditableFieldLayout |
getEditableFieldLayout(Long id)
Returns an
EditableFieldLayout for the id supplied. |
List<EditableFieldLayout> |
getEditableFieldLayouts()
Retrieves editable (see
EditableFieldLayout versions of the field layouts. |
FieldConfigurationScheme |
getFieldConfigurationScheme(Long schemeId)
Retrieves a
FieldConfigurationScheme by id |
FieldConfigurationScheme |
getFieldConfigurationScheme(Project project)
Retrieves the Field Configuration Scheme associated with the supplied project.
|
FieldConfigurationScheme |
getFieldConfigurationSchemeForProject(Long projectId)
Retrieves the Field Configuration Scheme associated with the supplied project.
|
Collection<FieldConfigurationScheme> |
getFieldConfigurationSchemes(FieldLayout fieldLayout)
Returns a collection of
FieldConfigurationScheme s that include the given FieldLayout . |
FieldLayout |
getFieldLayout()
Used to retrieve
FieldLayout information when rendering a screen. |
FieldLayout |
getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
Deprecated.
Use
getFieldLayout(com.atlassian.jira.issue.Issue) instead. Since v5.0. |
FieldLayout |
getFieldLayout(Issue issue)
Returns the fieldLayout for an issue.
|
FieldLayout |
getFieldLayout(Long id)
Used to retrieve
FieldLayout information when rendering a screen given the id
of the field layout. |
FieldLayout |
getFieldLayout(Long projectId,
String issueTypeId)
Find the FieldLayout for the given Project and IssueType.
|
FieldLayout |
getFieldLayout(Project project,
String issueTypeId) |
Collection<FieldLayoutSchemeEntity> |
getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
Returns a collection of
FieldLayoutSchemeEntity s. |
List<FieldLayoutScheme> |
getFieldLayoutSchemes()
Retries Field Configuration Schemes.
|
FieldLayoutScheme |
getMutableFieldLayoutScheme(Long schemeId)
Retrieves a mutable
FieldLayoutScheme by id. |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(FieldConfigurationScheme fieldConfigurationScheme)
Deprecated.
Use
getProjectsUsing(FieldConfigurationScheme) instead. Since v6.4. |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(FieldLayoutScheme fieldLayoutScheme)
Deprecated.
Use
getProjectsUsing(FieldLayoutScheme) instead. Since v6.4. |
Collection<Project> |
getProjectsUsing(FieldConfigurationScheme fieldConfigurationScheme)
Returns all projects that use the given FieldConfigurationScheme.
|
Collection<Project> |
getProjectsUsing(FieldLayout fieldLayout)
Finds all projects that use the given
FieldLayout (via the configured FieldConfigurationScheme ). |
Collection<Project> |
getProjectsUsing(FieldLayoutScheme fieldLayoutScheme)
Returns all projects that use the given FieldLayoutScheme.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getRelatedProjects(FieldLayout fieldLayout)
Deprecated.
Use
getProjectsUsing(FieldLayout) instead. Since v6.4. |
Set<FieldLayout> |
getUniqueFieldLayouts(Collection<Project> projects,
Collection<String> issueTypeIds)
Retrieves all the
FieldLayout 's for a collection of projects and issue types. |
Set<FieldLayout> |
getUniqueFieldLayouts(Project project)
Retrieves all the
FieldLayout 's for a project. |
boolean |
hasDefaultFieldLayout()
Checks to see if a
FieldLayout entity with type TYPE_DEFAULT exists |
boolean |
isFieldLayoutSchemesVisiblyEquivalent(Long fieldConfigurationSchemeId1,
Long fieldConfigurationSchemeId2)
Will determine whether or not two
FieldLayoutScheme s are
"visibly equivalent". |
boolean |
isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1,
Long fieldLayoutId2)
Will determine whether or not two
FieldLayout s are
"visibly equivalent". |
void |
refresh()
Clears all local caches.
|
void |
removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme) |
void |
removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Removes a
FieldLayoutSchemeEntity |
void |
removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
Deprecated.
Use
removeSchemeAssociation(com.atlassian.jira.project.Project, Long) instead. Since v5.2. |
void |
removeSchemeAssociation(Project project,
Long fieldLayoutSchemeId)
Removes an association between a particular project and field configuration scheme.
|
void |
restoreDefaultFieldLayout()
This method can be used to rollback any changes to the default field configuration.
|
EditableFieldLayout |
storeAndReturnEditableFieldLayout(EditableFieldLayout editableFieldLayout)
Persists the
EditableFieldLayout provided and returns a new instance as stored
in the database. |
void |
storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
Persist the given default
EditableDefaultFieldLayout |
void |
storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
Persists the
EditableFieldLayout provided. |
void |
updateFieldLayoutItemAttributesForCustomField(CustomField customField,
String description,
boolean isRequired,
boolean isHidden)
Update the
description , isHidden and isRequired columns of all the
fieldlayoutitem rows associated with this custom field. |
void |
updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Persists the
FieldLayoutScheme supplied. |
void |
updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Updates a
FieldLayoutSchemeEntity . |
static final String TYPE_DEFAULT
FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
fieldLayoutScheme
- The FieldLayoutScheme
to persist.FieldLayoutScheme
objectDataAccessException
- If there is a Data Layer error.UnsupportedOperationException
- If this is executed against standard editionFieldLayoutScheme createFieldLayoutScheme(@Nonnull String name, @Nullable String description)
FieldLayoutScheme copyFieldLayoutScheme(@Nonnull FieldLayoutScheme scheme, @Nonnull String name, @Nullable String description)
FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
FieldConfigurationScheme
by idschemeId
- FieldConfigurationScheme IDFieldConfigurationScheme
instanceDataAccessException
- If there is a DB exception.UnsupportedOperationException
- If this is executed against standard editionFieldLayoutScheme getMutableFieldLayoutScheme(Long schemeId)
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 IDFieldLayoutScheme
instanceDataAccessException
- if an error occurs in the DB layerUnsupportedOperationException
- If this is executed against standard editionboolean fieldConfigurationSchemeExists(String schemeName)
schemeName
- The scheme nametrue
if a FieldConfigurationScheme with the given name exists.DataAccessException
- If there is a DB error.UnsupportedOperationException
- If this is executed against standard editionList<EditableFieldLayout> getEditableFieldLayouts()
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
List<FieldLayoutScheme> getFieldLayoutSchemes()
FieldLayoutScheme
s.DataAccessException
- If there is a Data Layer error.UnsupportedOperationException
- If this is executed against standard editionvoid updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutScheme
supplied.fieldLayoutScheme
- The FieldLayoutSchemeDataAccessException
- If there is a Data Layer error.UnsupportedOperationException
- If this is executed against standard editionvoid deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutScheme
supplied.fieldLayoutScheme
- The FieldLayoutSchemeDataAccessException
- If there is a Data Layer error.UnsupportedOperationException
- If this is executed against standard editionFieldConfigurationScheme getFieldConfigurationScheme(Project project)
project
- A projectFieldConfigurationScheme
or null if none exists.FieldConfigurationScheme getFieldConfigurationSchemeForProject(@Nonnull Long projectId)
projectId
- The project IDFieldConfigurationScheme
or null if none exists.Set<FieldLayout> getUniqueFieldLayouts(Project project)
FieldLayout
's for a project.project
- a projectDataAccessException
- If there is a Data Layer error.@Nonnull Set<FieldLayout> getUniqueFieldLayouts(@Nonnull Collection<Project> projects, @Nonnull Collection<String> issueTypeIds)
FieldLayout
's for a collection of projects and issue types.projects
- a collection of projects.issueTypeIds
- An collection of issue type ids.void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project, Long fieldLayoutSchemeId)
addSchemeAssociation(com.atlassian.jira.project.Project, Long)
instead. Since v5.2.FieldLayoutScheme
to the project supplied.project
- A project GenericValue
fieldLayoutSchemeId
- ID of the FieldLayoutSchemeDataAccessException
- If there is an error in the DB layerUnsupportedOperationException
- If this is executed against standard editionIllegalArgumentException
- If the project supplied is null.void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project, Long fieldLayoutSchemeId)
removeSchemeAssociation(com.atlassian.jira.project.Project, Long)
instead. Since v5.2.project
- A project GenericValue
fieldLayoutSchemeId
- The fieldLayoutScheme IDUnsupportedOperationException
- If this is executed against standard editionDataAccessException
- If there is an error in the DB layer.void addSchemeAssociation(Project project, Long fieldLayoutSchemeId)
FieldLayoutScheme
to the project supplied.project
- The projectfieldLayoutSchemeId
- ID of the FieldLayoutSchemeIllegalArgumentException
- If the project supplied is null.void removeSchemeAssociation(Project project, Long fieldLayoutSchemeId)
project
- The projectfieldLayoutSchemeId
- The fieldLayoutScheme IDFieldLayout getFieldLayout()
FieldLayout
information when rendering a screen.DataAccessException
- If there is a Data Layer error.FieldLayout getFieldLayout(Long id)
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 editionFieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
getFieldLayout(com.atlassian.jira.issue.Issue)
instead. Since v5.0.issue
- An issue GenericValue
FieldLayout
DataAccessException
- If there is a Data Layer error.FieldLayout getFieldLayout(Issue issue)
issue
- An Issue
FieldLayout
FieldLayout getFieldLayout(Project project, String issueTypeId)
project
- A projectissueTypeId
- The IssueType id of the issue.FieldLayout
DataAccessException
- If there is a Data Layer error.getFieldLayout(Issue)
FieldLayout getFieldLayout(@Nonnull Long projectId, @Nonnull String issueTypeId)
projectId
- the projectissueTypeId
- the issue typeEditableDefaultFieldLayout getEditableDefaultFieldLayout()
EditableDefaultFieldLayout
.EditableDefaultFieldLayout
.DataAccessException
- If there is a Data Layer error.void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
EditableDefaultFieldLayout
editableDefaultFieldLayout
- The EditableDefaultFieldLayout.DataAccessException
- If there is a Data Layer error.void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
EditableFieldLayout
provided.editableFieldLayout
- the EditableFieldLayout.DataAccessException
- If there is a Data Layer error.EditableFieldLayout storeAndReturnEditableFieldLayout(EditableFieldLayout editableFieldLayout)
EditableFieldLayout
provided and returns a new instance as stored
in the database.editableFieldLayout
- the EditableFieldLayout.DataAccessException
- If there is a Data Layer error.void restoreDefaultFieldLayout()
DataAccessException
- If there is a Data Layer error.boolean hasDefaultFieldLayout()
FieldLayout
entity with type TYPE_DEFAULT
existsFieldLayout
exists, false otherwise.DataAccessException
- If there is a Data Layer error.Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldConfigurationScheme fieldConfigurationScheme)
getProjectsUsing(FieldConfigurationScheme)
instead. Since v6.4.fieldConfigurationScheme
- the FieldConfigurationSchemeCollection<Project> getProjectsUsing(FieldConfigurationScheme fieldConfigurationScheme)
fieldConfigurationScheme
- the FieldConfigurationSchemeCollection<org.ofbiz.core.entity.GenericValue> getProjects(FieldLayoutScheme fieldLayoutScheme)
getProjectsUsing(FieldLayoutScheme)
instead. Since v6.4.FieldLayoutScheme
supplied.fieldLayoutScheme
- the FieldLayoutSchemeGenericValue
sDataAccessException
- If there is a Data Layer error.UnsupportedOperationException
- If this is executed against standard editionCollection<Project> getProjectsUsing(FieldLayoutScheme fieldLayoutScheme)
fieldLayoutScheme
- the FieldLayoutSchemevoid refresh()
EditableFieldLayout getEditableFieldLayout(Long id)
EditableFieldLayout
for the id supplied.id
- If the id is NULL, the default layout is returned.EditableFieldLayout
UnsupportedOperationException
- If this is executed against standard editionvoid deleteFieldLayout(FieldLayout fieldLayout)
FieldLayout
fieldLayout
- The FieldLayoutUnsupportedOperationException
- If this is executed against standard editionCollection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutSchemeEntity
s. These are used to
record mappings from IssueType
-> FieldLayout
for the FieldLayoutScheme
passed in.fieldLayoutScheme
- The FieldLayoutSchemeFieldLayoutSchemeEntity
s.UnsupportedOperationException
- If this is executed against standard editionvoid createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutSchemeEntity
for a particular FieldLayoutScheme
.
The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme()
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntityUnsupportedOperationException
- If this is executed against standard editionFieldLayoutSchemeEntity createFieldLayoutSchemeEntity(FieldLayoutScheme fieldLayoutScheme, String issueTypeId, Long fieldConfigurationId)
FieldLayoutSchemeEntity
for a particular FieldLayoutScheme
.
The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme()
fieldLayoutScheme
- the FieldLayoutSchemeissueTypeId
- the Issue TypefieldConfigurationId
- the FieldConfigUnsupportedOperationException
- If this is executed against standard editionvoid updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutSchemeEntity
.fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntityUnsupportedOperationException
- If this is executed against standard editionvoid removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutSchemeEntity
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntityUnsupportedOperationException
- If this is executed against standard editionvoid removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
fieldLayoutScheme
- The FieldLayoutSchemeUnsupportedOperationException
- If this is executed against standard editionCollection<FieldConfigurationScheme> getFieldConfigurationSchemes(FieldLayout fieldLayout)
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 editionCollection<org.ofbiz.core.entity.GenericValue> getRelatedProjects(FieldLayout fieldLayout)
getProjectsUsing(FieldLayout)
instead. Since v6.4.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.Collection<Project> getProjectsUsing(FieldLayout fieldLayout)
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.boolean isFieldLayoutSchemesVisiblyEquivalent(Long fieldConfigurationSchemeId1, Long fieldConfigurationSchemeId2)
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 schemefieldConfigurationSchemeId2
- the second scheme; can use null
for the system default schemeDataAccessException
- If there is a Data Layer error.boolean isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1, Long fieldLayoutId2)
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 systemfieldLayoutId2
- the second layout id; null signifies the default field layout in the systemvoid updateFieldLayoutItemAttributesForCustomField(@Nonnull CustomField customField, @Nonnull String description, boolean isRequired, boolean isHidden)
description
, isHidden
and isRequired
columns of all the
fieldlayoutitem
rows associated with this custom field.customField
- a CustomField which owns the affected fieldlayoutitemsdescription
- a String containing the new descriptionisRequired
- a boolean containing the new valueisHidden
- a boolean containing the new value.Copyright © 2002-2017 Atlassian. All Rights Reserved.