Utils

Last modified by Pierre Dubois on 2018/06/06 16:39

Some utility functions, especially for emails notifications

Functions

SUImpersonate()

Impersonate the execution thread as a super user (Admin with all privileges)

GetLink(obj, actionName, params)

  • obj. The target entity
  • actionName. The action to be used. optional. Default value is "get"
  • params. Optional parameters

return: A direct link on the target object. (URL link). The object may be any entity.
example:
${Utils.GetLink(assignment, "approve")}

return: The URL as a string

ExtractTextFromHTML(txt)

Extract the text component for an HTML content

return: the text part

GetPropertyTitle(appname, propname)

return: The property title of a property of an entity
example:
${Utils.getPropertyTitle("rqTimeOffRequest", "rqBeneficiary")}

Tags:
Created by Pierre Dubois on 2018/06/06 16:39
     
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation