ibi.broker.api.data.schedule
Class AmperParameter

java.lang.Object
  extended by ibi.broker.api.data.schedule.AmperParameter
All Implemented Interfaces:
java.io.Serializable

public class AmperParameter
extends java.lang.Object
implements java.io.Serializable

 AmperParameter is used to specify, discover, and retrieve parameter names and values  
 located within a FOCUS procedure. This class is only thrown by the method 
 AmperParameter[] getAmperParameterList (Task task) in the 
 ScheduleManager class.
 The getAmperParameterList() method accepts a Task object which is used as a  
 reference when the AmperParameter class is instantiated. 
 getAmperParameterList() will return an array of AmperParameter  
 objects, with each member of the array representing a single parameter from the task 
 that was passed as a reference. 
 In ReportCaster a task represents one report within a ReportCaster scheduled  
 distribution.  A ReportCaster distribution can have multiple tasks, of which there are
 five types: WF_Procedure, Standard Report, My Report, URL, and File. AmperParameter is 
  designed to work only with Standard Report and My Report (i.e.) within Managed Reporting). 
 While it is true that WebFocus Server procedures are also FOCUS procedures, 
 these are not supported in this release.  Passing an invalid task to getAmperParameterList() 
 will result in an error. 
 Each AmperParameter object returned from getAmperParameterList() 
 represents an Amper variable declared within the FOCUS procedure associated with the task.
 The value of the parameters that are abstracted by the AmperParameter will be 
 resolved at run time and will come from one of two places:
 
  1. The Advanced Option within the Tasks section of ReportCaster, which allows you to add parameter values to the report associated with a task.
  2. From parameters defined within the context of a FOCUS procedure.
The following example illustrates the use of AmperParameter. + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Copyright (c) 2004 Information Builders, Inc. All Rights Reserved. + + + + Information Builders offers sample API programs as a heuristic device. + + They are not intended, as is, for production use. Licensed users are + + welcome to alter and extend these samples and deploy them in other + + environments, or alternate configurations, as they see fit. + + Information Builders will support the documented functionality of + + its API classes and methods. However, Information Builders is not + + responsible for functionality or behavior of products built with + + its API unless the documented behavior of its discrete classes and + + methods is different than the actual results. + + + + Redistributions of IBI source code and documentation must be within + + the scope of the Information Builders Software License Agreement. + + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ScheduleManager manager; //STANDARD TASK // -DEFAULT &CNTR=FRANCE // TABLE FILE CAR // PRINT CAR WHERE // COUNTRY EQ '&CNTR.(ENGLAND,FRANCE).' // END TaskStandardReport task = new TaskStandardReport(); task.setDescription("task"); task.setPassword("test"); task.setProcedureName("app/car.fex"); task.setUserName("test"); task.setServerName("EDASERVE"); task.setDomainHREF("untitled/untitled.htm"); task.setFolderHREF("#gr1iedjoow9e"); AmperParameter[] amperParameterList = manager.getAmperParameterList(task); AmperParameter amperParameter = amperParameterList[0]; String defaultValue = amperParameter.getDefaultValue(); // RESULT = "FRANCE" String parameterName = amperParameter.getParameterName(); // RESULT = "CNTR" OptionValue[] optionValueList = amperParameter.getOptionValueList(); OptionValue optionValue_0 = optionValueList[0]; String optionValue_0.getDescription(); // RESULT = "FRANCE" String optionName_0.getName(); // RESULT = "FRANCE" OptionValue optionValue_1 = optionValueList[1]; String optionValue_1.getDescription(); // RESULT = "ENGLAND" String optionName_1.getName(); // RESULT = "ENGLAND"

Version:
5.3
See Also:
Serialized Form

Constructor Summary
AmperParameter()
           
 
Method Summary
 java.lang.String getDefaultValue()
          getDefaultValue() obtains the default value that has been assigned to the parameter defined within the FOCUS procedure.
 java.lang.String getFormat()
           
 java.lang.String getMaximum()
           
 java.lang.String getMinimum()
           
 java.lang.String getOperation()
           
 OptionValue[] getOptionValueList()
          Obtains an array of values, which represent the range of possible options that are valid for a particular instance of AmperParameter.
 java.lang.String getParameterDescription()
           
 java.lang.String getParameterName()
          Returns the name of the parameter associated with an instance of AmperParameter.
 boolean isMulti()
          Returns value of isMulti property.
 java.lang.String nameToString()
           
 void setDefaultValue(java.lang.String defaultValue)
          getDefaultValue() assigns the default value that has been assigned to the parameter defined within the FOCUS procedure.
 void setFormat(java.lang.String format)
           
 void setMaximum(java.lang.String maximum)
           
 void setMinimum(java.lang.String minimum)
           
 void setMulti(boolean b)
          Sets value of isMulti property.
 void setOperation(java.lang.String operation)
           
 void setOptionValueList(OptionValue[] optionValueList)
          Populates an array representing the range of valid options for a given parameter as defined within a FOCUS procedure.
 void setParameterDescription(java.lang.String parameterDescription)
           
 void setParameterName(java.lang.String parameterName)
          Assigns a name of the parameter associated with an instance of AmperParameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmperParameter

public AmperParameter()
Method Detail

getDefaultValue

public java.lang.String getDefaultValue()
getDefaultValue() obtains the default value that has been assigned to the parameter defined within the FOCUS procedure. The default value is used specifically within the context of a FOCUS procedure as illustrated in the code sample from the class description above. Namely:

 
 // STANDARD TASK
        //      -DEFAULT &CNTR=FRANCE
        //      TABLE FILE CAR
        //      PRINT CAR WHERE  
        //      COUNTRY EQ '&CNTR.(ENGLAND,FRANCE).'
        //      END             
 
 
 

The defined parameter in this case, CNTR, represents country. The default country is then set to be FRANCE, and thus the method returns this value. The maximum length of the defaultValue argument is 255 characters.

Returns:
A String representing the defaultValue.
See Also:
setDefaultValue(java.lang.String)

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
getDefaultValue() assigns the default value that has been assigned to the parameter defined within the FOCUS procedure. The default value is used specifically within the context of a FOCUS procedure as illustrated in the code sample from the class description above. Namely:
 // STANDARD TASK
        //      -DEFAULT &CNTR=FRANCE
        //      TABLE FILE CAR
        //      PRINT CAR WHERE  
        //      COUNTRY EQ '&CNTR.(ENGLAND,FRANCE).'
        //      END             
 
 
 

The defined parameter in this case, CNTR, represents country. The default county is then set to be FRANCE, and the method returns this value. The maximum length of the defaultValue argument is 255 characters.

Parameters:
defaultValue - String representing the default value.
See Also:
getDefaultValue()

getOptionValueList

public OptionValue[] getOptionValueList()
Obtains an array of values, which represent the range of possible options that are valid for a particular instance of AmperParameter. From the example code in the AmperParameter class description, we see that in this case the two available options as referenced by OptionValue_0 and OptionValue_1 are FRANCE and ENGLAND respectively. The option value array, which has been populated initially by these values in the FOCUS procedure, is then retrieved by the call to getOptionValueList() as follows: OptionValue[] optionValueList = amperParameter.getOptionValueList();

Returns:
An array or list of values representing valid options for a given parameter.
See Also:
setOptionValueList(ibi.broker.api.data.schedule.OptionValue[])

setOptionValueList

public void setOptionValueList(OptionValue[] optionValueList)
Populates an array representing the range of valid options for a given parameter as defined within a FOCUS procedure. From the example code in the AmperParameter class description, we see that in this case the two available options as referenced by OptionValue_0 and OptionValue_1 are FRANCE and ENGLAND respectively. The option value array can have its values changed by call to this method.

Parameters:
optionValueList - an array of valid options for a given parameter.
See Also:
getOptionValueList()

getParameterName

public java.lang.String getParameterName()
Returns the name of the parameter associated with an instance of AmperParameter. The maximum length of the parameterName argument is 64 characters.

Returns:
A parameter name String.
See Also:
setParameterName(String)

setParameterName

public void setParameterName(java.lang.String parameterName)
Assigns a name of the parameter associated with an instance of AmperParameter. The maximum length of the parameterName argument is 64 characters.

Parameters:
parameterName - a String name for the parameter.
See Also:
getParameterName()

isMulti

public boolean isMulti()
Returns value of isMulti property.

Returns:
isMulti.

setMulti

public void setMulti(boolean b)
Sets value of isMulti property.

Parameters:
b - isMulti

getMaximum

public java.lang.String getMaximum()

setMaximum

public void setMaximum(java.lang.String maximum)

getMinimum

public java.lang.String getMinimum()

setMinimum

public void setMinimum(java.lang.String minimum)

getOperation

public java.lang.String getOperation()

setOperation

public void setOperation(java.lang.String operation)

getFormat

public java.lang.String getFormat()

setFormat

public void setFormat(java.lang.String format)

getParameterDescription

public java.lang.String getParameterDescription()

setParameterDescription

public void setParameterDescription(java.lang.String parameterDescription)

nameToString

public java.lang.String nameToString()


Copyright © 2006 Information Builders, Incorporated.