Web API

Data

Other API in Package

User

Internal Tunnel

Tunnel

List of Classes

WebController

AjaxResponse

AnalyticDataViewFilter

Archive

ArchiveManager

AreaChart

Attachment

AudioFile

BarChart

BillingEngine

BillingEvent

Browser

Buffer

BusinessUtil

CacheManager

Cell

CellFilter

Chart

ChartSharedSettings

ChartTool

Chunk

ConsoleManager

ConsoleResponse

Cube

Data

DataList

DataListFilter

DataReader

DataRecord

DataSet

DataSetRecord

DataSetResult

DataView

DataViewBuilder

DataViewCriteria

DataViewFilter

DataViewList

DataViewRecord

DatasetFile

DateUtil

DisplaySettings

Document

DocumentFile

DownloadResponse

Email

EncryptionUtil

Enterprise

EnterpriseInfo

ExcelFile

File

FileBuffer

Formatter

Fragment

GeoUtil

GroupConcat

ImageFile

Inspector

JSONBuffer

JSONParser

Job

JobManager

LineChart

LockManager

Logger

MailBox

MailBoxList

MailMessage

MailResponse

Message

MessageManager

Modules

Monitor

NavigatorResponse

PWA

Packet

PacketDataList

PacketDataRecord

Page

PagingInfo

Pal

PalActivationKeyInfo

PalInfo

Payload

PdfFile

PieChart

Pin

Profile

ProfileInfo

ProfilePacket

ProfilePalManager

ProfileTxManager

QRUtil

Render

Request

Response

Role

RuntimePal

SSOToken

SafeBox

ScatterPlotChart

ServiceRequest

ServiceResponse

ShellPal

ShellPalManager

SignSettings

SiteBuilder

Slice

SmartDoc

SmartDocManager

Socket

SocketResponse

StorageProvider

StorageProviderDataList

StoredObject

SystemDataView

SystemDataViewFilter

Tag

TagFilter

TagManager

TextEmail

TextMessage

TiffBuilder

TransactionPacket

Tunnel

TunnelResult

UnknownFile

VCardFile

Validator

ValidityCheck

Wizard

XMLReader

ZoneAccess

This class also used in (click to expand):
Method Summary
  addData(Data data)

Adds all of the entries in data to this Data object, over-writing duplicates.

  addJSONData(String json)

Decodes the JSON string and adds the payload to this Data object.

  addNewData(Data data, boolean emptyAsNull)

Adds all of the entries in data to this Data object. If the entry already exists, it is NOT over-written unless its value is empty and emtpyAsNull is true.

boolean addPrefix(String prefix, boolean camelBack)

Adds the prefix to all keys. Returns true if an update was made.

String calcMD5()

Returns an MD5 checksum of the contents of this Data.

String combineValues(String JEXL)

Substitutes in JEXL values. Treats null values as "" (empty string). (ex: data.combineValues("${first} ${last}") could be converted to John Doe). Nesting is permitted up to 50 iterations after which an exception occurs.

  deleteData()

Removes all entries.

String evaluate(String jexlExpression)

Evaluates the JEXL expression using information from this Data object.

Data filter(Data filter, boolean remove)

Returns a new Data object with values from this Data set to keys from the filter. Non matching items are removed if remove is true.

String get(String key)

Returns the value associated with key if it exists, null otherwise.

boolean getBoolean(String field)

Returns the given field as a boolean. The value must be true or false. Throws exception if the value does not exist or cannot be cast to the correct type.

boolean getCommonBoolean(String field)

Returns the given field as a boolean. The value must be any of the following combinations: [true/false], [1/0], [yes,no], [on,off]. Throws exception if the value does not exist or cannot be cast to the correct type.

Date getDate(String field)

Returns the given field as a Date. Throws exception if the value does not exist or cannot be cast to the correct type.

boolean getDefaultBoolean(String field, boolean defaultBoolean)

Returns the given field as a boolean. If the field does not exist or refers to a non-boolean field, it returns the default value

Date getDefaultDate(String field, Date defaultDate)

Returns the given field as a date. If the field does not exist or refers to a non-date field, it returns the default value

double getDefaultDouble(String field, double defaultDouble)

Returns the given field as a double. If the field does not exist or refers to a non-double field, it returns the default value

int getDefaultInt(String field, int defaultInt)

Returns the given field as an int. If the field does not exist or refers to a non-int field, it returns the default value

String getDefaultValue(String field, String defaultValue, boolean emptyIsNull)

Returns the given field. If the field does not exist, it returns the default value. If the field exists but is value is empty, this method returns defaultValue only if emptyIsNull=true.

double getDouble(String key)

Returns the given value of the given key as a double. Throws exception if the value does not exist or cannot be cast to the correct type.

int getInt(String key)

