You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

  • org.joget.plugin.property.service.PropertyUtil
  • Under wflow-plugin-base module
  • Utility method used by system to parse Plugin Properties Options values (JSON format)

Code Sample

import org.joget.plugin.base.Plugin;
import org.joget.plugin.base.PluginManager;
import org.joget.plugin.property.service.PropertyUtil;


PluginManager pluginManager = (PluginManager) AppUtil.getApplicationContext().getBean("pluginManager");
 
//get default properties value of a plugin
Plugin plugin = pluginManager.getPlugin("org.joget.apps.form.lib.TextField");
String defaultValues = PropertyUtil.getDefaultPropertyValues(plugin.getPropertyOptions());

Fields

PASSWORD_PROTECTED_VALUE
public final static java.lang.String PASSWORD_PROTECTED_VALUE = "****SECURE_VALUE****-";

Keyword used to hide the secure value in Plugin Properties options values

TYPE_ELEMENT_SELECT
public final static java.lang.String TYPE_PASSWORD = "password";

Property type of a password field

TYPE_PASSWORD
public final static java.lang.String TYPE_ELEMENT_SELECT = "elementselect";

Property type of a select box field to select plugin

Methods

getDefaultPropertyValues
public static java.lang.String getDefaultPropertyValues(java.lang.String json)

Parses default properties java.lang.String (JSON format) from Plugin Properties Options (JSON format)

getProperties
public static java.util.Map<java.lang.String, java.lang.Object> getProperties(org.json.JSONObject obj) 

Convenient method used by system to parses a JSON Object in to a map

getPropertiesJSONObject
public static java.lang.String getPropertiesJSONObject(java.lang.String[] fileNames)

Parses property XML files and convert to JSON output. Used to get Plugin Properties Options (JSON format) from XML files.

Deprecated Not using by the system and not recommended to use for performance consideration. 

getPropertiesValueFromJson
public static java.util.Map<java.lang.String, java.lang.Object> getPropertiesValueFromJson(java.lang.String json)

Parses the Plugin Properties Options values (JSON format) into a properties map

propertiesJsonLoadProcessing
public static java.lang.String propertiesJsonLoadProcessing(java.lang.String json)

Convenient method used by system to hide secure values in Plugin Properties Options values (JSON format)

propertiesJsonStoreProcessing
public static java.lang.String propertiesJsonStoreProcessing(java.lang.String oldJson, java.lang.String newJson)

Convenient method used by system to reverse the replaced/hided secure values in Plugin Properties Options values (JSON format)

  • No labels