com.atlassian.jira.issue.fields.layout.field
Class DefaultFieldLayoutManager

java.lang.Object
  extended by com.atlassian.jira.issue.fields.layout.field.DefaultFieldLayoutManager
All Implemented Interfaces:
FieldLayoutManager
Direct Known Subclasses:
EnterpriseFieldLayoutManager

public class DefaultFieldLayoutManager
extends Object
implements FieldLayoutManager


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
DefaultFieldLayoutManager(FieldManager fieldManager, OfBizDelegator ofBizDelegator)
           
 
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.
protected  String getDefaultDescription(String fieldId)
           
protected  List<FieldLayoutItem> getDefaultFieldLayoutItems()
           
 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)
          Retrieves the Field Configuration Scheme associated with the supplied project.
 FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
          Retrieves a FieldConfigurationScheme by id NOTE: This is an enterprise ONLY feature.
 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)
          Returns the fieldLayout for an issue.
 FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project, String issueTypeId)
           
 FieldLayout getFieldLayout(Issue issue)
           
 FieldLayout getFieldLayout(Long id)
          Used to retrieve FieldLayout information when rendering a screen given the id of the field layout.
 Collection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
          Returns a collection of FieldLayoutSchemeEntitys.
 List<FieldLayoutScheme> getFieldLayoutSchemes()
          Retries Field Configuration Schemes.
protected  I18nHelper getI18nHelper()
           
 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).
protected  FieldLayout getRelevantFieldLayout(Long id)
          Retrieves the field layout given a given id.
 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
 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.
protected  void refreshCaches(Long id)
           
 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.
protected  void restoreFieldLayout(Long id)
           
 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)
          THIS METHOD MUST BE SYNCHRONIZED!!!! So that only one thread updates the database at any one time.
 void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
          Persists the FieldLayoutScheme supplied.
 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

SCHEME

public static final String SCHEME
See Also:
Constant Field Values

SCHEME_ASSOCIATION

public static final String SCHEME_ASSOCIATION
See Also:
Constant Field Values

ofBizDelegator

protected OfBizDelegator ofBizDelegator
Constructor Detail

DefaultFieldLayoutManager

public DefaultFieldLayoutManager(FieldManager fieldManager,
                                 OfBizDelegator ofBizDelegator)
Method Detail

getDefaultFieldLayoutItems

protected List<FieldLayoutItem> getDefaultFieldLayoutItems()

getFieldLayout

public FieldLayout getFieldLayout()
                           throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Used to retrieve FieldLayout information when rendering a screen.

Specified by:
getFieldLayout in interface FieldLayoutManager
Returns:
the default FieldLayout
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

getFieldLayout

public FieldLayout getFieldLayout(Long id)
Description copied from interface: FieldLayoutManager
Used to retrieve 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.

Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
id - The FieldLayout ID.
Returns:
A FieldLayout

getFieldLayout

public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
                           throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Returns the fieldLayout for an issue. NOTE: In standard edition this only returns the default field layout, whereas in Enterprise, the field layout for the issue's issuetype associated with the field layout scheme, associated with the issue's project is returned.

Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
issue - An issue GenericValue
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

getFieldLayout

public FieldLayout getFieldLayout(Issue issue)
                           throws FieldLayoutStorageException
Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
issue - An Issue
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException - If there is a Data Layer error.
See Also:
FieldLayoutManager.getFieldLayout(org.ofbiz.core.entity.GenericValue)

getFieldLayout

public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project,
                                  String issueTypeId)
                           throws FieldLayoutStorageException
Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
project - A project GenericValue
issueTypeId - The IssueType id of the issue.
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException - If there is a Data Layer error.
See Also:
FieldLayoutManager.getFieldLayout(org.ofbiz.core.entity.GenericValue)

getFieldLayoutSchemes

public List<FieldLayoutScheme> getFieldLayoutSchemes()
                                              throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Retries Field Configuration Schemes. These are used to link field configurations to projects. NOTE: This is an enterprise ONLY feature.

Specified by:
getFieldLayoutSchemes in interface FieldLayoutManager
Returns:
A list of FieldLayoutSchemes.
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

updateFieldLayoutScheme

public void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
                             throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Persists the FieldLayoutScheme supplied. NOTE: This is an enterprise ONLY feature.

