|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.issue.fields.layout.field.AbstractFieldLayoutManager
com.atlassian.jira.issue.fields.layout.field.DefaultFieldLayoutManager
public class DefaultFieldLayoutManager
| Field Summary |
|---|
| Fields inherited from class com.atlassian.jira.issue.fields.layout.field.AbstractFieldLayoutManager |
|---|
ofBizDelegator, SCHEME, SCHEME_ASSOCIATION |
| Fields inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager |
|---|
TYPE_DEFAULT |
| Constructor Summary | |
|---|---|
DefaultFieldLayoutManager(FieldManager fieldManager,
OfBizDelegator ofBizDelegator,
ConstantsManager constantsManager,
SubTaskManager subTaskManager,
ProjectManager projectManager,
I18nHelper.BeanFactory i18n,
NodeAssociationStore nodeAssociationStore)
|
|
| Method Summary | |
|---|---|
void |
addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
Associates a FieldLayoutScheme to the project supplied. |
void |
addSchemeAssociation(Project project,
Long fieldLayoutSchemeId)
Associates a FieldLayoutScheme to the project supplied. |
protected void |
clearCaches()
|
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 |
void |
deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Removes the FieldLayoutScheme supplied. |
boolean |
fieldConfigurationSchemeExists(String schemeName)
Checks if a FieldConfigurationScheme with the given name exists. |
protected List<String> |
getAllRelevantIssueTypeIds()
|
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)
Retrieves the Field Configuration Scheme associated with the supplied project. |
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(org.ofbiz.core.entity.GenericValue issue)
Returns the fieldLayout for an issue. |
FieldLayout |
getFieldLayout(org.ofbiz.core.entity.GenericValue project,
String issueTypeId)
|
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 |
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 |
onClearCache(ClearCacheEvent event)
|
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)
Removes an association between a particular project and field configuration scheme. |
void |
removeSchemeAssociation(Project project,
Long fieldLayoutSchemeId)
Removes an association between a particular project and field configuration scheme. |
void |
restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
Restores the field layout associated with the provided scheme to defaults. |
void |
updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Persists the FieldLayoutScheme supplied. |
void |
updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Updates a FieldLayoutSchemeEntity. |
| Methods inherited from class com.atlassian.jira.issue.fields.layout.field.AbstractFieldLayoutManager |
|---|
getDefaultDescription, getDefaultFieldLayoutItems, getEditableDefaultFieldLayout, getFieldLayout, getFieldLayout, getI18nHelper, getRelevantFieldLayout, hasDefaultFieldLayout, onCustomFieldUpdated, refreshCaches, restoreDefaultFieldLayout, restoreFieldLayout, start, storeAndReturnEditableFieldLayout, storeEditableDefaultFieldLayout, storeEditableFieldLayout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager |
|---|
getEditableDefaultFieldLayout, getFieldLayout, getFieldLayout, hasDefaultFieldLayout, restoreDefaultFieldLayout, storeAndReturnEditableFieldLayout, storeEditableDefaultFieldLayout, storeEditableFieldLayout |
| Constructor Detail |
|---|
public DefaultFieldLayoutManager(FieldManager fieldManager,
OfBizDelegator ofBizDelegator,
ConstantsManager constantsManager,
SubTaskManager subTaskManager,
ProjectManager projectManager,
I18nHelper.BeanFactory i18n,
NodeAssociationStore nodeAssociationStore)
| Method Detail |
|---|
@EventListener public void onClearCache(ClearCacheEvent event)
public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
FieldLayoutManager
getFieldLayout in interface FieldLayoutManagergetFieldLayout in class AbstractFieldLayoutManagerissue - An issue GenericValue
FieldLayout
public FieldLayout getFieldLayout(Project project,
String issueTypeId)
getFieldLayout in interface FieldLayoutManagergetFieldLayout in class AbstractFieldLayoutManagerproject - A projectissueTypeId - The IssueType id of the issue.
FieldLayoutFieldLayoutManager.getFieldLayout(Issue)
public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project,
String issueTypeId)
getFieldLayout in interface FieldLayoutManagergetFieldLayout in class AbstractFieldLayoutManagerproject - the ProjectissueTypeId - The IssueType id of the issue.
FieldLayoutpublic List<FieldLayoutScheme> getFieldLayoutSchemes()
FieldLayoutManager
getFieldLayoutSchemes in interface FieldLayoutManagergetFieldLayoutSchemes in class AbstractFieldLayoutManagerFieldLayoutSchemes.public Collection<org.ofbiz.core.entity.GenericValue> getRelatedProjects(FieldLayout fieldLayout)
FieldLayoutManagerFieldLayout (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.
getRelatedProjects in interface FieldLayoutManagergetRelatedProjects in class AbstractFieldLayoutManagerfieldLayout - The FieldLayout.
public List<EditableFieldLayout> getEditableFieldLayouts()
FieldLayoutManagerEditableFieldLayout versions of the field layouts.
Note: For standard edition this simply returns an editable version of the default field
layout. (see EditableDefaultFieldLayout)
getEditableFieldLayouts in interface FieldLayoutManagergetEditableFieldLayouts in class AbstractFieldLayoutManagerEditableFieldLayout and EditableDefaultFieldLayoutpublic EditableFieldLayout getEditableFieldLayout(Long id)
FieldLayoutManagerEditableFieldLayout for the id supplied.
getEditableFieldLayout in interface FieldLayoutManagergetEditableFieldLayout in class AbstractFieldLayoutManagerid - If the id is NULL, the default layout is returned.
EditableFieldLayoutpublic void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutScheme supplied.
updateFieldLayoutScheme in interface FieldLayoutManagerupdateFieldLayoutScheme in class AbstractFieldLayoutManagerfieldLayoutScheme - The FieldLayoutSchemepublic void deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutScheme supplied.
deleteFieldLayoutScheme in interface FieldLayoutManagerdeleteFieldLayoutScheme in class AbstractFieldLayoutManagerfieldLayoutScheme - The FieldLayoutSchemepublic void deleteFieldLayout(FieldLayout fieldLayout)
FieldLayoutManagerFieldLayout
deleteFieldLayout in interface FieldLayoutManagerdeleteFieldLayout in class AbstractFieldLayoutManagerfieldLayout - The FieldLayoutpublic Collection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutSchemeEntitys. These are used to
record mappings from IssueType -> FieldLayout
for the FieldLayoutScheme passed in.
getFieldLayoutSchemeEntities in interface FieldLayoutManagergetFieldLayoutSchemeEntities in class AbstractFieldLayoutManagerfieldLayoutScheme - The FieldLayoutScheme
FieldLayoutSchemeEntitys.public void createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManagerFieldLayoutSchemeEntity for a particular FieldLayoutScheme.
The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme()
createFieldLayoutSchemeEntity in interface FieldLayoutManagercreateFieldLayoutSchemeEntity in class AbstractFieldLayoutManagerfieldLayoutSchemeEntity - The FieldLayoutSchemeEntitypublic void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManagerFieldLayoutSchemeEntity.
updateFieldLayoutSchemeEntity in interface FieldLayoutManagerupdateFieldLayoutSchemeEntity in class AbstractFieldLayoutManagerfieldLayoutSchemeEntity - The FieldLayoutSchemeEntitypublic void removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManagerFieldLayoutSchemeEntity
removeFieldLayoutSchemeEntity in interface FieldLayoutManagerremoveFieldLayoutSchemeEntity in class AbstractFieldLayoutManagerfieldLayoutSchemeEntity - The FieldLayoutSchemeEntitypublic void removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
removeFieldLayoutScheme in interface FieldLayoutManagerremoveFieldLayoutScheme in class AbstractFieldLayoutManagerfieldLayoutScheme - The FieldLayoutSchemepublic Collection<FieldConfigurationScheme> getFieldConfigurationSchemes(FieldLayout fieldLayout)
FieldLayoutManagerFieldConfigurationSchemes that include the given FieldLayout.
This is determined by retrieving all FieldLayoutSchemeEntitys with the FieldLayout and
calculating a set of FieldConfigurationSchemes using these entities.
getFieldConfigurationSchemes in interface FieldLayoutManagergetFieldConfigurationSchemes in class AbstractFieldLayoutManagerfieldLayout - The FieldLayout.
FieldConfigurationSchemespublic void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
FieldLayoutManager
restoreSchemeFieldLayout in interface FieldLayoutManagerrestoreSchemeFieldLayout in class AbstractFieldLayoutManagerscheme - A scheme GenericValuepublic Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldConfigurationScheme fieldConfigurationScheme)
FieldLayoutManager
getProjects in interface FieldLayoutManagergetProjects in class AbstractFieldLayoutManagerfieldConfigurationScheme - the FieldConfigurationScheme
public Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutScheme supplied.
getProjects in interface FieldLayoutManagergetProjects in class AbstractFieldLayoutManagerfieldLayoutScheme - the FieldLayoutScheme
GenericValuespublic FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
createFieldLayoutScheme in interface FieldLayoutManagercreateFieldLayoutScheme in class AbstractFieldLayoutManagerfieldLayoutScheme - The FieldLayoutScheme to persist.
FieldLayoutScheme objectpublic FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
FieldLayoutManagerFieldConfigurationScheme by id
getFieldConfigurationScheme in interface FieldLayoutManagergetFieldConfigurationScheme in class AbstractFieldLayoutManagerschemeId - FieldConfigurationScheme ID
FieldConfigurationScheme instancepublic FieldLayoutScheme getMutableFieldLayoutScheme(Long schemeId)
FieldLayoutManagerFieldLayoutScheme by id.
This returns a new copy of the object from the DB, and so will incur some performance penalty.
Please use FieldLayoutManager.getFieldConfigurationScheme(Long) for access to a cached immutable scheme object.
getMutableFieldLayoutScheme in interface FieldLayoutManagergetMutableFieldLayoutScheme in class AbstractFieldLayoutManagerschemeId - the scheme ID
FieldLayoutScheme instancepublic boolean fieldConfigurationSchemeExists(String schemeName)
FieldLayoutManager
fieldConfigurationSchemeExists in interface FieldLayoutManagerfieldConfigurationSchemeExists in class AbstractFieldLayoutManagerschemeName - The scheme name
true if a FieldConfigurationScheme with the given name exists.public Set<FieldLayout> getUniqueFieldLayouts(Project project)
FieldLayoutManagerFieldLayout's for a project.
getUniqueFieldLayouts in interface FieldLayoutManagergetUniqueFieldLayouts in class AbstractFieldLayoutManagerproject - a project
public FieldConfigurationScheme getFieldConfigurationScheme(Project project)
FieldLayoutManager
getFieldConfigurationScheme in interface FieldLayoutManagergetFieldConfigurationScheme in class AbstractFieldLayoutManagerproject - A project
FieldConfigurationScheme or null if none exists.public FieldConfigurationScheme getFieldConfigurationScheme(org.ofbiz.core.entity.GenericValue project)
FieldLayoutManager
getFieldConfigurationScheme in interface FieldLayoutManagergetFieldConfigurationScheme in class AbstractFieldLayoutManagerproject - A project GenericValue
FieldConfigurationScheme or null if none exists.
public void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
FieldLayoutManagerFieldLayoutScheme to the project supplied.
addSchemeAssociation in interface FieldLayoutManageraddSchemeAssociation in class AbstractFieldLayoutManagerproject - A project GenericValuefieldLayoutSchemeId - ID of the FieldLayoutScheme
public void addSchemeAssociation(Project project,
Long fieldLayoutSchemeId)
FieldLayoutManagerFieldLayoutScheme to the project supplied.
addSchemeAssociation in interface FieldLayoutManagerproject - The projectfieldLayoutSchemeId - ID of the FieldLayoutScheme
public void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
FieldLayoutManager
removeSchemeAssociation in interface FieldLayoutManagerremoveSchemeAssociation in class AbstractFieldLayoutManagerproject - A project GenericValuefieldLayoutSchemeId - The fieldLayoutScheme ID
public void removeSchemeAssociation(Project project,
Long fieldLayoutSchemeId)
FieldLayoutManager
removeSchemeAssociation in interface FieldLayoutManagerproject - The projectfieldLayoutSchemeId - The fieldLayoutScheme IDpublic FieldLayout getFieldLayout(Long id)
FieldLayoutManagerFieldLayout information when rendering a screen given the id
of the field layout. If the ID is null, the default layout is returned.
getFieldLayout in interface FieldLayoutManagergetFieldLayout in class AbstractFieldLayoutManagerid - The FieldLayout ID.
FieldLayoutpublic void refresh()
FieldLayoutManager
refresh in interface FieldLayoutManagerrefresh in class AbstractFieldLayoutManagerprotected void clearCaches()
public boolean isFieldLayoutSchemesVisiblyEquivalent(Long fieldConfigurationSchemeId1,
Long fieldConfigurationSchemeId2)
FieldLayoutManagerFieldLayoutSchemes 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.
isFieldLayoutSchemesVisiblyEquivalent in interface FieldLayoutManagerisFieldLayoutSchemesVisiblyEquivalent in class AbstractFieldLayoutManagerfieldConfigurationSchemeId1 - the first scheme; can use null for the system default schemefieldConfigurationSchemeId2 - the second scheme; can use null for the system default scheme
public boolean isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1,
Long fieldLayoutId2)
FieldLayoutManagerFieldLayouts 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:
isFieldLayoutsVisiblyEquivalent in interface FieldLayoutManagerisFieldLayoutsVisiblyEquivalent in class AbstractFieldLayoutManagerfieldLayoutId1 - 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
protected List<String> getAllRelevantIssueTypeIds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||