|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 FieldConfigurationScheme s 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)
|
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 FieldLayoutSchemeEntity s. |
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 FieldLayoutScheme s are
"visibly equivalent". |
abstract boolean |
isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1,
Long fieldLayoutId2)
Will determine whether or not two FieldLayout s 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)
FieldLayoutManager
FieldLayout
information when rendering a screen given the id
of the field layout. If the ID is null, the default layout is returned.
NOTE: This is an enterprise ONLY feature.
getFieldLayout
in interface FieldLayoutManager
id
- The FieldLayout ID.
FieldLayout
public abstract FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
FieldLayoutManager
getFieldLayout
in interface FieldLayoutManager
issue
- An issue GenericValue
FieldLayout
public abstract FieldLayout getFieldLayout(Project project, String issueTypeId)
getFieldLayout
in interface FieldLayoutManager
project
- A project GenericValue
issueTypeId
- The IssueType id of the issue.
FieldLayout
FieldLayoutManager.getFieldLayout(Issue)
public abstract FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project, String issueTypeId)
getFieldLayout
in interface FieldLayoutManager
project
- the ProjectissueTypeId
- The IssueType id of the issue.
FieldLayout
FieldLayoutManager.getFieldLayout(org.ofbiz.core.entity.GenericValue)
public abstract List<FieldLayoutScheme> getFieldLayoutSchemes()
FieldLayoutManager
getFieldLayoutSchemes
in interface FieldLayoutManager
FieldLayoutScheme
s.public abstract void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
FieldLayoutScheme
supplied.
NOTE: This is an enterprise ONLY feature.
updateFieldLayoutScheme
in interface FieldLayoutManager
fieldLayoutScheme
- The FieldLayoutSchemepublic abstract void deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
FieldLayoutScheme
supplied.
NOTE: This is an enterprise ONLY feature.
deleteFieldLayoutScheme
in interface FieldLayoutManager
fieldLayoutScheme
- The FieldLayoutSchemepublic abstract void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
FieldLayoutManager
restoreSchemeFieldLayout
in interface FieldLayoutManager
scheme
- A scheme GenericValue
public abstract Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldConfigurationScheme fieldConfigurationScheme)
FieldLayoutManager
getProjects
in interface FieldLayoutManager
fieldConfigurationScheme
- the FieldConfigurationScheme
public abstract Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
FieldLayoutScheme
supplied.
NOTE: This is an enterprise ONLY feature.
getProjects
in interface FieldLayoutManager
fieldLayoutScheme
- the FieldLayoutScheme
GenericValue
spublic abstract FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
createFieldLayoutScheme
in interface FieldLayoutManager
fieldLayoutScheme
- The FieldLayoutScheme
to persist.
FieldLayoutScheme
objectpublic abstract FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
FieldLayoutManager
FieldConfigurationScheme
by id
NOTE: This is an enterprise ONLY feature.
getFieldConfigurationScheme
in interface FieldLayoutManager
schemeId
- FieldConfigurationScheme ID
FieldConfigurationScheme
instancepublic abstract FieldConfigurationScheme getFieldConfigurationScheme(Project project)
FieldLayoutManager
getFieldConfigurationScheme
in interface FieldLayoutManager
project
- A project GenericValue
FieldConfigurationScheme
or null if none exists.public abstract FieldConfigurationScheme getFieldConfigurationScheme(org.ofbiz.core.entity.GenericValue project)
FieldLayoutManager
getFieldConfigurationScheme
in interface FieldLayoutManager
project
- A project GenericValue
FieldConfigurationScheme
or null if none exists.public abstract Set<FieldLayout> getUniqueFieldLayouts(Project project)
FieldLayoutManager
FieldLayout
's for a project.
getUniqueFieldLayouts
in interface FieldLayoutManager
project
- a project
public abstract FieldLayoutScheme getMutableFieldLayoutScheme(Long schemeId)
FieldLayoutManager
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 FieldLayoutManager.getFieldConfigurationScheme(Long)
for access to a cached immutable scheme object.
getMutableFieldLayoutScheme
in interface FieldLayoutManager
schemeId
- the scheme ID
FieldLayoutScheme
instancepublic abstract boolean fieldConfigurationSchemeExists(String schemeName)
FieldLayoutManager
fieldConfigurationSchemeExists
in interface FieldLayoutManager
schemeName
- The scheme name
true
if a FieldConfigurationScheme with the given name exists.public abstract List<EditableFieldLayout> getEditableFieldLayouts()
FieldLayoutManager
EditableFieldLayout
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 FieldLayoutManager
EditableFieldLayout
and EditableDefaultFieldLayout
public abstract void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project, Long fieldLayoutSchemeId)
FieldLayoutManager
FieldLayoutScheme
to the project supplied.
NOTE: This is an enterprise ONLY feature.
addSchemeAssociation
in interface FieldLayoutManager
project
- A project GenericValue
fieldLayoutSchemeId
- ID of the FieldLayoutSchemepublic abstract void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project, Long fieldLayoutSchemeId)
FieldLayoutManager
removeSchemeAssociation
in interface FieldLayoutManager
project
- A project GenericValue
fieldLayoutSchemeId
- The fieldLayoutScheme IDpublic abstract EditableFieldLayout getEditableFieldLayout(Long id)
FieldLayoutManager
EditableFieldLayout
for the id supplied.
NOTE: This is an enterprise ONLY feature.
getEditableFieldLayout
in interface FieldLayoutManager
id
- If the id is NULL, the default layout is returned.
EditableFieldLayout
public abstract void deleteFieldLayout(FieldLayout fieldLayout)
FieldLayoutManager
FieldLayout
NOTE: This is an enterprise ONLY feature.
deleteFieldLayout
in interface FieldLayoutManager
fieldLayout
- The FieldLayoutpublic abstract Collection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
FieldLayoutSchemeEntity
s. These are used to
record mappings from IssueType
-> FieldLayout
for the FieldLayoutScheme
passed in.
NOTE: This is an enterprise ONLY feature.
getFieldLayoutSchemeEntities
in interface FieldLayoutManager
fieldLayoutScheme
- The FieldLayoutScheme
FieldLayoutSchemeEntity
s.public abstract void createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManager
FieldLayoutSchemeEntity
for a particular FieldLayoutScheme
.
The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme()
NOTE: This is an enterprise ONLY feature.
createFieldLayoutSchemeEntity
in interface FieldLayoutManager
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntitypublic abstract void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManager
FieldLayoutSchemeEntity
.
NOTE: This is an enterprise ONLY feature.
updateFieldLayoutSchemeEntity
in interface FieldLayoutManager
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntitypublic abstract void removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
FieldLayoutManager
FieldLayoutSchemeEntity
NOTE: This is an enterprise ONLY feature.
removeFieldLayoutSchemeEntity
in interface FieldLayoutManager
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntitypublic abstract void removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
FieldLayoutManager
removeFieldLayoutScheme
in interface FieldLayoutManager
fieldLayoutScheme
- The FieldLayoutSchemepublic abstract Collection<FieldConfigurationScheme> getFieldConfigurationSchemes(FieldLayout fieldLayout)
FieldLayoutManager
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.
getFieldConfigurationSchemes
in interface FieldLayoutManager
fieldLayout
- The FieldLayout.
FieldConfigurationScheme
spublic abstract Collection<org.ofbiz.core.entity.GenericValue> getRelatedProjects(FieldLayout fieldLayout)
FieldLayoutManager
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.
getRelatedProjects
in interface FieldLayoutManager
fieldLayout
- The FieldLayout.
public abstract boolean isFieldLayoutSchemesVisiblyEquivalent(Long fieldConfigurationSchemeId1, Long fieldConfigurationSchemeId2)
FieldLayoutManager
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.
isFieldLayoutSchemesVisiblyEquivalent
in interface FieldLayoutManager
fieldConfigurationSchemeId1
- 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)
FieldLayoutManager
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:
isFieldLayoutsVisiblyEquivalent
in interface FieldLayoutManager
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
public void start() throws Exception
Startable
start
in interface Startable
Exception
- Allows implementations to throw an Exception.protected List<FieldLayoutItem> getDefaultFieldLayoutItems()
public FieldLayout getFieldLayout()
FieldLayoutManager
FieldLayout
information when rendering a screen.
getFieldLayout
in interface FieldLayoutManager
public FieldLayout getFieldLayout(Issue issue)
getFieldLayout
in interface FieldLayoutManager
issue
- An Issue
FieldLayout
FieldLayoutManager.getFieldLayout(org.ofbiz.core.entity.GenericValue)
public EditableDefaultFieldLayout getEditableDefaultFieldLayout()
FieldLayoutManager
EditableDefaultFieldLayout
.
getEditableDefaultFieldLayout
in interface FieldLayoutManager
EditableDefaultFieldLayout
.public void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
FieldLayoutManager
EditableDefaultFieldLayout
storeEditableDefaultFieldLayout
in interface FieldLayoutManager
editableDefaultFieldLayout
- The EditableDefaultFieldLayout.public void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
storeEditableFieldLayout
in interface FieldLayoutManager
editableFieldLayout
- editable default field layoutprotected void refreshCaches(Long id)
public boolean hasDefaultFieldLayout()
FieldLayoutManager
FieldLayout
entity with type FieldLayoutManager.TYPE_DEFAULT
exists
hasDefaultFieldLayout
in interface FieldLayoutManager
FieldLayout
exists, false otherwise.public void restoreDefaultFieldLayout()
FieldLayoutManager
restoreDefaultFieldLayout
in interface FieldLayoutManager
protected void restoreFieldLayout(Long id)
public void refresh()
FieldLayoutManager
refresh
in interface FieldLayoutManager
protected 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 |