com.atlassian.jira.issue.fields.layout.field.enterprise
Class EnterpriseFieldLayoutManager

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

public class EnterpriseFieldLayoutManager
extends DefaultFieldLayoutManager


Field Summary
static String ENT_FIELDLAYOUT_ASSOCIATION
           
 
Fields inherited from class com.atlassian.jira.issue.fields.layout.field.DefaultFieldLayoutManager
SCHEME, SCHEME_ASSOCIATION
 
Fields inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayoutManager
TYPE_DEFAULT
 
Constructor Summary
EnterpriseFieldLayoutManager(FieldManager fieldManager, org.ofbiz.core.entity.GenericDelegator genericDelegator)
           
 
Method Summary
 void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project, FieldLayoutScheme fieldLayoutScheme)
          Adding association between project and field layout scheme
protected  void clearCaches()
           
 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.
 EditableFieldLayout getEditableFieldLayout(Long id)
          Returns an EditableFieldLayout for the id supplied.
 List getEditableFieldLayouts()
          Retrieves editable (see EditableFieldLayout versions of the field layouts.
 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(Long id)
          Used to retrieve FieldLayout information when rendering a screen given the id of the field layout.
 FieldLayoutScheme getFieldLayoutScheme(org.ofbiz.core.entity.GenericValue project)
          Retrieves the Field Configuration Scheme associated with the supplied project.
 FieldLayoutScheme getFieldLayoutScheme(Long schemeId)
          Retrieves a FieldLayoutScheme by id NOTE: This is an enterprise ONLY feature.
 FieldLayoutScheme getFieldLayoutScheme(String schemeName)
          Retrieves a FieldLayoutScheme by name NOTE: This is an enterprise ONLY feature.
 Collection getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
          Returns a collection of FieldLayoutSchemeEntitys.
 List getFieldLayoutSchemes()
          Retries Field Configuration Schemes.
 Collection getFieldLayoutSchemes(EditableFieldLayout editableFieldLayout)
          Returns a collection of FieldLayoutSchemes that have the EditableFieldLayout supplied associated with them.
 Collection getProjects(FieldLayoutScheme fieldLayoutScheme)
          Returns all associated projects for the FieldLayoutScheme supplied.
 Collection getRelatedProjects(EditableFieldLayout editableFieldLayout)
          Finds all projects that have a certain EditableFieldLayout associated with them (via a FieldLayoutScheme.
 void refresh()
          Clears all local caches.
 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, FieldLayoutScheme fieldLayoutScheme)
          Remove association between project and field layout scheme
 void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
          Restores the field layout associated with the provided scheme to defaults.
 void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
          Persists the FieldLayoutScheme supplied.
 void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
          Updates a FieldLayoutSchemeEntity.
 
Methods inherited from class com.atlassian.jira.issue.fields.layout.field.DefaultFieldLayoutManager
getDefaultDesciption, getEditableDefaultFieldLayout, getFieldLayout, getFieldLayout, getRelevantFieldLayout, hasDefaultFieldLayout, refreshCaches, restoreDefaultFieldLayout, restoreFieldLayout, storeEditableDefaultFieldLayout, storeEditableFieldLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENT_FIELDLAYOUT_ASSOCIATION

public static final String ENT_FIELDLAYOUT_ASSOCIATION
See Also:
Constant Field Values
Constructor Detail

EnterpriseFieldLayoutManager

public EnterpriseFieldLayoutManager(FieldManager fieldManager,
                                    org.ofbiz.core.entity.GenericDelegator genericDelegator)
Method Detail

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
Overrides:
getFieldLayout in class DefaultFieldLayoutManager
Parameters:
issue - An issue GenericValue
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException

getFieldLayout

public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project,
                                  String issueTypeId)
                           throws FieldLayoutStorageException
Specified by:
getFieldLayout in interface FieldLayoutManager
Overrides:
getFieldLayout in class DefaultFieldLayoutManager
Parameters:
project - A project GenericValue
issueTypeId - The IssueType id of the issue.
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException
See Also:
FieldLayoutManager.getFieldLayout(org.ofbiz.core.entity.GenericValue)

getFieldLayoutSchemes

public List 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
Overrides:
getFieldLayoutSchemes in class DefaultFieldLayoutManager
Returns:
A list of FieldLayoutSchemes.
Throws:
FieldLayoutStorageException

getRelatedProjects

