Toolkit API

The functions toolkit API is comprised of the miscellaneous utility functions. The list is flexible and can further be expanded. Currently available methods are listed below in the table.

method description
fromJSONString create a map object from Json string
asJSONPrettyString create a string from Json object
getObject retrieved a class object from data source
getOneByQuery retrieve a class object based upon the query
getObjectsByQuery retrieve a list of objects based upon the query
getPage retrieve a page of objects
getPageWhereOrderBy retrieved a page with where clause
save save a class object from the data source
saveAll save a list of objects
updateAttr update the attribute of a class object
delete remove a class object
deleteAll remove a list of class objects
deleteByQuery removed by the query
makeAuditLogObject make an audit log object
getUser retrieve a user object from object ID
getUserByQuery retrieve the user object by query
getUserByUserId retrieve a user by user ID
getUserByEmail retrieve the user by email
getOrgByQuery retrieve the workspace (org)** by query
getOrgByOrgName retrieve the workspace ID with workspace name
httpGet HTTP get request
mvelLogger MVEL logger for logging the script
uidToId converts a string to a long user ID
uidToIdStr convert a long to a string userid
uidToClassName conversion ID to a class name
getRtURL get runtime URL
sendEmail send an email
bigQueryToCSV bigQuery to CSV
csvGetAllRows get all rows from CSV
csvToSqlScript import from CSV using script
csvWithSeparatorToSql import from CSV using script with separator
getFilePath get file path
getFolderPath get folder path
getScript get get script
migrate migrate from one data source to another
sqlToCSV export SQL to CSV

A complete list is given below.

Trillo API Wrapper Documentation

TrilloApiWrapper

The type Trillo api wrapper.

public static String UUID()

generate a random uuid number

  • Returns: number

public static String asJSONPrettyString(Object obj)

As json pretty string string.

  • Parameters: obj — the obj
  • Returns: the string

public static String asJSONString(Object obj)

As json string.

  • Parameters: obj — the obj
  • Returns: the string

public static Object auditLog(Object logObject)

Audit log object.

  • Parameters: logObject — the log object
  • Returns: the object

public static Object auditLog(String sourceClass, String sourceId, String action, String summary)

Audit log object.

  • Parameters:
    • sourceClass — the source class
    • sourceId — the source id
    • action — the action
    • summary — the summary
  • Returns: the object

public static Object auditLog(String sourceClass, String sourceId, String action, String summary, Map<String, Object> oldObject, Map<String, Object> newObject)

Audit log object.

  • Parameters:
    • sourceClass — the source class
    • sourceId — the source id
    • action — the action
    • summary — the summary
    • oldObject — the old object
    • newObject — the new object
  • Returns: the object

public static Object convertedValue(Object v, Map<String, Object> attrMap)

get an object from attributes

  • Parameters:
    • v
    • attrMap

  • Returns: object

public static Object delete(String className, String id, boolean permanent)

Delete object.

  • Parameters:
    • className — the class name
    • id — the id
    • permanent — the permanent
  • Returns: the object

public static Object delete(String className, String id, boolean permanent, boolean audit)

delete an object

  • Parameters:
    • className
    • id
    • permanent
    • audit

  • Returns: result

public static Object delete(String className, String id, boolean permanent, String auditMsg)

delete an object

  • Parameters:
    • className
    • id
    • permanent
    • auditMsg

  • Returns: result

public static Object delete(String appName, String dsName, String className, String id, boolean permanent)

Delete object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • id — the id
    • permanent — the permanent
  • Returns: the object

public static Object delete(String appName, String dsName, String className, String id, boolean permanent, boolean audit)

delete an object

  • Parameters:
    • appName
    • dsName
    • className
    • id
    • permanent
    • audit

  • Returns: result

public static Object delete(String appName, String dsName, String className, String id, boolean permanent, String auditMsg)

delete an object

  • Parameters:
    • appName
    • dsName
    • className
    • id
    • permanent
    • auditMsg

  • Returns: result

public static Object deleteAll(String className, Iterable ids, boolean permanent)

Delete all object .

  • Parameters:
    • className — the class name
    • ids — the ids
    • permanent — the permanent
  • Returns: the object

public static Object deleteAll(String className, Iterable ids, boolean permanent, boolean audit)

delete all objects

  • Parameters:
    • className
    • ids
    • permanent
    • audit

  • Returns: result

public static Object deleteAll(String className, Iterable ids, boolean permanent, String auditMsg)

delete all objects

  • Parameters:
    • className
    • ids
    • permanent
    • auditMsg

  • Returns: result

public static Object deleteAll(String appName, String dsName, String className, Iterable ids, boolean permanent)

Delete all object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • ids — the ids
    • permanent — the permanent
  • Returns: the object

public static Object deleteAll(String appName, String dsName, String className, Iterable ids, boolean permanent, boolean audit)

delete all objects

  • Parameters:
    • appName
    • dsName
    • className
    • ids
    • permanent
    • audit

  • Returns: result

public static Object deleteAll(String appName, String dsName, String className, Iterable ids, boolean permanent, String auditMsg)

delete all objects

  • Parameters:
    • appName
    • dsName
    • className
    • ids
    • permanent
    • auditMsg

  • Returns: result

public static Object deleteByQuery(String className, String query, boolean permanent)

Delete by query object.

  • Parameters:
    • className — the class name
    • query — the query
    • permanent — the permanent
  • Returns: the object

public static Object deleteByQuery(String className, String query, boolean permanent, boolean audit)

delete specific to a query

  • Parameters:
    • className
    • query
    • permanent
    • audit

  • Returns: result

public static Object deleteByQuery(String className, String query, boolean permanent, String auditMsg)

delete by query

  • Parameters:
    • className
    • query
    • permanent
    • auditMsg

  • Returns: result

public static Object deleteByQuery(String appName, String dsName, String className, String query, boolean permanent)

Delete by query object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • query — the query
    • permanent — the permanent
  • Returns: the object

public static Object deleteByQuery(String appName, String dsName, String className, String query, boolean permanent, boolean audit)

delete by query

  • Parameters:
    • appName
    • dsName
    • className
    • query
    • permanent
    • audit

  • Returns: result

public static Object deleteByQuery(String appName, String dsName, String className, String query, boolean permanent, String auditMsg)

delete by query

  • Parameters:
    • appName
    • dsName
    • className
    • query
    • permanent
    • auditMsg

  • Returns: result

public static Object emptyTable(String className)

empty table

  • Parameters: className

  • Returns: result

public static Object emptyTable(String className, String auditMsg)

empty table

  • Parameters:
    • className
    • auditMsg

  • Returns: result

public static Object emptyTable(String appName, String dsName, String className)

empty table

  • Parameters:
    • appName
    • dsName
    • className

  • Returns: result

public static Object emptyTable(String appName, String dsName, String className, String auditMsg)

empty table

  • Parameters:
    • appName
    • dsName
    • className
    • auditMsg

  • Returns: result

public static Result errorResult(String msg)

generate an error result

  • Parameters: msg

  • Returns: result

public static Result errorResult(String msg, int code)

generate error result

  • Parameters:
    • msg
    • code

  • Returns: results

public static Result executeFunction(String functionName, Map<String, Object> params)

execute function

  • Parameters:
    • functionName
    • params

  • Returns: result

public static Result executeFunction(String appName, String functionName, Map<String, Object> params)

execute function

  • Parameters:
    • appName
    • functionName
    • params

  • Returns: result

public static Result executeRule(String functionName, Map<String, Object> params)

execute rule

  • Parameters:
    • functionName
    • params

  • Returns: result

public static Result executeRule(String appName, String functionName, Map<String, Object> params)

execute rule

  • Parameters:
    • appName
    • functionName
    • params

  • Returns: result

public static Result executeSSH(String hostName, String command)

execute remote call

  • Parameters:
    • hostName
    • command

  • Returns: result

public static Result executeSSH(String hostName, String command, boolean async)

execute remote call

  • Parameters:
    • hostName
    • command
    • async

  • Returns: result

public static void finalizeTx(boolean forceCommit)

finalize transaction

  • Parameters: forceCommit

    @SuppressWarnings("unchecked") public static T fromJSONString(String json)**

From json string t.

  • Parameters:
    • <T> — the type parameter
    • json — the json
  • Returns: the t

public static Result httpGet(String requestUrl)

Http get result.

  • Parameters: requestUrl — the request url
  • Returns: the result

public static Result httpPost(String requestUrl, Map<String, Object> body)

HTTP post

  • Parameters:
    • requestUrl
    • body

  • Returns: result

public static Result httpPost(String requestUrl, Map<String, Object> body, Map<String, String> headers)

HTTP post

  • Parameters:
    • requestUrl
    • body
    • headers

  • Returns: result