Specified by:
updateFieldLayoutScheme in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - The FieldLayoutScheme
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

deleteFieldLayoutScheme

public void deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
                             throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Removes the FieldLayoutScheme supplied. NOTE: This is an enterprise ONLY feature.

Specified by:
deleteFieldLayoutScheme in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - The FieldLayoutScheme
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

getEditableDefaultFieldLayout

public EditableDefaultFieldLayout getEditableDefaultFieldLayout()
                                                         throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Returns the default EditableDefaultFieldLayout.

Specified by:
getEditableDefaultFieldLayout in interface FieldLayoutManager
Returns:
the default EditableDefaultFieldLayout.
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

storeEditableDefaultFieldLayout

public void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
                                     throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Persist the given default EditableDefaultFieldLayout

Specified by:
storeEditableDefaultFieldLayout in interface FieldLayoutManager
Parameters:
editableDefaultFieldLayout - The EditableDefaultFieldLayout.
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

storeEditableFieldLayout

public void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
                              throws FieldLayoutStorageException
THIS METHOD MUST BE SYNCHRONIZED!!!! So that only one thread updates the database at any one time. "Fields are duplicated" if this method is not synchronized.

Specified by:
storeEditableFieldLayout in interface FieldLayoutManager
Parameters:
editableFieldLayout - editable default field layout
Throws:
FieldLayoutStorageException

refreshCaches

protected void refreshCaches(Long id)

hasDefaultFieldLayout

public boolean hasDefaultFieldLayout()
                              throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Checks to see if a FieldLayout entity with type FieldLayoutManager.TYPE_DEFAULT exists

Specified by:
hasDefaultFieldLayout in interface FieldLayoutManager
Returns:
True if a default FieldLayout exists, false otherwise.
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

restoreDefaultFieldLayout

public void restoreDefaultFieldLayout()
                               throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
This method can be used to rollback any changes to the default field configuration.

Specified by:
restoreDefaultFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

restoreSchemeFieldLayout

public void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
                              throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Restores the field layout associated with the provided scheme to defaults. Essentially this involves removing all previously configured custom items. NOTE: This is an enterprise ONLY feature.

Specified by:
restoreSchemeFieldLayout in interface FieldLayoutManager
Parameters:
scheme - A scheme GenericValue
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

restoreFieldLayout

protected void restoreFieldLayout(Long id)
                           throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException

getProjects

public Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldConfigurationScheme fieldConfigurationScheme)
Description copied from interface: FieldLayoutManager
Returns all projects that use the given FieldConfigurationScheme. NOTE: This is an enterprise ONLY feature.

Specified by:
getProjects in interface FieldLayoutManager
Parameters:
fieldConfigurationScheme - the FieldConfigurationScheme
Returns:
A list of projects that use the given FieldConfigurationScheme.

getProjects

public Collection<org.ofbiz.core.entity.GenericValue> getProjects(FieldLayoutScheme fieldLayoutScheme)
                                                           throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Returns all associated projects for the FieldLayoutScheme supplied. NOTE: This is an enterprise ONLY feature.

Specified by:
getProjects in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - the FieldLayoutScheme
Returns:
A list of project GenericValues
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

createFieldLayoutScheme

public FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
                                          throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Persists a new field Layout scheme (i.e Field Configuration Scheme). NOTE: This is an enterprise ONLY feature.

Specified by:
createFieldLayoutScheme in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - The FieldLayoutScheme to persist.
Returns:
The stored FieldLayoutScheme object
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

getFieldConfigurationScheme

public FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
                                                     throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Retrieves a FieldConfigurationScheme by id NOTE: This is an enterprise ONLY feature.

Specified by:
getFieldConfigurationScheme in interface FieldLayoutManager
Parameters:
schemeId - FieldConfigurationScheme ID
Returns:
A FieldConfigurationScheme instance
Throws:
FieldLayoutStorageException - If there is a DB exception.

getFieldConfigurationScheme

public FieldConfigurationScheme getFieldConfigurationScheme(org.ofbiz.core.entity.GenericValue project)
                                                     throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Retrieves the Field Configuration Scheme associated with the supplied project. NOTE: This is an enterprise ONLY feature.

