com.atlassian.jira.util
Class JiraVelocityHelper

java.lang.Object
  extended bycom.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()
           
 
Method Summary
 java.lang.String getFieldName(java.lang.String fieldName)
          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 indentTextBlock(java.lang.String in, java.lang.String indentStr, boolean quoteFirst)
           
 java.lang.String indentToChangelog(java.lang.String fieldKey, java.lang.String fieldValue, org.ofbiz.core.entity.GenericValue changelog)
           
 java.lang.String printChangelog(org.ofbiz.core.entity.GenericValue changelog, java.util.Collection ignoredFields)
           
 java.lang.String quote(java.lang.String in)
           
 java.lang.String quoteExceptFirst(java.lang.String in)
           
 java.lang.String urlencode(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraVelocityHelper

public JiraVelocityHelper()
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 fieldName)
Returns Internationalized human-readable name of a field, or the key (usually also readable) if none was found.


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,
                                       java.util.Collection ignoredFields)
                                throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

indentToChangelog

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


Copyright © 2002-2005 Atlassian. All Rights Reserved.