Returns the given value of the given key as an Java Int which is smaller than a Javascript Int. Throws exception if the value does not exist or cannot be cast to the correct type.

String getJSON(String key)

Returns the value of the specified key as unescaped JSON.

long getLong(String key)

Returns the given value of the given key as Java Long which is larger. Throws exception if the value does not exist or cannot be cast to the correct type.

String[] getNameSet(String prefix)

Returns the names of this Data object as an array of strings that start with the given prefix. If no values exist, this will return an empty array.

String[] getNames()

Returns the names of this Data object as an array of strings. If no values exist, this will return an empty array.

int getSize()

Returns the length of all keys and entries in this Data object. This is roughly the length of this object in bytes.

String getValue(String key)

Returns the value associated with key if it exists, null otherwise.

String getValue(String name, int maxLength, boolean allowEmpty)

Returns the given value. Throws exception if the max length is exceeded or value is null/empty and allowEmpty=false.

String[] getValues()

Returns the values of this Data object as an array of strings. If no values exist, this will return an empty array.

String[] getValues(String prefix)

Returns the names of this Data object as an array of strings that start with the given prefix. If no values exist, this will return an empty array.

boolean hasName(String name)

Returns true if the name exists in the data map.

boolean hasValue(String name)

Returns true if the value exists in the data map.

boolean isEmpty()

Returns true if there are no entries.

  loadQueryString(String queryString)

Decodes the query string and adds name/value pairs to this data.

int parse(String rawText, String[] fields)

Parses information from rawText matching fields and storing them in this Data object and returns the number found.

Data removeControlChars(boolean all)

Returns a new Data object with all control characters in the range x0000 to x001F inclusive removed if all is true. If all is false, this will remove all control characters except tab, line feed, and carriage return.

Data removeNonAsciiChars()

Returns a new Data object having removed characters outside of the UTF-8 C1 Controls and Latin1 Supplement (keeps those in the range of 0-255 decimal).

boolean removePrefix(String prefix, boolean camelBack)

Removes the prefix from any key that has it. Returns true if an update was made.

String removeValue(String key)