public static Result invokeService(String serviceName, String partialPath, String method, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Invoke service result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • method — the method
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Result invokeService(String appName, String serviceName, String partialPath, String method, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Invoke service result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • method — the method
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Result invokeService(String serviceName, String partialPath, String method, MediaType mediaType, String queryStr, Map<String, Object> body, Map<String, String> pathVariables, String objectOrMediaType)

Invoke service result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • method — the method
    • mediaType — the media type
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
    • objectOrMediaType — the object or media type
  • Returns: the result

public static Result invokeService(String appName, String serviceName, String partialPath, String method, MediaType mediaType, String queryStr, Map<String, Object> body, Map<String, String> pathVariables, String objectOrMediaType)

Invoke service result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • method — the method
    • mediaType — the media type
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
    • objectOrMediaType — the object or media type
  • Returns: the result

public static void logDebug(String msg)

logging

  • Parameters: msg

public static void logError(String msg)

logging

  • Parameters: msg

public static void logInfo(String msg)

login info

  • Parameters: msg

public static void logWarn(String msg)

logging warnings

  • Parameters: msg

public static Object makeAuditLogObject(String sourceClass, String sourceId, String action, String summary)

Make audit log object object.

  • Parameters:
    • sourceClass — the source class
    • sourceId — the source id
    • action — the action
    • summary — the summary
  • Returns: the object

public static Object makeAuditLogObject(String type, String sourceClass, String sourceId, String action, String summary)

create audit records

  • Parameters:
    • type
    • sourceClass
    • sourceId
    • action
    • summary

  • Returns: result

    @SuppressWarnings("unchecked") public static void mapAttrs(Map<String, Object> stateMap, List attrs, Map<String, Object> m, Map<String, Object> d)**

map attributes

  • Parameters:

    • stateMap
    • attrs
    • m
    • d

    @SuppressWarnings("unchecked") public static void mapOneAttr(Map<String, Object> stateMap, Map<String, Object> attrMap, Map<String, Object> m, Map<String, Object> d)**

map one attribute

  • Parameters:
    • stateMap
    • attrMap
    • m
    • d

public static MVELLogger mvelLogger()

Mvel logger mvel logger.

  • Returns: the mvel logger

    @SuppressWarnings("unchecked") public Object pingTask(String id)**

check an ongoing task

  • Parameters: id

  • Returns: result

public static Map<String, Object> readJSON(String dir, String fileName)

  • Parameters:
    • dir
    • fileName

  • Returns:

public static String replacePathVariables(String url, Map<String, String> m)

Replace path variables string.

  • Parameters:
    • url — the url
    • m — the m
  • Returns: the string

public static Object resetAutoIncrement(String appName, String dsName, String className)

reset Auto increment

  • Parameters:
    • appName
    • dsName
    • className

  • Returns: result

public static Result runOSCmd(List argList)

run local commands

  • Parameters: argList

  • Returns: result

public static Object save(String className, Object entity)

Save object.

  • Parameters:
    • className — the class name
    • entity — the entity
  • Returns: the object

public static Object save(String className, Object entity, boolean audit)

save an object

  • Parameters:
    • className
    • entity
    • audit

  • Returns: result

public static Object save(String className, Object entity, String auditMsg)

save an object

  • Parameters:
    • className
    • entity
    • auditMsg

  • Returns: result

public static Object save(String appName, String dsName, String className, Object entity)

Save object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • entity — the entity
  • Returns: the object

public static Object save(String appName, String dsName, String className, Object entity, boolean audit)

save an object

  • Parameters:
    • appName
    • dsName
    • className
    • entity
    • audit

  • Returns: result

public static Object save(String appName, String dsName, String className, Object entity, String auditMsg)

save an object

  • Parameters:
    • appName
    • dsName
    • className
    • entity
    • auditMsg

  • Returns: result

public static Object saveAll(String className, Iterable entities)

Save all object.

  • Parameters:
    • className — the class name
    • entities — the entities
  • Returns: the object

public static Object saveAll(String className, Iterable entities, boolean audit)

save all objects

  • Parameters:
    • className
    • entities
    • audit

  • Returns: result

public static Object saveAll(String className, Iterable entities, String auditMsg)

save all objects

  • Parameters:
    • className
    • entities
    • auditMsg

  • Returns: result

public static Object saveAll(String appName, String dsName, String className, Iterable entities)

Save all object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • entities — the entities
  • Returns: the object

public static Object saveAll(String appName, String dsName, String className, Iterable entities, boolean audit)

save all objects

  • Parameters:
    • appName
    • dsName
    • className
    • entities
    • audit

  • Returns: result

public static Object saveAll(String appName, String dsName, String className, Iterable entities, String auditMsg)

save all objects

  • Parameters:
    • appName
    • dsName
    • className
    • entities
    • auditMsg

  • Returns: results

public static Object sendEmail(String appName, String email, String subject, String content, String template, String fromAlias, Map<String, Object> templateParams)

Send email object.

  • Parameters:
    • appName — the app name
    • email — the email
    • subject — the subject
    • content — the content
    • template — the template
    • fromAlias — the from alias
    • templateParams — the template params
  • Returns: the object

public static Result serviceDelete(String serviceName, String partialPath, String queryStr, Map<String, Object> body)

Service delete result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
  • Returns: the result

public static Result serviceDelete(String serviceName, String partialPath, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Service delete result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Result serviceDelete(String appName, String serviceName, String partialPath, String queryStr, Map<String, Object> body)

Service delete result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
  • Returns: the result

public static Result serviceDelete(String appName, String serviceName, String partialPath, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Service delete result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Result serviceFileGet(String serviceName, String partialPath, String queryStr, Map<String, String> pathVariables)

Service file get result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • pathVariables — the path variables
  • Returns: the result

public static Result serviceFileGet(String appName, String serviceName, String partialPath, String queryStr, Map<String, String> pathVariables)

Service file get result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • pathVariables — the path variables
  • Returns: the result

public static Result serviceGet(String serviceName, String partialPath, String queryStr)

Service get result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
  • Returns: the result

public static Result serviceGet(String serviceName, String partialPath, String queryStr, Map<String, String> pathVariables)

Service get result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • pathVariables — the path variables
  • Returns: the result

public static Result serviceGet(String appName, String serviceName, String partialPath, String queryStr)

Service get result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
  • Returns: the result

public static Result serviceGet(String appName, String serviceName, String partialPath, String queryStr, Map<String, String> pathVariables)

Service get result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • pathVariables — the path variables
  • Returns: the result

public static Result servicePost(String serviceName, String partialPath, String queryStr, Map<String, Object> body)

Service post result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
  • Returns: the result

public static Result servicePost(String serviceName, String partialPath, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Service post result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Result servicePost(String appName, String serviceName, String partialPath, String queryStr, Map<String, Object> body)

Service post result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
  • Returns: the result

public static Result servicePost(String appName, String serviceName, String partialPath, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Service post result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Result servicePut(String serviceName, String partialPath, String queryStr, Map<String, Object> body)

Service put result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
  • Returns: the result

public static Result servicePut(String serviceName, String partialPath, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Service put result.

  • Parameters:
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Result servicePut(String appName, String serviceName, String partialPath, String queryStr, Map<String, Object> body)

Service put result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
  • Returns: the result

public static Result servicePut(String appName, String serviceName, String partialPath, String queryStr, Map<String, Object> body, Map<String, String> pathVariables)

Service put result.

  • Parameters:
    • appName
    • serviceName — the service name
    • partialPath — the partial path
    • queryStr — the query str
    • body — the body
    • pathVariables — the path variables
  • Returns: the result

public static Object signup(Object entity, String authChoice)

Signup object.

  • Parameters:
    • entity — the entity
    • authChoice — the auth choice
  • Returns: the object

public static Result successResult()

success result

  • Returns: result

public static Result successResult(String msg)

success result

  • Parameters: msg

  • Returns: result

public static Result successResult(String msg, Object data)

success result

  • Parameters:
    • msg
    • data

  • Returns: result

public static Object timezoneAdjustment(Object value, String tzStr, int dir)

time zone adjustment

  • Parameters:
    • value
    • tzStr
    • dir

  • Returns: result

public static String uidToClassName(String uid)

Uid to class name string.

  • Parameters: uid — the uid
  • Returns: the string

public static long uidToId(String uid)

Uid to id long.

  • Parameters: uid — the uid
  • Returns: the long

public static String uidToIdStr(String uid)

Uid to id str string.

  • Parameters: uid — the uid
  • Returns: the string

public static Object updateAttr(String className, List ids, String attrName, Object value)

Update attr object.

  • Parameters:
    • className — the class name
    • ids — the ids
    • attrName — the attr name
    • value — the value
  • Returns: the object

public static Object updateAttr(String className, String id, String attrName, Object value)

Update attr object.

  • Parameters:
    • className — the class name
    • id — the id
    • attrName — the attr name
    • value — the value
  • Returns: the object

public static Object updateAttr(String className, List ids, String attrName, Object value, boolean audit)

update attribute object

  • Parameters:
    • className
    • ids
    • attrName
    • value
    • audit

  • Returns: result

public static Object updateAttr(String className, List ids, String attrName, Object value, String auditMsg)

update attribute object

  • Parameters:
    • className
    • ids
    • attrName
    • value
    • auditMsg

  • Returns: result

public static Object updateAttr(String className, String id, String attrName, Object value, boolean audit)

update attribute object

  • Parameters:
    • className
    • id
    • attrName
    • value
    • audit

  • Returns: result

public static Object updateAttr(String className, String id, String attrName, Object value, String auditMsg)

update attribute object

  • Parameters:
    • className
    • id
    • attrName
    • value
    • auditMsg

  • Returns: result

public static Object updateAttr(String appName, String dsName, String className, List ids, String attrName, Object value)

Update attr object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • ids — the ids
    • attrName — the attr name
    • value — the value
  • Returns: the object

public static Object updateAttr(String appName, String dsName, String className, String id, String attrName, Object value)

Update attr object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • id — the id
    • attrName — the attr name
    • value — the value
  • Returns: the object

public static Object updateAttr(String appName, String dsName, String className, List ids, String attrName, Object value, boolean audit)

update attribute object

  • Parameters:
    • appName
    • dsName
    • className
    • ids
    • attrName
    • value
    • audit

  • Returns: result

public static Object updateAttr(String appName, String dsName, String className, List ids, String attrName, Object value, String auditMsg)

update attribute object

  • Parameters:
    • appName
    • dsName
    • className
    • ids
    • attrName
    • value
    • auditMsg

  • Returns: result

public static Object updateAttr(String appName, String dsName, String className, String id, String attrName, Object value, boolean audit)

update attribute object

  • Parameters:
    • appName
    • dsName
    • className
    • id
    • attrName
    • value
    • audit

  • Returns: result

public static Object updateAttr(String appName, String dsName, String className, String id, String attrName, Object value, String auditMsg)

update attribute object

  • Parameters:
    • appName
    • dsName
    • className
    • id
    • attrName
    • value
    • auditMsg

  • Returns: result

public static Object updateAttrs(String className, List ids, Map<String, Object> updateAttrs)

Update attr object.

  • Parameters:
    • className — the class name
    • ids — the ids
    • updateAttrs — - map of attribute names and values
  • Returns: the object

public static Object updateAttrs(String className, String id, Map<String, Object> updateAttrs)

Update attr object.

  • Parameters:
    • className — the class name
    • id — the id
    • updateAttrs — - map of attribute names and values
  • Returns: the object

public static Object updateAttrs(String className, List ids, Map<String, Object> updateAttrs, boolean audit)

update attribute objects

  • Parameters:
    • className
    • ids
    • updateAttrs
    • audit

  • Returns: result

public static Object updateAttrs(String className, List ids, Map<String, Object> updateAttrs, String auditMsg)

update attribute objects

  • Parameters:
    • className
    • ids
    • updateAttrs
    • auditMsg

  • Returns: result

public static Object updateAttrs(String className, String id, Map<String, Object> updateAttrs, boolean audit)

update attribute objects

  • Parameters:
    • className
    • id
    • updateAttrs
    • audit

  • Returns: result

public static Object updateAttrs(String className, String id, Map<String, Object> updateAttrs, String auditMsg)

update attribute objects

  • Parameters:
    • className
    • id
    • updateAttrs
    • auditMsg

  • Returns: result

public static Object updateAttrs(String appName, String dsName, String className, List ids, Map<String, Object> updateAttrs)

Update attr object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • ids — the ids
    • updateAttrs — - map of attribute names and values
  • Returns: the object

public static Object updateAttrs(String appName, String dsName, String className, String id, Map<String, Object> updateAttrs)

Update attr object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • id — the id
    • updateAttrs — - map of attribute names and values
  • Returns: the object

public static Object updateAttrs(String appName, String dsName, String className, List ids, Map<String, Object> updateAttrs, boolean audit)

update attribute objects

  • Parameters:
    • appName
    • dsName
    • className
    • ids
    • updateAttrs
    • audit

  • Returns: result

public static Object updateAttrs(String appName, String dsName, String className, List ids, Map<String, Object> updateAttrs, String auditMsg)

update attribute objects

  • Parameters:
    • appName
    • dsName
    • className
    • ids
    • updateAttrs
    • auditMsg

  • Returns: result

public static Object updateAttrs(String appName, String dsName, String className, String id, Map<String, Object> updateAttrs, boolean audit)

update attribute objects

  • Parameters:
    • appName
    • dsName
    • className
    • id
    • updateAttrs
    • audit

  • Returns: result

public static Object updateAttrs(String appName, String dsName, String className, String id, Map<String, Object> updateAttrs, String auditMsg)

update attribute objects

  • Parameters:
    • appName
    • dsName
    • className
    • id
    • updateAttrs
    • auditMsg

  • Returns: result

public static Object updateByQuery(String className, String query, Map<String, Object> updateAttrs)

Update attr object.

  • Parameters:
    • className — the class name
    • query — - query
    • updateAttrs — - map of attribute names and values
  • Returns: the object

public static Object updateByQuery(String className, String query, Map<String, Object> updateAttrs, boolean audit)

update by query

  • Parameters:
    • className
    • query
    • updateAttrs
    • audit

  • Returns: result

public static Object updateByQuery(String className, String query, Map<String, Object> updateAttrs, String auditMsg)

update by query

  • Parameters:
    • className
    • query
    • updateAttrs
    • auditMsg

  • Returns: result

public static Object updateByQuery(String appName, String dsName, String className, String query, Map<String, Object> updateAttrs)

Update attr object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • query — - query
    • updateAttrs — - map of attribute names and values
  • Returns: the object

public static Object updateByQuery(String appName, String dsName, String className, String query, Map<String, Object> updateAttrs, boolean audit)

update by query

  • Parameters:
    • appName
    • dsName
    • className
    • query
    • updateAttrs
    • audit

  • Returns: result

public static Object updateByQuery(String appName, String dsName, String className, String query, Map<String, Object> updateAttrs, String auditMsg)

update by query

  • Parameters:
    • appName
    • dsName
    • className
    • query
    • updateAttrs
    • auditMsg

  • Returns: result

public static Result waitForMillis(long tm)

wait in milliseconds

  • Parameters: tm

  • Returns: result

public static void writeJSON(String dir, String fileName, Object obj)

create json object

  • Parameters:
    • dir
    • fileName
    • obj

public static void writePrettyJSON(String dir, String fileName, Object obj)

write pretty Json

  • Parameters:

    • dir
    • fileName
    • obj

    static public Class<?> getApiClass()

get this class

  • Returns:

    static public void setApiClass(Class<?> cls)

set the class

  • Parameters: cls

public static String getAppDataDir()

application data directory

  • Returns: directory

public static BaseRepo getBaseRepo()

Gets base repo.

  • Returns: the base repo

    @SuppressWarnings("unchecked") public static Object getCodeValue(Map<String, Object> stateMap, String codeMapping, Object v)**

code values

  • Parameters:
    • stateMap
    • codeMapping
    • v

  • Returns: result

public static Object getCreateUser(Map<String, Object> map)

Get or create user.

  • Parameters: map — the map
  • Returns: the create user

    @SuppressWarnings("unchecked") public static Object getCreateUserAppObject(String idOfUser, String appName, String role)**

Gets create user app object.

  • Parameters:
    • idOfUser — the id of user
    • appName — the app name
    • role — the role
  • Returns: the create user app object

public static Map<String, Object> getCurrentUser()

current user details

  • Returns: map

public static String getCurrentUserId()

current user ID

  • Returns: user ID

public static Object getDataIterator(String className)

data iterator

  • Parameters: className

  • Returns: object

public static Object getDataIterator(String className, String sqlTemplate)

data iterator

  • Parameters:
    • className
    • sqlTemplate

  • Returns: object

public static Object getDataIterator(String className, int start, int size)

data iterator

  • Parameters:
    • className
    • start
    • size

  • Returns: object

public static Object getDataIterator(String className, String sqlTemplate, int start, int size)

data iterator

  • Parameters:
    • className
    • sqlTemplate
    • start
    • size

  • Returns: object

public static Object getDataIterator(String className, String where, String orderBy, int start, int size)

data iterator

  • Parameters:
    • className
    • where
    • orderBy
    • start
    • size

  • Returns: object

public static Object getDataIteratorForAppAndDS(String appName, String dsName, String className, String sqlTemplate, int start, int size)

data iterator for application and data source

  • Parameters:
    • appName
    • dsName
    • className
    • sqlTemplate
    • start
    • size

  • Returns: object

public static Object getDataIteratorForAppAndDS(String appName, String dsName, String className, String where, String orderBy, int start, int size)

data iterator for application and data source

  • Parameters:
    • appName
    • dsName
    • className
    • where
    • orderBy
    • start
    • size

  • Returns: object

public static DataModelRepo getDataModelRepo()

Gets data model repo.

  • Returns: the data model repo

public static Object getDomainFileAsJson(String fileName)

domain files

  • Parameters: fileName

  • Returns: object

public static T getDomainFileAsJson(String fileName, TypeReference type)

retrieve domain files

  • Parameters:
    • fileName
    • type
    • <T>

  • Returns: type object

public static DomainMetaRepo getDomainMetaRepo()

Gets domain meta repo.

  • Returns: the domain meta repo

public static FaasRepo getFaasRepo()

Gets faas repo.

  • Returns: the faas repo

public static boolean isFailedResult(Object obj)

Is failed result boolean.

  • Parameters: obj — the obj
  • Returns: the boolean

public static FlowRepo getFlowRepo()

Gets flow repo.

  • Returns: the flow repo

public static FunctionRepo getFunctionRepo()

Gets function repo.

  • Returns: the function repo

public static String getIdOfCurrentUser()

get ID of current user

  • Returns: ID

public static long getIdOfCurrentUserAsLong()

get ID of current user as long

  • Returns: Id

public static InMemoryCache getMemoryCache()

memory cache

  • Returns: object

public static String getMessage(Object obj)

message

  • Parameters: obj

  • Returns: object

public static boolean isNumeric(String strNum)

numeric

  • Parameters: strNum

  • Returns: flag

public static Object getObject(String className, String id)

Gets object.

  • Parameters:
    • className — the class name
    • id — the id
  • Returns: the object

public static Object getObject(String appName, String dsName, String className, String id)

Gets object.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • id — the id
  • Returns: the object

public static Object getObjectGraph(ObjectGraphRequest ogr)

Gets object graph.

  • Parameters: ogr — the object graph request
  • Returns: the object graph

public static Object getObjectGraph(String appName, String dsName, ObjectGraphRequest ogr)

Gets object graph.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • ogr — the object graph request
  • Returns: the object graph

public static Object getObjectsByQuery(String className, String query)

Gets objects by query.

  • Parameters:
    • className — the class name
    • query — the query
  • Returns: the objects by query

public static Object getObjectsByQuery(String className, String query, boolean includeDeleted)

Gets objects by query.

  • Parameters:
    • className — the class name
    • query — the query
    • includeDeleted
  • Returns: the objects by query

public static Object getObjectsByQuery(String appName, String dsName, String className, String query)

Gets objects by query.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • query — the query
  • Returns: the objects by query

public static Object getObjectsByQuery(String appName, String dsName, String className, String query, boolean includeDeleted)

Gets objects by query.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • query — the query
    • includeDeleted
  • Returns: the objects by query

public static Object getOneByQuery(String className, String query)

Gets one by query.

  • Parameters:
    • className — the class name
    • query — the query
  • Returns: the one by query

public static Object getOneByQuery(String className, String query, boolean includeDeleted)

Gets one by query.

  • Parameters:
    • className — the class name
    • query — the query
    • includeDeleted
  • Returns: the one by query

public static Object getOneByQuery(String appName, String dsName, String className, String query)

Gets one by query.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • query — the query
  • Returns: the one by query

public static Object getOneByQuery(String appName, String dsName, String className, String query, boolean includeDeleted)

Gets one by query.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • query — the query
    • includeDeleted
  • Returns: the one by query

public static Object getOrgByOrgName(String orgName)

Gets org by org name.

  • Parameters: orgName — the org name
  • Returns: the org by org name

public static Object getOrgByQuery(String orgName)

Gets org by query.

  • Parameters: orgName — the org name
  • Returns: the org by query

public static Object getPage(DataRequest dsr)

Gets page.

  • Parameters: dsr — the dsr
  • Returns: the page

public static Object getPage(String className, int start, int size)

Gets page.

  • Parameters:
    • className — the class name
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPage(String appName, String dsName, DataRequest dsr)

Gets page.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • dsr — the dsr
  • Returns: the page

public static Object getPage(String className, String whereClause, int start, int size)

Gets page.

  • Parameters:
    • className — the class name
    • whereClause — the where clause
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPage(String className, String sqlTemplate, Map<String, Object> params, int start, int size)

Gets page.

  • Parameters:
    • className — the class name
    • sqlTemplate — the sql template
    • params — the params
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPage(String appName, String dsName, String className, int start, int size)

Gets page.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPage(String appName, String dsName, String className, String whereClause, int start, int size)

Gets page.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • whereClause — the where clause
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPage(String appName, String dsName, String className, String sqlTemplate, Map<String, Object> params, int start, int size)

Gets page.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • sqlTemplate — the sql template
    • params — the params
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPage(String appName, String dsName, String className, String whereClause, String orderBy, int start, int size)

Gets page.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • whereClause — the where clause
    • orderBy — the order by
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPage(String appName, String dsName, String className, String whereClause, String having, String groupBy, String orderBy, int start, int size)

Gets page.

  • Parameters:
    • appName — the app name
    • dsName — the ds name
    • className — the class name
    • whereClause — the where clause
    • having — the having
    • groupBy — the group by
    • orderBy — the order by
    • start — the start
    • size — the size
  • Returns: the page

public static Object getPageWhereHavingGroupByOrderBy(String className, String whereClause, String having, String groupBy, String orderBy, int start, int size)

Gets page where having group by order by.

  • Parameters:
    • className — the class name
    • whereClause — the where clause
    • having — the having
    • groupBy — the group by
    • orderBy — the order by
    • start — the start
    • size — the size
  • Returns: the page where having group by order by

public static Object getPageWhereOrderBy(String className, String whereClause, String orderBy, int start, int size)

Gets page where order by.

  • Parameters:
    • className — the class name
    • whereClause — the where clause
    • orderBy — the order by
    • start — the start
    • size — the size
  • Returns: the page where order by

public static boolean isResult(Object obj)

Is result boolean.

  • Parameters: obj — the obj
  • Returns: the boolean

public static boolean isResultOrNull(Object obj)

Is result boolean.

  • Parameters: obj — the obj
  • Returns: the boolean

public static RouteRepo getRouteRepo()

Gets route repo.

  • Returns: the route repo

public static String getRtUrl(String orgName)

Gets rt url.

  • Parameters: orgName — the org name
  • Returns: the rt url

public static RuleRepo getRuleRepo()

Gets function repo.

  • Returns: the rule repo

public static SecurityRepo getSecurityRepo()

Gets security repo.

  • Returns: the security repo

public static ServiceRepo getServiceRepo()

Gets service repo.

  • Returns: the service repo

public static boolean isSuccessResult(Object obj)

Is success result boolean.

  • Parameters: obj — the obj
  • Returns: the boolean

public static Object getUser(String id)

Gets user.

  • Parameters: id — the id
  • Returns: the user

public static Object getUserByEmail(String email)

Gets user by email.

  • Parameters: email — the email
  • Returns: the user by email

public static Object getUserByQuery(String query)

Gets user by query.

  • Parameters: query — the query
  • Returns: the user by query

public static Object getUserByUserId(String userId)

Gets user by user id.

  • Parameters: userId — the user id
  • Returns: the user by user id

public static ViewRepo getViewRepo()

Gets view repo.

  • Returns: the view repo

TrilloApiWrapper2

public static int bigQueryToCSV(String filePath, String[] columnNames, String dataSetName, String bqTableName, String query)

export bq table data to CSV

  • Parameters:
    • filePath
    • columnNames
    • dataSetName
    • bqTableName
    • query

  • Returns: result

public static int bigQueryToCSV(String filePath, String[] columnNames, String dataSetName, String bqTableName, String query, String functionName)

export bq table data to CSV

  • Parameters:
    • filePath
    • columnNames
    • dataSetName
    • bqTableName
    • query
    • functionName

  • Returns: result

public static int bigQueryToCSVWithScript(String filePath, String[] columnNames, String dataSetName, String bqTableName, String query, String script)

export bq table data to CSV

  • Parameters:
    • filePath
    • columnNames
    • dataSetName
    • bqTableName
    • query
    • script

  • Returns: result

public static List<Map<String, Object>> csvGetAllRows(String filePath)

get all rows of CSV data file

  • Parameters: filePath

  • Returns: list of data

public static List<Map<String, Object>> csvGetAllRows(String filePath, String separator)

get all rows of CSV data file

  • Parameters:
    • filePath
    • separator

  • Returns: list of rows

public static int csvToSql(String filePath, String className, String query, Map<String, Object> commonAttrs)

transform CSV to SQL

  • Parameters:
    • filePath
    • className
    • query
    • commonAttrs

  • Returns: result

public static int csvToSql(String filePath, String className, String query, String parentId)

transfer CSV to SQL Server

  • Parameters:
    • filePath
    • className
    • query
    • parentId

  • Returns: result

public static int csvToSql(String filePath, String className, String query, Map<String, Object> commonAttrs, String functionName)

transfer CSV to SQL Server

  • Parameters:
    • filePath
    • className
    • query
    • commonAttrs
    • functionName

  • Returns: result

public static int csvToSql(String filePath, String className, String query, String parentId, String functionName)

transfer CSV to SQL

  • Parameters:
    • filePath
    • className
    • query
    • parentId
    • functionName

  • Returns: result

public static int csvToSql(String filePath, String className, String query, Map<String, Object> commonAttrs, String functionName, int pageSize)

transfer CSV to SQL

  • Parameters:
    • filePath
    • className
    • query
    • commonAttrs
    • functionName
    • pageSize

  • Returns: result

public static int csvToSqlScript(String filePath, String className, String query, String parentId, String script)

transfer CSV to SQL using script

  • Parameters:
    • filePath
    • className
    • query
    • parentId
    • script

  • Returns: result

public static int csvToSqlScript(String filePath, String className, String query, Map<String, Object> commonAttrs, String script, int pageSize)

transfer CSV to SQL using script

  • Parameters:
    • filePath
    • className
    • query
    • commonAttrs
    • script
    • pageSize

  • Returns: result

public static int csvToSqlScript(String filePath, String className, String query, String parentId, String script, int pageSize)

transform CSV to SQL with script

  • Parameters:
    • filePath
    • className
    • query
    • parentId
    • script
    • pageSize

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, String parentId)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs, boolean useClassSchema)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs
    • useClassSchema

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs, String functionName)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs
    • functionName

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, String parentId, boolean useClassSchema)

transfer CSV with separator do SQL

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId
    • useClassSchema

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, String parentId, String functionName)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId
    • functionName

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs, String functionName, boolean useClassSchema)

transfer CSV to SQL with specific separator using specific class schema

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs
    • functionName
    • useClassSchema

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs, String functionName, int pageSize)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs
    • functionName
    • pageSize

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, String parentId, String functionName, boolean useClassSchema)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId
    • functionName
    • useClassSchema

  • Returns: result

