com.atlassian.jira.issue.customfields
Class CustomFieldUtils

java.lang.Object
  |
  +--com.atlassian.jira.issue.customfields.CustomFieldUtils

public class CustomFieldUtils
extends java.lang.Object


Field Summary
static java.text.DateFormat CUSTOMFIELD_DATEFORMATTER
           
 
Constructor Summary
CustomFieldUtils()
           
 
Method Summary
static ChangeItemBean createCustomFieldValue(org.ofbiz.core.entity.GenericValue issue, java.lang.Object value, org.ofbiz.core.entity.GenericValue customField)
          Create a new custom field value.
static java.util.List createUpdateCustomFieldValues(org.ofbiz.core.entity.GenericValue issue, java.util.Map customFieldValues)
          This method will create and update the custom field values for an issue.
static java.util.Map getCustomFieldValues(java.util.Collection customFields)
          Return a map filled with the current default custom field values.
static java.util.Map getCustomFieldValues(org.ofbiz.core.entity.GenericValue issue, java.util.Collection customFields)
          Return a map filled with the current custom field values from a given issue.
static java.lang.String getStringValue(org.ofbiz.core.entity.GenericValue customFieldValue)
           
static java.lang.Object getTypedValue(org.ofbiz.core.entity.GenericValue customField, java.lang.String value)
           
static void setCustomFields(CustomFieldValuesAware action, java.util.Map params)
          This method sets up the CustomFieldValuesHolder with correct values from incoming parameters.
static ChangeItemBean updateCustomFieldValue(org.ofbiz.core.entity.GenericValue customFieldValue, java.lang.Object value, org.ofbiz.core.entity.GenericValue customField)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOMFIELD_DATEFORMATTER

public static final java.text.DateFormat CUSTOMFIELD_DATEFORMATTER
Constructor Detail

CustomFieldUtils

public CustomFieldUtils()
Method Detail

getTypedValue

public static java.lang.Object getTypedValue(org.ofbiz.core.entity.GenericValue customField,
                                             java.lang.String value)

getStringValue

public static java.lang.String getStringValue(org.ofbiz.core.entity.GenericValue customFieldValue)
                                       throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException

getCustomFieldValues

public static java.util.Map getCustomFieldValues(java.util.Collection customFields)
                                          throws java.lang.Exception
Return a map filled with the current default custom field values.

java.lang.Exception

getCustomFieldValues

public static java.util.Map getCustomFieldValues(org.ofbiz.core.entity.GenericValue issue,
                                                 java.util.Collection customFields)
                                          throws java.lang.Exception
Return a map filled with the current custom field values from a given issue. If there are no current values, then the defaults are used.

java.lang.Exception

setCustomFields

public static void setCustomFields(CustomFieldValuesAware action,
                                   java.util.Map params)
                            throws java.lang.Exception
This method sets up the CustomFieldValuesHolder with correct values from incoming parameters.

Parameters:
action - A WebWork action that implements CustomFieldValuesAware
params - A map of parameters, usually retrieved from ActionContext.getContext().getParameters()
java.lang.Exception
See Also:
CustomFieldValuesAware

createUpdateCustomFieldValues

public static java.util.List createUpdateCustomFieldValues(org.ofbiz.core.entity.GenericValue issue,
                                                           java.util.Map customFieldValues)
                                                    throws org.ofbiz.core.entity.GenericEntityException
This method will create and update the custom field values for an issue.

Returns:
A list of ChangeItemBeans representing the changes made
Throws:
org.ofbiz.core.entity.GenericEntityException

updateCustomFieldValue

public static ChangeItemBean updateCustomFieldValue(org.ofbiz.core.entity.GenericValue customFieldValue,
                                                    java.lang.Object value,
                                                    org.ofbiz.core.entity.GenericValue customField)
                                             throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException

createCustomFieldValue

public static ChangeItemBean createCustomFieldValue(org.ofbiz.core.entity.GenericValue issue,
                                                    java.lang.Object value,
                                                    org.ofbiz.core.entity.GenericValue customField)
                                             throws org.ofbiz.core.entity.GenericEntityException
Create a new custom field value. This should really only be used from createUpdateCustomFields.

Returns:
A ChangeItemBean indicating the resultant change item.
org.ofbiz.core.entity.GenericEntityException


Copyright © 2002-2003 Atlassian. All Rights Reserved.