public Collection getRelatedProjects(EditableFieldLayout editableFieldLayout)
Description copied from interface: FieldLayoutManager
Finds all projects that have a certain EditableFieldLayout associated with them (via a FieldLayoutScheme.

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
Overrides:
getRelatedProjects in class DefaultFieldLayoutManager
Returns:

getEditableFieldLayouts

public List 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
Overrides:
getEditableFieldLayouts in class DefaultFieldLayoutManager
Returns:
A list of EditableFieldLayout and EditableDefaultFieldLayout

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
Overrides:
getEditableFieldLayout in class DefaultFieldLayoutManager
Parameters:
id - If the id is NULL, the default layout is returned.
Returns:
An EditableFieldLayout

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
Overrides:
updateFieldLayoutScheme in class DefaultFieldLayoutManager
Throws:
FieldLayoutStorageException

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
Overrides:
deleteFieldLayoutScheme in class DefaultFieldLayoutManager
Throws:
FieldLayoutStorageException

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
Overrides:
deleteFieldLayout in class DefaultFieldLayoutManager

getFieldLayoutSchemeEntities

public Collection 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
Overrides:
getFieldLayoutSchemeEntities in class DefaultFieldLayoutManager
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
Overrides:
createFieldLayoutSchemeEntity in class DefaultFieldLayoutManager

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
Overrides:
updateFieldLayoutSchemeEntity in class DefaultFieldLayoutManager

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
Overrides:
removeFieldLayoutSchemeEntity in class DefaultFieldLayoutManager

removeFieldLayoutScheme

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

Specified by:
removeFieldLayoutScheme in interface FieldLayoutManager
Overrides:
removeFieldLayoutScheme in class DefaultFieldLayoutManager

getFieldLayoutSchemes

public Collection getFieldLayoutSchemes(EditableFieldLayout editableFieldLayout)
Description copied from interface: FieldLayoutManager
Returns a collection of FieldLayoutSchemes that have the EditableFieldLayout supplied associated with them. This is determined by retrieving all FieldLayoutSchemeEntitys with the EditableFieldLayout and calculating a set of FieldLayoutSchemes associated with these entities. NOTE: This is an enterprise ONLY feature.

Specified by:
getFieldLayoutSchemes in interface FieldLayoutManager
Overrides:
getFieldLayoutSchemes in class DefaultFieldLayoutManager
Returns:
A collection of FieldLayoutSchemes

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
Overrides:
restoreSchemeFieldLayout in class DefaultFieldLayoutManager
Parameters:
scheme - A scheme GenericValue
Throws:
FieldLayoutStorageException

getProjects

public Collection 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
Overrides:
getProjects in class DefaultFieldLayoutManager
Returns:
A list of project GenericValues
Throws:
FieldLayoutStorageException

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
Overrides:
createFieldLayoutScheme in class DefaultFieldLayoutManager
Parameters:
fieldLayoutScheme - The FieldLayoutScheme to persist.
Returns:
The stored FieldLayoutScheme object
Throws:
FieldLayoutStorageException

getFieldLayoutScheme

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

Specified by:
getFieldLayoutScheme in interface FieldLayoutManager
Overrides:
getFieldLayoutScheme in class DefaultFieldLayoutManager
Returns:
A FieldLayoutScheme instance
Throws:
FieldLayoutStorageException

getFieldLayoutScheme

public FieldLayoutScheme getFieldLayoutScheme(String schemeName)
                                       throws FieldLayoutStorageException
Description copied from interface: FieldLayoutManager
Retrieves a FieldLayoutScheme by name NOTE: This is an enterprise ONLY feature.

Specified by:
getFieldLayoutScheme in interface FieldLayoutManager
Overrides:
getFieldLayoutScheme in class DefaultFieldLayoutManager
Returns:
A FieldLayoutScheme instance
Throws:
FieldLayoutStorageException

getFieldLayoutScheme

public FieldLayoutScheme getFieldLayoutScheme(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:
getFieldLayoutScheme in interface FieldLayoutManager
Overrides:
getFieldLayoutScheme in class DefaultFieldLayoutManager
Parameters:
project - A project GenericValue
Returns:
A FieldLayoutScheme or null if none exists.
Throws:
FieldLayoutStorageException

addSchemeAssociation

public void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                 FieldLayoutScheme fieldLayoutScheme)
                          throws FieldLayoutStorageException,
                                 org.ofbiz.core.entity.GenericEntityException
Adding association between project and field layout scheme

Specified by:
addSchemeAssociation in interface FieldLayoutManager
Overrides:
addSchemeAssociation in class DefaultFieldLayoutManager
Parameters:
project - A project GenericValue
Throws:
FieldLayoutStorageException
org.ofbiz.core.entity.GenericEntityException

removeSchemeAssociation

public void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                    FieldLayoutScheme fieldLayoutScheme)
                             throws FieldLayoutStorageException,
                                    org.ofbiz.core.entity.GenericEntityException
Remove association between project and field layout scheme

Specified by:
removeSchemeAssociation in interface FieldLayoutManager
Overrides:
removeSchemeAssociation in class DefaultFieldLayoutManager
Parameters:
project - A project GenericValue
Throws:
FieldLayoutStorageException
org.ofbiz.core.entity.GenericEntityException

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
Overrides:
getFieldLayout in class DefaultFieldLayoutManager
Returns:
A FieldLayout

refresh

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

Specified by:
refresh in interface FieldLayoutManager
Overrides:
refresh in class DefaultFieldLayoutManager

clearCaches

protected void clearCaches()


Copyright © 2002-2007 Atlassian. All Rights Reserved.