|
||||||||||
| 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
public abstract class AbstractFieldLayoutManager
| Field Summary | |
|---|---|
protected OfBizDelegator |
ofBizDelegator
|
static String |
SCHEME
|
static String |
SCHEME_ASSOCIATION
|
| Fields inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager |
|---|
TYPE_DEFAULT |
| Constructor Summary | |
|---|---|
AbstractFieldLayoutManager(FieldManager fieldManager,
OfBizDelegator ofBizDelegator,
I18nHelper.BeanFactory i18n)
|
|
| Method Summary | |
|---|---|
abstract void |
addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
Associates a FieldLayoutScheme to the project supplied. |
abstract FieldLayoutScheme |
createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Persists a new field Layout scheme (i.e Field Configuration Scheme). |
abstract void |
createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Persists a new FieldLayoutSchemeEntity for a particular FieldLayoutScheme. |
abstract void |
deleteFieldLayout(FieldLayout fieldLayout)
Deletes a custom FieldLayout
NOTE: This is an enterprise ONLY feature. |
abstract void |
deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Removes the FieldLayoutScheme supplied. |
abstract boolean |
fieldConfigurationSchemeExists(String schemeName)
Checks if a FieldConfigurationScheme with the given name exists. |
protected String |
getDefaultDescription(String fieldId)
|
protected List<FieldLayoutItem> |
getDefaultFieldLayoutItems()
|
EditableDefaultFieldLayout |
getEditableDefaultFieldLayout()
Returns the default EditableDefaultFieldLayout. |
abstract EditableFieldLayout |
getEditableFieldLayout(Long id)
Returns an EditableFieldLayout for the id supplied. |
abstract List<EditableFieldLayout> |
getEditableFieldLayouts()
Retrieves editable (see EditableFieldLayout versions of the field layouts. |
abstract FieldConfigurationScheme |
getFieldConfigurationScheme(org.ofbiz.core.entity.GenericValue project)
Retrieves the Field Configuration Scheme associated with the supplied project. |
abstract FieldConfigurationScheme |
getFieldConfigurationScheme(Long schemeId)
Retrieves a FieldConfigurationScheme by id
NOTE: This is an enterprise ONLY feature. |
abstract FieldConfigurationScheme |
getFieldConfigurationScheme(Project project)
Retrieves the Field Configuration Scheme associated with the supplied project. |
abstract 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. |
abstract FieldLayout |
getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
Returns the fieldLayout for an issue. |
abstract FieldLayout |
getFieldLayout(org.ofbiz.core.entity.GenericValue project,
String issueTypeId)
|
FieldLayout |
getFieldLayout(Issue issue)
Returns the fieldLayout for an issue. |
abstract FieldLayout |
getFieldLayout(Long id)
Used to retrieve FieldLayout information when rendering a screen given the id
of the field layout. |
abstract FieldLayout |
getFieldLayout(Project project,
String issueTypeId)
|
abstract Collection<FieldLayoutSchemeEntity> |
getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
Returns a collection of FieldLayoutSchemeEntitys. |
abstract List<FieldLayoutScheme> |
getFieldLayoutSchemes()
Retries Field Configuration Schemes. |
protected I18nHelper |
getI18nHelper()
|
abstract FieldLayoutScheme |
getMutableFieldLayoutScheme(Long schemeId)
Retrieves a mutable FieldLayoutScheme by id. |
abstract Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(FieldConfigurationScheme fieldConfigurationScheme)
Returns all projects that use the given FieldConfigurationScheme. |
abstract Collection<org.ofbiz.core.entity.GenericValue> |
getProjects(FieldLayoutScheme fieldLayoutScheme)
Returns all associated projects for the FieldLayoutScheme supplied. |
abstract Collection<org.ofbiz.core.entity.GenericValue> |
getRelatedProjects(FieldLayout fieldLayout)
Finds all projects that use the given FieldLayout (via the configured FieldConfigurationScheme). |
protected FieldLayout |
getRelevantFieldLayout(Long id)
Retrieves the field layout given a given id. |
abstract Set<FieldLayout> |
getUniqueFieldLayouts(Project project)
Retrieves all the FieldLayout's for a project. |
boolean |
hasDefaultFieldLayout()
Checks to see if a FieldLayout entity with type FieldLayoutManager.TYPE_DEFAULT exists |
abstract boolean |
isFieldLayoutSchemesVisiblyEquivalent(Long fieldConfigurationSchemeId1,
Long fieldConfigurationSchemeId2)
Will determine whether or not two FieldLayoutSchemes are
"visibly equivalent". |
abstract boolean |
isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1,
Long fieldLayoutId2)
Will determine whether or not two FieldLayouts are
"visibly equivalent". |
void |
refresh()
Clears all local caches. |
protected void |
refreshCaches(Long id)
|
abstract void |
removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
NOTE: This is an enterprise ONLY feature. |
abstract void |
removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Removes a FieldLayoutSchemeEntity
NOTE: This is an enterprise ONLY feature. |
abstract 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. |
protected void |
restoreFieldLayout(Long id)
|
abstract void |
restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
Restores the field layout associated with the provided scheme to defaults. |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
void |
storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
Persist the given default EditableDefaultFieldLayout |
void |
storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
THIS METHOD MUST BE SYNCHRONIZED!!!! So that only one thread updates the database at any one time. |
abstract void |
updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Persists the FieldLayoutScheme supplied. |
abstract void |
updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Updates a FieldLayoutSchemeEntity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SCHEME
public static final String SCHEME_ASSOCIATION
protected OfBizDelegator ofBizDelegator
| Constructor Detail |
|---|
public AbstractFieldLayoutManager(FieldManager fieldManager,
OfBizDelegator ofBizDelegator,
I18nHelper.BeanFactory i18n)
| Method Detail |
|---|
public abstract 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 FieldLayoutManagerid - The FieldLayout ID.
FieldLayoutpublic abstract FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
FieldLayoutManager
getFieldLayout in interface FieldLayoutManagerissue - An issue GenericValue
FieldLayout
public abstract FieldLayout getFieldLayout(Project project,
String issueTypeId)
getFieldLayout in interface FieldLayoutManagerproject - A project GenericValueissueTypeId - The IssueType id of the issue.
FieldLayoutFieldLayoutManager.getFieldLayout(Issue)
public abstract FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project,
String issueTypeId)
getFieldLayout in interface FieldLayoutManagerproject - the ProjectissueTypeId - The IssueType id of the issue.
FieldLayoutpublic abstract List<FieldLayoutScheme> getFieldLayoutSchemes()
FieldLayoutManager
getFieldLayoutSchemes in interface FieldLayoutManagerFieldLayoutSchemes.public abstract void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutScheme supplied.
NOTE: This is an enterprise ONLY feature.
updateFieldLayoutScheme in interface FieldLayoutManagerfieldLayoutScheme - The FieldLayoutSchemepublic abstract void deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutScheme supplied.
NOTE: This is an enterprise ONLY feature.
deleteFieldLayoutScheme in interface FieldLayoutManagerfieldLayoutScheme - The FieldLayoutSchemepublic abstract void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
FieldLayoutManager
restoreSchemeFieldLayout in interface FieldLayoutManagerscheme - A scheme GenericValuepublic abstract Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldConfigurationScheme fieldConfigurationScheme)
FieldLayoutManager
getProjects in interface FieldLayoutManagerfieldConfigurationScheme - the FieldConfigurationScheme
public abstract Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutScheme supplied.
NOTE: This is an enterprise ONLY feature.
getProjects in interface FieldLayoutManagerfieldLayoutScheme - the FieldLayoutScheme
GenericValuespublic abstract FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
createFieldLayoutScheme in interface FieldLayoutManagerfieldLayoutScheme - The FieldLayoutScheme to persist.
FieldLayoutScheme objectpublic abstract FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
FieldLayoutManagerFieldConfigurationScheme by id
NOTE: This is an enterprise ONLY feature.
getFieldConfigurationScheme in interface FieldLayoutManagerschemeId - FieldConfigurationScheme ID
FieldConfigurationScheme instancepublic abstract FieldConfigurationScheme getFieldConfigurationScheme(Project project)
FieldLayoutManager
getFieldConfigurationScheme in interface FieldLayoutManagerproject - A project GenericValue
FieldConfigurationScheme or null if none exists.public abstract FieldConfigurationScheme getFieldConfigurationScheme(org.ofbiz.core.entity.GenericValue project)
FieldLayoutManager
getFieldConfigurationScheme in interface FieldLayoutManagerproject - A project GenericValue
FieldConfigurationScheme or null if none exists.public abstract Set<FieldLayout> getUniqueFieldLayouts(Project project)
FieldLayoutManagerFieldLayout's for a project.
getUniqueFieldLayouts in interface FieldLayoutManagerproject - a project
public abstract FieldLayoutScheme getMutableFieldLayoutScheme(Long schemeId)
FieldLayoutManagerFieldLayoutScheme 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 FieldLayoutManager.getFieldConfigurationScheme(Long) for access to a cached immutable scheme object.
getMutableFieldLayoutScheme in interface FieldLayoutManagerschemeId - the scheme ID
FieldLayoutScheme instancepublic abstract boolean fieldConfigurationSchemeExists(String schemeName)
FieldLayoutManager
fieldConfigurationSchemeExists in interface FieldLayoutManagerschemeName - The scheme name
true if a FieldConfigurationScheme with the given name exists.public abstract 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 FieldLayoutManagerEditableFieldLayout and EditableDefaultFieldLayout
public abstract void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
FieldLayoutManagerFieldLayoutScheme to the project supplied.
NOTE: This is an enterprise ONLY feature.
addSchemeAssociation in interface FieldLayoutManagerproject - A project GenericValuefieldLayoutSchemeId - ID of the FieldLayoutScheme
public abstract void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
Long fieldLayoutSchemeId)
FieldLayoutManager
removeSchemeAssociation in interface FieldLayoutManagerproject - A project GenericValuefieldLayoutSchemeId - The fieldLayoutScheme IDpublic abstract EditableFieldLayout getEditableFieldLayout(Long id)
FieldLayoutManagerEditableFieldLayout for the id supplied.
NOTE: This is an enterprise ONLY feature.
getEditableFieldLayout in interface FieldLayoutManagerid - If the id is NULL, the default layout is returned.
EditableFieldLayoutpublic abstract void deleteFieldLayout(FieldLayout fieldLayout)
FieldLayoutManagerFieldLayout
NOTE: This is an enterprise ONLY feature.
deleteFieldLayout in interface FieldLayoutManagerfieldLayout - The FieldLayoutpublic abstract Collection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManagerFieldLayoutSchemeEntitys. These are used to
record mappings from IssueType -> FieldLayout
for the FieldLayoutScheme passed in.
NOTE: This is an enterprise ONLY feature.
getFieldLayoutSchemeEntities in interface FieldLayoutManagerfieldLayoutScheme - The FieldLayoutScheme
FieldLayoutSchemeEntitys.public abstract void createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManagerFieldLayoutSchemeEntity for a particular FieldLayoutScheme.
The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme()
NOTE: This is an enterprise ONLY feature.
createFieldLayoutSchemeEntity in interface FieldLayoutManagerfieldLayoutSchemeEntity - The FieldLayoutSchemeEntitypublic abstract void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManagerFieldLayoutSchemeEntity.
NOTE: This is an enterprise ONLY feature.
updateFieldLayoutSchemeEntity in interface FieldLayoutManagerfieldLayoutSchemeEntity - The FieldLayoutSchemeEntitypublic abstract void removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManagerFieldLayoutSchemeEntity
NOTE: This is an enterprise ONLY feature.
removeFieldLayoutSchemeEntity in interface FieldLayoutManagerfieldLayoutSchemeEntity - The FieldLayoutSchemeEntitypublic abstract void removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
removeFieldLayoutScheme in interface FieldLayoutManagerfieldLayoutScheme - The FieldLayoutSchemepublic abstract 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.
NOTE: This is an enterprise ONLY feature.
getFieldConfigurationSchemes in interface FieldLayoutManagerfieldLayout - The FieldLayout.
FieldConfigurationSchemespublic abstract 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 FieldLayoutManagerfieldLayout - The FieldLayout.
public abstract 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 FieldLayoutManagerfieldConfigurationSchemeId1 - the first scheme; can use null for the system default schemefieldConfigurationSchemeId2 - the second scheme; can use null for the system default scheme
public abstract 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 FieldLayoutManagerfieldLayoutId1 - 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
public void start()
throws Exception
Startable
start in interface StartableException - Allows implementations to throw an Exception.protected List<FieldLayoutItem> getDefaultFieldLayoutItems()
public FieldLayout getFieldLayout()
FieldLayoutManagerFieldLayout information when rendering a screen.
getFieldLayout in interface FieldLayoutManagerpublic FieldLayout getFieldLayout(Issue issue)
FieldLayoutManager
getFieldLayout in interface FieldLayoutManagerissue - An Issue
FieldLayoutpublic EditableDefaultFieldLayout getEditableDefaultFieldLayout()
FieldLayoutManagerEditableDefaultFieldLayout.
getEditableDefaultFieldLayout in interface FieldLayoutManagerEditableDefaultFieldLayout.public void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
FieldLayoutManagerEditableDefaultFieldLayout
storeEditableDefaultFieldLayout in interface FieldLayoutManagereditableDefaultFieldLayout - The EditableDefaultFieldLayout.public void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
storeEditableFieldLayout in interface FieldLayoutManagereditableFieldLayout - editable default field layoutprotected void refreshCaches(Long id)
public boolean hasDefaultFieldLayout()
FieldLayoutManagerFieldLayout entity with type FieldLayoutManager.TYPE_DEFAULT exists
hasDefaultFieldLayout in interface FieldLayoutManagerFieldLayout exists, false otherwise.public void restoreDefaultFieldLayout()
FieldLayoutManager
restoreDefaultFieldLayout in interface FieldLayoutManagerprotected void restoreFieldLayout(Long id)
public void refresh()
FieldLayoutManager
refresh in interface FieldLayoutManagerprotected FieldLayout getRelevantFieldLayout(Long id)
id - field layout id
protected String getDefaultDescription(String fieldId)
protected I18nHelper getI18nHelper()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||