public class

JiraVelocityHelper

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.JiraVelocityHelper

Class Overview

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

Summary

Public Constructors
JiraVelocityHelper(FieldManager fieldManager)
Public Methods
String getFieldName(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(GenericValue changelog)
For 'Move Issue' events; returns the issue's new key, extracted from the changelog.
String getOldKey(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 getPrettyFieldString(String fieldKey, String str, I18nHelper i18n, String defaultIfNull)
String indentTextBlock(String in, String indentStr, boolean quoteFirst)
String indentToChangelog(String fieldName, String fieldValue, GenericValue changelog, I18nHelper i18n)
String indentToChangelogNoLineSep(String fieldName, String fieldValue, I18nHelper i18n, List<String> allFieldNames)
Map newMap(Object k1, Object v1, Object k2, Object v2)
Creates a new, mutable, map for use in velocity.
Map newMap(Object k1, Object v1)
Creates a new, mutable, map for use in velocity.
Map newMap()
Creates a new, mutable, empty map for use in velocity
String printChangelog(GenericValue changelog, I18nHelper i18n, Collection<String> ignoredFields, boolean ignoreStatus)
String printChangelog(GenericValue changelog, I18nHelper i18n, Collection<String> ignoredFields)
String quote(String in)
String quoteExceptFirst(String in)
String removeHtmlBreaks(String str)
String removeHtmlTags(String str)
String urlencode(String s)
boolean wasDeleted(GenericValue changelog, String fieldKey, I18nHelper i18n)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JiraVelocityHelper (FieldManager fieldManager)

Public Methods

public String getFieldName (GenericValue changeItem, I18nHelper i18n)

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.

public String getNewKey (GenericValue changelog)

For 'Move Issue' events; returns the issue's new key, extracted from the changelog.

Throws
GenericEntityException

public String getOldKey (GenericValue changelog)

For 'Move Issue' events; returns the issue's old key, extracted from the changelog.

Throws
GenericEntityException

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

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

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

public String indentToChangelog (String fieldName, String fieldValue, GenericValue changelog, I18nHelper i18n)

Throws
GenericEntityException

public String indentToChangelogNoLineSep (String fieldName, String fieldValue, I18nHelper i18n, List<String> allFieldNames)

Throws
GenericEntityException

public Map newMap (Object k1, Object v1, Object k2, Object v2)

Creates a new, mutable, map for use in velocity. The map will contain two entries (k1, v1) and (k2, v2).

public Map newMap (Object k1, Object v1)

Creates a new, mutable, map for use in velocity. The map will contain one entry (k1, v1).

public Map newMap ()

Creates a new, mutable, empty map for use in velocity

public String printChangelog (GenericValue changelog, I18nHelper i18n, Collection<String> ignoredFields, boolean ignoreStatus)

Throws
GenericEntityException

public String printChangelog (GenericValue changelog, I18nHelper i18n, Collection<String> ignoredFields)

Throws
GenericEntityException

public String quote (String in)

public String quoteExceptFirst (String in)

public String removeHtmlBreaks (String str)

public String removeHtmlTags (String str)

public String urlencode (String s)

public boolean wasDeleted (GenericValue changelog, String fieldKey, I18nHelper i18n)

Throws
GenericEntityException