|
|
com.architech.function
|
Field Summary | |
java.lang.Exception |
lastError
The Exception object set by the last call in this library. |
Constructor Summary | |
userFunctions2()
|
Method Summary | |
void |
abortAssemblyLine(java.lang.String reason)
Throws a rseAbortAL exception to tell the assembly line to terminate the assembly line. |
int |
charCode(char ch)
Returns a character's numeric value using the Character.digit method. |
int |
charCode(java.lang.String str,
int index)
Returns the numeric value for a character. |
boolean |
chdir(java.lang.String directory)
Change Java runtime working directory (Sets the "user.dir" property which not always works!!). |
boolean |
copyFile(java.lang.String fromPath,
java.lang.String toPath,
boolean overwrite)
Copy file. |
java.lang.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(java.lang.String className)
Dumps the public methods for a Java class. |
java.lang.String |
entry2LDIF(Entry e)
Converts an Entry object to an LDIF string. |
com.architech.connector.rscConnectorInterface |
getConnector(java.lang.String name)
Load a connector. |
java.lang.String |
getcwd()
Returns the current working directory. |
com.architech.protocols.FTPBean |
getFTP()
Returns an instance of the FTP object. |
java.lang.String |
getJavaProperty(java.lang.String prop)
Returns the value for a system property. |
java.lang.String |
getOSName()
Returns the name of the operating system./ |
com.architech.parser.rspParserInterface |
getParser(java.lang.String name)
Load a parser. |
java.lang.String |
getScriptText(java.lang.String name)
Returns the text from the Script Library. |
java.lang.String |
getX400Attribute(java.lang.String x400,
java.lang.String sep,
java.lang.String attribute)
Returns an attribute value from an X.400 address. |
org.apache.xpath.XPathAPI |
getXPathAPI()
Returns the Apache XPathAPI |
void |
ignoreEntry()
Throws a rseEntryIgnore exception to tell the assembly line to skip the current connector and continue with the next connector in the assembly line. |
boolean |
isValidInt(java.lang.String str)
Returns true if a string holds a valid Integer. |
com.architech.connector.rscConnectorInterface |
loadConnector(java.lang.String connectorName)
Load a connector. |
java.lang.String |
mapString(java.lang.String source,
java.lang.String fromSet,
java.lang.String toSet)
Translates characters in a string. |
Attribute |
newAttribute(java.lang.String name)
Creates a new Attribute object. |
Entry |
newEntry()
Creates a new Entry object. |
java.lang.Object |
newObject(java.lang.String className)
Creates a new object. |
rscSearchCriteria |
newSearchCriteria()
Creates a new rscSearchCriteira object. |
java.lang.String |
normalizeX400(java.lang.String value,
java.lang.String cursep,
java.lang.String newsep)
Converts an X.400 address to a string using short form attribute names. |
java.io.BufferedWriter |
openFileForAppend(java.lang.String path)
Opens a file in append mode and returns the associated BufferedWriter object. |
java.io.BufferedReader |
openFileForInput(java.lang.String path)
Opens a file for input and returns the associated BufferedReader object. |
java.io.BufferedWriter |
openFileForOutput(java.lang.String path)
Opens a file in output mode and returns the associated BufferedWriter object. |
java.util.Date |
parseDate(java.lang.String value,
java.lang.String format)
Converts a String to a java.util.Date object. |
Entry |
parseObject(java.lang.String parser,
java.lang.Object data)
Use a parser to interpret data. |
java.lang.String |
remove(java.lang.String s,
java.lang.String source)
Remove occurrences of a character from a string. |
java.lang.String |
removeStringChars(java.lang.String source,
java.lang.String fromSet)
Removes occurrences of characters from a string. |
void |
restartEntry()
Throws a rseRestartEntry exception to tell the assembly line to skip all connectors and start with first connector in the assembly line using the current work object. |
com.architech.function.NodeIterator |
selectNodeIterator(com.architech.function.Node contextNode,
java.lang.String str)
Selects nodes using an XPath expression from an XML node. |
com.architech.function.NodeList |
selectNodeList(com.architech.function.Node contextNode,
java.lang.String str)
Selects nodes using an XPath expression from an XML node. |
com.architech.function.Node |
selectSingleNode(com.architech.function.Node contextNode,
java.lang.String str)
Selects a single node using an XPath expression from an XML node. |
java.lang.String |
sendMail(java.lang.String from,
java.lang.String recipient,
java.lang.String subject,
java.lang.String body,
java.lang.String attachment)
Sends an email message. |
void |
setJavaProperty(java.lang.String prop,
java.lang.String value)
Sets the value of a property name. |
com.architech.function.executeCommand |
shellCommand(java.lang.String command)
Executes a shell command. |
void |
skipEntry()
Throws a rseEntrySkipped exception to tell the assembly line to skip the current entry. |
java.lang.InterruptedException |
sleep(int seconds)
Causes the current thread (e.g. assembly line, event handler etc..) to sleep for a number of seconds. |
boolean |
snmpTrap(java.lang.String host,
int port,
java.lang.String oid,
java.lang.String value)
Sends an SNMP trap. |
java.lang.String[] |
splitString(java.lang.String source,
java.lang.String separators)
Splits a string into an array of strings. |
void |
throwException(java.lang.String message)
Throws a generic java.lang.Exception. |
java.lang.String |
toHex(java.lang.String str)
Converts a string to a hexadecimal string where each character is converted to a two-byte hex value. |
java.lang.Integer |
toInt(java.lang.String str)
Convert a string to an java.lang.Integer object. |
java.lang.String |
translateString(java.lang.String str,
java.lang.String fromCharset,
java.lang.String toCharset)
Translate a string from one character set to another. |
java.lang.String |
trim(java.lang.String str)
Trims leading/traing white-space from a string. |
void |
writeln(java.io.Writer w,
java.lang.String str)
Writes a string plus a CRLF using a Writer object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.Exception lastError
Constructor Detail |
public userFunctions2()
Method Detail |
public java.lang.String remove(java.lang.String s, java.lang.String source) throws java.lang.Exception
remove (" ", "J O P")
. The returned value would then be "JOP".
var a = "A string with blanks"; var b = system.remove (" ", a); task.logmsg ("Result: " + b); // "Astringwithblanks"
s
- The character to be removedsource
- The string from which characters are removedpublic java.lang.String trim(java.lang.String str)
str
- The string to trimpublic java.lang.Integer toInt(java.lang.String str) throws java.lang.Exception
str
- The string with a numberpublic boolean isValidInt(java.lang.String str)
str
- The string to testpublic java.io.BufferedWriter openFileForAppend(java.lang.String path) throws java.lang.Exception
path
- The file path to openpublic java.io.BufferedWriter openFileForOutput(java.lang.String path) throws java.lang.Exception
path
- The file path to open (overwrites existing file)public java.io.BufferedReader openFileForInput(java.lang.String path) throws java.lang.Exception
path
- The file path to openpublic void writeln(java.io.Writer w, java.lang.String str) throws java.lang.Exception
w
- The writer objectstr
- The string to writepublic java.lang.String sendMail(java.lang.String from, java.lang.String recipient, java.lang.String subject, java.lang.String body, java.lang.String attachment) throws java.lang.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 messagepublic boolean copyFile(java.lang.String fromPath, java.lang.String toPath, boolean overwrite) throws java.lang.Exception
fromPath
- The source filetoPath
- The destination fileoverwrite
- Specify true if destination should be overwritten.public Attribute newAttribute(java.lang.String name)
name
- The attribute namepublic rscSearchCriteria newSearchCriteria()
public Entry newEntry()
public java.lang.Object newObject(java.lang.String className)
className
- The java class namepublic void skipEntry() throws com.architech.exceptions.rseEntrySkipped
public void ignoreEntry() throws com.architech.exceptions.rseEntryIgnore
public void restartEntry() throws com.architech.exceptions.rseRestartEntry
public void abortAssemblyLine(java.lang.String reason) throws com.architech.exceptions.rseAbortAL
reason
- Descriptive text why the AL is terminatedpublic void throwException(java.lang.String message) throws java.lang.Exception
message
- The exception's message textpublic com.architech.connector.rscConnectorInterface loadConnector(java.lang.String connectorName)
connectorName
- The connector name as it appears in the configuration filepublic java.lang.String dtSeconds()
public java.lang.InterruptedException sleep(int seconds)
seconds
- Number of seconds to sleeppublic java.lang.String removeStringChars(java.lang.String source, java.lang.String fromSet)
source
- The source stringfromSet
- A string specifying characters to be removed from sourcepublic java.lang.String mapString(java.lang.String source, java.lang.String fromSet, java.lang.String toSet)
source
- The source stringfromSet
- The characters to be replacedtoSet
- The characters to replace characters in fromSetpublic java.lang.String translateString(java.lang.String str, java.lang.String fromCharset, java.lang.String toCharset)
str
- The source stringfromCharset
- The source character settoCharset
- The target character setpublic java.lang.String toHex(java.lang.String str)
str
- The source stringpublic int charCode(java.lang.String str, int index)
str
- The source stringindex
- The position of the character in strpublic int charCode(char ch)
ch
- The characterpublic java.lang.String getX400Attribute(java.lang.String x400, java.lang.String sep, java.lang.String attribute)
x400
- The X.400 addresssep
- The separator used in the address ( typically "/" or ";" )attribute
- The X.400 attributepublic java.lang.String normalizeX400(java.lang.String value, java.lang.String cursep, java.lang.String newsep)
value
- The X.400 addresscursep
- The separator used in valuenewsep
- The separator to be used in the resultpublic java.util.Date parseDate(java.lang.String value, java.lang.String format)
value
- The date in string formformat
- The format of value (e.g. "YYYY.MM.DD", "MM/DD/YY" etc ...)lastError
public java.lang.String[] splitString(java.lang.String source, java.lang.String separators)
source
- The source stringseparators
- The word-separating characterspublic com.architech.connector.rscConnectorInterface getConnector(java.lang.String name)
name
- The connector name as it appears in the configuration filepublic com.architech.parser.rspParserInterface getParser(java.lang.String name)
name
- The parser name as it appears in the configuration filepublic Entry parseObject(java.lang.String parser, java.lang.Object data)
parser
- The parser namedata
- Any object of type Reader, InputStream or object that has a toString methodlastError
public com.architech.function.executeCommand shellCommand(java.lang.String command)
command
- The shell command to executeexecuteCommand
public java.lang.String getOSName()
public java.lang.String getJavaProperty(java.lang.String prop)
prop
- The property namepublic void setJavaProperty(java.lang.String prop, java.lang.String value)
prop
- The property namevalue
- The property valuepublic java.lang.String entry2LDIF(Entry e)
e
- The entrypublic com.architech.protocols.FTPBean getFTP()
FTPBean
public void dumpEntry(Entry e)
e
- The entrypublic org.apache.xpath.XPathAPI getXPathAPI()
public com.architech.function.Node selectSingleNode(com.architech.function.Node contextNode, java.lang.String str)
contextNode
- The XML document nodestr
- The XPath search stringpublic com.architech.function.NodeList selectNodeList(com.architech.function.Node contextNode, java.lang.String str)
contextNode
- The XML document nodestr
- The XPath search stringpublic com.architech.function.NodeIterator selectNodeIterator(com.architech.function.Node contextNode, java.lang.String str)
contextNode
- The XML document nodestr
- The XPath search stringpublic boolean dumpJavaClass(java.lang.String className)
className
- The java class namelastError
public boolean chdir(java.lang.String directory)
directory
- File system directorypublic java.lang.String getcwd()
public java.lang.String getScriptText(java.lang.String name)
name
- The script name as it appears in the configuration.public boolean snmpTrap(java.lang.String host, int port, java.lang.String oid, java.lang.String value)
host
- The IP hostport
- The TCP portoid
- The OIDvalue
- The valuelastError
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
|