com.dragosmatachescu.hyperionUtils
Class HyperionRuntime

java.lang.Object
  extended bycom.dragosmatachescu.hyperionUtils.HyperionRuntime

public class HyperionRuntime
extends java.lang.Object

Wrapper class for java.lang.Runtime most interesting methods that can be used in Hyperion Essbase as UDF - User Defined Functions.

Naming conventions:

- if the java JRE class is called String for example, the correspondent class will be called HyperionString.

- if the java JRE method is called compareTo for example, the correspondent wrapper method will be called z_compareTo, and the essbase UDF function will be called @JString_compareTo.

- whenever possible, the wrapper function will have the same parameters as the JRE function, except the first parameter will be the java object and the function will be static.

Ex:
str1.compareTo(str2);
becomes
z_compareTo(str1, str2).

Implements static wrappers for the following methods in Runtime object as defined in J2SE 1.4.2 (to allow to execute external processes from Essbase):

Process exec(String[] cmdarray);
Process exec(String[] cmdarray, String[] envp, File dir);

Author:
Dragos Matachescu.

Constructor Summary
HyperionRuntime()
           
 
Method Summary
static void main(java.lang.String[] args)
          Create also the main function so we can use RUNJAVA in Essbase for functions that return void.
static java.lang.String z_exec(java.lang.String[] cmdarray, java.lang.String[] shellInput, java.lang.String responseSeparator, java.lang.String dir)
          Wrapper for Process exec(String[] cmdarray, String[] envp, File dir);

Executes a command in the given directory (can be any) that can accept multiple manual input commands (ftp like or telnet like session), and returns all output from all steps separated by responseSeparator.
static java.lang.String z_execCurrentDir(java.lang.String[] cmdarray, java.lang.String[] shellInput, java.lang.String responseSeparator)
          Wrapper for Process exec(String[] cmdarray);

Executes a command in the current directory (Essbase bin directory) that can accept multiple manual input commands (ftp like or telnet like session), and returns all output from all steps separated by responseSeparator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyperionRuntime

public HyperionRuntime()
Method Detail

z_execCurrentDir

public static java.lang.String z_execCurrentDir(java.lang.String[] cmdarray,
                                                java.lang.String[] shellInput,
                                                java.lang.String responseSeparator)
Wrapper for Process exec(String[] cmdarray);

Executes a command in the current directory (Essbase bin directory) that can accept multiple manual input commands (ftp like or telnet like session), and returns all output from all steps separated by responseSeparator.


z_exec

public static java.lang.String z_exec(java.lang.String[] cmdarray,
                                      java.lang.String[] shellInput,
                                      java.lang.String responseSeparator,
                                      java.lang.String dir)
Wrapper for Process exec(String[] cmdarray, String[] envp, File dir);

Executes a command in the given directory (can be any) that can accept multiple manual input commands (ftp like or telnet like session), and returns all output from all steps separated by responseSeparator.


main

public static void main(java.lang.String[] args)
Create also the main function so we can use RUNJAVA in Essbase for functions that return void. Allows to call the method z_exec with limited parameters (each input array must have a single element).

Ex: RUNJAVA com.dragosmatachescu.hyperionUtils.HyperionRuntime "z_exec" "msg" "Administrator Hello" "" "C:\\"; .