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

java.lang.Object
  extended by com.atlassian.jira.issue.fields.layout.field.MockFieldLayoutManager
All Implemented Interfaces:
FieldLayoutManager

public class MockFieldLayoutManager
extends Object
implements FieldLayoutManager

Simple implementation of MockFieldLayoutManager.

Since:
v4.1

Field Summary
 
Fields inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager
TYPE_DEFAULT
 
Constructor Summary
MockFieldLayoutManager()
           
 
Method Summary
 MockFieldLayout addLayoutItem(Issue issue)
           
 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.
 FieldLayoutScheme copyFieldLayoutScheme(FieldLayoutScheme scheme, String name, String description)
          Copies an existing field layout to a new one.
 FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
          Persists a new field Layout scheme (i.e Field Configuration Scheme).
 FieldLayoutScheme createFieldLayoutScheme(String name, String description)
          Persists a new field Layout scheme (i.e Field Configuration Scheme).
 void createFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
          Persists a new FieldLayoutSchemeEntity for a particular FieldLayoutScheme.
 FieldLayoutSchemeEntity createFieldLayoutSchemeEntity(FieldLayoutScheme fieldLayoutScheme, String issueTypeId, Long fieldConfigurationId)
          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.
 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
 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()
          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)
          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 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 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.
 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 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.
 MockFieldLayoutManager setFieldConfigurationScheme(Long id, FieldConfigurationScheme fieldConfigurationScheme)
           
 MockFieldLayoutManager setFieldConfigurationScheme(Project project, FieldConfigurationScheme fieldConfigurationScheme)
           
 MockFieldLayoutManager setFieldLayout(Long id, FieldLayout fieldLayout)
           
 MockFieldLayoutManager setFieldLayout(Project project, String issueTypeId, FieldLayout fieldLayout)
           
 MockFieldLayoutManager setFieldLayoutSchemes(List<FieldLayoutScheme> fieldLayoutSchemes)
           
 EditableFieldLayout storeAndReturnEditableFieldLayout(EditableFieldLayout editableFieldLayout)
          Persists the EditableFieldLayout provided and returns a new instance as stored in the database.
 void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
          Persist the given default EditableDefaultFieldLayout
 void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
          Persists the EditableFieldLayout provided.
 String toString()
           
 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, wait, wait, wait
 

Constructor Detail

MockFieldLayoutManager

public MockFieldLayoutManager()
Method Detail

addLayoutItem

public MockFieldLayout addLayoutItem(Issue issue)

createFieldLayoutScheme

public FieldLayoutScheme createFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Description copied from interface: FieldLayoutManager
Persists a new field Layout scheme (i.e Field Configuration Scheme).

Specified by:
createFieldLayoutScheme in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - The FieldLayoutScheme to persist.
Returns:
The stored FieldLayoutScheme object

createFieldLayoutScheme

public FieldLayoutScheme createFieldLayoutScheme(@Nonnull
                                                 String name,
                                                 @Nullable
                                                 String description)
Description copied from interface: FieldLayoutManager
Persists a new field Layout scheme (i.e Field Configuration Scheme).

Specified by:
createFieldLayoutScheme in interface FieldLayoutManager

copyFieldLayoutScheme

public FieldLayoutScheme copyFieldLayoutScheme(@Nonnull
                                               FieldLayoutScheme scheme,
                                               @Nonnull
                                               String name,
                                               @Nullable
                                               String description)
Description copied from interface: FieldLayoutManager
Copies an existing field layout to a new one.

Specified by:
copyFieldLayoutScheme in interface FieldLayoutManager

getFieldConfigurationScheme

public FieldConfigurationScheme getFieldConfigurationScheme(Long schemeId)
Description copied from interface: FieldLayoutManager
Retrieves a FieldConfigurationScheme by id

Specified by:
getFieldConfigurationScheme in interface FieldLayoutManager
Parameters:
schemeId - FieldConfigurationScheme ID
Returns:
A FieldConfigurationScheme instance

getMutableFieldLayoutScheme

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