Specified by:
getFieldConfigurationScheme in interface FieldLayoutManager
Parameters:
project - A project GenericValue
Returns:
A FieldConfigurationScheme or null if none exists.
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

getUniqueFieldLayouts

public Set<FieldLayout> getUniqueFieldLayouts(Project project)
                                       throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Retrieves all the FieldLayout's for a project.

Specified by:
getUniqueFieldLayouts in interface FieldLayoutManager
Parameters:
project - a project
Returns:
the unique set of FieldLayout's for the provided project, an empty set if there are none.
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

getMutableFieldLayoutScheme

public FieldLayoutScheme getMutableFieldLayoutScheme(Long schemeId)
                                              throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Retrieves a mutable 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.

Specified by:
getMutableFieldLayoutScheme in interface FieldLayoutManager
Parameters:
schemeId - the scheme ID
Returns:
A FieldLayoutScheme instance
Throws:
FieldLayoutStorageException - if an error occurs in the DB layer

fieldConfigurationSchemeExists

public boolean fieldConfigurationSchemeExists(String schemeName)
                                       throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Checks if a FieldConfigurationScheme with the given name exists.

Specified by:
fieldConfigurationSchemeExists in interface FieldLayoutManager
Parameters:
schemeName - The scheme name
Returns:
true if a FieldConfigurationScheme with the given name exists.
Throws:
FieldLayoutStorageException - If there is a DB error.

getEditableFieldLayouts

public List<EditableFieldLayout> getEditableFieldLayouts()
Description copied from interface: FieldLayoutManager
Retrieves editable (see EditableFieldLayout versions of the field layouts. Note: For standard edition this simply returns an editable version of the default field layout. (see EditableDefaultFieldLayout)

Specified by:
getEditableFieldLayouts in interface FieldLayoutManager
Returns:
A list of EditableFieldLayout and EditableDefaultFieldLayout

addSchemeAssociation

public void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                 Long fieldLayoutSchemeId)
                          throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Associates a FieldLayoutScheme to the project supplied. NOTE: This is an enterprise ONLY feature.

Specified by:
addSchemeAssociation in interface FieldLayoutManager
Parameters:
project - A project GenericValue
fieldLayoutSchemeId - ID of the FieldLayoutScheme
Throws:
FieldLayoutStorageException - If there is an error in the DB layer

removeSchemeAssociation

public void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                    Long fieldLayoutSchemeId)
                             throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Removes an association between a particular project and field configuration scheme. NOTE: This is an enterprise ONLY feature.

Specified by:
removeSchemeAssociation in interface FieldLayoutManager
Parameters:
project - A project GenericValue
fieldLayoutSchemeId - The fieldLayoutScheme ID
Throws:
FieldLayoutStorageException - If there is an error in the DB layer.

refresh

public void refresh()
Description copied from interface: FieldLayoutManager
Clears all local caches.

Specified by:
refresh in interface FieldLayoutManager

getEditableFieldLayout

public EditableFieldLayout getEditableFieldLayout(Long id)
Description copied from interface: FieldLayoutManager
Returns an EditableFieldLayout for the id supplied. NOTE: This is an enterprise ONLY feature.

Specified by:
getEditableFieldLayout in interface FieldLayoutManager
Parameters:
id - If the id is NULL, the default layout is returned.
Returns:
An EditableFieldLayout

deleteFieldLayout

public void deleteFieldLayout(FieldLayout fieldLayout)
Description copied from interface: FieldLayoutManager
Deletes a custom FieldLayout NOTE: This is an enterprise ONLY feature.

Specified by:
deleteFieldLayout in interface FieldLayoutManager
Parameters:
fieldLayout - The FieldLayout

getFieldLayoutSchemeEntities

public Collection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
Description copied from interface: FieldLayoutManager
Returns a collection of FieldLayoutSchemeEntitys. These are used to record mappings from IssueType -> FieldLayout for the FieldLayoutScheme passed in. NOTE: This is an enterprise ONLY feature.

Specified by:
getFieldLayoutSchemeEntities in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - The FieldLayoutScheme
Returns:
A collection of FieldLayoutSchemeEntitys.

createFieldLayoutSchemeEntity

public void createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Description copied from interface: FieldLayoutManager
Persists a new FieldLayoutSchemeEntity for a particular FieldLayoutScheme. The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme() NOTE: This is an enterprise ONLY feature.

Specified by:
createFieldLayoutSchemeEntity in interface FieldLayoutManager
Parameters:
fieldLayoutSchemeEntity - The FieldLayoutSchemeEntity

updateFieldLayoutSchemeEntity

public void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Description copied from interface: FieldLayoutManager
Updates a FieldLayoutSchemeEntity. NOTE: This is an enterprise ONLY feature.

Specified by:
updateFieldLayoutSchemeEntity in interface FieldLayoutManager
Parameters:
fieldLayoutSchemeEntity - The FieldLayoutSchemeEntity

removeFieldLayoutSchemeEntity

public void removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Description copied from interface: FieldLayoutManager
Removes a FieldLayoutSchemeEntity NOTE: This is an enterprise ONLY feature.

Specified by:
removeFieldLayoutSchemeEntity in interface FieldLayoutManager
Parameters:
fieldLayoutSchemeEntity - The FieldLayoutSchemeEntity

removeFieldLayoutScheme

public void removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Description copied from interface: FieldLayoutManager
NOTE: This is an enterprise ONLY feature.

Specified by:
removeFieldLayoutScheme in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - The FieldLayoutScheme

getFieldConfigurationSchemes

public Collection<FieldConfigurationScheme> getFieldConfigurationSchemes(FieldLayout fieldLayout)
Description copied from interface: FieldLayoutManager
Returns a collection of 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. NOTE: This is an enterprise ONLY feature.

Specified by:
getFieldConfigurationSchemes in interface FieldLayoutManager
Parameters:
fieldLayout - The FieldLayout.
Returns:
A collection of FieldConfigurationSchemes

getRelatedProjects

public Collection<org.ofbiz.core.entity.GenericValue> getRelatedProjects(FieldLayout fieldLayout)
Description copied from interface: FieldLayoutManager
Finds all projects that use the given 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.

Specified by:
getRelatedProjects in interface FieldLayoutManager
Parameters:
fieldLayout - The FieldLayout.
Returns:
The set of Projects that use the given FieldLayout.

getRelevantFieldLayout

protected FieldLayout getRelevantFieldLayout(Long id)
                                      throws FieldLayoutStorageException
Retrieves the field layout given a given id. If the id is null the default field layout is retrieved

Parameters:
id - field layout id
Returns:
field layout
Throws:
FieldLayoutStorageException - if can not retrieve field layout

getDefaultDescription

protected String getDefaultDescription(String fieldId)

getI18nHelper

protected I18nHelper getI18nHelper()

isFieldLayoutSchemesVisiblyEquivalent

public boolean isFieldLayoutSchemesVisiblyEquivalent(Long fieldConfigurationSchemeId1,
                                                     Long fieldConfigurationSchemeId2)
                                              throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Will determine whether or not two 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:

It is possible that one scheme may have a mapping for an issue type, but the other does not. In this case, equivalence is compared between the issue type specific one and the default field layout.

Note that equivalence is reflexive - all the associations in scheme1 must have equivalent associations in scheme2, and vice versa.

Specified by:
isFieldLayoutSchemesVisiblyEquivalent in interface FieldLayoutManager
Parameters:
fieldConfigurationSchemeId1 - the first scheme; can use null for the system default scheme
fieldConfigurationSchemeId2 - the second scheme; can use null for the system default scheme
Returns:
the result of the equivalence comparison
Throws:
FieldLayoutStorageException - If there is a Data Layer error.

isFieldLayoutsVisiblyEquivalent

public boolean isFieldLayoutsVisiblyEquivalent(Long fieldLayoutId1,
                                               Long fieldLayoutId2)
Description copied from interface: FieldLayoutManager
Will determine whether or not two 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:

Note that equivalence is reflexive: layout1 == layout2 implies layout2 == layout1.

Specified by:
isFieldLayoutsVisiblyEquivalent in interface FieldLayoutManager
Parameters:
fieldLayoutId1 - the first layout id; null signifies the default field layout in the system
fieldLayoutId2 - the second layout id; null signifies the default field layout in the system
Returns:
the result of the equivalence comparison


Copyright © 2002-2010 Atlassian. All Rights Reserved.