SL-GMS Enterprise RTView Customization

com.sl.gmsjrtview
Class GmsRtViewFunctionDescriptor

java.lang.Object
  extended by com.sl.gmsjrtview.GmsRtViewFunctionDescriptor

public class GmsRtViewFunctionDescriptor
extends java.lang.Object

The GmsRtViewCustomFunctionArgument class defines a function argument.


Constructor Summary
GmsRtViewFunctionDescriptor(java.lang.String name, GmsRtViewFunctionArgument[] args, int returnType, java.lang.String[] returnColumns, java.lang.String description, java.lang.String extendedHelpDescription, boolean addSeparator)
          Creates a GmsRtViewFunctionDescriptor
 
Method Summary
 boolean addSeparator()
          Returns whether or not to add a separator after this function name in the Edit Function dialog menu.
 double getArgDoubleValue(java.lang.String argName, GmsModelVariables functionIcon)
          Returns the double value of the argument with the given name.
 int getArgIntValue(java.lang.String argName, GmsModelVariables functionIcon)
          Returns the int value of the argument with the given name.
 java.lang.String[] getArgNames()
          Returns the argument names for this function.
 GmsRtViewFunctionArgument[] getArgs()
          Returns the argument objects for this function.
 java.lang.String getArgStringValue(java.lang.String argName, GmsModelVariables functionIcon)
          Returns the String value of the argument with the given name.
 GmsTabularData getArgTableValue(java.lang.String argName, GmsModelVariables functionIcon)
          Returns the Table value of the argument with the given name.
 java.lang.String getDescription()
          Returns the description for this function.
 java.lang.String getExtendedHelpDescription()
          Returns the extended help description for this function.
 java.lang.String getName()
          Returns the name of this function.
 java.lang.String[] getReturnColumns()
          If this function returns a table with known column names, this returns the names of the columns in the table returned by this function.
 int getReturnType()
          Returns the return type for this function.
 boolean isEvalFunction()
           
 boolean isTabularEvalFunction()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GmsRtViewFunctionDescriptor

public GmsRtViewFunctionDescriptor(java.lang.String name,
                                   GmsRtViewFunctionArgument[] args,
                                   int returnType,
                                   java.lang.String[] returnColumns,
                                   java.lang.String description,
                                   java.lang.String extendedHelpDescription,
                                   boolean addSeparator)
Creates a GmsRtViewFunctionDescriptor

New and preferred constructor, which uses GmsRtViewCustomFunctionArguments

Parameters:
name - The function name.
args - The arguments.
returnType - The type of data returned by this function. Valid values are GMS.G_DOUBLE, GMS.G_INTEGER, GMS.G_STRING and GMS.G_TABLE.
returnColumns - If the return type is not a table, or if the column names change depending on the value of the arguments, specify null. Otherwise, the names of the columns in the table returned by this function.
description - The description of the function, its arguments and returns for display in the Edit Function dialog. The description will first be queried from the properties file using functionDesc_name where name is the name of the function. If this returns null, the value of this argument will be used.
extendedHelpDescription - The extended Help description of the function, its arguments and returns for display in the Edit Function dialog. The extended description will first be queried from the properties file using functionExtendedDesc_name where name is the name of the function. If this returns null, the value of this argument will be used.
addSeparator - If true, a separator will be added after the name of this function in the Edit Function dialog menu if there is another function after this one in the list.
Method Detail

addSeparator

public boolean addSeparator()
Returns whether or not to add a separator after this function name in the Edit Function dialog menu. The separator will only be added if this is not the last function in the list.


getArgDoubleValue

public double getArgDoubleValue(java.lang.String argName,
                                GmsModelVariables functionIcon)
                         throws java.lang.Exception
Returns the double value of the argument with the given name.

Parameters:
argName - The name of the argument.
functionIcon - The function object.
Throws:
java.lang.Exception - if the argument name or function object are invalid.

getArgIntValue

public int getArgIntValue(java.lang.String argName,
                          GmsModelVariables functionIcon)
                   throws java.lang.Exception
Returns the int value of the argument with the given name.

Parameters:
argName - The name of the argument.
functionIcon - The function object.
Throws:
java.lang.Exception - if the argument name or function object are invalid.

getArgNames

public java.lang.String[] getArgNames()
Returns the argument names for this function.


getArgs

public GmsRtViewFunctionArgument[] getArgs()
Returns the argument objects for this function.


getArgStringValue

public java.lang.String getArgStringValue(java.lang.String argName,
                                          GmsModelVariables functionIcon)
                                   throws java.lang.Exception
Returns the String value of the argument with the given name.

Parameters:
argName - The name of the argument.
functionIcon - The function object.
Throws:
java.lang.Exception - if the argument name or function object are invalid.

getArgTableValue

public GmsTabularData getArgTableValue(java.lang.String argName,
                                       GmsModelVariables functionIcon)
                                throws java.lang.Exception
Returns the Table value of the argument with the given name.

Parameters:
argName - The name of the argument.
functionIcon - The function object.
Throws:
java.lang.Exception - if the argument name or function object are invalid.

getDescription

public java.lang.String getDescription()
Returns the description for this function.


getExtendedHelpDescription

public java.lang.String getExtendedHelpDescription()
Returns the extended help description for this function.


getName

public java.lang.String getName()
Returns the name of this function.


getReturnColumns

public java.lang.String[] getReturnColumns()
If this function returns a table with known column names, this returns the names of the columns in the table returned by this function. Otherwise, this method returns null.


getReturnType

public int getReturnType()
Returns the return type for this function. Valid values are GMS.G_DOUBLE, GMS.G_INTEGER, GMS.G_STRING, GMS.G_TABLE.


isEvalFunction

public boolean isEvalFunction()

isTabularEvalFunction

public boolean isTabularEvalFunction()

SL-GMS Enterprise RTView Customization

Copyright 2009 Sherrill-Lubinski Corporation, 240 Tamal Vista Blvd
Corte Madera, CA 94925, U.S.A. All Rights Reserved