Specified by:
getMutableFieldLayoutScheme in interface FieldLayoutManager
Parameters:
schemeId - the scheme ID
Returns:
A FieldLayoutScheme instance

fieldConfigurationSchemeExists

public boolean fieldConfigurationSchemeExists(String schemeName)
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.

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

getFieldLayoutSchemes

public List<FieldLayoutScheme> getFieldLayoutSchemes()
Description copied from interface: FieldLayoutManager
Retries Field Configuration Schemes. These are used to link field configurations to projects.

Specified by:
getFieldLayoutSchemes in interface FieldLayoutManager
Returns:
A list of FieldLayoutSchemes.

setFieldLayoutSchemes

public MockFieldLayoutManager setFieldLayoutSchemes(List<FieldLayoutScheme> fieldLayoutSchemes)

updateFieldLayoutScheme

public void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Description copied from interface: FieldLayoutManager
Persists the FieldLayoutScheme supplied.

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

deleteFieldLayoutScheme

public void deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
Description copied from interface: FieldLayoutManager
Removes the FieldLayoutScheme supplied.

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

getFieldConfigurationScheme

public FieldConfigurationScheme getFieldConfigurationScheme(Project project)
Description copied from interface: FieldLayoutManager
Retrieves the Field Configuration Scheme associated with the supplied project.

Specified by:
getFieldConfigurationScheme in interface FieldLayoutManager
Parameters:
project - A project
Returns:
A FieldConfigurationScheme or null if none exists.

setFieldConfigurationScheme

public MockFieldLayoutManager setFieldConfigurationScheme(Project project,
                                                          FieldConfigurationScheme fieldConfigurationScheme)

setFieldConfigurationScheme

public MockFieldLayoutManager setFieldConfigurationScheme(Long id,
                                                          FieldConfigurationScheme fieldConfigurationScheme)

getFieldConfigurationScheme

public FieldConfigurationScheme getFieldConfigurationScheme(org.ofbiz.core.entity.GenericValue project)
Description copied from interface: FieldLayoutManager
Retrieves the Field Configuration Scheme associated with the supplied project.

Specified by:
getFieldConfigurationScheme in interface FieldLayoutManager
Parameters:
project - A project GenericValue
Returns:
A FieldConfigurationScheme or null if none exists.

getUniqueFieldLayouts

public Set<FieldLayout> getUniqueFieldLayouts(Project project)
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.

addSchemeAssociation

public void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                 Long fieldLayoutSchemeId)
Description copied from interface: FieldLayoutManager
Associates a FieldLayoutScheme to the project supplied.

Specified by:
addSchemeAssociation in interface FieldLayoutManager
Parameters:
project - A project GenericValue
fieldLayoutSchemeId - ID of the FieldLayoutScheme

removeSchemeAssociation

public void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                    Long fieldLayoutSchemeId)
Description copied from interface: FieldLayoutManager
Removes an association between a particular project and field configuration scheme.

Specified by:
removeSchemeAssociation in interface FieldLayoutManager
Parameters:
project - A project GenericValue
fieldLayoutSchemeId - The fieldLayoutScheme ID

addSchemeAssociation

public void addSchemeAssociation(Project project,
                                 Long fieldLayoutSchemeId)
Description copied from interface: FieldLayoutManager
Associates a FieldLayoutScheme to the project supplied.

Specified by:
addSchemeAssociation in interface FieldLayoutManager
Parameters:
project - The project
fieldLayoutSchemeId - ID of the FieldLayoutScheme

removeSchemeAssociation

public void removeSchemeAssociation(Project project,
                                    Long fieldLayoutSchemeId)
Description copied from interface: FieldLayoutManager
Removes an association between a particular project and field configuration scheme.

Specified by:
removeSchemeAssociation in interface FieldLayoutManager
Parameters:
project - The project
fieldLayoutSchemeId - The fieldLayoutScheme ID

getFieldLayout

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

Specified by:
getFieldLayout in interface FieldLayoutManager
Returns:
the default FieldLayout

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.

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

setFieldLayout

public MockFieldLayoutManager setFieldLayout(Long id,
                                             FieldLayout fieldLayout)

getFieldLayout

