railo.runtime.type
Interface UDF

All Superinterfaces:
java.lang.Cloneable, Dumpable, Function, Member, java.io.Serializable
All Known Subinterfaces:
ComponentMethod, UserDefinedFunction

public interface UDF
extends Function, Dumpable, Member, java.lang.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
 java.lang.Object call(PageContext pageContext, java.lang.Object[] args, boolean doIncludePath)
          call user defined Funcion with parameters as Object Array
 java.lang.Object callWithNamedValues(PageContext pageContext, Struct values, boolean doIncludePath)
          call user defined Funcion with a hashmap of named values
 UDF duplicate()
           
 java.lang.Object getDefaultValue(PageContext pc, int index)
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
 FunctionArgument[] getFunctionArguments()
          return all function arguments of this UDF
 java.lang.String getFunctionName()
           
 java.lang.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()
           
 java.lang.String getReturnTypeAsString()
           
 java.lang.Boolean getSecureJson()
          returns null when not defined
 java.lang.Boolean getVerifyClient()
          returns null when not defined
 java.lang.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

public static final int RETURN_FORMAT_WDDX
See Also:
Constant Field Values

RETURN_FORMAT_JSON

public static final int RETURN_FORMAT_JSON
See Also:
Constant Field Values

RETURN_FORMAT_PLAIN

public static final int RETURN_FORMAT_PLAIN
See Also:
Constant Field Values

RETURN_FORMAT_SERIALIZE

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

implementation

public java.lang.Object implementation(PageContext pageContext)
                                throws java.lang.Throwable
abstract method for the function Body

Parameters:
pageContext -
Throws:
java.lang.Throwable

getFunctionArguments

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

Returns:
the arguments.
Throws:
PageException

getDefaultValue

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

getFunctionName

public java.lang.String getFunctionName()
Returns:
Returns the functionName.

getOutput

public boolean getOutput()
Returns:
Returns the output.

getReturnType

public int getReturnType()
Returns:
Returns the returnType.

getReturnFormat

public int getReturnFormat()

getSecureJson

public java.lang.Boolean getSecureJson()
returns null when not defined

Returns:

getVerifyClient

public java.lang.Boolean getVerifyClient()
returns null when not defined

Returns:

getReturnTypeAsString

public java.lang.String getReturnTypeAsString()
Returns:
Returns the returnType.

getDescription

public java.lang.String getDescription()

callWithNamedValues

public java.lang.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

public java.lang.Object call(PageContext pageContext,
                             java.lang.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

public java.lang.String getDisplayName()
Returns:
Returns the displayName.

getHint

public java.lang.String getHint()
Returns:
Returns the hint.

getPage

public Page getPage()
Returns:
Returns the page.

getMetaData

public Struct getMetaData(PageContext pc)
                   throws PageException
Throws:
PageException

duplicate

public UDF duplicate()

getOwnerComponent

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

Returns:
owner component