@PermitAll public class ActionFunctionsImpl extends Object implements ActionFunctions
ActionFunctions
.Constructor and Description |
---|
ActionFunctionsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
cleanEvaluation(ExecutionContext ctx)
Cleans auxiliary contexts and values used by the evaluation in the 'isFullExecutionMode = false' mode.
|
ClosureHolder |
compileClosure(ExecutionContext ctx,
String closureString) |
RecordHolder |
createInstance(ExecutionContext ctx,
Type type,
MapHolder values)
Creates new instance of record type T.
|
RecordHolder |
createModelInstance(ExecutionContext ctx,
Boolean synchronous,
RecordHolder model,
MapHolder properties)
Creates a model instance.
|
RecordHolder |
createModelInstance(ExecutionContext ctx,
Boolean synchronous,
RecordHolder model,
RecordHolder processEntity,
MapHolder properties)
Creates a model instance with a specified process entity record.
|
void |
createProxyOfProperties(ExecutionContext ctx,
RecordHolder record,
Property... properties)
Creates change proxy for all object referenced by the property and sets the proxy values to the property.
|
RecordProxySetHolder |
createProxySet(ExecutionContext ctx,
RecordHolder parentProxySet)
Creates new record proxy set.
|
void |
createWithProxySetStart(RecordHolder proxySet) |
void |
createWithProxySetStop(RecordHolder proxySet) |
String |
debugLog(ExecutionContext ctx,
ClosureHolder message)
Logs a message to the console at the debug logging level.
|
String |
debugLog(ExecutionContext ctx,
ClosureHolder message,
Decimal level)
Logs a message to the console at the specified logging level.
|
void |
deleteAllRecords(ExecutionContext ctx,
CollectionHolder records)
Deletes the specified records and all related data links navigable from the deleted records.
|
void |
deleteRecords(ExecutionContext ctx,
RecordHolder... records)
Deletes the specified records and all related data links navigable from the deleted records.
|
Object |
evaluateExpression(ExecutionContext ctx,
Boolean isFullExecutionMode,
ClosureHolder expression)
This method evaluates an expression defined in the closure using defined evaluationMode.
|
void |
flushAndRefresh(ExecutionContext ctx,
RecordHolder... record)
Executes flush on all relevant sessions and performs refresh (re-read from database) on the specified records.
|
RecordHolder |
getCommonProxySet() |
RecordHolder |
getProxiedRecord(Object proxy)
Returns proxied record of the proxy.
|
Decimal |
getProxyLevel(RecordHolder record)
Returns proxy level of the record.
|
RecordProxySetHolder |
getProxySet(RecordHolder record)
Returns
RecordProxySetHolder for the record. |
void |
log(ExecutionContext ctx,
String message,
Decimal level)
Logs a message to the application log on specified level.
|
ListHolder |
mergeAllProxies(ExecutionContext ctx,
Boolean checkConflicts,
CollectionHolder records)
Merges changes from the proxies to the proxied records.
|
void |
mergeEvaluation(ExecutionContext ctx)
Merges auxiliary contexts and values to the original execution contexts and values.
|
ListHolder |
mergeProxies(ExecutionContext ctx,
Boolean checkConflicts,
Object... records)
Merges changes from the proxies to the proxied records.
|
void |
notifyModelInstance(ExecutionContext ctx,
Decimal modelInstanceId,
String reason,
Boolean synchronously)
Notify provided model instance.
|
void |
removeFromProxySet(RecordHolder record)
Remove the record from the proxySet the record is included in.
|
void |
sendSignal(ExecutionContext ctx,
Boolean synchronous,
SetHolder receivers,
Object signal)
Sends a sync or async signal to receivers.
|
void |
setCommonProxySet(RecordHolder proxySet) |
void |
throwEscalation(ExecutionContext ctx,
String escalationCode,
Object payload)
Throws an escalation event with the escalation code and optional payload.
|
public void sendSignal(ExecutionContext ctx, Boolean synchronous, SetHolder receivers, Object signal) throws ErrorException
ActionFunctions
sendSignal
in interface ActionFunctions
ErrorException
public RecordHolder createModelInstance(ExecutionContext ctx, Boolean synchronous, RecordHolder model, MapHolder properties) throws ErrorException
ActionFunctions
createModelInstance
in interface ActionFunctions
ErrorException
public RecordHolder createModelInstance(ExecutionContext ctx, Boolean synchronous, RecordHolder model, RecordHolder processEntity, MapHolder properties) throws ErrorException
ActionFunctions
createModelInstance
in interface ActionFunctions
ErrorException
public void notifyModelInstance(ExecutionContext ctx, Decimal modelInstanceId, String reason, Boolean synchronously) throws ErrorException
ActionFunctions
notifyModelInstance
in interface ActionFunctions
reason
- string used for loggingErrorException
public void log(ExecutionContext ctx, String message, Decimal level) throws ErrorException
ActionFunctions
log
in interface ActionFunctions
ErrorException
public String debugLog(ExecutionContext ctx, ClosureHolder message) throws ErrorException
ActionFunctions
debugLog
in interface ActionFunctions
ErrorException
public String debugLog(ExecutionContext ctx, ClosureHolder message, Decimal level) throws ErrorException
ActionFunctions
debugLog
in interface ActionFunctions
ErrorException
public Object evaluateExpression(ExecutionContext ctx, Boolean isFullExecutionMode, ClosureHolder expression) throws ErrorException
ActionFunctions
evaluateExpression
in interface ActionFunctions
ErrorException
public void cleanEvaluation(ExecutionContext ctx)
ActionFunctions
cleanEvaluation
in interface ActionFunctions
public void mergeEvaluation(ExecutionContext ctx) throws ErrorException
ActionFunctions
mergeEvaluation
in interface ActionFunctions
ErrorException
public void deleteAllRecords(ExecutionContext ctx, CollectionHolder records) throws ErrorException
ActionFunctions
deleteAllRecords
in interface ActionFunctions
ErrorException
public void deleteRecords(ExecutionContext ctx, RecordHolder... records) throws ErrorException
ActionFunctions
deleteRecords
in interface ActionFunctions
ErrorException
public void throwEscalation(ExecutionContext ctx, String escalationCode, Object payload) throws ErrorException
ActionFunctions
throwEscalation
in interface ActionFunctions
escalationCode
- the code of the escalationpayload
- the escalation payload (optional)ErrorException
public RecordHolder createInstance(ExecutionContext ctx, Type type, MapHolder values) throws ErrorException
ActionFunctions
createInstance
in interface ActionFunctions
ErrorException
public RecordProxySetHolder createProxySet(ExecutionContext ctx, RecordHolder parentProxySet)
ActionFunctions
createProxySet
in interface ActionFunctions
public void createProxyOfProperties(ExecutionContext ctx, RecordHolder record, Property... properties) throws ErrorException
ActionFunctions
createProxyOfProperties
in interface ActionFunctions
ErrorException
public RecordHolder getProxiedRecord(Object proxy)
ActionFunctions
getProxiedRecord
in interface ActionFunctions
public RecordProxySetHolder getProxySet(RecordHolder record)
ActionFunctions
RecordProxySetHolder
for the record. If the record is not a proxy it returns null;getProxySet
in interface ActionFunctions
public void removeFromProxySet(RecordHolder record)
ActionFunctions
removeFromProxySet
in interface ActionFunctions
public Decimal getProxyLevel(RecordHolder record)
ActionFunctions
getProxyLevel
in interface ActionFunctions
public void setCommonProxySet(RecordHolder proxySet)
setCommonProxySet
in interface ActionFunctions
public RecordHolder getCommonProxySet()
getCommonProxySet
in interface ActionFunctions
public void createWithProxySetStart(RecordHolder proxySet)
createWithProxySetStart
in interface ActionFunctions
public void createWithProxySetStop(RecordHolder proxySet)
createWithProxySetStop
in interface ActionFunctions
public ListHolder mergeProxies(ExecutionContext ctx, Boolean checkConflicts, Object... records) throws LspsException
ActionFunctions
mergeProxies
in interface ActionFunctions
LspsException
public ListHolder mergeAllProxies(ExecutionContext ctx, Boolean checkConflicts, CollectionHolder records) throws LspsException
ActionFunctions
mergeAllProxies
in interface ActionFunctions
LspsException
public void flushAndRefresh(ExecutionContext ctx, RecordHolder... record)
ActionFunctions
flushAndRefresh
in interface ActionFunctions
public ClosureHolder compileClosure(ExecutionContext ctx, String closureString) throws ValidationException
compileClosure
in interface ActionFunctions
ValidationException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.