public static int csvWithSeparatorToSql(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs, String functionName, int pageSize, boolean useClassSchema)

transfer CSV to SQL with specific separator

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs
    • functionName
    • pageSize
    • useClassSchema

  • Returns: result

public static int csvWithSeparatorToSqlScript(String filePath, String separator, String className, String query, String parentId, String script)

transfer CSV to SQL with script

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId
    • script

  • Returns: result

public static int csvWithSeparatorToSqlScript(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs, String script, int pageSize)

transfer CSV with specific separator to SQL with script

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs
    • script
    • pageSize

  • Returns: result

public static int csvWithSeparatorToSqlScript(String filePath, String separator, String className, String query, String parentId, String script, boolean useClassSchema)

transfer CSV with specific separator to SQL

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId
    • script
    • useClassSchema

  • Returns: result

public static int csvWithSeparatorToSqlScript(String filePath, String separator, String className, String query, String parentId, String script, int pageSize)

transfer CSV with separate data to SQL with specific script

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId
    • script
    • pageSize

  • Returns: result

public static int csvWithSeparatorToSqlScript(String filePath, String separator, String className, String query, Map<String, Object> commonAttrs, String script, int pageSize, boolean useClassSchema)

transfer CSV with separator to SQL script with variation

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • commonAttrs
    • script
    • pageSize
    • useClassSchema

  • Returns: result

