com.atlassian.jira.issue.fields.layout.field
Interface FieldLayoutManager

All Known Implementing Classes:
DefaultFieldLayoutManager, EnterpriseFieldLayoutManager

public interface FieldLayoutManager

The FieldLayoutManager is responsible for managing screens, field configurations and field configuration schemes.


Field Summary
static String TYPE_DEFAULT
          JIRA must have a default field layout.
 
Method Summary
 void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project, FieldLayoutScheme fieldLayoutScheme)
          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.
 EditableDefaultFieldLayout getEditableDefaultFieldLayout()
          Returns the default EditableDefaultFieldLayout.
 EditableFieldLayout getEditableFieldLayout(Long id)
          Returns an EditableFieldLayout for the id supplied.
 List getEditableFieldLayouts()
          Retrieves editable (see EditableFieldLayout versions of the field layouts.
 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.
 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.
 boolean hasDefaultFieldLayout()
          Checks to see if a FieldLayout entity with type TYPE_DEFAULT exists
 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)
          Removes an association between a particular project and fieldlayoutscheme.
 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.
 void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
          Persist the given default EditableDefaultFieldLayout
 void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
          Persists the EditableFieldLayout provided.
 void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
          Persists the FieldLayoutScheme supplied.
 void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
          Updates a FieldLayoutSchemeEntity.
 

Field Detail

TYPE_DEFAULT

static final String TYPE_DEFAULT
JIRA must have a default field layout. This is used identify the default layout.

See Also:
Constant Field Values
Method Detail

createFieldLayoutScheme

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

Parameters:
fieldLayoutScheme - The FieldLayoutScheme to persist.
Returns:
The stored FieldLayoutScheme object
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition

getFieldLayoutScheme

FieldLayoutScheme getFieldLayoutScheme(Long schemeId)
                                       throws FieldLayoutStorageException
Retrieves a FieldLayoutScheme by id NOTE: This is an enterprise ONLY feature.

Parameters:
schemeId -
Returns:
A FieldLayoutScheme instance
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition

getFieldLayoutScheme

FieldLayoutScheme getFieldLayoutScheme(String schemeName)
                                       throws FieldLayoutStorageException
Retrieves a FieldLayoutScheme by name NOTE: This is an enterprise ONLY feature.

Parameters:
schemeName -
Returns:
A FieldLayoutScheme instance
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition

getEditableFieldLayouts

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

Returns:
A list of EditableFieldLayout and EditableDefaultFieldLayout

getFieldLayoutSchemes

List getFieldLayoutSchemes()
                           throws FieldLayoutStorageException
Retries Field Configuration Schemes. These are used to link field configurations to projects. NOTE: This is an enterprise ONLY feature.

Returns:
A list of FieldLayoutSchemes.
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition

updateFieldLayoutScheme

void updateFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
                             throws FieldLayoutStorageException
Persists the FieldLayoutScheme supplied. NOTE: This is an enterprise ONLY feature.

Parameters:
fieldLayoutScheme -
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition

deleteFieldLayoutScheme

void deleteFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
                             throws FieldLayoutStorageException
Removes the FieldLayoutScheme supplied. NOTE: This is an enterprise ONLY feature.

Parameters:
fieldLayoutScheme -
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition

getFieldLayoutScheme

FieldLayoutScheme getFieldLayoutScheme(org.ofbiz.core.entity.GenericValue project)
                                       throws FieldLayoutStorageException,
                                              org.ofbiz.core.entity.GenericEntityException
Retrieves the Field Configuration Scheme associated with the supplied project. NOTE: This is an enterprise ONLY feature.

Parameters:
project - A project GenericValue
Returns:
A FieldLayoutScheme or null if none exists.
Throws:
FieldLayoutStorageException
org.ofbiz.core.entity.GenericEntityException
UnsupportedOperationException - If this is executed against standard edition
IllegalArgumentException - If the project supplied is null.

addSchemeAssociation

void addSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                          FieldLayoutScheme fieldLayoutScheme)
                          throws FieldLayoutStorageException,
                                 org.ofbiz.core.entity.GenericEntityException
Associates a FieldLayoutScheme to the project supplied. NOTE: This is an enterprise ONLY feature.

Parameters:
project - A project GenericValue
fieldLayoutScheme -
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition
IllegalArgumentException - If the project supplied is null.
org.ofbiz.core.entity.GenericEntityException

removeSchemeAssociation

void removeSchemeAssociation(org.ofbiz.core.entity.GenericValue project,
                             FieldLayoutScheme fieldLayoutScheme)
                             throws FieldLayoutStorageException,
                                    org.ofbiz.core.entity.GenericEntityException
Removes an association between a particular project and fieldlayoutscheme. NOTE: This is an enterprise ONLY feature.

Parameters:
project - A project GenericValue
fieldLayoutScheme -
Throws:
FieldLayoutStorageException
IllegalArgumentException - If the fieldLayoutScheme passes is null
UnsupportedOperationException - If this is executed against standard edition
org.ofbiz.core.entity.GenericEntityException

getFieldLayout

FieldLayout getFieldLayout()
                           throws FieldLayoutStorageException
Used to retrieve FieldLayout information when rendering a screen.

Returns:
Throws:
FieldLayoutStorageException

getFieldLayout

FieldLayout getFieldLayout(Long id)
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.

Parameters:
id -
Returns:
A FieldLayout
Throws:
UnsupportedOperationException - If this is executed against standard edition

getFieldLayout

FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue issue)
                           throws FieldLayoutStorageException
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.

Parameters:
issue - An issue GenericValue
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException

getFieldLayout

FieldLayout getFieldLayout(Issue issue)
                           throws FieldLayoutStorageException
Parameters:
issue - An Issue
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException
See Also:
getFieldLayout(org.ofbiz.core.entity.GenericValue)

getFieldLayout

FieldLayout getFieldLayout(org.ofbiz.core.entity.GenericValue project,
                           String issueTypeId)
                           throws FieldLayoutStorageException
Parameters:
project - A project GenericValue
issueTypeId - The IssueType id of the issue.
Returns:
A FieldLayout
Throws:
FieldLayoutStorageException
See Also:
getFieldLayout(org.ofbiz.core.entity.GenericValue)

getEditableDefaultFieldLayout

EditableDefaultFieldLayout getEditableDefaultFieldLayout()
                                                         throws FieldLayoutStorageException
Returns the default EditableDefaultFieldLayout.

Returns:
Throws:
FieldLayoutStorageException

storeEditableDefaultFieldLayout

void storeEditableDefaultFieldLayout(EditableDefaultFieldLayout editableDefaultFieldLayout)
                                     throws FieldLayoutStorageException
Persist the given default EditableDefaultFieldLayout

Parameters:
editableDefaultFieldLayout -
Throws:
FieldLayoutStorageException

storeEditableFieldLayout

void storeEditableFieldLayout(EditableFieldLayout editableFieldLayout)
                              throws FieldLayoutStorageException
Persists the EditableFieldLayout provided.

Parameters:
editableFieldLayout -
Throws:
FieldLayoutStorageException

restoreDefaultFieldLayout

void restoreDefaultFieldLayout()
                               throws FieldLayoutStorageException
This method can be used to rollback any changes to the default field configuration.

Throws:
FieldLayoutStorageException

restoreSchemeFieldLayout

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

Parameters:
scheme - A scheme GenericValue
Throws:
FieldLayoutStorageException
IllegalArgumentException - if the scheme passes is null.
UnsupportedOperationException - If this is executed against standard edition

hasDefaultFieldLayout

boolean hasDefaultFieldLayout()
                              throws FieldLayoutStorageException
Checks to see if a FieldLayout entity with type TYPE_DEFAULT exists

Returns:
True if a default FieldLayout exists, false otherwise.
Throws:
FieldLayoutStorageException

getProjects

Collection getProjects(FieldLayoutScheme fieldLayoutScheme)
                       throws FieldLayoutStorageException
Returns all associated projects for the FieldLayoutScheme supplied. NOTE: This is an enterprise ONLY feature.

Parameters:
fieldLayoutScheme -
Returns:
A list of project GenericValues
Throws:
FieldLayoutStorageException
UnsupportedOperationException - If this is executed against standard edition

refresh

void refresh()
Clears all local caches.


getEditableFieldLayout

EditableFieldLayout getEditableFieldLayout(Long id)
Returns an EditableFieldLayout for the id supplied. NOTE: This is an enterprise ONLY feature.

Parameters:
id - If the id is NULL, the default layout is returned.
Returns:
An EditableFieldLayout
Throws:
UnsupportedOperationException - If this is executed against standard edition

deleteFieldLayout

void deleteFieldLayout(FieldLayout fieldLayout)
Deletes a custom FieldLayout NOTE: This is an enterprise ONLY feature.

Parameters:
fieldLayout -
Throws:
UnsupportedOperationException - If this is executed against standard edition

getFieldLayoutSchemeEntities

Collection getFieldLayoutSchemeEntities(FieldLayoutScheme fieldLayoutScheme)
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.

Parameters:
fieldLayoutScheme -
Returns:
A collection of FieldLayoutSchemeEntitys.
Throws:
UnsupportedOperationException - If this is executed against standard edition

createFieldLayoutSchemeEntity

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

Parameters:
fieldLayoutSchemeEntity -
Throws:
UnsupportedOperationException - If this is executed against standard edition

updateFieldLayoutSchemeEntity

void updateFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Updates a FieldLayoutSchemeEntity. NOTE: This is an enterprise ONLY feature.

Parameters:
fieldLayoutSchemeEntity -
Throws:
UnsupportedOperationException - If this is executed against standard edition

removeFieldLayoutSchemeEntity

void removeFieldLayoutSchemeEntity(FieldLayoutSchemeEntity fieldLayoutSchemeEntity)
Removes a FieldLayoutSchemeEntity NOTE: This is an enterprise ONLY feature.

Parameters:
fieldLayoutSchemeEntity -
Throws:
UnsupportedOperationException - If this is executed against standard edition

removeFieldLayoutScheme

void removeFieldLayoutScheme(FieldLayoutScheme fieldLayoutScheme)
NOTE: This is an enterprise ONLY feature.

Parameters:
fieldLayoutScheme -
Throws:
UnsupportedOperationException - If this is executed against standard edition

getFieldLayoutSchemes

Collection getFieldLayoutSchemes(EditableFieldLayout editableFieldLayout)
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.

Parameters:
editableFieldLayout -
Returns:
A collection of FieldLayoutSchemes
Throws:
UnsupportedOperationException - If this is executed against standard edition

getRelatedProjects

Collection getRelatedProjects(EditableFieldLayout editableFieldLayout)
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.

Parameters:
editableFieldLayout -
Returns:


Copyright © 2002-2007 Atlassian. All Rights Reserved.