Removes the associated key from the data map.

  set(String key, String value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setBoolean(String name, boolean value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setDate(String name, Date value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setDecimal(String name, double value)
⚠Deprecated since 08-28-2018. Use setDouble(String,double)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setDouble(String name, double double)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setInt(String name, long value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setString(String name, String value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setValue(String key, String value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setValue(String key, boolean value)
⚠Deprecated since 08-28-2018. Use setBoolean(String,boolean)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setValue(String key, double value)
⚠Deprecated since 08-28-2018. Use setDouble(String,double)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setValue(String key, int value)
⚠Deprecated since 08-28-2018. Use setInt(String,int)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

  setValue(String key, long value)
⚠Deprecated since 08-28-2018. Use setInt(String,int)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

boolean setValues(String value)

Sets all key values to the specified value. If value is null, the keys are deleted. Returns true if changes were made.

PacketDataList toDataList(String name)

Returns the data as a DataList. This DataList can be modified but will not modify the original Data Object.

File toFile()

Converts this data object to file. Expected entries: filename - contains file name, contentType - contains file content type, base64 - contains base64 encoded file contents OR plain - contains plain text content of the file

String toJSON()

Returns contents as a JSON string.

String toJson()

Returns contents as a JSON string.

String toJson(boolean preserveType)

Returns contents as a JSON string with types preserved.

String toQueryString()

Returns all entries as a name/value querystring.

String toString()

Returns a description of this object.

  trim(boolean includeNonBreaking)

Trims all of the values with leading and trailing whitespace, including non breaking spaces.

boolean updateData(Data data)

Updates matching entries in this Data from the values in the supplied Data. Returns true if any changes were made.

Method Detail


addData(Data data)

Adds all of the entries in data to this Data object, over-writing duplicates.

Parameters:

Since: 07-11-2008

top

addJSONData(String json)

Decodes the JSON string and adds the payload to this Data object.

Parameters:

  • String   json

Since: 01-19-2010

top

addNewData(Data data, boolean emptyAsNull)

Adds all of the entries in data to this Data object. If the entry already exists, it is NOT over-written unless its value is empty and emtpyAsNull is true.

Parameters:

  • Data   data
  • boolean   emptyAsNull

Since: 09-11-2008

top

boolean addPrefix(String prefix, boolean camelBack)

Adds the prefix to all keys. Returns true if an update was made.

Parameters:

  • String   prefix  - prefix to add. Required parameter.
  • boolean   camelBack

Returns:  boolean

Since: 04-06-2010

top

String calcMD5()

Returns an MD5 checksum of the contents of this Data.

Returns:  String

Since: 05-15-2014

top

String combineValues(String JEXL)

Substitutes in JEXL values. Treats null values as "" (empty string). (ex: data.combineValues("${first} ${last}") could be converted to John Doe). Nesting is permitted up to 50 iterations after which an exception occurs.

Parameters:

  • String   JEXL

Returns:  String

Since: 11-05-2009

top

deleteData()

Removes all entries.

Since: 07-11-2008

top

String evaluate(String jexlExpression)

Evaluates the JEXL expression using information from this Data object.

Parameters:

  • String   jexlExpression

Returns:  String

Since: 05-27-2010

top

Data filter(Data filter, boolean remove)

Returns a new Data object with values from this Data set to keys from the filter. Non matching items are removed if remove is true.

Parameters:

  • Data   filter Required parameter.
  • boolean   remove

Returns:  Data

Since: 07-25-2019

top

String get(String key)

Returns the value associated with key if it exists, null otherwise.

Parameters:

  • String   key

Returns:  String

Since: 08-28-2018

top

boolean getBoolean(String field)

Returns the given field as a boolean. The value must be true or false. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   field

Returns:  boolean

Since: 07-11-2008

top

boolean getCommonBoolean(String field)

Returns the given field as a boolean. The value must be any of the following combinations: [true/false], [1/0], [yes,no], [on,off]. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   field

Returns:  boolean

Since: 08-22-2008

top

Date getDate(String field)

Returns the given field as a Date. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   field

Returns:  Date

Since: 07-11-2008

top

boolean getDefaultBoolean(String field, boolean defaultBoolean)

Returns the given field as a boolean. If the field does not exist or refers to a non-boolean field, it returns the default value

Parameters:

  • String   field
  • boolean   defaultBoolean

Returns:  boolean

Since: 09-05-2008

top

Date getDefaultDate(String field, Date defaultDate)

Returns the given field as a date. If the field does not exist or refers to a non-date field, it returns the default value

Parameters:

  • String   field
  • Date   defaultDate

Returns:  Date

Since: 09-05-2008

top

double getDefaultDouble(String field, double defaultDouble)

Returns the given field as a double. If the field does not exist or refers to a non-double field, it returns the default value

Parameters:

  • String   field
  • double   defaultDouble

Returns:  double

Since: 09-05-2008

top

int getDefaultInt(String field, int defaultInt)

Returns the given field as an int. If the field does not exist or refers to a non-int field, it returns the default value

Parameters:

  • String   field
  • int   defaultInt

Returns:  int

Since: 09-05-2008

top

String getDefaultValue(String field, String defaultValue, boolean emptyIsNull)

Returns the given field. If the field does not exist, it returns the default value. If the field exists but is value is empty, this method returns defaultValue only if emptyIsNull=true.

Parameters:

  • String   field
  • String   defaultValue
  • boolean   emptyIsNull

Returns:  String

Since: 09-05-2008

top

double getDouble(String key)

Returns the given value of the given key as a double. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   key Required parameter.

Returns:  double

Since: 07-11-2008

top

int getInt(String key)

Returns the given value of the given key as an Java Int which is smaller than a Javascript Int. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   key Required parameter.

Returns:  int

Since: 07-11-2008

top

String getJSON(String key)

Returns the value of the specified key as unescaped JSON.

Parameters:

  • String   key

Returns:  String

Since: 08-30-2010

top

long getLong(String key)

Returns the given value of the given key as Java Long which is larger. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   key Required parameter.

Returns:  long

Since: 05-28-2022

top

String[] getNameSet(String prefix)

Returns the names of this Data object as an array of strings that start with the given prefix. If no values exist, this will return an empty array.

Parameters:

  • String   prefix

Returns:  String[]

Since: 07-11-2008

top

String[] getNames()

Returns the names of this Data object as an array of strings. If no values exist, this will return an empty array.

Returns:  String[]

Since: 07-11-2008

top

int getSize()

Returns the length of all keys and entries in this Data object. This is roughly the length of this object in bytes.

Returns:  int

Since: 04-18-2012

top

String getValue(String key)

Returns the value associated with key if it exists, null otherwise.

Parameters:

  • String   key

Returns:  String

Since: 07-11-2008

top

String getValue(String name, int maxLength, boolean allowEmpty)

Returns the given value. Throws exception if the max length is exceeded or value is null/empty and allowEmpty=false.

Parameters:

  • String   name
  • int   maxLength
  • boolean   allowEmpty

Returns:  String

Since: 06-07-2012

top

String[] getValues()

Returns the values of this Data object as an array of strings. If no values exist, this will return an empty array.

Returns:  String[]

Since: 05-31-2007

top

String[] getValues(String prefix)

Returns the names of this Data object as an array of strings that start with the given prefix. If no values exist, this will return an empty array.

Parameters:

  • String   prefix

Returns:  String[]

Since: 07-11-2008

top

boolean hasName(String name)

Returns true if the name exists in the data map.

Parameters:

  • String   name

Returns:  boolean

Since: 06-11-2010

top

boolean hasValue(String name)

Returns true if the value exists in the data map.

Parameters:

  • String   name

Returns:  boolean

Since: 07-11-2008

top

boolean isEmpty()

Returns true if there are no entries.

Returns:  boolean

Since: 05-29-2012

top

loadQueryString(String queryString)

Decodes the query string and adds name/value pairs to this data.

Parameters:

  • String   queryString

Since: 06-09-2010

top

int parse(String rawText, String[] fields)

Parses information from rawText matching fields and storing them in this Data object and returns the number found.

Parameters:

  • String   rawText
  • String[]   fields

Returns:  int

Since: 10-17-2018

top

Data removeControlChars(boolean all)

Returns a new Data object with all control characters in the range x0000 to x001F inclusive removed if all is true. If all is false, this will remove all control characters except tab, line feed, and carriage return.

Parameters:

  • boolean   all

Returns:  Data

Since: 11-24-2014

top

Data removeNonAsciiChars()

Returns a new Data object having removed characters outside of the UTF-8 C1 Controls and Latin1 Supplement (keeps those in the range of 0-255 decimal).

Returns:  Data

Since: 06-15-2022

top

boolean removePrefix(String prefix, boolean camelBack)

Removes the prefix from any key that has it. Returns true if an update was made.

Parameters:

  • String   prefix  - prefix to remove. Required parameter.
  • boolean   camelBack

Returns:  boolean

Since: 04-06-2010

top

String removeValue(String key)

Removes the associated key from the data map.

Parameters:

  • String   key

Returns:  String

Since: 07-11-2008

top

set(String key, String value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   key
  • String   value

Since: 08-28-2018

top

setBoolean(String name, boolean value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   name
  • boolean   value

Since: 08-28-2018

top

setDate(String name, Date value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   name
  • Date   value

Since: 08-28-2018

top

setDecimal(String name, double value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   name
  • double   value

Since: 08-28-2018

This method has been deprecated since 08-28-2018. Use setDouble(String,double)

top

setDouble(String name, double double)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   name
  • double   double

Since: 08-28-2018

top

setInt(String name, long value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   name
  • long   value

Since: 08-28-2018

top

setString(String name, String value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   name
  • String   value

Since: 08-28-2018

top

setValue(String key, String value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   key
  • String   value

Since: 07-11-2008

top

setValue(String key, boolean value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   key
  • boolean   value

Since: 03-30-2009

This method has been deprecated since 08-28-2018. Use setBoolean(String,boolean)

top

setValue(String key, double value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   key
  • double   value

Since: 03-27-2009

This method has been deprecated since 08-28-2018. Use setDouble(String,double)

top

setValue(String key, int value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   key
  • int   value

Since: 03-27-2009

This method has been deprecated since 08-28-2018. Use setInt(String,int)

top

setValue(String key, long value)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   key
  • long   value

Since: 03-27-2009

This method has been deprecated since 08-28-2018. Use setInt(String,int)

top

boolean setValues(String value)

Sets all key values to the specified value. If value is null, the keys are deleted. Returns true if changes were made.

Parameters:

  • String   value

Returns:  boolean

Since: 04-13-2010

top

PacketDataList toDataList(String name)

Returns the data as a DataList. This DataList can be modified but will not modify the original Data Object.

Parameters:

  • String   name

Returns:  PacketDataList


DataList Name: data
DataList Fields: name, value

Since: 01-21-2010

top

File toFile()

Converts this data object to file. Expected entries: filename - contains file name, contentType - contains file content type, base64 - contains base64 encoded file contents OR plain - contains plain text content of the file

Returns:  File

Since: 05-19-2011

top

String toJSON()

Returns contents as a JSON string.

Returns:  String

Since: 08-30-2010

top

String toJson()

Returns contents as a JSON string.

Returns:  String

Since: 03-17-2021

top

String toJson(boolean preserveType)

Returns contents as a JSON string with types preserved.

Parameters:

  • boolean   preserveType

Returns:  String

Since: 09-22-2023

top

String toQueryString()

Returns all entries as a name/value querystring.

Returns:  String

Since: 04-23-2010

top

String toString()

Returns a description of this object.

Returns:  String

Since: 07-11-2008

top

trim(boolean includeNonBreaking)

Trims all of the values with leading and trailing whitespace, including non breaking spaces.

Parameters:

  • boolean   includeNonBreaking

Since: 06-16-2011

top

boolean updateData(Data data)

Updates matching entries in this Data from the values in the supplied Data. Returns true if any changes were made.

Parameters:

  • Data   data Required parameter.

Returns:  boolean

Since: 04-06-2010

top
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. API Date: May 01, 2024 05:15 AM