public static int csvWithSeparatorToSqlScript(String filePath, String separator, String className, String query, String parentId, String script, int pageSize, boolean useClassSchema)

transfer CSV to SQL with specific separator with script

  • Parameters:
    • filePath
    • separator
    • className
    • query
    • parentId
    • script
    • pageSize
    • useClassSchema

  • Returns: result

public static Result migrate(String appName1, String dsName1, String className1, String className2)

migrate from one schema to another

  • Parameters:
    • appName1
    • dsName1
    • className1
    • className2

  • Returns: result

public static Result migrate(String appName1, String dsName1, String className1, String className2, String mapperFunction)

migrate from one class to another

  • Parameters:
    • appName1
    • dsName1
    • className1
    • className2
    • mapperFunction

  • Returns: result

public static Result migrate(String appName1, String dsName1, String className1, String appName2, String dsName2, String className2)

migrate from one data source to another data source

  • Parameters:
    • appName1
    • dsName1
    • className1
    • appName2
    • dsName2
    • className2

  • Returns:

public static Result migrate(String appName1, String dsName1, String className1, String appName2, String dsName2, String className2, String mapperFunction)

migrate from one data source to another data source with mapper function

  • Parameters:
    • appName1
    • dsName1
    • className1
    • appName2
    • dsName2
    • className2
    • mapperFunction

  • Returns: result

