ServerlessFunction
This is the base class of all Trillo functions. It provides accessor methods for the runtime environment and information about the user in the current context.
package com.collager.trillo.util;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.collager.trillo.pojo.Result;
import com.collager.trillo.pojo.RuntimeContext;
import com.collager.trillo.pojo.ScriptParameter;
public class ServerlessFunction implements TrilloFunction, Loggable {
protected RuntimeContext rtContext;
protected List<Result> failedResults = null;
protected int failedCount = 0;
protected int successCount = 0;
protected Result criticalFailureResult = null;
public long getIdOfUser() {
return rtContext.getIdOfUser();
}
public String getUserId() {
return rtContext.getUserId();
}
public String getFirstName() {
return rtContext.getFirstName();
}
public String getLastName() {
return rtContext.getLastName();
}
public String getFullName() {
return rtContext.getFullName();
}
public String getEmail() {
return rtContext.getEmail();
}
public String getOrgName() {
return rtContext.getOrgName();
}
public String getAppName() {
return rtContext.getAppName();
}
public String getExternalId() {
return rtContext.getExternalId();
}
public String getRole() {
return rtContext.getRole();
}
public String getUserOrgName() {
return rtContext.getUserOrgName();
}
public boolean isEmailVerified() {
return rtContext.isEmailVerified();
}
public String getTenantId() {
return rtContext.getTenantId();
}
public String getTenantName() {
return rtContext.getTenantName();
}
public long getUserOrgId() {
return rtContext.getUserOrgId();
}
public String getPictureUrl() {
return rtContext.getPictureUrl();
}
public Object getV() {
return rtContext.getV();
}
public String getTaskName() {
return rtContext.getTaskName();
}
public long getExecutionId() {
return rtContext.getExecutionId();
}
}
Last updated