Class JiraVelocityHelper

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

public class JiraVelocityHelper extends Object
A simple class store methods we want to expose to velocity templates
  • Constructor Details

    • JiraVelocityHelper

      public JiraVelocityHelper(FieldManager fieldManager)
  • Method Details

    • 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<String> 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<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, String fieldKey, I18nHelper i18n) throws org.ofbiz.core.entity.GenericEntityException
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getPrettyFieldString

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

      public String getPrettyFieldString(String fieldKey, String str, String value, I18nHelper i18n, String defaultIfNull)
    • indentToChangelogNoLineSep

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

      public Map newMap(Object k1, Object v1)
      Creates a new, mutable, map for use in velocity. The map will contain one entry (k1, v1).
    • removeHtmlTags

      public String removeHtmlTags(String str)
    • noEscape

      public String noEscape(String s)