Class MockFieldLayoutManager
- All Implemented Interfaces:
FieldLayoutManager
MockFieldLayoutManager
.- Since:
- v4.1
-
Field Summary
Fields inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager
TYPE_DEFAULT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLayoutItem
(Issue issue) void
addSchemeAssociation
(Project project, Long fieldLayoutSchemeId) Associates aFieldLayoutScheme
to the project supplied.void
addSchemeAssociation
(org.ofbiz.core.entity.GenericValue project, Long fieldLayoutSchemeId) Associates aFieldLayoutScheme
to the project supplied.copyFieldLayoutScheme
(FieldLayoutScheme scheme, String name, String description) Copies an existing field layout to a new one.createFieldLayoutScheme
(FieldLayoutScheme fieldLayoutScheme) Persists a new field Layout scheme (i.e Field Configuration Scheme).createFieldLayoutScheme
(String name, String description) Persists a new field Layout scheme (i.e Field Configuration Scheme).void
createFieldLayoutSchemeEntity
(FieldLayoutSchemeEntity fieldLayoutSchemeEntity) Persists a newFieldLayoutSchemeEntity
for a particularFieldLayoutScheme
.createFieldLayoutSchemeEntity
(FieldLayoutScheme fieldLayoutScheme, String issueTypeId, Long fieldConfigurationId) Persists a newFieldLayoutSchemeEntity
for a particularFieldLayoutScheme
.void
deleteFieldLayout
(FieldLayout fieldLayout) Deletes a customFieldLayout
void
deleteFieldLayoutScheme
(FieldLayoutScheme fieldLayoutScheme) Removes theFieldLayoutScheme
supplied.boolean
fieldConfigurationSchemeExists
(String schemeName) Checks if a FieldConfigurationScheme with the given name exists.Returns the defaultEditableDefaultFieldLayout
.Returns anEditableFieldLayout
for the id supplied.Retrieves editable (seeEditableFieldLayout
versions of the field layouts.getFieldConfigurationScheme
(Project project) Retrieves the Field Configuration Scheme associated with the supplied project.getFieldConfigurationScheme
(Long schemeId) Retrieves aFieldConfigurationScheme
by idgetFieldConfigurationSchemeForProject
(Long projectId) Retrieves the Field Configuration Scheme associated with the supplied project.getFieldConfigurationSchemes
(FieldLayout fieldLayout) Returns a collection ofFieldConfigurationScheme
s that include the givenFieldLayout
.Used to retrieveFieldLayout
information when rendering a screen.getFieldLayout
(Issue issue) Returns the fieldLayout for an issue.getFieldLayout
(Project project, String issueTypeId) getFieldLayout
(Long id) Used to retrieveFieldLayout
information when rendering a screen given the id of the field layout.getFieldLayout
(Long projectId, String issueTypeId) Find the FieldLayout for the given Project and IssueType.getFieldLayout
(org.ofbiz.core.entity.GenericValue issue) Returns the fieldLayout for an issue.getFieldLayoutSchemeEntities
(FieldLayoutScheme fieldLayoutScheme) Returns a collection ofFieldLayoutSchemeEntity
s.Retries Field Configuration Schemes.getMutableFieldLayoutScheme
(Long schemeId) Retrieves a mutableFieldLayoutScheme
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 theFieldLayoutScheme
supplied.getProjectsUsing
(FieldConfigurationScheme fieldConfigurationScheme) Returns all projects that use the given FieldConfigurationScheme.getProjectsUsing
(FieldLayout fieldLayout) Finds all projects that use the givenFieldLayout
(via the configuredFieldConfigurationScheme
).getProjectsUsing
(FieldLayoutScheme fieldLayoutScheme) Returns all projects that use the given FieldLayoutScheme.Collection<org.ofbiz.core.entity.GenericValue>
getRelatedProjects
(FieldLayout fieldLayout) Finds all projects that use the givenFieldLayout
(via the configuredFieldConfigurationScheme
).getUniqueFieldLayouts
(Project project) Retrieves all theFieldLayout
's for a project.getUniqueFieldLayouts
(Collection<Project> projects, Collection<String> issueTypeIds) Retrieves all theFieldLayout
's for a collection of projects and issue types.boolean
Checks to see if aFieldLayout
entity with typeFieldLayoutManager.TYPE_DEFAULT
existsboolean
isFieldLayoutSchemesVisiblyEquivalent
(Long fieldConfigurationSchemeId1, Long fieldConfigurationSchemeId2) Will determine whether or not twoFieldLayoutScheme
s are "visibly equivalent".boolean
isFieldLayoutsVisiblyEquivalent
(Long fieldLayoutId1, Long fieldLayoutId2) Will determine whether or not twoFieldLayout
s are "visibly equivalent".void
refresh()
Clears all local caches.void
removeFieldLayoutScheme
(FieldLayoutScheme fieldLayoutScheme) void
removeFieldLayoutSchemeEntity
(FieldLayoutSchemeEntity fieldLayoutSchemeEntity) Removes aFieldLayoutSchemeEntity
void
removeSchemeAssociation
(Project project, Long fieldLayoutSchemeId) Removes an association between a particular project and field configuration scheme.void
removeSchemeAssociation
(org.ofbiz.core.entity.GenericValue project, Long fieldLayoutSchemeId) Removes an association between a particular project and field configuration scheme.void
This method can be used to rollback any changes to the default field configuration.setFieldConfigurationScheme
(Project project, FieldConfigurationScheme fieldConfigurationScheme) setFieldConfigurationScheme
(Long id, FieldConfigurationScheme fieldConfigurationScheme) setFieldLayout
(Project project, String issueTypeId, FieldLayout fieldLayout) setFieldLayout
(Long id, FieldLayout fieldLayout) setFieldLayoutSchemes
(List<FieldLayoutScheme> fieldLayoutSchemes) storeAndReturnEditableFieldLayout
(EditableFieldLayout editableFieldLayout) Persists theEditableFieldLayout
provided and returns a new instance as stored in the database.void
storeEditableDefaultFieldLayout
(EditableDefaultFieldLayout editableDefaultFieldLayout) Persist the given defaultEditableDefaultFieldLayout
void
storeEditableFieldLayout
(EditableFieldLayout editableFieldLayout) Persists theEditableFieldLayout
provided.toString()
void
updateFieldLayoutItemAttributesForCustomField
(CustomField customField, String description, boolean isRequired, boolean isHidden) Update thedescription
,isHidden
andisRequired
columns of all thefieldlayoutitem
rows associated with this custom field.void
updateFieldLayoutScheme
(FieldLayoutScheme fieldLayoutScheme) Persists theFieldLayoutScheme
supplied.void
updateFieldLayoutSchemeEntity
(FieldLayoutSchemeEntity fieldLayoutSchemeEntity) Updates aFieldLayoutSchemeEntity
.
-
Constructor Details
-
MockFieldLayoutManager
public MockFieldLayoutManager()
-
-
Method Details
-
addLayoutItem
-
createFieldLayoutScheme
Description copied from interface:FieldLayoutManager
Persists a new field Layout scheme (i.e Field Configuration Scheme).- Specified by:
createFieldLayoutScheme
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- TheFieldLayoutScheme
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 interfaceFieldLayoutManager
-
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 interfaceFieldLayoutManager
-
getFieldConfigurationScheme
Description copied from interface:FieldLayoutManager
Retrieves aFieldConfigurationScheme
by id- Specified by:
getFieldConfigurationScheme
in interfaceFieldLayoutManager
- Parameters:
schemeId
- FieldConfigurationScheme ID- Returns:
- A
FieldConfigurationScheme
instance
-
getMutableFieldLayoutScheme
Description copied from interface:FieldLayoutManager
Retrieves a mutableFieldLayoutScheme
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 interfaceFieldLayoutManager
- Parameters:
schemeId
- the scheme ID- Returns:
- A
FieldLayoutScheme
instance
-
fieldConfigurationSchemeExists
Description copied from interface:FieldLayoutManager
Checks if a FieldConfigurationScheme with the given name exists.- Specified by:
fieldConfigurationSchemeExists
in interfaceFieldLayoutManager
- Parameters:
schemeName
- The scheme name- Returns:
true
if a FieldConfigurationScheme with the given name exists.
-
getEditableFieldLayouts
Description copied from interface:FieldLayoutManager
Retrieves editable (seeEditableFieldLayout
versions of the field layouts. Note: For standard edition this simply returns an editable version of the default field layout. (seeEditableDefaultFieldLayout
)- Specified by:
getEditableFieldLayouts
in interfaceFieldLayoutManager
- Returns:
- A list of
EditableFieldLayout
andEditableDefaultFieldLayout
-
getFieldLayoutSchemes
Description copied from interface:FieldLayoutManager
Retries Field Configuration Schemes. These are used to link field configurations to projects.- Specified by:
getFieldLayoutSchemes
in interfaceFieldLayoutManager
- Returns:
- A list of
FieldLayoutScheme
s.
-
setFieldLayoutSchemes
-
updateFieldLayoutScheme
Description copied from interface:FieldLayoutManager
Persists theFieldLayoutScheme
supplied.- Specified by:
updateFieldLayoutScheme
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- The FieldLayoutScheme
-
deleteFieldLayoutScheme
Description copied from interface:FieldLayoutManager
Removes theFieldLayoutScheme
supplied.- Specified by:
deleteFieldLayoutScheme
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- The FieldLayoutScheme
-
getFieldConfigurationScheme
Description copied from interface:FieldLayoutManager
Retrieves the Field Configuration Scheme associated with the supplied project.- Specified by:
getFieldConfigurationScheme
in interfaceFieldLayoutManager
- Parameters:
project
- A project- Returns:
- A
FieldConfigurationScheme
or null if none exists.
-
getFieldConfigurationSchemeForProject
Description copied from interface:FieldLayoutManager
Retrieves the Field Configuration Scheme associated with the supplied project.- Specified by:
getFieldConfigurationSchemeForProject
in interfaceFieldLayoutManager
- Parameters:
projectId
- The project ID- Returns:
- A
FieldConfigurationScheme
or null if none exists.
-
setFieldConfigurationScheme
public MockFieldLayoutManager setFieldConfigurationScheme(Project project, FieldConfigurationScheme fieldConfigurationScheme) -
setFieldConfigurationScheme
public MockFieldLayoutManager setFieldConfigurationScheme(Long id, FieldConfigurationScheme fieldConfigurationScheme) -
getUniqueFieldLayouts
Description copied from interface:FieldLayoutManager
Retrieves all theFieldLayout
's for a project.- Specified by:
getUniqueFieldLayouts
in interfaceFieldLayoutManager
- Parameters:
project
- a project- Returns:
- the unique set of FieldLayout's for the provided project, an empty set if there are none.
-
getUniqueFieldLayouts
@Nonnull public Set<FieldLayout> getUniqueFieldLayouts(@Nonnull Collection<Project> projects, @Nonnull Collection<String> issueTypeIds) Description copied from interface:FieldLayoutManager
Retrieves all theFieldLayout
's for a collection of projects and issue types.- Specified by:
getUniqueFieldLayouts
in interfaceFieldLayoutManager
- Parameters:
projects
- a collection of projects.issueTypeIds
- An collection of issue type ids.- Returns:
- the unique set of FieldLayout's for the provided projects, 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 aFieldLayoutScheme
to the project supplied.- Specified by:
addSchemeAssociation
in interfaceFieldLayoutManager
- Parameters:
project
- A projectGenericValue
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 interfaceFieldLayoutManager
- Parameters:
project
- A projectGenericValue
fieldLayoutSchemeId
- The fieldLayoutScheme ID
-
addSchemeAssociation
Description copied from interface:FieldLayoutManager
Associates aFieldLayoutScheme
to the project supplied.- Specified by:
addSchemeAssociation
in interfaceFieldLayoutManager
- Parameters:
project
- The projectfieldLayoutSchemeId
- ID of the FieldLayoutScheme
-
removeSchemeAssociation
Description copied from interface:FieldLayoutManager
Removes an association between a particular project and field configuration scheme.- Specified by:
removeSchemeAssociation
in interfaceFieldLayoutManager
- Parameters:
project
- The projectfieldLayoutSchemeId
- The fieldLayoutScheme ID
-
getFieldLayout
Description copied from interface:FieldLayoutManager
Used to retrieveFieldLayout
information when rendering a screen.- Specified by:
getFieldLayout
in interfaceFieldLayoutManager
- Returns:
- the default FieldLayout
-
getFieldLayout
Description copied from interface:FieldLayoutManager
Used to retrieveFieldLayout
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 interfaceFieldLayoutManager
- Parameters:
id
- The FieldLayout ID.- Returns:
- The
FieldLayout
-
setFieldLayout
-
getFieldLayout
Description copied from interface:FieldLayoutManager
Returns the fieldLayout for an issue.- Specified by:
getFieldLayout
in interfaceFieldLayoutManager
- Parameters:
issue
- An issueGenericValue
- Returns:
- A
FieldLayout
-
getFieldLayout
Description copied from interface:FieldLayoutManager
Returns the fieldLayout for an issue.- Specified by:
getFieldLayout
in interfaceFieldLayoutManager
- Parameters:
issue
- AnIssue
- Returns:
- A
FieldLayout
-
getFieldLayout
- Specified by:
getFieldLayout
in interfaceFieldLayoutManager
- Parameters:
project
- A projectissueTypeId
- The IssueType id of the issue.- Returns:
- A
FieldLayout
- See Also:
-
getFieldLayout
Description copied from interface:FieldLayoutManager
Find the FieldLayout for the given Project and IssueType.- Specified by:
getFieldLayout
in interfaceFieldLayoutManager
- Parameters:
projectId
- the projectissueTypeId
- the issue type- Returns:
- the FieldLayout for the given Project and IssueType.
-
setFieldLayout
public MockFieldLayoutManager setFieldLayout(Project project, String issueTypeId, FieldLayout fieldLayout) -
getEditableDefaultFieldLayout
Description copied from interface:FieldLayoutManager
Returns the defaultEditableDefaultFieldLayout
.- Specified by:
getEditableDefaultFieldLayout
in interfaceFieldLayoutManager
- Returns:
- the default
EditableDefaultFieldLayout
.
-
storeEditableDefaultFieldLayout
Description copied from interface:FieldLayoutManager
Persist the given defaultEditableDefaultFieldLayout
- Specified by:
storeEditableDefaultFieldLayout
in interfaceFieldLayoutManager
- Parameters:
editableDefaultFieldLayout
- The EditableDefaultFieldLayout.
-
storeEditableFieldLayout
Description copied from interface:FieldLayoutManager
Persists theEditableFieldLayout
provided.- Specified by:
storeEditableFieldLayout
in interfaceFieldLayoutManager
- Parameters:
editableFieldLayout
- the EditableFieldLayout.
-
storeAndReturnEditableFieldLayout
public EditableFieldLayout storeAndReturnEditableFieldLayout(EditableFieldLayout editableFieldLayout) Description copied from interface:FieldLayoutManager
Persists theEditableFieldLayout
provided and returns a new instance as stored in the database.- Specified by:
storeAndReturnEditableFieldLayout
in interfaceFieldLayoutManager
- 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 interfaceFieldLayoutManager
-
hasDefaultFieldLayout
public boolean hasDefaultFieldLayout()Description copied from interface:FieldLayoutManager
Checks to see if aFieldLayout
entity with typeFieldLayoutManager.TYPE_DEFAULT
exists- Specified by:
hasDefaultFieldLayout
in interfaceFieldLayoutManager
- 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 interfaceFieldLayoutManager
- Parameters:
fieldConfigurationScheme
- the FieldConfigurationScheme- Returns:
- A list of projects that use the given FieldConfigurationScheme.
-
getProjectsUsing
Description copied from interface:FieldLayoutManager
Returns all projects that use the given FieldConfigurationScheme.- Specified by:
getProjectsUsing
in interfaceFieldLayoutManager
- 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 theFieldLayoutScheme
supplied.- Specified by:
getProjects
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- the FieldLayoutScheme- Returns:
- A list of project
GenericValue
s
-
getProjectsUsing
Description copied from interface:FieldLayoutManager
Returns all projects that use the given FieldLayoutScheme.- Specified by:
getProjectsUsing
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- the FieldLayoutScheme- Returns:
- A list of projects that use the given FieldLayoutScheme.
-
refresh
public void refresh()Description copied from interface:FieldLayoutManager
Clears all local caches.- Specified by:
refresh
in interfaceFieldLayoutManager
-
getEditableFieldLayout
Description copied from interface:FieldLayoutManager
Returns anEditableFieldLayout
for the id supplied.- Specified by:
getEditableFieldLayout
in interfaceFieldLayoutManager
- Parameters:
id
- If the id is NULL, the default layout is returned.- Returns:
- An
EditableFieldLayout
-
deleteFieldLayout
Description copied from interface:FieldLayoutManager
Deletes a customFieldLayout
- Specified by:
deleteFieldLayout
in interfaceFieldLayoutManager
- Parameters:
fieldLayout
- The FieldLayout
-
getFieldLayoutSchemeEntities
public Collection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme) Description copied from interface:FieldLayoutManager
Returns a collection ofFieldLayoutSchemeEntity
s. These are used to record mappings fromIssueType
->FieldLayout
for theFieldLayoutScheme
passed in.- Specified by:
getFieldLayoutSchemeEntities
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- The FieldLayoutScheme- Returns:
- A collection of
FieldLayoutSchemeEntity
s.
-
createFieldLayoutSchemeEntity
Description copied from interface:FieldLayoutManager
Persists a newFieldLayoutSchemeEntity
for a particularFieldLayoutScheme
. The appropriate scheme is retrieved usingFieldLayoutSchemeEntity.getFieldLayoutScheme()
- Specified by:
createFieldLayoutSchemeEntity
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntity
-
createFieldLayoutSchemeEntity
public FieldLayoutSchemeEntity createFieldLayoutSchemeEntity(FieldLayoutScheme fieldLayoutScheme, String issueTypeId, Long fieldConfigurationId) Description copied from interface:FieldLayoutManager
Persists a newFieldLayoutSchemeEntity
for a particularFieldLayoutScheme
. The appropriate scheme is retrieved usingFieldLayoutSchemeEntity.getFieldLayoutScheme()
- Specified by:
createFieldLayoutSchemeEntity
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- the FieldLayoutSchemeissueTypeId
- the Issue TypefieldConfigurationId
- the FieldConfig
-
updateFieldLayoutSchemeEntity
Description copied from interface:FieldLayoutManager
Updates aFieldLayoutSchemeEntity
.- Specified by:
updateFieldLayoutSchemeEntity
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntity
-
removeFieldLayoutSchemeEntity
Description copied from interface:FieldLayoutManager
Removes aFieldLayoutSchemeEntity
- Specified by:
removeFieldLayoutSchemeEntity
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutSchemeEntity
- The FieldLayoutSchemeEntity
-
removeFieldLayoutScheme
- Specified by:
removeFieldLayoutScheme
in interfaceFieldLayoutManager
- Parameters:
fieldLayoutScheme
- The FieldLayoutScheme
-
getFieldConfigurationSchemes
Description copied from interface:FieldLayoutManager
Returns a collection ofFieldConfigurationScheme
s that include the givenFieldLayout
.This is determined by retrieving all
FieldLayoutSchemeEntity
s with theFieldLayout
and calculating a set ofFieldConfigurationScheme
s using these entities.- Specified by:
getFieldConfigurationSchemes
in interfaceFieldLayoutManager
- Parameters:
fieldLayout
- The FieldLayout.- Returns:
- A collection of
FieldConfigurationScheme
s
-
getRelatedProjects
Description copied from interface:FieldLayoutManager
Finds all projects that use the givenFieldLayout
(via the configuredFieldConfigurationScheme
).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 interfaceFieldLayoutManager
- Parameters:
fieldLayout
- The FieldLayout.- Returns:
- The set of Projects that use the given FieldLayout.
-
getProjectsUsing
Description copied from interface:FieldLayoutManager
Finds all projects that use the givenFieldLayout
(via the configuredFieldConfigurationScheme
).NOTE: In the case of Standard & Professional, this simply returns ALL projects, as the only fieldlayout is the default field layout.
- Specified by:
getProjectsUsing
in interfaceFieldLayoutManager
- 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 twoFieldLayoutScheme
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:
- All issue types map to the same field layouts; or else
- The field layouts that an issue type is associated with in each scheme are visibly equivalent
Note that equivalence is reflexive - all the associations in scheme1 must have equivalent associations in scheme2, and vice versa.
- Specified by:
isFieldLayoutSchemesVisiblyEquivalent
in interfaceFieldLayoutManager
- Parameters:
fieldConfigurationSchemeId1
- the first scheme; can usenull
for the system default schemefieldConfigurationSchemeId2
- the second scheme; can usenull
for the system default scheme- Returns:
- the result of the equivalence comparison
-
isFieldLayoutsVisiblyEquivalent
Description copied from interface:FieldLayoutManager
Will determine whether or not twoFieldLayout
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:
- They contain the same fields, and
- Each field has the same shown/hidden flag
- Specified by:
isFieldLayoutsVisiblyEquivalent
in interfaceFieldLayoutManager
- Parameters:
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- Returns:
- the result of the equivalence comparison
-
updateFieldLayoutItemAttributesForCustomField
public void updateFieldLayoutItemAttributesForCustomField(CustomField customField, String description, boolean isRequired, boolean isHidden) Description copied from interface:FieldLayoutManager
Update thedescription
,isHidden
andisRequired
columns of all thefieldlayoutitem
rows associated with this custom field.- Specified by:
updateFieldLayoutItemAttributesForCustomField
in interfaceFieldLayoutManager
- Parameters:
customField
- a CustomField which owns the affected fieldlayoutitemsdescription
- a String containing the new descriptionisRequired
- a boolean containing the new valueisHidden
- a boolean containing the new value.
-
toString
-