Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
Code Block |
---|
import org.joget.apps.app.service.AppUtil;
//gets the system/user selected locale
String localeCode = AppUtil.getAppLocale(); |
public static final String PREFIX_WORKFLOW_VARIABLE = "var_";
Prefix of a request parameter to indicate the parameter is to used to sets the workflow variable.
public static final String PROPERTY_WORKFLOW_VARIABLE = "workflowVariable";
Property key to retrieves the workflow variable name from a form field property
public static boolean containsHashVariable(java.lang.String content)
Used to checks a content may contains Hash Variable or not
public static java.lang.Long convertVersionToLong(java.lang.String version)
Converts a String version to its Long equivalent.
public static java.lang.String escapeHashVariable(java.lang.String content)
Used to escapes all the Hash Variables found in the content
public static java.lang.String getAppDateFormat()
Read date format from Setup
public static org.springframework.context.ApplicationContext getApplicationContext()
Utility method to retrieve the ApplicationContext of the system
public static java.lang.String getAppLocale()
Read locale from Setup
public static org.joget.apps.app.model.AppDefinition getCurrentAppDefinition()
Retrieve the AppDefinition for the current thread.
public static java.lang.String getDesignerWebBaseUrl()
Returns the URL to the workflow web designer
public static java.lang.String getDesignerContextPath()
Used by system to gets designer context path
public static java.util.Collection<java.lang.String> getEmailList(java.lang.String toParticipantId, java.lang.String toSpecific, org.joget.workflow.model.WorkflowAssignment wfAssignment, org.joget.apps.app.model.AppDefinition appDef)
Used to retrieves email list based on Participant Id and To email string. Username will auto convert to email address belongs to the user.
public static java.lang.String getProcessDefIdWithVersion(java.lang.String appId, java.lang.String version, java.lang.String processDefId)
Forms the full process definition ID which includes the package and version.
public static java.lang.String getRequestContextPath()
Convenience method to retrieve the current request context path
public static java.lang.String getSystemAlert()
Used by system to retrieves the once time HTML to append on the page load. The once time HTML will be remove after this method call.
public static java.lang.String getSystemVersion()
Returns the current system version.
public static java.lang.String getUserviewThemeCss()
Get the userview theme css depends on the userview parameter in request
public static boolean isAppDefinitionReset() throws org.springframework.beans.BeansException
Method used by system to check whether there is an AppDefinition exist in current thread
public static boolean isQuickEditEnabled()
Checks system settings whether front-end quick edit is enabled.
public static java.lang.String processHashVariable(java.lang.String content, org.joget.workflow.model.WorkflowAssignment wfAssignment, java.lang.String escapeFormat, java.util.Map<java.lang.String, java.lang.String> replaceMap)
Used to parses Hash Variables found in the content and replace it to the Hash Variable value
public static java.lang.String processHashVariable(java.lang.String content, org.joget.workflow.model.WorkflowAssignment wfAssignment, java.lang.String escapeFormat, java.util.Map<java.lang.String, java.lang.String> replaceMap, org.joget.apps.app.model.AppDefinition appDef)
Used to parses Hash Variables found in the content and replace it to the Hash Variable value
public static java.lang.String readPluginResource(java.lang.String pluginName, java.lang.String resourceUrl)
Reads a resource from a plugin
public static java.lang.String readPluginResource(java.lang.String pluginName, java.lang.String resourceUrl, java.lang.Object[] arguments, boolean removeNewLines)
Reads a resource from a plugin. java.util.Formatter text patterns supported.
public static java.lang.String readPluginResource(java.lang.String pluginName, java.lang.String resourceUrl, java.lang.Object[] arguments, boolean removeNewLines, java.lang.String translationFileName)
Reads a resource from a plugin. java.util.Formatter text patterns supported.
public static void resetAppDefinition() throws org.springframework.beans.BeansException
Method used by system to clear the AppDefinition of current thread once the request is processing finish
public static java.util.Map<java.lang.String, java.lang.String> retrieveVariableDataFromMap(java.util.Map parameters)
Retrieves workflow variable values from a Map and populate into another Map
public static java.util.Map<java.lang.String, java.lang.String> retrieveVariableDataFromRequest(javax.servlet.http.HttpServletRequest request)
Retrieves workflow variable values from request parameters and populate into a Map
public static void setCurrentAppDefinition(org.joget.apps.app.model.AppDefinition appDef) throws org.springframework.beans.BeansException
Ties an AppDefinition to the current thread.
public static void setDesignerContextPath(java.lang.String path)
Used by system to sets designer context path
public static void setSystemAlert(java.lang.String value)
Used to set an once time HTML which will append to the page when next page load.
public static void writeJson(java.io.Writer writer, org.json.JSONObject jsonObject, java.lang.String callback) throws java.io.IOException, org.json.JSONException
Convenient method used to write JSON Object to the response
public static void writeJson(java.io.Writer writer, org.json.JSONArray jsonArray, java.lang.String callback) throws java.io.IOException, org.json.JSONException
Convenient method used to write JSON Array to the response