public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
Description copied from interface: FieldLayoutManager
Returns the fieldLayout for an issue.

Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
issue - An issue GenericValue
Returns:
A FieldLayout

getFieldLayout

public FieldLayout getFieldLayout(Issue issue)
Description copied from interface: FieldLayoutManager
Returns the fieldLayout for an issue.

Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
issue - An Issue
Returns:
A FieldLayout

getFieldLayout

public FieldLayout getFieldLayout(Project project,
                                  String issueTypeId)
Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
project - A project
issueTypeId - The IssueType id of the issue.
Returns:
A FieldLayout
See Also:
FieldLayoutManager.getFieldLayout(Issue)

setFieldLayout

public MockFieldLayoutManager setFieldLayout(Project project,
                                             String issueTypeId,
                                             FieldLayout fieldLayout)

getFieldLayout

public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project,
                                  String issueTypeId)
Specified by:
getFieldLayout in interface FieldLayoutManager
Parameters:
project - the Project
issueTypeId - The IssueType id of the issue.
Returns:
A FieldLayout

getEditableDefaultFieldLayout

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

Specified by:
getEditableDefaultFieldLayout in interface FieldLayoutManager
Returns:
the default EditableDefaultFieldLayout.

storeEditableDefaultFieldLayout

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

Specified by:
storeEditableDefaultFieldLayout in interface FieldLayoutManager
Parameters:
editableDefaultFieldLayout - The EditableDefaultFieldLayout.

storeEditableFieldLayout

public void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
Description copied from interface: FieldLayoutManager
Persists the EditableFieldLayout provided.

Specified by:
storeEditableFieldLayout in interface FieldLayoutManager
Parameters:
editableFieldLayout - the EditableFieldLayout.

storeAndReturnEditableFieldLayout

public EditableFieldLayout storeAndReturnEditableFieldLayout(EditableFieldLayout editableFieldLayout)
Description copied from interface: FieldLayoutManager
Persists the EditableFieldLayout provided and returns a new instance as stored in the database.

Specified by:
storeAndReturnEditableFieldLayout in interface FieldLayoutManager
Parameters:
editableFieldLayout - the EditableFieldLayout.
Returns:
the layout as stored in the database.

restoreDefaultFieldLayout

public void restoreDefaultFieldLayout()
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

restoreSchemeFieldLayout

public void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
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.

Specified by:
restoreSchemeFieldLayout in interface FieldLayoutManager
Parameters:
scheme - A scheme GenericValue

hasDefaultFieldLayout

public boolean hasDefaultFieldLayout()
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.

getProjects

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

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)
Description copied from interface: FieldLayoutManager
Returns all associated projects for the FieldLayoutScheme supplied.

Specified by:
getProjects in interface FieldLayoutManager
Parameters:
fieldLayoutScheme - the FieldLayoutScheme
Returns:
A list of project GenericValues

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.

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

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.

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()

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

createFieldLayoutSchemeEntity

public FieldLayoutSchemeEntity createFieldLayoutSchemeEntity(FieldLayoutScheme fieldLayoutScheme,
                                                             String issueTypeId,
                                                             Long fieldConfigurationId)
Description copied from interface: FieldLayoutManager
Persists a new FieldLayoutSchemeEntity for a particular FieldLayoutScheme. The appropriate scheme is retrieved using FieldLayoutSchemeEntity.getFieldLayoutScheme()

Specified by:
createFieldLayoutSchemeEntity in interface FieldLayoutManager

updateFieldLayoutSchemeEntity

public void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Description copied from interface: FieldLayoutManager
Updates a FieldLayoutSchemeEntity.

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

removeFieldLayoutSchemeEntity

public void removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Description copied from interface: FieldLayoutManager
Removes a FieldLayoutSchemeEntity

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

removeFieldLayoutScheme

public void removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
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.

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.

isFieldLayoutSchemesVisiblyEquivalent

public boolean isFieldLayoutSchemesVisiblyEquivalent(Long fieldConfigurationSchemeId1,
                                                     Long fieldConfigurationSchemeId2)
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

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2014 Atlassian. All Rights Reserved.