|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.function.UserFunctions
public class UserFunctions
This class contains a number of convenience methods widely used by the scripting environment. An instance of this class is available in scripts, with the scripting name of system.
Field Summary | |
---|---|
static char[] |
INVALID_XML_CHARS
|
Exception |
lastError
The Exception object set by the last call in this library. |
RSInterface |
server
|
Constructor Summary | |
---|---|
UserFunctions()
|
|
UserFunctions(RSInterface server)
|
Method Summary | |
---|---|
void |
abortAssemblyLine(String reason)
Throws an AbortALException to instruct the AssemblyLine to terminate. |
String |
arrayToString(byte[] array)
Converts a ByteArray to a string. |
static byte[] |
base64Decode(String str)
base64Decode: Obtain Byte Array from a Base 64 encoded String. |
static String |
base64Encode(byte[] b)
base64Encode: Obtain Base 64 encoded String from a binary Byte Array |
String |
binaryGUIDtoString(byte[] binaryData)
Generates the hexadecimal String representation of an Active Directory GUID based on its 128-bit binary representation. |
boolean |
chdir(String directory)
Change Java runtime working directory (Sets the "user.dir" property which not always works!!). |
static boolean |
containsIC(String first,
String second)
Returns true if the second String is a substring of the first, ignoring case. |
void |
continueLoop()
Throws a ContinueloopException to tell the AssemblyLine to continue with the next value in the loop. |
void |
continueLoop(String name)
Throws a ContinueLoopException to tell the AssemblyLine to continue with the next value in the named loop. |
boolean |
copyBinaryFile(String fromPath,
String toPath,
boolean overwrite)
|
void |
copyDirectory(String source,
String target,
boolean recursive,
boolean overwrite,
Log log)
|
boolean |
copyFile(String oldFile,
String newFile)
Copy a File. |
boolean |
copyFile(String fromPath,
String toPath,
boolean overwrite)
Copy file. |
AssemblyLinePool |
createALPool(String assemblyLine,
Log log)
Creates an AssemblyLine Pool object from the specified AssemblyLine name. |
static IDispatch |
createCOMInstance(String progID)
|
boolean |
deleteFile(String filePath)
This method deletes a file. |
Object |
deletePersistentObject(String key)
This method deletes a named object in the default system property store. |
static void |
deletePipe(String pipeName)
Deletes specified pipe from default instance Drops the associated table in System Store with the specified memory queue (if it’s a persistent queue). |
static void |
deletePipe(String instName,
String pipeName)
Deletes the specified pipe from the specified instance. |
String |
dtSeconds()
Returns the number of milliseconds since Jan 1 1970 as a string. |
void |
dumpEntry(Entry e)
Dumps an entry to the console log. |
boolean |
dumpJavaClass(String className)
Dumps the public methods for a Java class. |
static String |
encodeToHexstring(byte[] data)
encodeToHexstring: Obtain HexString from a byte array. |
static boolean |
endsWithIC(String first,
String second)
Returns true if the first String ends with the second String, ignoring case If at least one if the Strings are null, returns false. |
String |
entry2LDIF(Entry e)
Converts an Entry object to an LDIF string. |
void |
exitBranch()
Throws an ExitBranchException that tells the AssemblyLine to exit the current branch/loop. |
void |
exitBranch(String name)
Throws an ExitBranchException that tells the AssemblyLine to exit the named branch/loop. |
void |
exitFlow()
Throws an ExitBranchException that tells the AssemblyLine to not execute any more of the Flow Section components. |
void |
exitFlow(boolean skipResponse)
Throws an ExitBranchException that tells the AssemblyLine to not execute any more of the Flow Section components. |
String |
formatDate(Date date,
String format)
This method formats a java.util.Date object using the provided template. |
ConnectorInterface |
getConnector(String name)
Load a connector. |
String |
getcwd()
Returns the current working directory. |
Object |
getExternalProperty(String propName)
Get external property using delegator object |
Object |
getExternalProperty(String extObj,
String propName)
Get external property from specific extprop object |
ExternalPropertiesConfig |
getExtProp(String name)
Returns a named extprop object. |
FTPBean |
getFTP()
Returns an instance of the FTP object. |
FunctionInterface |
getFunction(String name)
Loads a function from the function library. |
String |
getJavaProperty(String prop)
Returns the value for a system property. |
String |
getOSName()
Returns the name of the operating system. |
ParserInterface |
getParser(String name)
Load a parser. |
Object |
getPersistentObject(String key)
This method retrieves a named object from the default system property store. |
static MemBufferQ |
getPipe(String instName,
String pipeName)
This method returns a handle to a pipe with the specified instName and pipeName (if it already exists). |
String |
getRacfPassword(byte[] pwbytes,
String recipientKeystore,
String recipientKeystorePW,
String recipientCertAlias,
String recipientCertPW,
String signerKeystore,
String signerKeystorePW,
String signerCertAlias)
This method returns the String representation of the decrypted password from the RACF PasswordEnvelope |
RacfPassword |
getRacfPasswordObject(byte[] pwbytes,
String recipientKeystore,
String recipientKeystorePW,
String recipientCertAlias,
String recipientCertPW,
String signerKeystore,
String signerKeystorePW,
String signerCertAlias)
This method returns a RacfPassword object containing the decrypted RACF password envelope |
String |
getRacfPasswordObjectDump(byte[] pwbytes,
String recipientKeystore,
String recipientKeystorePW,
String recipientCertAlias,
String recipientCertPW,
String signerKeystore,
String signerKeystorePW,
String signerCertAlias)
This method returns the String representation of the decrypted racfpasswordenvelope The syntax for the String is: Password: <password>, Version: <version>, Change Time: <timestamp>, Language: <language>, Expired: <true/false> |
String |
getRsaDecrypted(String cipherText,
String ksPath,
String ksPassword,
String certificateAlias,
String certificatePassword)
getRsaDecrypted: Obtain plain ascii text for encrypted ciphertext specified. |
String |
getRsaEncrypted(String plainText,
String ksPath,
String ksPassword,
String certificateAlias)
getRsaEncrypted: Obtain encrypted (and ascii-encoded) value for plaintext specified, null strings are not processed and will be returned as null. |
static Vector |
getRunningALs()
This method returns a Vector containing all AssemblyLines that were running when the function was called |
static Vector |
getRunningALs(String name)
This method returns a Vector containing all AssemblyLines with the given name that were running when the function was called |
static Vector |
getRunningEHs()
This method returns a Vector containing all EventHandlers that were running when the function was called. |
static Vector |
getRunningEHs(String name)
This method returns a Vector containing all EventHandlers with the given name that were running when the function was called |
String |
getScriptText(String name)
Returns the text from the Script Library. |
RSInterface |
getServer()
|
static ParameterSubstitution |
getTDIExpression(String pattern)
|
TDIProperties |
getTDIProperties()
Returns the TDIProperties object for the current configuration |
Object |
getTDIProperty(String name)
Returns the value for a TDI property |
Object |
getTDIProperty(String propstore,
String name)
Returns the property value from a specific TDI property store "@param propstore The property store name |
String |
getX400Attribute(String x400,
String sep,
String attribute)
Returns an attribute value from an X.400 address. |
org.apache.xpath.XPathAPI |
getXPathAPI()
Returns the Apache XPathAPI |
Entry |
httpGet(String url)
Posts file to a web server. |
Entry |
httpPost(String url,
Object file)
|
Entry |
httpRequest(String method,
String contentType,
String url,
Object file)
|
void |
ignoreEntry()
Throws an IgnoreEntryException to tell the AssemblyLine to skip the current Connector and continue with the next Connector in the AssemblyLine. |
void |
ignoreEntry(String msg)
Throws an IgnoreEntryException to tell the AssemblyLine to skip the current Connector and continue with the next Connector in the AssemblyLine. |
boolean |
isValidInt(String str)
Returns true if a string holds a valid Integer. |
ConnectorInterface |
loadConnector(String connectorName)
Load a connector. |
static void |
loadJarFile(String path)
Dynamically add jar file containing class definitions. |
String |
makeTitleCase(String in)
Convert A String Into Title Case (Like This), using the current Locale. |
String |
mapString(String source,
String fromSet,
String toSet)
Translates characters in a string. |
Attribute |
newAttribute(String name)
Creates a new Attribute object. |
Entry |
newEntry()
Creates a new Entry object. |
Object |
newObject(String className)
Creates a new object. |
static MemBufferQ |
newPipe(String instName,
String pipeName,
int watermark)
This method create a new Memory Buffer Queue if it does not already exist. |
static MemBufferQ |
newPipe(String instName,
String pipeName,
int watermark,
int pagesize)
This method create a new Memory Buffer Queue if it does not already exist. |
SearchCriteria |
newSearchCriteria()
Creates a new rscSearchCriteira object. |
TaskCallBlock |
newTCB()
Create an empty TaskCallBlock. |
TaskCallBlock |
newTCB(String assemblyLine)
Create a TaskCallBlock with i/o specifications from an existing assemblyline. |
String |
normalizeX400(String value,
String cursep,
String newsep)
Converts an X.400 address to a string using short form attribute names. |
BufferedWriter |
openFileForAppend(String path)
Opens a file in append mode and returns the associated BufferedWriter object. |
BufferedReader |
openFileForInput(String path)
Opens a file for input and returns the associated BufferedReader object. |
BufferedWriter |
openFileForOutput(String path)
Opens a file in output mode and returns the associated BufferedWriter object. |
Date |
parseDate(String value,
String format)
Converts a String to a java.util.Date object. |
Entry |
parseObject(String parser,
Object data)
Use a parser to interpret data. |
String |
remove(String s,
String source)
Remove characters from a string. |
static String |
removeInvalidXMLChars(String aString)
|
String |
removeStringChars(String source,
String fromSet)
Removes occurrences of characters from a string. |
boolean |
renameFile(String oldName,
String newName)
Rename a file. |
void |
restartEntry()
Throws a RestartEntryException to tell the AssemblyLine to restart. |
void |
restartEntry(String msg)
Throws a RestartEntryException to tell the AssemblyLine to restart, using the current work object. |
void |
retryEntry()
Throws a RetryEntryException to tell the AssemblyLine to retry this Connector. |
org.w3c.dom.traversal.NodeIterator |
selectNodeIterator(Node contextNode,
String str)
Selects nodes using an XPath expression from an XML node. |
NodeList |
selectNodeList(Node contextNode,
String str)
Selects nodes using an XPath expression from an XML node. |
Node |
selectSingleNode(Node contextNode,
String str)
Selects a single node using an XPath expression from an XML node. |
String |
sendMail(String from,
String recipient,
String subject,
String body,
String attachment)
Sends an email message. |
void |
setExternalProperty(String propName,
Object value)
Set external property using delegator object |
void |
setExternalProperty(String extObj,
String propName,
Object value)
Set external property in a specific extprop object |
void |
setJavaProperty(String prop,
String value)
Sets the value of a property name. |
Object |
setPersistentObject(String key,
Object value)
This method stores a named object in the default system property store. |
void |
setTDIProperty(String name,
Object value)
Sets the property value for a property (store selection based on naming rules and order) "@param propstore The property store name |
void |
setTDIProperty(String propstore,
String name,
Object value)
Sets the property value in a specific TDI property store "@param propstore The property store name |
ExecuteCommand |
shellCommand(String command)
Executes a shell command. |
ExecuteCommand |
shellCommand(String command,
Object args)
Executes a shell command. |
void |
skipEntry()
Throws a SkipEntryException to tell the AssemblyLine to skip the current Entry. |
void |
skipEntry(String msg)
Throws a SkipEntryException to tell the AssemblyLine to skip the current Entry. |
void |
skipTo(String name)
Throws a SkipToException to tell the AssemblyLine to skip to the named Connector/ScriptComponent. |
InterruptedException |
sleep(int seconds)
Causes the current thread (e.g. |
boolean |
snmpTrap(String host,
int port,
String oid,
String value)
Sends an SNMP trap. |
boolean |
snmpTrap(String agentIP,
String host,
int port,
String community,
String enterprise,
int genericTrap,
int specificTrap,
String oid,
Object value)
Sends an SNMP trap. |
String[] |
splitString(String source,
String separators)
Splits a string into an array of strings. |
static boolean |
startsWithIC(String first,
String second)
Returns true if the first String starts with the second String, ignoring case. |
static String |
substitute(String pattern,
Map params)
Performs a one-time parsing and substitution of pattern with the objects available in params. |
static String |
substitute(String pattern,
String[] names,
Object[] objects)
Performs a one-time parsing and substitution of pattern with named objects. |
void |
throwException(String message)
Throws a generic java.lang.Exception. |
String |
toHex(String str)
Converts a string to a hexadecimal string where each character is converted to a two-byte hex value. |
Integer |
toInt(String str)
Convert a string to a java.lang.Integer object. |
String |
translateString(String str,
String fromCharset,
String toCharset)
Translate a string from one character set to another. |
String |
trim(String str)
Trims leading/trailing white-space from a string. |
void |
writeln(Writer w,
String str)
Writes a string plus a CRLF using a Writer object. |
String |
xslTransform(Object xsl,
Object xml)
Calls the XSLTransformer to transform an XML document using a given style sheet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Exception lastError
public RSInterface server
public static char[] INVALID_XML_CHARS
Constructor Detail |
---|
public UserFunctions()
public UserFunctions(RSInterface server)
Method Detail |
---|
public RSInterface getServer()
public String remove(String s, String source) throws Exception
remove (" ", "J O P")
. The returned value would then be "JOP".
var a = "A string with blanks and vowels"; var b = system.remove ("AEIOUaeiou ", a); task.logmsg("Result: " + b); // "strngwthblnksndvwls"
s
- The characters to be removedsource
- The string from which characters are removed
Exception
public String trim(String str)
str
- The string to trim
public Integer toInt(String str) throws Exception
str
- The string with a number
Exception
public boolean isValidInt(String str)
str
- The string to test
public BufferedWriter openFileForAppend(String path) throws Exception
var out = system.openFileForAppend("out.txt"); out.write ("Hello world!"); out.newLine (); out.close ();
path
- The file path to open
Exception
public BufferedWriter openFileForOutput(String path) throws Exception
var out = system.openFileForOutput("out.txt"); out.write ("Hello world!"); out.newLine (); out.close ();
path
- The file path to open (overwrites existing file)
Exception
public BufferedReader openFileForInput(String path) throws Exception
var inp = system.openFileForInput ("inp.txt"); var str = inp.readLine(); if ( str == null ) task.logmsg("End of file"); inp.close ();
path
- The file path to open
Exception
public void writeln(Writer w, String str) throws Exception
w
- The writer objectstr
- The string to write
Exception
public String sendMail(String from, String recipient, String subject, String body, String attachment) throws Exception
from
- The From fieldrecipient
- A comma separated list of recipient addressessubject
- The Subject fieldbody
- The message textattachment
- If specified a file-path that will be attached to the message
Exception
public boolean copyFile(String fromPath, String toPath, boolean overwrite) throws Exception
fromPath
- The source filetoPath
- The destination fileoverwrite
- Specify true if destination should be overwritten.
Exception
public boolean copyBinaryFile(String fromPath, String toPath, boolean overwrite) throws Exception
Exception
public void copyDirectory(String source, String target, boolean recursive, boolean overwrite, Log log) throws Exception
Exception
public Attribute newAttribute(String name)
name
- The attribute name
public SearchCriteria newSearchCriteria()
public Entry newEntry()
public Object newObject(String className)
className
- The java class name
public void skipEntry() throws SkipEntryException
SkipEntryException
public void skipEntry(String msg) throws SkipEntryException
msg
- - A message supplied by the user
SkipEntryException
public void ignoreEntry() throws IgnoreEntryException
IgnoreEntryException
public void ignoreEntry(String msg) throws IgnoreEntryException
msg
- - A message supplied by the user
IgnoreEntryException
public void restartEntry() throws RestartEntryException
RestartEntryException
public void restartEntry(String msg) throws RestartEntryException
msg
- - A message supplied by the user
RestartEntryException
restartEntry()
public void retryEntry() throws RetryEntryException
RetryEntryException
public void skipTo(String name) throws SkipToException
name
- - The name of the Connector to skip to.
SkipToException
public void abortAssemblyLine(String reason) throws AbortALException
reason
- Descriptive text why the AssemblyLine is terminated
AbortALException
public void throwException(String message) throws Exception
message
- The Exception's message text
Exception
public void exitBranch() throws ExitBranchException
ExitBranchException
public void exitBranch(String name) throws ExitBranchException
name
- - The name of the branch/loop to exit
ExitBranchException
- to tell the AssemblyLine to exit the named branch/looppublic void exitFlow() throws ExitBranchException
This behavior is identical to that caused by the following call:
system.exitBranch("Flow");
ExitBranchException
- to tell the AssemblyLine to exit the Flow Sectionpublic void exitFlow(boolean skipResponse) throws ExitBranchException
If the skipResponse parameter pass is false, then in the case of a Server mode Connector, the Response is carried out. If skipResponse is true, no Response is sent.
skipResponse
- Whether or not a Response should be sent if a Server mode Connector is feeding this AL.
ExitBranchException
- to tell the AssemblyLine to exit the Flow Sectionpublic void continueLoop() throws ContinueLoopException
ContinueLoopException
public void continueLoop(String name) throws ContinueLoopException
name
- - The name of the loop
ContinueLoopException
public ConnectorInterface loadConnector(String connectorName)
connectorName
- The connector name as it appears in the configuration file
public String dtSeconds()
public InterruptedException sleep(int seconds)
seconds
- Number of seconds to sleep
public String removeStringChars(String source, String fromSet)
source
- The source stringfromSet
- A string specifying characters to be removed from source
public String makeTitleCase(String in)
in
- The string to convert
public String mapString(String source, String fromSet, String toSet)
source
- The source stringfromSet
- The characters to be replacedtoSet
- The characters to replace characters in fromSet
public String translateString(String str, String fromCharset, String toCharset)
str
- The source stringfromCharset
- The source character settoCharset
- The target character set
public String toHex(String str)
str
- The source string
public String getX400Attribute(String x400, String sep, String attribute)
x400
- The X.400 addresssep
- The separator used in the address ( typically "/" or ";" )attribute
- The X.400 attribute
public String normalizeX400(String value, String cursep, String newsep)
value
- The X.400 addresscursep
- The separator used in valuenewsep
- The separator to be used in the result
public Date parseDate(String value, String format)
value
- The date in string formformat
- The format of value (e.g. "yyyy.MM.DD", "MM/DD/yy" etc ...)
A complete list of format chanacters can be found at http://icu.sourceforge.net/apiref/icu4j/com/ibm/icu/text/SimpleDateFormat.html
lastError
public String formatDate(Date date, String format)
date
- The date objectformat
- The format of value (e.g. "yyyy.MM.DD", "MM/DD/yy" etc ...)
A complete list of format chanacters can be found at
http://icu.sourceforge.net/apiref/icu4j/com/ibm/icu/text/SimpleDateFormat.html.
lastError
public String[] splitString(String source, String separators)
source
- The source stringseparators
- The word-separating characters
public ConnectorInterface getConnector(String name)
name
- The connector name as it appears in the configuration file
public ParserInterface getParser(String name)
name
- The parser name as it appears in the configuration file
public Entry parseObject(String parser, Object data)
parser
- The parser namedata
- Any object of type Reader, InputStream or object that has a toString method
lastError
public ExecuteCommand shellCommand(String command)
command
- A String containing the shell command to execute.
This String will be parsed with a simple StringTokenizer, to split the command and arguments.
ExecuteCommand
public ExecuteCommand shellCommand(String command, Object args)
command
- The shell command to executeargs
- The arguments to the command. E.g. a String array containing the arguments.
In JavaScript you could have code like this:
myArr = ["-c", "/bin/ls", "/mnt/cd rom"]; cmd = system.shellCommand ("su", myArr); main.logmsg("The result was:\n" + cmd.getOutputBuffer() );
ExecuteCommand
public String getOSName()
public String getJavaProperty(String prop)
prop
- The property name
public void setJavaProperty(String prop, String value)
prop
- The property namevalue
- The property valuepublic String entry2LDIF(Entry e)
e
- The entry
public FTPBean getFTP()
FTPBean
public void dumpEntry(Entry e)
e
- The entrypublic org.apache.xpath.XPathAPI getXPathAPI()
public Node selectSingleNode(Node contextNode, String str)
contextNode
- The XML document nodestr
- The XPath search string
public NodeList selectNodeList(Node contextNode, String str)
contextNode
- The XML document nodestr
- The XPath search string
public org.w3c.dom.traversal.NodeIterator selectNodeIterator(Node contextNode, String str)
contextNode
- The XML document nodestr
- The XPath search string
public String xslTransform(Object xsl, Object xml)
xsl
- The XSL Style sheet (String, java.io.File, java.io.Reader )xml
- The XML document (String, java.io.File, java.io.Reader )
public boolean dumpJavaClass(String className)
className
- The java class name
lastError
public boolean chdir(String directory)
directory
- File system directory
public String getcwd()
public String getScriptText(String name)
name
- The script name as it appears in the configuration.
public boolean snmpTrap(String host, int port, String oid, String value)
host
- The IP hostport
- The TCP portoid
- The OIDvalue
- The value
lastError
public boolean snmpTrap(String agentIP, String host, int port, String community, String enterprise, int genericTrap, int specificTrap, String oid, Object value)
importClass(Packages.com.ibm.di.protocols.SNMP); var entry = system.newEntry(); entry.setAttribute("1.2.3.4.1", "MyString"); entry.setAttribute("1.2.3.4.2", SNMP.createIPAddress("10.0.0.1") ); entry.setAttribute("1.2.3.4.3", SNMP.createGauge(200) ); if ( !system.snmpTrap( "192.1.1.1", targetIP, 162, "public", enterpriseOID, 0, 0, null, entry) ) { task.logmsg("Error sending trap: " + system.lastError); }If oid is non-null, value should be a java.util.Vector, a javascript array or any other object. The conversion of the values to SNMP PDU values are as follows: If you provide an object whose class starts with "com.tivoli.snmp.data" the value is used asis (see com.ibm.di.protocols.SNMP on how to create these objects). If you provide an Integer then a com.tivoli.snmp.data.Counter object is created. In all other cases an OctetString object is created from the object value's toString() method. Sample script:
importClass(Packages.com.ibm.di.protocols.SNMP); var varBind = [ "MyString", SNMP.createIPAddress("10.0.0.1"), SNMP.createGauge(200) ]; if ( !system.snmpTrap( "192.1.1.1", targetIP, 162, "public", enterpriseOID, 0, 0, "1.2.3.4", varBind) ) { task.logmsg("Error sending trap: " + system.lastError); }
agentIP
- The agent IP address or null to use the local host ip address (e.g. InetAddress.getLocalHost().getHostAddress())host
- The target IP hostport
- The target TCP portcommunity
- The SNMP community stringenterprise
- The Enterprise OIDgenericTrap
- Trap type: coldStart(0), warmStart(1), linkDown(2), linkUp(3), authenticationFailure(4), egpNeighborLoss(5), enterpriseSpecific(6)specificTrap
- Used for enterpriseSpecific trapsoid
- The OID for the values. If oid is null, value must be en Entry where the Attribute names will be used as OIDsvalue
- The value(s)
lastError
public Entry httpGet(String url)
url
- The URL to the web server
lastError
public Entry httpPost(String url, Object file)
public Entry httpRequest(String method, String contentType, String url, Object file)
public String arrayToString(byte[] array)
ret.value = system.arrayToString( work.getObject("userpassword"));
array
- The byte array to be converted
public boolean deleteFile(String filePath) throws Exception
filePath
- The name of the file to be deleted
Exception
lastError
public boolean renameFile(String oldName, String newName)
oldName
- The old name of the filenewName
- The new name of the file
lastError
public boolean copyFile(String oldFile, String newFile)
oldFile
- The name of the file to copynewFile
- The name of the new file
lastError
public TaskCallBlock newTCB()
public TaskCallBlock newTCB(String assemblyLine)
public Object getPersistentObject(String key) throws Exception
key
- The unique key
Exception
public Object setPersistentObject(String key, Object value) throws Exception
key
- The unique keyvalue
- The object to store (must be java serializable)
Exception
public Object deletePersistentObject(String key) throws Exception
key
- The unique key
Exception
public static Vector getRunningALs()
public static Vector getRunningALs(String name)
name
- Find all AssemblyLines with this name. Only the last part of the name (after optional /) is used.
public static Vector getRunningEHs()
public static Vector getRunningEHs(String name)
name
- Find all EventHandlers with this name. Only the last part of the name (after optional /) is used.
public RacfPassword getRacfPasswordObject(byte[] pwbytes, String recipientKeystore, String recipientKeystorePW, String recipientCertAlias, String recipientCertPW, String signerKeystore, String signerKeystorePW, String signerCertAlias) throws Exception
pwbytes
- the byte array containing the racfpasswordenveloperecipientKeystore
- the file path to the recipient's keystore filerecipientKeystorePW
- the password for access to the recipient's keystore filerecipientCertAlias
- String alias name of certificate for recipientrecipientCertPW
- the password for access to the recipient's certificatesignerKeystore
- the file path to the signer's keystore file (note: signer cert and recip cert keystore can be same file)signerKeystorePW
- the password for access to the recipient's keystore filesignerCertAlias
- String alias name of certificate for recipient
Exception
public String getRacfPassword(byte[] pwbytes, String recipientKeystore, String recipientKeystorePW, String recipientCertAlias, String recipientCertPW, String signerKeystore, String signerKeystorePW, String signerCertAlias) throws Exception
pwbytes
- the byte array containing the racfpasswordenveloperecipientKeystore
- the file path to the recipient's keystore filerecipientKeystorePW
- the password for access to the recipient's keystore filerecipientCertAlias
- String alias name of certificate for recipientrecipientCertPW
- the password for access to the recipient's certificatesignerKeystore
- the file path to the signer's keystore file (note: signer cert and recip cert keystore can be same file)signerKeystorePW
- the password for access to the recipient's keystore filesignerCertAlias
- String alias name of certificate for recipient
Exception
public String getRacfPasswordObjectDump(byte[] pwbytes, String recipientKeystore, String recipientKeystorePW, String recipientCertAlias, String recipientCertPW, String signerKeystore, String signerKeystorePW, String signerCertAlias) throws Exception
pwbytes
- the byte array containing the racfpasswordenveloperecipientKeystore
- the file path to the recipient's keystore filerecipientKeystorePW
- the password for access to the recipient's keystore filerecipientCertAlias
- String alias name of certificate for recipientrecipientCertPW
- the password for access to the recipient's certificatesignerKeystore
- the file path to the signer's keystore file (note: signer cert and recip cert keystore can be same file)signerKeystorePW
- the password for access to the recipient's keystore filesignerCertAlias
- String alias name of certificate for recipient
Exception
public String getRsaEncrypted(String plainText, String ksPath, String ksPassword, String certificateAlias) throws Exception
plainText
- String representing value to be encrypted using public keyksPath
- String representing file path to jks fileksPassword
- String representing password for jks file as specified by pathcertificateAlias
- String naming the alias of certificate in keystore file
java.langException
- when underlying funtion fails
Exception
public String getRsaDecrypted(String cipherText, String ksPath, String ksPassword, String certificateAlias, String certificatePassword) throws Exception
cipherText
- String representing value to be decrypted using private keyksPath
- String representing file path to jks fileksPassword
- String representing password for jks file as specified by pathcertificateAlias
- String naming the alias of certificate in keystore filecertificatePassword
- String representing password certificate
java.langException
- when underlying funtion fails
Exception
public AssemblyLinePool createALPool(String assemblyLine, Log log) throws Throwable
assemblyLine
- The name of the assemblylinelog
- The Log object to use or null to use the system logger
Throwable
public FunctionInterface getFunction(String name) throws Exception
name
- The name of the function.
Exception
public static String base64Encode(byte[] b)
b
- byte array containing binary data
public static byte[] base64Decode(String str)
str
- String containing base64 Data.
public static String encodeToHexstring(byte[] data)
data
- byte array containing binary data
public static IDispatch createCOMInstance(String progID)
public static MemBufferQ newPipe(String instName, String pipeName, int watermark) throws Exception
instName
- name of the instance. Default instance will be used if this param is null.pipeName
- name of the pipe to be createdwatermark
- With Paging On, it is the threshold at which objects are persisted to the System Store
With Paging Off, it is the maximum queue size
Exception
public static MemBufferQ newPipe(String instName, String pipeName, int watermark, int pagesize) throws Exception
instName
- name of the instance. Default instance will be used if this param is null.pipeName
- name of the pipe to be createdwatermark
- With Paging On, it is the threshold at which objects are persisted to the System Store
With Paging Off, it is the maximum queue sizepagesize
-
Exception
public static MemBufferQ getPipe(String instName, String pipeName) throws Exception
instName
- name of the instance. Default instance will be used if this param is null.pipeName
- name of the pipe to be returned
Exception
public static void deletePipe(String instName, String pipeName) throws Exception
instName
- name of the instance. Default instance will be used if this param is null.pipeName
- name of the pipe to be deleted
Exception
public static void deletePipe(String pipeName) throws Exception
pipeName
- name of the pipe to be deleted
Exception
public Object getExternalProperty(String propName) throws Exception
Exception
public void setExternalProperty(String propName, Object value) throws Exception
Exception
public Object getExternalProperty(String extObj, String propName) throws Exception
Exception
public void setExternalProperty(String extObj, String propName, Object value) throws Exception
Exception
public ExternalPropertiesConfig getExtProp(String name) throws Exception
Exception
public String binaryGUIDtoString(byte[] binaryData)
binaryData
- a 16-byte byte array, holding the 128-bit binary representation of the GUID.
public static String removeInvalidXMLChars(String aString)
public static void loadJarFile(String path)
path
- The full path name of a jar file or a directory containing jar filesIDILoader.addFiles(String)
public TDIProperties getTDIProperties() throws Exception
Exception
public Object getTDIProperty(String name) throws Exception
name
- The name of the property
Exception
public Object getTDIProperty(String propstore, String name) throws Exception
name
- The name of the property
Exception
public void setTDIProperty(String name, Object value) throws Exception
name
- The name of the property
"@param value The property value
Exception
public void setTDIProperty(String propstore, String name, Object value) throws Exception
name
- The name of the property
"@param value The property value
Exception
public static boolean startsWithIC(String first, String second)
first
- The first Stringsecond
- The second String
public static boolean endsWithIC(String first, String second)
first
- The first Stringsecond
- The second String
public static boolean containsIC(String first, String second)
containsIC("abcde", "BCD"); // Returns true containsIC("abcde", "bd"); // Returns false
first
- The first Stringsecond
- The second String
public static ParameterSubstitution getTDIExpression(String pattern) throws Exception
Exception
public static String substitute(String pattern, Map params) throws Exception
map = new java.util.HashMap(); map.put("mc", main.getMetamergeConfig()); map.put("work", work); result = system.substitute("{work.cn} {property.myprop}", map);
pattern
- The pattern string to expandparams
- The available objects (e.g. conn, work, task etc)
Exception
public static String substitute(String pattern, String[] names, Object[] objects) throws Exception
result = system.substitute("{work.cn} {property.myprop}", ["mc", "work"], [main.getMetamergeConfig(), work]);
pattern
- The pattern string to expandnames
- The names of the available objects (e.g. "conn", "work", "task" etc)objects
- The available objects (e.g. conn, work, task etc)
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |