A native operation specifies a static (class) operation
whose implementation is written in an external library by the programmer.
The name of the implementing method must be the same as the name of the
operation. The name of the library in which it is defined must be entered
in the Library name property.
PHP: The qualified
library name indicates the name of the library file and the path to the
library.
Ex: Utilities will include the file Utilities.class.php
The programmer must write the file Utilities.class.php
and store it directly under the root folder in the navigation model
(directly under the folder htdocs on disk).
Afolder::Utilities will
include the file Afolder/Utilities.class.php
The programmer must store the file Utilities.class.php
in the folder Afolder under the root folder in the navigation model
(under the folder htdocs/Afolder on disk). The file should begin
with :
<?
define (__Utilities, "true");
and end with:
?>
JSP, Servlet: The
qualified library name indicates the name of a class, a package and a path
to the file.
Ex: Utilities will expect the file Utilities.java
The programmer must write the file Utilities.java
and store it directly under the root folder in the navigation model
(directly under the folder htdocs on disk). The name of the class
must be Utilities, it must be public and defined in the package com.site
where site is the name of the site (root node in the browser). The
implementing method must be defined as public static.
Afolder::Utilities will
expect the file Afolder/Utilities.java that contains a class named Utilities
defined in the package com.site.Afolder where site is the
name of the site.
The formal parameters of a native operation in Xion are
mapped to native types in the same order. In the case of a contextually_native
operation, a context parameter is inserted in first position in the
sequence of parameters. This parameter holds for example a connection to
the database.
PHP: the
implementing contextually_native method should define the parameter
&$ctxt in first position. The type of this parameter is an
instance of the class Context.
JSP, Servlet: the
implementing contextually_native method should define the parameter
com.site.Context ctxt in first position where site is
the name of the site.