com.atlassian.jira.util
Class JiraVelocityHelper

java.lang.Object
  extended bycom.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 fieldKey, String fieldValue, org.ofbiz.core.entity.GenericValue changelog, I18nHelper i18n)
           
 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 fieldKey,
                                String fieldValue,
                                org.ofbiz.core.entity.GenericValue changelog,
                                I18nHelper i18n)
                         throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

removeHtmlBreaks

public String removeHtmlBreaks(String str)


Copyright © 2002-2006 Atlassian. All Rights Reserved.