com.atlassian.jira.issue.managers
Class DefaultCustomFieldManager

java.lang.Object
  extended bycom.atlassian.jira.issue.managers.DefaultCustomFieldManager
All Implemented Interfaces:
CustomFieldManager

public class DefaultCustomFieldManager
extends java.lang.Object
implements CustomFieldManager


Constructor Summary
DefaultCustomFieldManager()
           
 
Method Summary
 GenericValue createCustomField(java.lang.String fieldName, java.lang.String description, int fieldType, java.lang.String defaultValue, java.lang.Long project, java.lang.String issueType, java.util.List selectValues)
           
 GenericValue getCustomField(java.lang.Long id)
           
 java.util.List getCustomField(java.lang.String name)
           
 CustomField getCustomFieldObject(java.lang.Long id)
           
 java.util.List getCustomFieldObjects()
           
 java.util.List getCustomFieldObjects(GenericValue project, java.util.List issueTypes)
           
 GenericValue getCustomFieldOption(java.lang.Long id)
           
 java.util.List getCustomFieldOptions(GenericValue customField)
           
 java.util.List getCustomFields()
          Get all custom fields.
 java.util.List getCustomFields(GenericValue issue)
          Get all the custom fields for a particular issue.
 java.util.List getCustomFields(java.util.List issueTypes, java.lang.Long projectId)
           
 java.util.List getCustomFields(java.lang.String issueType, java.lang.Long projectId)
          Get all the custom fields for a particular issue type and project.
 java.util.List getCustomFields(java.lang.String issueType, java.lang.Long projectId, int customFieldType)
          Get all the custom fields for a particular issue type, project and custom field type.
 java.util.List getCustomFieldsForType(java.lang.String typeId)
          Return custom fields specific to a certain type of issue.
 java.util.List getValidCustomFields(java.util.List issueTypes, java.lang.Long projectId)
           
 void moveCustomFieldOptionValues(GenericValue customFieldOption, java.lang.String moveTo)
           
 void refresh()
           
 void removeCustomField(GenericValue customField)
           
 void removeCustomFieldOption(GenericValue customFieldOption)
           
 void removeCustomFieldOptionValues(GenericValue genericValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCustomFieldManager

public DefaultCustomFieldManager()
Method Detail

createCustomField

public GenericValue createCustomField(java.lang.String fieldName,
                                      java.lang.String description,
                                      int fieldType,
                                      java.lang.String defaultValue,
                                      java.lang.Long project,
                                      java.lang.String issueType,
                                      java.util.List selectValues)
                               throws GenericEntityException
Specified by:
createCustomField in interface CustomFieldManager
Throws:
GenericEntityException

getCustomField

public GenericValue getCustomField(java.lang.Long id)
                            throws GenericEntityException
Specified by:
getCustomField in interface CustomFieldManager
Throws:
GenericEntityException

getCustomField

public java.util.List getCustomField(java.lang.String name)
                              throws GenericEntityException
Specified by:
getCustomField in interface CustomFieldManager
Throws:
GenericEntityException

getCustomFields

public java.util.List getCustomFields(GenericValue issue)
                               throws GenericEntityException
Description copied from interface: CustomFieldManager
Get all the custom fields for a particular issue. They will be returned in the order global fields, issue type fields, project fields.

Specified by:
getCustomFields in interface CustomFieldManager
Parameters:
issue - The issue to get custom fields for.
Returns:
A list of the custom fields for the given issue.
Throws:
GenericEntityException

getCustomFields

public java.util.List getCustomFields(java.lang.String issueType,
                                      java.lang.Long projectId)
                               throws GenericEntityException
Description copied from interface: CustomFieldManager
Get all the custom fields for a particular issue type and project. They will be returned in the order global fields, issue type fields, project fields.

Specified by:
getCustomFields in interface CustomFieldManager
Returns:
A list of the custom field generic values.
Throws:
GenericEntityException

getCustomFields

public java.util.List getCustomFields(java.util.List issueTypes,
                                      java.lang.Long projectId)
                               throws GenericEntityException
Specified by:
getCustomFields in interface CustomFieldManager
Throws:
GenericEntityException

getValidCustomFields

public java.util.List getValidCustomFields(java.util.List issueTypes,
                                           java.lang.Long projectId)
                                    throws GenericEntityException
Specified by:
getValidCustomFields in interface CustomFieldManager
Throws:
GenericEntityException

getCustomFieldObject

public CustomField getCustomFieldObject(java.lang.Long id)
Specified by:
getCustomFieldObject in interface CustomFieldManager

getCustomFieldObjects

public java.util.List getCustomFieldObjects()
Specified by:
getCustomFieldObjects in interface CustomFieldManager

refresh

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

getCustomFieldsForType

public java.util.List getCustomFieldsForType(java.lang.String typeId)
                                      throws GenericEntityException
Return custom fields specific to a certain type of issue.

Specified by:
getCustomFieldsForType in interface CustomFieldManager
Parameters:
typeId - Custom field type (eg. IssueFieldConstants.NEWFEATURE_TYPE_ID
Returns:
List of CustomField @{link GenericValue}s
Throws:
GenericEntityException

getCustomFieldObjects

public java.util.List getCustomFieldObjects(GenericValue project,
                                            java.util.List issueTypes)
Specified by:
getCustomFieldObjects in interface CustomFieldManager

getCustomFields

public java.util.List getCustomFields(java.lang.String issueType,
                                      java.lang.Long projectId,
                                      int customFieldType)
                               throws GenericEntityException
Description copied from interface: CustomFieldManager
Get all the custom fields for a particular issue type, project and custom field type. They will be returned in the order global fields, issue type fields, project fields.

Specified by:
getCustomFields in interface CustomFieldManager
Returns:
A list of the custom field generic values.
Throws:
GenericEntityException

getCustomFields

public java.util.List getCustomFields()
                               throws GenericEntityException
Description copied from interface: CustomFieldManager
Get all custom fields. This call is always cached (as custom fields are rarely added or updated).

Specified by:
getCustomFields in interface CustomFieldManager
Returns:
A list of all custom fields for this installation, in no particular order.
Throws:
GenericEntityException

getCustomFieldOption

public GenericValue getCustomFieldOption(java.lang.Long id)
                                  throws GenericEntityException
Specified by:
getCustomFieldOption in interface CustomFieldManager
Throws:
GenericEntityException

getCustomFieldOptions

public java.util.List getCustomFieldOptions(GenericValue customField)
                                     throws GenericEntityException
Specified by:
getCustomFieldOptions in interface CustomFieldManager
Throws:
GenericEntityException

removeCustomField

public void removeCustomField(GenericValue customField)
                       throws GenericEntityException
Specified by:
removeCustomField in interface CustomFieldManager
Throws:
GenericEntityException

moveCustomFieldOptionValues

public void moveCustomFieldOptionValues(GenericValue customFieldOption,
                                        java.lang.String moveTo)
                                 throws GenericEntityException
Specified by:
moveCustomFieldOptionValues in interface CustomFieldManager
Throws:
GenericEntityException

removeCustomFieldOption

public void removeCustomFieldOption(GenericValue customFieldOption)
                             throws GenericEntityException
Specified by:
removeCustomFieldOption in interface CustomFieldManager
Throws:
GenericEntityException

removeCustomFieldOptionValues

public void removeCustomFieldOptionValues(GenericValue genericValue)
                                   throws GenericEntityException
Specified by:
removeCustomFieldOptionValues in interface CustomFieldManager
Throws:
GenericEntityException