|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@PublicApi public interface FieldLayoutManager
The FieldLayoutManager is responsible for managing field configurations and field configuration schemes.
| Field Summary | |
|---|---|
static String |
TYPE_DEFAULT
JIRA must have a default field layout. |
| Method Summary | |
|---|---|
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(org.ofbiz.core.entity.GenericValue project)
Deprecated. Use getFieldConfigurationScheme(com.atlassian.jira.project.Project) instead. Since v4.3 |
FieldConfigurationScheme |
getFieldConfigurationScheme(Long schemeId)
Retrieves a FieldConfigurationScheme by id |
FieldConfigurationScheme |
getFieldConfigurationScheme(Project project)
Retrieves the Field Configuration Scheme associated with the supplied project. |
Collection<FieldConfigurationScheme> |
getFieldConfigurationSchemes(FieldLayout fieldLayout)
Returns a collection of FieldConfigurationSchemes 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(org.ofbiz.core.entity.GenericValue project,
String issueTypeId)
Deprecated. Use getFieldLayout(com.atlassian.jira.project.Project, String) instead. Since v4.3 |
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(Project project,
String issueTypeId)
|
Collection<FieldLayoutSchemeEntity> |
getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
Returns a collection of FieldLayoutSchemeEntitys. |
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)
Returns all projects that use the given FieldConfigurationScheme. |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(FieldLayoutScheme fieldLayoutScheme)
Returns all associated projects for the FieldLayoutScheme supplied. |
Collection<org.ofbiz.core.entity.GenericValue> |
getRelatedProjects(FieldLayout fieldLayout)
Finds all projects that use the given FieldLayout (via the configured FieldConfigurationScheme). |
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 FieldLayoutSchemes are
"visibly equivalent". |
boolean |
isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1,
Long fieldLayoutId2)
Will determine whether or not two FieldLayouts 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. |
void |
restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
Restores the field layout associated with the provided scheme to defaults. |
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 |
updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Persists the FieldLayoutScheme supplied. |
void |
updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Updates a FieldLayoutSchemeEntity. |
| Field Detail |
|---|
static final String TYPE_DEFAULT
| Method Detail |
|---|
FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
fieldLayoutScheme - The FieldLayoutScheme to persist.
FieldLayoutScheme object
DataAccessException - If there is a Data Layer error.
UnsupportedOperationException - If this is executed against standard edition
FieldLayoutScheme createFieldLayoutScheme(@Nonnull
String name,
@Nullable
String description)
FieldLayoutScheme copyFieldLayoutScheme(@Nonnull
FieldLayoutScheme scheme,
@Nonnull
String name,
@Nullable
String description)
FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
FieldConfigurationScheme by id
schemeId - FieldConfigurationScheme ID
FieldConfigurationScheme instance
DataAccessException - 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 ID
FieldLayoutScheme instance
DataAccessException - if an error occurs in the DB layer
UnsupportedOperationException - If this is executed against standard editionboolean fieldConfigurationSchemeExists(String schemeName)
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 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 EditableDefaultFieldLayoutList<FieldLayoutScheme> getFieldLayoutSchemes()
FieldLayoutSchemes.
DataAccessException - If there is a Data Layer error.
UnsupportedOperationException - If this is executed against standard editionvoid updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutScheme supplied.
fieldLayoutScheme - The FieldLayoutScheme
DataAccessException - If there is a Data Layer error.
UnsupportedOperationException - If this is executed against standard editionvoid deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutScheme supplied.
fieldLayoutScheme - The FieldLayoutScheme
DataAccessException - If there is a Data Layer error.
UnsupportedOperationException - If this is executed against standard editionFieldConfigurationScheme getFieldConfigurationScheme(Project project)
project - A project
FieldConfigurationScheme or null if none exists.
DataAccessException - If there is a Data Layer error.
UnsupportedOperationException - If this is executed against standard edition
IllegalArgumentException - If the project supplied is null.FieldConfigurationScheme getFieldConfigurationScheme(org.ofbiz.core.entity.GenericValue project)
getFieldConfigurationScheme(com.atlassian.jira.project.Project) instead. Since v4.3
project - A project GenericValue
FieldConfigurationScheme or null if none exists.
DataAccessException - If there is a Data Layer error.
UnsupportedOperationException - If this is executed against standard edition
IllegalArgumentException - If the project supplied is null.Set<FieldLayout> getUniqueFieldLayouts(Project project)
FieldLayout's for a project.
project - a project
DataAccessException - If there is a Data Layer error.
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 GenericValuefieldLayoutSchemeId - 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.
void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
removeSchemeAssociation(com.atlassian.jira.project.Project, Long) instead. Since v5.2.
project - A project GenericValuefieldLayoutSchemeId - The fieldLayoutScheme ID
UnsupportedOperationException - If this is executed against standard edition
DataAccessException - 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 FieldLayoutScheme
IllegalArgumentException - 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(org.ofbiz.core.entity.GenericValue project,
String issueTypeId)
getFieldLayout(com.atlassian.jira.project.Project, String) instead. Since v4.3
project - the ProjectissueTypeId - The IssueType id of the issue.
FieldLayout
DataAccessException - If there is a Data Layer error.EditableDefaultFieldLayout 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.void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
scheme - A scheme GenericValue
DataAccessException - If there is a Data Layer error.
IllegalArgumentException - if the scheme passes is null.
UnsupportedOperationException - If this is executed against standard editionboolean hasDefaultFieldLayout()
FieldLayout entity with type TYPE_DEFAULT exists
FieldLayout exists, false otherwise.
DataAccessException - If there is a Data Layer error.Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldConfigurationScheme fieldConfigurationScheme)
fieldConfigurationScheme - the FieldConfigurationScheme
Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutScheme supplied.
fieldLayoutScheme - the FieldLayoutScheme
GenericValues
DataAccessException - If there is a Data Layer error.
UnsupportedOperationException - If this is executed against standard editionvoid 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 FieldLayout
UnsupportedOperationException - If this is executed against standard editionCollection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutSchemeEntitys. These are used to
record mappings from IssueType -> FieldLayout
for the FieldLayoutScheme passed in.
fieldLayoutScheme - The FieldLayoutScheme
FieldLayoutSchemeEntitys.
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 FieldLayoutSchemeEntity
UnsupportedOperationException - If this is executed against standard edition
FieldLayoutSchemeEntity createFieldLayoutSchemeEntity(FieldLayoutScheme fieldLayoutScheme,
String issueTypeId,
Long fieldConfigurationId)
FieldLayoutSchemeEntity for a particular FieldLayoutScheme.
The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme()
fieldLayoutScheme - issueTypeId - fieldConfigurationId -
UnsupportedOperationException - If this is executed against standard editionvoid updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutSchemeEntity.
fieldLayoutSchemeEntity - The FieldLayoutSchemeEntity
UnsupportedOperationException - If this is executed against standard editionvoid removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutSchemeEntity
fieldLayoutSchemeEntity - The FieldLayoutSchemeEntity
UnsupportedOperationException - If this is executed against standard editionvoid removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
fieldLayoutScheme - The FieldLayoutScheme
UnsupportedOperationException - If this is executed against standard editionCollection<FieldConfigurationScheme> getFieldConfigurationSchemes(FieldLayout fieldLayout)
FieldConfigurationSchemes that include the given FieldLayout.
This is determined by retrieving all FieldLayoutSchemeEntitys with the FieldLayout and
calculating a set of FieldConfigurationSchemes using these entities.
fieldLayout - The FieldLayout.
FieldConfigurationSchemes
UnsupportedOperationException - If this is executed against standard editionCollection<org.ofbiz.core.entity.GenericValue> getRelatedProjects(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)
FieldLayoutSchemes 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 scheme
DataAccessException - If there is a Data Layer error.
boolean isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1,
Long fieldLayoutId2)
FieldLayouts 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 system
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||