com.pega.pegarules.pub.generator
Interface IGeneratedMethod


public interface IGeneratedMethod

IGeneratedMethod

Version:
$Revision: 18430 $ $Date: 2011-12-16 14:32:09 -0500 (Fri, 16 Dec 2011) $
Author:
olsok

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Method Summary
 java.lang.String close()
          Completes construction of the method, which results in a check for duplicate methods.
 void declareExternalEntry()
          Indicates that this method should be able to be invoked directly by an AJAX invocation.
 void declareExternalParameter(java.lang.String aParamName, java.lang.String aJavaType, java.lang.String aDefault)
          Provides a mapping from parameter page property names to the (ordered) parameters of this method, indicating the appropriate data type conversion to be performed and a default value if the parameter page property is omitted (or blank, for non-String parameters only).
 void insertMethodName(java.lang.StringBuffer aBuffer)
          Inserts the real method name into the specified StringBuffer at the current location when the close() method is invoked.
 java.lang.StringBuffer put(java.lang.String aText)
          Adds text to the method being constructed
 void setParameterDeclaration(java.lang.String aDeclaration)
          Supplies the (final portion of the) parameter declaration to be inserted during close() processing.
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values
Method Detail

put

java.lang.StringBuffer put(java.lang.String aText)
Adds text to the method being constructed

Parameters:
aText - text to add
Returns:
buffer used for building text of method

insertMethodName

void insertMethodName(java.lang.StringBuffer aBuffer)
Inserts the real method name into the specified StringBuffer at the current location when the close() method is invoked.

Parameters:
aBuffer - buffer into which method name should be inserted.

setParameterDeclaration

void setParameterDeclaration(java.lang.String aDeclaration)
Supplies the (final portion of the) parameter declaration to be inserted during close() processing. For example, during JSP processing the first parameter is always known initially and may be supplied during initial method generation. But if additional parameters are to be added during method generation based on the attributes supplied on the tag, those would be collected and the resulting declaration String passed in via this method. The String will be inserted immediately before the first ')' in the generated method.

Parameters:
aDeclaration - parameter declarations to be inserted

declareExternalEntry

void declareExternalEntry()
Indicates that this method should be able to be invoked directly by an AJAX invocation.


declareExternalParameter

void declareExternalParameter(java.lang.String aParamName,
                              java.lang.String aJavaType,
                              java.lang.String aDefault)
Provides a mapping from parameter page property names to the (ordered) parameters of this method, indicating the appropriate data type conversion to be performed and a default value if the parameter page property is omitted (or blank, for non-String parameters only).

Call this method once for each parameter to the method, in the order in which the parameters are specified in the setParameterDeclaration call.

Parameters:
aParamName - parameter page name of corresponding value
aJavaType - String, int, boolean
aDefault - default value if parameter page value unusable

close

java.lang.String close()
Completes construction of the method, which results in a check for duplicate methods. The code for the method is added to the rule's output stream (for the first instance of this method's code). Returns the name of a generated singleton method containing the desired code.

Returns:
name of method to use.


Copyright © 2012 Pegasystems Inc. All Rights Reserved.