ColdBox Platform v3.8.0

coldbox.system.plugins
Class Utilities

WEB-INF.cftags.component
        extended by coldbox.system.plugins.Utilities

public class Utilities
extends WEB-INF.cftags.component

This is a Utilities CFC

Constructor Summary
init()
 
Method Summary
 Any _deserialize(string binaryString)
          Deserialize a byte array
 Any _deserializeFromFile(string fileSource)
          Deserialize a byte array from a file
 string _serialize(any complexObject)
          Serialize complex objects that implement serializable
 void _serializeToFile(any complexObject, string fileDestination)
          Serialize complex objects that implement serializable, into a file
 boolean isCFUUID(string inStr)
          Checks if a passed string is a valid UUID
 boolean isSSL()
          Tells you if you are in SSL mode or not
 any marshallData(string type, any data, [string encoding='utf-8'], [string jsonCallback=''], [string jsonQueryFormat='query'], [string xmlColumnList=''], [boolean xmlUseCDATA='false'], [string xmlListDelimiter=','], [string xmlRootName=''], [struct pdfArgs='[runtime expression]'])
          Marshall data according to types or conventions on data objects
 any placeHolderReplacer(any str, any settings)
          PlaceHolder Replacer for strings containing ${} patterns
 struct queryStringToStruct(string qs='')
          Converts a querystring into a struct of name value pairs
 void sleeper(numeric milliseconds)
          Make the main thread of execution sleep for X amount of seconds
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()

Method Detail

_deserialize

public Any _deserialize(string binaryString)
Deserialize a byte array

Parameters:
binaryString - The byte array string to deserialize

_deserializeFromFile

public Any _deserializeFromFile(string fileSource)
Deserialize a byte array from a file

Parameters:
fileSource - The absolute path to the source file to deserialize

_serialize

public string _serialize(any complexObject)
Serialize complex objects that implement serializable. Returns a binary string.

Parameters:
complexObject - Any coldfusion primative data type and if cf8 componetns.

_serializeToFile

public void _serializeToFile(any complexObject, string fileDestination)
Serialize complex objects that implement serializable, into a file.

Parameters:
complexObject - Any coldfusion primative data type and if cf8 componetns.
fileDestination - The absolute path to the destination file to write to

isCFUUID

public boolean isCFUUID(string inStr)
Checks if a passed string is a valid UUID.

Parameters:
inStr

isSSL

public boolean isSSL()
Tells you if you are in SSL mode or not.


marshallData

public any marshallData(string type, any data, [string encoding='utf-8'], [string jsonCallback=''], [string jsonQueryFormat='query'], [string xmlColumnList=''], [boolean xmlUseCDATA='false'], [string xmlListDelimiter=','], [string xmlRootName=''], [struct pdfArgs='[runtime expression]'])
Marshall data according to types or conventions on data objects.

Parameters:
type - The type to marshal to. Valid values are JSON, XML, WDDX, PLAIN, HTML, TEXT
data - The data to marshal
encoding - The default character encoding to use
jsonCallback - Only needed when using JSONP, this is the callback to add to the JSON packet
jsonQueryFormat - JSON Only: query or array
xmlColumnList - XML Only: Choose which columns to inspect, by default it uses all the columns in the query, if using a query
xmlUseCDATA - XML Only: Use CDATA content for ALL values. The default is false
xmlListDelimiter - XML Only: The delimiter in the list. Comma by default
xmlRootName - XML Only: The name of the initial root element of the XML packet
pdfArgs - All the PDF arguments to pass along to the CFDocument tag.

placeHolderReplacer

public any placeHolderReplacer(any str, any settings)
PlaceHolder Replacer for strings containing ${} patterns

Parameters:
str - The string variable to look for replacements
settings - The structure of settings to use in replacing

queryStringToStruct

public struct queryStringToStruct(string qs='')
Converts a querystring into a struct of name value pairs

Parameters:
qs - The query string

sleeper

public void sleeper(numeric milliseconds)
Make the main thread of execution sleep for X amount of seconds.

Parameters:
milliseconds - Milliseconds to sleep

ColdBox Platform v3.8.0