Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Description

Thai

ลักษณะ

  • org.joget.apps.app.service.AppUtil
  • Under wflow-core module
  • Utility methods is used by App in runtime

Code Sample

Thai

ตัวอย่างโค้ด

Code Block
import org.joget.apps.app.service.AppUtil;
 
//gets the system/user selected locale
String localeCode = AppUtil.getAppLocale();

Fields

Thai

ฟิลด์

PREFIX_WORKFLOW_VARIABLE
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.

Thai

คำนำหน้าของพารามิเตอร์คำขอเพื่อระบุพารามิเตอร์ที่จะใช้ในการตั้งค่าตัวแปรเวิร์กโฟลว์

PROPERTY_WORKFLOW_VARIABLE

...

Property key to retrieves the workflow variable name from a form field property

Thai

รหัสคุณสมบัติเพื่อดึงชื่อตัวแปรเวิร์กโฟลว์จากคุณสมบัติเขตข้อมูลฟอร์ม

Methods

Thai

กระบวนการ

containsHashVariable
public static boolean containsHashVariable(java.lang.String content)

Used to checks a content may contains Hash Variable or not

Thai

ใช้ในการตรวจสอบเนื้อหาอาจมี Hash Variable หรือไม่

convertVersionToLong
public static java.lang.Long convertVersionToLong(java.lang.String version)

Converts a String version to its Long equivalent.

Thai

แปลงเวอร์ชันของสตริงเป็น Long 

escapeHashVariable
public static java.lang.String escapeHashVariable(java.lang.String content)
English
Used to escapes all the Hash Variables found in the content
Thai

ใช้เพื่อหลบหนีตัวแปรแฮชทั้งหมดที่พบในเนื้อหา

getAppDateFormat
public static java.lang.String getAppDateFormat()

Read date format from Setup

Thai

อ่านรูปแบบวันที่จากการตั้งค่า

getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()

Utility method to retrieve the ApplicationContext of the system

Thai

วิธีการ Utility เพื่อดึง ApplicationContext ของระบบ

getAppLocale
public static java.lang.String getAppLocale()

Read locale from Setup

Thai

อ่านสถานที่จากการตั้งค่า

getCurrentAppDefinition
public static org.joget.apps.app.model.AppDefinition getCurrentAppDefinition()

Retrieve the AppDefinition for the current thread.

Thai

ดึง AppDefinition สำหรับเธรดปัจจุบัน

getDesignerWebBaseUrl
public static java.lang.String getDesignerWebBaseUrl()

Returns the URL to the workflow web designer

Thai

ส่งคืน URL ไปที่นักออกแบบเว็บไซต์เวิร์กโฟลว์

getDesignerContextPath
public static java.lang.String getDesignerContextPath()

Used by system to gets designer context path

Thai

ใช้โดยระบบเพื่อรับ path นักออกแบบ

getEmailList
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.

Thai

ใช้เพื่อดึงรายชื่ออีเมลตามรหัสผู้เข้าร่วมและถึงอีเมลสตริง ชื่อผู้ใช้จะแปลงเป็นอีเมลโดยอัตโนมัติเป็นของผู้ใช้

getProcessDefIdWithVersion

...

Forms the full process definition ID which includes the package and version.

Thai

จัดทำ ID นิยามกระบวนการทั้งหมดซึ่งรวมถึงแพ็คเกจและเวอร์ชัน

getRequestContextPath
public static java.lang.String getRequestContextPath()

Convenience method to retrieve the current request context path

Thai

วิธีการความสะดวกสบายในการดึงเส้นทางบริบทคำขอปัจจุบัน

getSystemAlert
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.

Thai

ใช้โดยระบบเพื่อดึง HTML ครั้งเดียวต่อท้ายโหลดหน้าเว็บ HTML ครั้งเดียวจะถูกลบออกหลังจากเรียกเมธอดนี้

getSystemVersion
public static java.lang.String getSystemVersion()

Returns the current system version.

Thai

ส่งคืนเวอร์ชันระบบปัจจุบัน

getUserviewThemeCss
public static java.lang.String getUserviewThemeCss()

Get the userview theme css depends on the userview parameter in request

Thai

รับธีม userview css ขึ้นอยู่กับพารามิเตอร์ userview ที่ร้องขอ

isAppDefinitionReset
public static boolean isAppDefinitionReset() throws org.springframework.beans.BeansException

Method used by system to check whether there is an AppDefinition exist in current thread

Thai

วิธีที่ใช้โดยระบบเพื่อตรวจสอบว่ามี AppDefinition อยู่ในเธรดปัจจุบันหรือไม่

isQuickEditEnabled
public static boolean isQuickEditEnabled()

Checks system settings whether front-end quick edit is enabled.

Thai

ตรวจสอบการตั้งค่าระบบว่าเปิดใช้งานการแก้ไขด่วนส่วนหน้าหรือไม่

processHashVariable
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

Thai

ใช้เพื่อแยกวิเคราะห์ตัวแปร Hash ที่พบในเนื้อหาและแทนที่เป็นค่า Hash Variable

processHashVariable
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

Thai

ใช้เพื่อแยกวิเคราะห์ตัวแปร Hash ที่พบในเนื้อหาและแทนที่เป็นค่า Hash Variable

readPluginResource
public static java.lang.String readPluginResource(java.lang.String pluginName, java.lang.String resourceUrl)

Reads a resource from a plugin

Thai

อ่านทรัพยากรจากปลั๊กอิน

readPluginResource
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.

Thai

อ่านทรัพยากรจากปลั๊กอิน สนับสนุนรูปแบบข้อความ java.util.Formatter

readPluginResource
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.

Thai

อ่านทรัพยากรจากปลั๊กอิน สนับสนุนรูปแบบข้อความ java.util.Formatter

resetAppDefinition
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

Thai

วิธีที่ระบบใช้เพื่อล้าง AppDefinition ของเธรดปัจจุบันเมื่อคำขอกำลังประมวลผลเสร็จสิ้น

retrieveVariableDataFromMap

...

Retrieves workflow variable values from a Map and populate into another Map

Thai

ดึงค่าตัวแปรเวิร์กโฟลว์จากแผนที่และเติมลงในแผนที่อื่น

retrieveVariableDataFromRequest

...

Retrieves workflow variable values from request parameters and populate into a Map

Thai

ดึงค่าตัวแปรเวิร์กโฟลว์จากพารามิเตอร์คำขอและเติมลงในแผนที่

setCurrentAppDefinition
public static void setCurrentAppDefinition(org.joget.apps.app.model.AppDefinition appDef) throws org.springframework.beans.BeansException

Ties an AppDefinition to the current thread.

Thai

ผูก AppDefinition กับเธรดปัจจุบัน

setDesignerContextPath
public static void setDesignerContextPath(java.lang.String path)

Used by system to sets designer context path

Thai

ใช้โดยระบบเพื่อกำหนดเส้นทางบริบทนักออกแบบ

setSystemAlert
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.

Thai

ใช้เพื่อตั้งค่า HTML ครั้งเดียวซึ่งจะต่อท้ายหน้าเมื่อโหลดหน้าถัดไป

writeJson
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

Thai

วิธีที่สะดวกใช้ในการเขียน JSON Array เพื่อการตอบสนอง

writeJson
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

Thai

วิธีที่สะดวกใช้ในการเขียน JSON Array เพื่อการตอบสนอง