com.mindoo.remote.api.notes
Class LotusScriptProgram

java.lang.Object
  extended by com.mindoo.remote.api.notes.LotusScriptProgram

public class LotusScriptProgram
extends java.lang.Object

This class is a container for the LotusScript code that can be fed into the method IRemoteNotesUITools.executeLotusScriptInUI(LotusScriptProgram, boolean, boolean, Map) in order to execute a piece of LotusScript code as a temporary Notes agent


Field Summary
static java.lang.String DEFAULT_METHODS_DECLARATIONS
          Use this method to define the Declarations section via addMethod(String, String)
static java.lang.String DEFAULT_METHODS_INITIALIZE
          Use this method to define the Initialize section via addMethod(String, String)
static java.lang.String DEFAULT_METHODS_OPTIONS
          Use this method to define the Options section via addMethod(String, String)
static java.lang.String DEFAULT_METHODS_TERMINATE
          Use this method to define the Terminate section via addMethod(String, String)
 
Constructor Summary
LotusScriptProgram()
           
 
Method Summary
 void addMethod(java.lang.String methodName, java.lang.String methodContent)
          Adds a method to the LotusScript program.
 java.lang.String getCode(java.lang.String methodName)
          Returns the code for the specified method
 java.util.Iterator<java.lang.String> getMethods()
          Returns an Iterator of the defined method names
 java.lang.String toString()
          The method concatenates all declared methods and their code to one big string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_METHODS_OPTIONS

public static final java.lang.String DEFAULT_METHODS_OPTIONS
Use this method to define the Options section via addMethod(String, String)

See Also:
Constant Field Values

DEFAULT_METHODS_DECLARATIONS

public static final java.lang.String DEFAULT_METHODS_DECLARATIONS
Use this method to define the Declarations section via addMethod(String, String)

See Also:
Constant Field Values

DEFAULT_METHODS_INITIALIZE

public static final java.lang.String DEFAULT_METHODS_INITIALIZE
Use this method to define the Initialize section via addMethod(String, String)

See Also:
Constant Field Values

DEFAULT_METHODS_TERMINATE

public static final java.lang.String DEFAULT_METHODS_TERMINATE
Use this method to define the Terminate section via addMethod(String, String)

See Also:
Constant Field Values
Constructor Detail

LotusScriptProgram

public LotusScriptProgram()
Method Detail

addMethod

public void addMethod(java.lang.String methodName,
                      java.lang.String methodContent)
Adds a method to the LotusScript program. The methods should be added in the right order based on the dependencies between the methods. That means the code should be tested in a standalone agent before it is used from an XPages context

Parameters:
methodName - method name
methodContent - method code including the sub/function definition

getMethods

public java.util.Iterator<java.lang.String> getMethods()
Returns an Iterator of the defined method names

Returns:
method names

getCode

public java.lang.String getCode(java.lang.String methodName)
Returns the code for the specified method

Parameters:
methodName - method name
Returns:
code or null if not found

toString

public java.lang.String toString()
The method concatenates all declared methods and their code to one big string

Overrides:
toString in class java.lang.Object