Package com.ibm.di.function
Class SystemFunctions
- java.lang.Object
-
- com.ibm.di.function.SystemFunctions
-
public class SystemFunctions extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConnectorConfigcreateRuntimeConnector()static voiddeclareUserFunctions(ScriptEngine se)static voiddeclareUserFunctions(ScriptEngine se, RSInterface main)static voiddoNothing()Do nothing.static java.lang.ObjectgetClassInstance(java.lang.String className)static RSInterfacegetServer()Returns the RS instance associated with the current ThreadGroup, or the dummy RSInterface object defined by the Config Editor.static AssemblyLineConfigloadAssemblyLine(java.lang.String name)static AssemblyLineConfigloadAssemblyLine(java.lang.String name, RSInterface server)static ConnectorInterfaceloadConnector(ConnectorConfig config)static ConnectorInterfaceloadConnector(ConnectorConfig config, java.lang.Object parentConfig)static ConnectorInterfaceloadConnector(ConnectorConfig config, java.lang.Object parentConfig, RSInterface server)static ConnectorInterfaceloadConnector(PropertyStoreConfig psc)static ConnectorInterfaceloadConnector(java.lang.String name)static ConnectorInterfaceloadConnector(java.lang.String name, RSInterface server)static SearchCriterialoadCriteria(java.util.Vector<java.lang.String> m)static FunctionInterfaceloadFunction(FunctionConfig config)static FunctionInterfaceloadFunction(FunctionConfig config, Log log)static FunctionInterfaceloadFunction(java.lang.String name)static FunctionInterfaceloadFunction(java.lang.String name, RSInterface server)static ParserInterfaceloadParser(ParserConfig config)static ParserInterfaceloadParser(java.lang.String name)static ParserInterfaceloadParser(java.lang.String name, RSInterface server)static ScriptConfigloadScript(java.lang.String name)static ScriptConfigloadScript(java.lang.String name, RSInterface server)static voidrotatelog(RSInterface parent, java.lang.String logfile)This method renames old logs to be one version older and add current log with version '1'.static voidsetServer(RSInterface server)static voidsetSystemProperties(MetamergeConfig mc)static voidsetSystemProperties(MetamergeConfig config, boolean recursive)Set system properties from properties object in config.static voidsetupSystemConnectorInheritance()Set up inheritance for system Connectors.static java.util.ArrayList<java.lang.String>split(java.lang.String str, java.lang.String sep)static voidverifySSLProtocols(java.net.Socket socket)Verify that a Socket is using the correct SSL protocols.static voidverifySSLProtocols(javax.net.ssl.SSLServerSocket socket)Verify that a ServerSocket is using the correct SSL protocols.
-
-
-
Method Detail
-
setServer
public static void setServer(RSInterface server)
-
getServer
public static RSInterface getServer()
Returns the RS instance associated with the current ThreadGroup, or the dummy RSInterface object defined by the Config Editor. Although this method is public, it is meant for internal use,. The usual way to get the current RS instance would be to use themainobject in JavaScript.- Returns:
- the
RSinstance ornullif it couldn't be found, e.g. because the current Thread was not created by the TDI framework.
-
split
public static java.util.ArrayList<java.lang.String> split(java.lang.String str, java.lang.String sep)
-
loadScript
public static ScriptConfig loadScript(java.lang.String name)
-
loadScript
public static ScriptConfig loadScript(java.lang.String name, RSInterface server)
-
loadAssemblyLine
public static AssemblyLineConfig loadAssemblyLine(java.lang.String name)
-
loadAssemblyLine
public static AssemblyLineConfig loadAssemblyLine(java.lang.String name, RSInterface server)
-
loadParser
public static ParserInterface loadParser(java.lang.String name) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadParser
public static ParserInterface loadParser(java.lang.String name, RSInterface server) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadParser
public static ParserInterface loadParser(ParserConfig config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadConnector
public static ConnectorInterface loadConnector(java.lang.String name) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadConnector
public static ConnectorInterface loadConnector(java.lang.String name, RSInterface server) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadConnector
public static ConnectorInterface loadConnector(PropertyStoreConfig psc) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadConnector
public static ConnectorInterface loadConnector(ConnectorConfig config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadConnector
public static ConnectorInterface loadConnector(ConnectorConfig config, java.lang.Object parentConfig) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadConnector
public static ConnectorInterface loadConnector(ConnectorConfig config, java.lang.Object parentConfig, RSInterface server) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadFunction
public static FunctionInterface loadFunction(java.lang.String name) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadFunction
public static FunctionInterface loadFunction(java.lang.String name, RSInterface server) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadFunction
public static FunctionInterface loadFunction(FunctionConfig config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadFunction
public static FunctionInterface loadFunction(FunctionConfig config, Log log) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadCriteria
public static SearchCriteria loadCriteria(java.util.Vector<java.lang.String> m) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getClassInstance
public static java.lang.Object getClassInstance(java.lang.String className) throws java.lang.Exception- Throws:
java.lang.Exception
-
declareUserFunctions
public static void declareUserFunctions(ScriptEngine se) throws java.lang.Exception
- Throws:
java.lang.Exception
-
declareUserFunctions
public static void declareUserFunctions(ScriptEngine se, RSInterface main) throws java.lang.Exception
- Throws:
java.lang.Exception
-
rotatelog
public static void rotatelog(RSInterface parent, java.lang.String logfile) throws java.lang.Exception
This method renames old logs to be one version older and add current log with version '1'. The total number of the kept log files is specified by the system property com.ibm.di.server.rotatelogs.Note: If this property is not set, this method will not do anything.
See Also:
Online documentation for help about setting com.ibm.di.server.rotatelogs property.- Parameters:
parent- object used for getting the system property - com.ibm.di.server.rotatelogs.logfile- current log file- Throws:
java.lang.Exception
-
createRuntimeConnector
public static ConnectorConfig createRuntimeConnector() throws java.lang.Exception
- Throws:
java.lang.Exception
-
setSystemProperties
public static void setSystemProperties(MetamergeConfig config, boolean recursive) throws java.lang.Exception
Set system properties from properties object in config. If recursive, run through included configs as well.- Throws:
java.lang.Exception
-
setSystemProperties
public static void setSystemProperties(MetamergeConfig mc) throws java.lang.Exception
- Throws:
java.lang.Exception
-
doNothing
public static void doNothing()
Do nothing. This method intentionally does nothing.- Since:
- 7.0
-
setupSystemConnectorInheritance
public static void setupSystemConnectorInheritance()
Set up inheritance for system Connectors.- Since:
- 7.1
-
verifySSLProtocols
public static void verifySSLProtocols(java.net.Socket socket)
Verify that a Socket is using the correct SSL protocols. If the socket is an SSLSocket, set the protocols as defined by a system property.- Parameters:
socket-
-
verifySSLProtocols
public static void verifySSLProtocols(javax.net.ssl.SSLServerSocket socket)
Verify that a ServerSocket is using the correct SSL protocols. If the socket is an SSLServerSocket, set the protocols as defined by a system property.- Parameters:
socket-
-
-