public static Result migrate(String appName1, String dsName1, String className1, String appName2, String dsName2, String className2, String mapperFunction, String sql)

migrate from one data source to another data source

  • Parameters:
    • appName1
    • dsName1
    • className1
    • appName2
    • dsName2
    • className2
    • mapperFunction
    • sql

  • Returns: result

public static Result migrate(String appName1, String dsName1, String className1, String appName2, String dsName2, String className2, String mapperFunction, String query, String orderBy)

migrate from one data source to another

  • Parameters:
    • appName1
    • dsName1
    • className1
    • appName2
    • dsName2
    • className2
    • mapperFunction
    • query
    • orderBy

  • Returns: result

public static int sqlToCSV(String filePath, String[] columnNames, String className, String query)

export data from SQL to CSV

  • Parameters:
    • filePath
    • columnNames
    • className
    • query

  • Returns: result

public static int sqlToCSV(String filePath, String[] columnNames, String className, String query, String functionName)

export data from SQL to CSV

  • Parameters:
    • filePath
    • columnNames
    • className
    • query
    • functionName

  • Returns: the result

public static int sqlToCSVWithScript(String filePath, String[] columnNames, String className, String query, String script)

export data from SQL to CSV with script

  • Parameters:
    • filePath
    • columnNames
    • className
    • query
    • script

  • Returns: result

public static String getFilePath(String fileId)

get the file path

  • Parameters: fileId

  • Returns: path

public static String getFolderPath(String folderId)

get the folder path

  • Parameters: folderId

  • Returns: result

public static String getScript(String functionName)

get the script

  • Parameters: functionName

  • Returns: result