|
||||||||||
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)
Associates a FieldLayoutScheme to the project supplied. |
FieldLayoutScheme |
createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Persists a new field Layout scheme (i.e Field Configuration Scheme). |
void |
createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Persists a new FieldLayoutSchemeEntity for a particular FieldLayoutScheme . |
void |
deleteFieldLayout(FieldLayout fieldLayout)
Deletes a custom FieldLayout
NOTE: This is an enterprise ONLY feature. |
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
NOTE: This is an enterprise ONLY feature. |
FieldConfigurationScheme |
getFieldConfigurationScheme(Project project)
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(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 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)
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 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)
NOTE: This is an enterprise ONLY feature. |
void |
removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Removes a FieldLayoutSchemeEntity
NOTE: This is an enterprise ONLY feature. |
void |
removeSchemeAssociation(org.ofbiz.core.entity.GenericValue 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. |
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 editionFieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
FieldConfigurationScheme
by id
NOTE: This is an enterprise ONLY feature.
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.
NOTE: This is an enterprise ONLY feature.
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 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.
NOTE: This is an enterprise ONLY feature.
fieldLayoutScheme
- The FieldLayoutScheme
DataAccessException
- If there is a Data Layer error.
UnsupportedOperationException
- If this is executed against standard editionvoid deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutScheme
supplied.
NOTE: This is an enterprise ONLY feature.
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 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.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)
FieldLayoutScheme
to the project supplied.
NOTE: This is an enterprise ONLY feature.
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.void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project, Long fieldLayoutSchemeId)
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.FieldLayout 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 project GenericValue
issueTypeId
- 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.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.
NOTE: This is an enterprise ONLY feature.
fieldLayoutScheme
- the FieldLayoutScheme
GenericValue
s
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.
NOTE: This is an enterprise ONLY feature.
id
- If the id is NULL, the default layout is returned.
EditableFieldLayout
UnsupportedOperationException
- If this is executed against standard editionvoid deleteFieldLayout(FieldLayout fieldLayout)
FieldLayout
NOTE: This is an enterprise ONLY feature.
fieldLayout
- The FieldLayout
UnsupportedOperationException
- 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.
NOTE: This is an enterprise ONLY feature.
fieldLayoutScheme
- The FieldLayoutScheme
FieldLayoutSchemeEntity
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()
NOTE: This is an enterprise ONLY feature.
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntity
UnsupportedOperationException
- If this is executed against standard editionvoid updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutSchemeEntity
.
NOTE: This is an enterprise ONLY feature.
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntity
UnsupportedOperationException
- If this is executed against standard editionvoid removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutSchemeEntity
NOTE: This is an enterprise ONLY feature.
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)
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.
NOTE: This is an enterprise ONLY feature.
fieldLayout
- The FieldLayout.
FieldConfigurationScheme
s
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)
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 scheme
DataAccessException
- 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 system
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |