railo.runtime.type
Interface UDF

All Superinterfaces:
Cloneable, Dumpable, Function, Member, Serializable
All Known Subinterfaces:
ComponentMethod, UserDefinedFunction
All Known Implementing Classes:
TOUDF, UDFAddProperty, UDFGetterProperty, UDFGSProperty, UDFHasProperty, UDFImpl, UDFRemoveProperty, UDFSetterProperty

public interface UDF
extends Function, Dumpable, Member, Cloneable

a user defined function


Field Summary
static int RETURN_FORMAT_JSON
           
static int RETURN_FORMAT_PLAIN
           
static int RETURN_FORMAT_SERIALIZE
           
static int RETURN_FORMAT_WDDX
           
 
Method Summary
 Object call(PageContext pageContext, Object[] args, boolean doIncludePath)
          call user defined Funcion with parameters as Object Array
 Object callWithNamedValues(PageContext pageContext, Struct values, boolean doIncludePath)
          call user defined Funcion with a hashmap of named values
 UDF duplicate()
           
 Object getDefaultValue(PageContext pc, int index)
           
 String getDescription()
           
 String getDisplayName()
           
 FunctionArgument[] getFunctionArguments()
          return all function arguments of this UDF
 String getFunctionName()
           
 String getHint()
           
 Struct getMetaData(PageContext pc)
           
 boolean getOutput()
           
 Component getOwnerComponent()
          it is the component in whitch this udf is constructed, must not be the same as active udf
 Page getPage()
           
 int getReturnFormat()
           
 int getReturnType()
           
 String getReturnTypeAsString()
           
 Boolean getSecureJson()
          returns null when not defined
 Boolean getVerifyClient()
          returns null when not defined
 Object implementation(PageContext pageContext)
          abstract method for the function Body
 
Methods inherited from interface railo.runtime.dump.Dumpable
toDumpData
 
Methods inherited from interface railo.runtime.component.Member
getAccess, getValue
 

Field Detail

RETURN_FORMAT_WDDX

static final int RETURN_FORMAT_WDDX
See Also:
Constant Field Values

RETURN_FORMAT_JSON

static final int RETURN_FORMAT_JSON
See Also:
Constant Field Values

RETURN_FORMAT_PLAIN

static final int RETURN_FORMAT_PLAIN
See Also:
Constant Field Values

RETURN_FORMAT_SERIALIZE

static final int RETURN_FORMAT_SERIALIZE
See Also:
Constant Field Values
Method Detail

implementation

Object implementation(PageContext pageContext)
                      throws Throwable
abstract method for the function Body

Parameters:
pageContext -
Throws:
Throwable

getFunctionArguments

FunctionArgument[] getFunctionArguments()
return all function arguments of this UDF

Returns:
the arguments.
Throws:
PageException

getDefaultValue

Object getDefaultValue(PageContext pc,
                       int index)
                       throws PageException
Parameters:
pc -
index -
Returns:
default value
Throws:
PageException

getFunctionName

String getFunctionName()
Returns:
Returns the functionName.

getOutput

boolean getOutput()
Returns:
Returns the output.

getReturnType

int getReturnType()
Returns:
Returns the returnType.

getReturnFormat

int getReturnFormat()

getSecureJson

Boolean getSecureJson()
returns null when not defined

Returns:
value of attribute securejson

getVerifyClient

Boolean getVerifyClient()
returns null when not defined

Returns:
value of attribute verifyclient

getReturnTypeAsString

String getReturnTypeAsString()
Returns:
Returns the returnType.

getDescription

String getDescription()

callWithNamedValues

Object callWithNamedValues(PageContext pageContext,
                           Struct values,
                           boolean doIncludePath)
                           throws PageException
call user defined Funcion with a hashmap of named values

Parameters:
pageContext -
values - named values
doIncludePath -
Returns:
return value of the function
Throws:
PageException

call

Object call(PageContext pageContext,
            Object[] args,
            boolean doIncludePath)
            throws PageException
call user defined Funcion with parameters as Object Array

Parameters:
pageContext -
args - parameters for the function
doIncludePath -
Returns:
return value of the function
Throws:
PageException

getDisplayName

String getDisplayName()
Returns:
Returns the displayName.

getHint

String getHint()
Returns:
Returns the hint.

getPage

Page getPage()
Returns:
Returns the page.

getMetaData

Struct getMetaData(PageContext pc)
                   throws PageException
Throws:
PageException

duplicate

UDF duplicate()

getOwnerComponent

Component getOwnerComponent()
it is the component in whitch this udf is constructed, must not be the same as active udf

Returns:
owner component


Copyright © 2012 Railo