public class ScriptUtils
extends java.lang.Object
Constructor and Description |
---|
ScriptUtils() |
Modifier and Type | Method and Description |
---|---|
static RemoteDataResult |
getNamedQueryData(int iCompanyID_p,
java.lang.String sQueryName_p,
int iTimeout_p) |
static int |
getRandomPercentage()
Generates a random integer between 1 and 100 inclusive.
|
static RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.util.List<java.lang.String> headers_p,
java.util.Map<java.lang.String,java.lang.String> params_p,
int iTimeout_p) |
static RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.util.List<java.lang.String> headers_p,
java.lang.String sRequestBody_p,
java.lang.String sContentType_p,
int iTimeout_p) |
static RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.util.Map<java.lang.String,java.lang.String> params_p,
int iTimeout_p) |
static RemoteDataResult |
getRemoteHttpData(java.lang.String sURL_p,
java.lang.String sMethod_p,
java.lang.String sRequestBody_p,
java.lang.String sContentType_p,
int iTimeout_p) |
static void |
initScripting()
Kicks off a very basic Groovy script in order to pre-load the script
engine.
|
static groovy.util.Node |
parseXML(java.lang.String sXML_p) |
static RemoteDataResult |
sendEmail(java.util.List<java.lang.String> recipients_p,
java.lang.String sFromAddress_p,
java.lang.String sSubject_p,
java.lang.String sMessage_p)
Attempts to send a simple 'text' email using the platform's configured
SMPT provider.
|
static RemoteDataResult |
sendSMS(java.lang.String sRecipientNumber_p,
java.lang.String sSenderNumber_p,
java.lang.String sMessage_p)
Attempts to send an SMS message asynchronously using the platform's
standard HTTP-based gateway.
|
public static int getRandomPercentage()
public static RemoteDataResult sendSMS(java.lang.String sRecipientNumber_p, java.lang.String sSenderNumber_p, java.lang.String sMessage_p) throws RemoteException
sRecipientNumber_p
- the mobile number that you want to send the
message to.sSenderNumber_p
- the number that you want to appear as the 'from'
number.sMessage_p
- the body of the SMS message.RemoteException
- if the asynchronous task could not be instigated;
check the RemoteDataResult for further errors.public static RemoteDataResult sendEmail(java.util.List<java.lang.String> recipients_p, java.lang.String sFromAddress_p, java.lang.String sSubject_p, java.lang.String sMessage_p) throws RemoteException
recipients_p
- one or more email addresses to send the message to.sFromAddress_p
- the email address from which you want the message
to look like it was sent.sSubject_p
- the subject line of the email.sMessage_p
- the body of the email.RemoteException
- if the asynchronous task could not be instigated;
check the RemoteDataResult for further errors.public static RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.lang.String sRequestBody_p, java.lang.String sContentType_p, int iTimeout_p) throws RemoteException
RemoteException
public static RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.util.Map<java.lang.String,java.lang.String> params_p, int iTimeout_p) throws RemoteException
RemoteException
public static RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.util.List<java.lang.String> headers_p, java.lang.String sRequestBody_p, java.lang.String sContentType_p, int iTimeout_p) throws RemoteException
RemoteException
public static RemoteDataResult getRemoteHttpData(java.lang.String sURL_p, java.lang.String sMethod_p, java.util.List<java.lang.String> headers_p, java.util.Map<java.lang.String,java.lang.String> params_p, int iTimeout_p) throws RemoteException
RemoteException
public static RemoteDataResult getNamedQueryData(int iCompanyID_p, java.lang.String sQueryName_p, int iTimeout_p) throws RemoteException
RemoteException
public static void initScripting()
public static groovy.util.Node parseXML(java.lang.String sXML_p) throws java.lang.Exception
java.lang.Exception