com.atlassian.jira.util
Class JiraVelocityHelper

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

public class JiraVelocityHelper
extends java.lang.Object

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


Constructor Summary
JiraVelocityHelper(FieldManager fieldManager)
           
 
Method Summary
 java.lang.String getFieldName(org.ofbiz.core.entity.GenericValue changeItem, I18nHelper i18n)
           
 java.lang.String getFieldName(java.lang.String fieldKey, I18nHelper i18n)
          Returns Internationalized human-readable name of a field, or the key (usually also readable) if none was found.
 java.lang.String getNewKey(org.ofbiz.core.entity.GenericValue changelog)
          For 'Move Issue' events; returns the issue's new key, extracted from the changelog.
 java.lang.String getOldKey(org.ofbiz.core.entity.GenericValue changelog)
          For 'Move Issue' events; returns the issue's old key, extracted from the changelog.
 java.lang.String getPrettyFieldString(java.lang.String fieldKey, java.lang.String str, I18nHelper i18n)
           
 java.lang.String indentTextBlock(java.lang.String in, java.lang.String indentStr, boolean quoteFirst)
           
 java.lang.String indentToChangelog(java.lang.String fieldName, java.lang.String fieldValue, org.ofbiz.core.entity.GenericValue changelog, I18nHelper i18n)
           
 java.lang.String indentToChangelogNoLineSep(java.lang.String fieldName, java.lang.String fieldValue, I18nHelper i18n, java.util.List<java.lang.String> allFieldNames)
           
 java.lang.String printChangelog(org.ofbiz.core.entity.GenericValue changelog, I18nHelper i18n, java.util.Collection<java.lang.String> ignoredFields)
           
 java.lang.String printChangelog(org.ofbiz.core.entity.GenericValue changelog, I18nHelper i18n, java.util.Collection<java.lang.String> ignoredFields, boolean ignoreStatus)
           
 java.lang.String quote(java.lang.String in)
           
 java.lang.String quoteExceptFirst(java.lang.String in)
           
 java.lang.String removeHtmlBreaks(java.lang.String str)
           
 java.lang.String urlencode(java.lang.String s)
           
 boolean wasDeleted(org.ofbiz.core.entity.GenericValue changelog, java.lang.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 java.lang.String urlencode(java.lang.String s)
                           throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

quote

public java.lang.String quote(java.lang.String in)

quoteExceptFirst

public java.lang.String quoteExceptFirst(java.lang.String in)

indentTextBlock

public java.lang.String indentTextBlock(java.lang.String in,
                                        java.lang.String indentStr,
                                        boolean quoteFirst)

getFieldName

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


getFieldName

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

getOldKey

public java.lang.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 java.lang.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 java.lang.String printChangelog(org.ofbiz.core.entity.GenericValue changelog,
                                       I18nHelper i18n,
                                       java.util.Collection<java.lang.String> ignoredFields)
                                throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

printChangelog

public java.lang.String printChangelog(org.ofbiz.core.entity.GenericValue changelog,
                                       I18nHelper i18n,
                                       java.util.Collection<java.lang.String> 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,
                          java.lang.String fieldKey,
                          I18nHelper i18n)
                   throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getPrettyFieldString

public java.lang.String getPrettyFieldString(java.lang.String fieldKey,
                                             java.lang.String str,
                                             I18nHelper i18n)

indentToChangelog

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

indentToChangelogNoLineSep

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

removeHtmlBreaks

public java.lang.String removeHtmlBreaks(java.lang.String str)


Copyright © 2002-2010 Atlassian. All Rights Reserved.