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

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

public class DefaultFieldLayoutManager
extends java.lang.Object
implements FieldLayoutManager


Field Summary
static java.lang.String SCHEME
           
static java.lang.String SCHEME_ASSOCIATION
           
 
Constructor Summary
DefaultFieldLayoutManager(FieldManager fieldManager)
           
 
Method Summary
 void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue fieldLayoutScheme, java.lang.String issueTypeId)
           
 org.ofbiz.core.entity.GenericValue createFieldLayoutScheme(java.lang.String name, java.lang.String description)
           
 void deleteFieldLayoutScheme(org.ofbiz.core.entity.GenericValue fieldLayoutScheme)
           
protected  java.lang.String getDefaultDesciption(java.lang.String fieldId)
           
 EditableDefaultFieldLayout getEditableDefaultFieldLayout()
           
 EditableSchemeFieldLayout getEditableSchemeFieldLayout(org.ofbiz.core.entity.GenericValue schemeLayout)
           
 FieldLayout getFieldLayout()
           
 FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
           
 FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue projectOrScheme, java.lang.String issueTypeId)
           
protected  java.util.Map getFieldLayoutCache()
           
 org.ofbiz.core.entity.GenericValue getFieldLayoutScheme(org.ofbiz.core.entity.GenericValue project, java.lang.String issueTypeId)
           
 org.ofbiz.core.entity.GenericValue getFieldLayoutScheme(java.lang.Long schemeId)
           
 org.ofbiz.core.entity.GenericValue getFieldLayoutScheme(java.lang.String schemeName)
           
 java.util.List getFieldLayoutSchemes()
           
 java.util.Collection getProjects(org.ofbiz.core.entity.GenericValue issueFieldScheme)
           
protected  FieldLayout getRelevantFieldLayout(org.ofbiz.core.entity.GenericValue layoutScheme)
          Retrieves the field layout given a scheme.
 boolean hasDefaultFieldLayout()
           
 boolean isProjectDefaultScheme(java.lang.Long projectId, java.lang.String issueTypeId, java.lang.Long fieldLayoutSchemeId)
           
 void refresh()
           
protected  void refreshCaches(org.ofbiz.core.entity.GenericValue scheme)
           
 void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue fieldLayoutScheme, java.lang.String issueTypeId)
           
 void restoreDefaultFieldLayout()
           
protected  void restoreFieldLayout(java.lang.Long schemeId)
           
 void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
           
 void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
           
protected  void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout, java.lang.Object layoutSchemeId)
          THIS METHOD MUST BE SYNCHRONIZED!!!! So that only one thread updates the database at any one time.
 void storeEditableSchemeFieldLayout(EditableSchemeFieldLayout editableSchemeFieldLayout)
           
 void updateFieldLayoutScheme(org.ofbiz.core.entity.GenericValue fieldLayoutScheme, java.lang.String name, java.lang.String description)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEME

public static final java.lang.String SCHEME
See Also:
Constant Field Values

SCHEME_ASSOCIATION

public static final java.lang.String SCHEME_ASSOCIATION
See Also:
Constant Field Values
Constructor Detail

DefaultFieldLayoutManager

public DefaultFieldLayoutManager(FieldManager fieldManager)
Method Detail

getFieldLayout

public FieldLayout getFieldLayout()
                           throws FieldLayoutStorageException
Specified by:
getFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getFieldLayout

public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
                           throws FieldLayoutStorageException
Specified by:
getFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getFieldLayout

public FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue projectOrScheme,
                                  java.lang.String issueTypeId)
                           throws FieldLayoutStorageException
Specified by:
getFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getFieldLayoutSchemes

public java.util.List getFieldLayoutSchemes()
                                     throws FieldLayoutStorageException
Specified by:
getFieldLayoutSchemes in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

updateFieldLayoutScheme

public void updateFieldLayoutScheme(org.ofbiz.core.entity.GenericValue fieldLayoutScheme,
                                    java.lang.String name,
                                    java.lang.String description)
                             throws FieldLayoutStorageException
Specified by:
updateFieldLayoutScheme in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

deleteFieldLayoutScheme

public void deleteFieldLayoutScheme(org.ofbiz.core.entity.GenericValue fieldLayoutScheme)
                             throws FieldLayoutStorageException
Specified by:
deleteFieldLayoutScheme in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getEditableDefaultFieldLayout

public EditableDefaultFieldLayout getEditableDefaultFieldLayout()
                                                         throws FieldLayoutStorageException
Specified by:
getEditableDefaultFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getEditableSchemeFieldLayout

public EditableSchemeFieldLayout getEditableSchemeFieldLayout(org.ofbiz.core.entity.GenericValue schemeLayout)
                                                       throws FieldLayoutStorageException
Specified by:
getEditableSchemeFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

