com.atlassian.jira.util
Class JiraVelocityHelper

java.lang.Object
  extended by com.atlassian.jira.util.JiraVelocityHelper

public class JiraVelocityHelper
extends Object

A simple class store methods we want to expose to velocity templates


Constructor Summary
JiraVelocityHelper(FieldManager fieldManager)
           
 
Method Summary
 String getFieldName(org.ofbiz.core.entity.GenericValue changeItem, I18nHelper i18n)
           
 String getFieldName(String fieldKey, I18nHelper i18n)
          Returns Internationalized human-readable name of a field, or the key (usually also readable) if none was found.
 String getNewKey(org.ofbiz.core.entity.GenericValue changelog)
          For 'Move Issue' events; returns the issue's new key, extracted from the changelog.
 String getOldKey(org.ofbiz.core.entity.GenericValue changelog)
          For 'Move Issue' events; returns the issue's old key, extracted from the changelog.
 String getPrettyFieldString(String fieldKey, String str, I18nHelper i18n)
           
 String indentTextBlock(String in, String indentStr, boolean quoteFirst)
           
 String indentToChangelog(String fieldName, String fieldValue, org.ofbiz.core.entity.GenericValue changelog, I18nHelper i18n)
           
 String indentToChangelogNoLineSep(String fieldName, String fieldValue, I18nHelper i18n, List allFieldNames)
           
 String printChangelog(org.ofbiz.core.entity.GenericValue changelog, I18nHelper i18n, Collection ignoredFields)
           
 String printChangelog(org.ofbiz.core.entity.GenericValue changelog, I18nHelper i18n, Collection ignoredFields, boolean ignoreStatus)
           
 String quote(String in)
           
 String quoteExceptFirst(String in)
           
 String removeHtmlBreaks(String str)
           
 String urlencode(String s)
           
 boolean wasDeleted(org.ofbiz.core.entity.GenericValue changelog, String fieldKey, I18nHelper i18n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraVelocityHelper

public JiraVelocityHelper(FieldManager fieldManager)
Method Detail

urlencode

public String urlencode(String s)
                 throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

quote

public String quote(String in)

quoteExceptFirst

public String quoteExceptFirst(String in)

indentTextBlock

public String indentTextBlock(String in,
                              String indentStr,
                              boolean quoteFirst)

getFieldName

public String getFieldName(String fieldKey,
                           I18nHelper i18n)
Returns Internationalized human-readable name of a field, or the key (usually also readable) if none was found.


getFieldName

public String getFieldName(org.ofbiz.core.entity.GenericValue changeItem,
                           I18nHelper i18n)

getOldKey

public String getOldKey(org.ofbiz.core.entity.GenericValue changelog)
                 throws org.ofbiz.core.entity.GenericEntityException
For 'Move Issue' events; returns the issue's old key, extracted from the changelog.

Throws:
org.ofbiz.core.entity.GenericEntityException

getNewKey

public String getNewKey(org.ofbiz.core.entity.GenericValue changelog)
                 throws org.ofbiz.core.entity.GenericEntityException
For 'Move Issue' events; returns the issue's new key, extracted from the changelog.

Throws:
org.ofbiz.core.entity.GenericEntityException

printChangelog

public String printChangelog(org.ofbiz.core.entity.GenericValue changelog,
                             I18nHelper i18n,
                             Collection ignoredFields)
                      throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

printChangelog

public String printChangelog(org.ofbiz.core.entity.GenericValue changelog,
                             I18nHelper i18n,
                             Collection ignoredFields,
                             boolean ignoreStatus)
                      throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

wasDeleted

public boolean wasDeleted(org.ofbiz.core.entity.GenericValue changelog,
                          String fieldKey,
                          I18nHelper i18n)
                   throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getPrettyFieldString

public String getPrettyFieldString(String fieldKey,
                                   String str,
                                   I18nHelper i18n)

indentToChangelog

public String indentToChangelog(String fieldName,
                                String fieldValue,
                                org.ofbiz.core.entity.GenericValue changelog,
                                I18nHelper i18n)
                         throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

indentToChangelogNoLineSep

public String indentToChangelogNoLineSep(String fieldName,
                                         String fieldValue,
                                         I18nHelper i18n,
                                         List allFieldNames)
                                  throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

removeHtmlBreaks

public String removeHtmlBreaks(String str)


Copyright © 2002-2009 Atlassian. All Rights Reserved.