storeEditableDefaultFieldLayout

public void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
                                     throws FieldLayoutStorageException
Specified by:
storeEditableDefaultFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

storeEditableSchemeFieldLayout

public void storeEditableSchemeFieldLayout(EditableSchemeFieldLayout editableSchemeFieldLayout)
                                    throws FieldLayoutStorageException
Specified by:
storeEditableSchemeFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

storeEditableFieldLayout

protected void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout,
                                        java.lang.Object layoutSchemeId)
                                 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.

Parameters:
editableFieldLayout -
layoutSchemeId -
Throws:
FieldLayoutStorageException

refreshCaches

protected void refreshCaches(org.ofbiz.core.entity.GenericValue scheme)

hasDefaultFieldLayout

public boolean hasDefaultFieldLayout()
                              throws FieldLayoutStorageException
Specified by:
hasDefaultFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

restoreDefaultFieldLayout

public void restoreDefaultFieldLayout()
                               throws FieldLayoutStorageException
Specified by:
restoreDefaultFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

restoreSchemeFieldLayout

public void restoreSchemeFieldLayout(org.ofbiz.core.entity.GenericValue scheme)
                              throws FieldLayoutStorageException
Specified by:
restoreSchemeFieldLayout in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

restoreFieldLayout

protected void restoreFieldLayout(java.lang.Long schemeId)
                           throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException

getProjects

public java.util.Collection getProjects(org.ofbiz.core.entity.GenericValue issueFieldScheme)
                                 throws FieldLayoutStorageException
Specified by:
getProjects in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

createFieldLayoutScheme

public org.ofbiz.core.entity.GenericValue createFieldLayoutScheme(java.lang.String name,
                                                                  java.lang.String description)
                                                           throws FieldLayoutStorageException
Specified by:
createFieldLayoutScheme in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getFieldLayoutScheme

public org.ofbiz.core.entity.GenericValue getFieldLayoutScheme(java.lang.Long schemeId)
                                                        throws FieldLayoutStorageException
Specified by:
getFieldLayoutScheme in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getFieldLayoutScheme

public org.ofbiz.core.entity.GenericValue getFieldLayoutScheme(java.lang.String schemeName)
                                                        throws FieldLayoutStorageException
Specified by:
getFieldLayoutScheme in interface FieldLayoutManager
Throws:
FieldLayoutStorageException

getFieldLayoutScheme

public org.ofbiz.core.entity.GenericValue getFieldLayoutScheme(org.ofbiz.core.entity.GenericValue project,
                                                               java.lang.String issueTypeId)
                                                        throws FieldLayoutStorageException,
                                                               org.ofbiz.core.entity.GenericEntityException
Specified by:
getFieldLayoutScheme in interface FieldLayoutManager
Throws:
FieldLayoutStorageException
org.ofbiz.core.entity.GenericEntityException

addSchemeAssociation

public void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                 org.ofbiz.core.entity.GenericValue fieldLayoutScheme,
                                 java.lang.String issueTypeId)
                          throws FieldLayoutStorageException,
                                 org.ofbiz.core.entity.GenericEntityException
Specified by:
addSchemeAssociation in interface FieldLayoutManager
Throws:
FieldLayoutStorageException
org.ofbiz.core.entity.GenericEntityException

isProjectDefaultScheme

public boolean isProjectDefaultScheme(java.lang.Long projectId,
                                      java.lang.String issueTypeId,
                                      java.lang.Long fieldLayoutSchemeId)
                               throws org.ofbiz.core.entity.GenericEntityException
Specified by:
isProjectDefaultScheme in interface FieldLayoutManager
Throws:
org.ofbiz.core.entity.GenericEntityException

removeSchemeAssociation

public void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                                    org.ofbiz.core.entity.GenericValue fieldLayoutScheme,
                                    java.lang.String issueTypeId)
                             throws FieldLayoutStorageException,
                                    org.ofbiz.core.entity.GenericEntityException
Specified by:
removeSchemeAssociation in interface FieldLayoutManager
Throws:
FieldLayoutStorageException
org.ofbiz.core.entity.GenericEntityException

refresh

public void refresh()
Specified by:
refresh in interface FieldLayoutManager

getRelevantFieldLayout

protected FieldLayout getRelevantFieldLayout(org.ofbiz.core.entity.GenericValue layoutScheme)
                                      throws FieldLayoutStorageException
Retrieves the field layout given a scheme.

Parameters:
layoutScheme -
Returns:
Throws:
FieldLayoutStorageException

getDefaultDesciption

protected java.lang.String getDefaultDesciption(java.lang.String fieldId)

getFieldLayoutCache

protected java.util.Map getFieldLayoutCache()


Copyright © 2002-2005 Atlassian. All Rights Reserved.