Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.adapter
Class RuntimeAdapterHelper

java.lang.Object
  |
  +--oracle.panama.adapter.RuntimeAdapterHelper

public class RuntimeAdapterHelper
extends java.lang.Object

Adapter Helper Class, contains helper methods for writing adapters


Constructor Summary
RuntimeAdapterHelper()
           

 

Method Summary
static boolean checkConditions(ServiceContext sc, org.w3c.dom.Element wResult)
          Checks if OutputFilter-condition match against value.
static Arguments createArguments()
          Helper method for creating arguments
static void createInputFields(org.w3c.dom.Element simpleForm, java.lang.String[] missingParameters, Arguments arg)
          Creates a SimpleFormItem for every missing parameter.
static OutputArguments createOutputArguments()
          Helper method for creating output arguments
static org.w3c.dom.NodeList format(org.w3c.dom.Document owner, java.lang.String name, Arguments args, java.lang.Object[] objs)
          Formats an argument caption string.
static java.lang.String getURLPAoidParameter(Arguments args)
          Creates an URL pointing to the currently running Service.
static java.lang.String getURLPathParameter(Arguments args)
          Deprecated. replaced by getURLPAoidParameter(Arguments).

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RuntimeAdapterHelper

public RuntimeAdapterHelper()
Method Detail

createArguments

public static Arguments createArguments()
Helper method for creating arguments
Returns:
arguments

createOutputArguments

public static OutputArguments createOutputArguments()
Helper method for creating output arguments
Returns:
the output arguments

getURLPathParameter

public static java.lang.String getURLPathParameter(Arguments args)
Deprecated. replaced by getURLPAoidParameter(Arguments).
Creates an URL pointing to the currently running Service. This method can be used if we want to link something back to the same service, as creating an Input form with missing parameters, where the target URL should be the same as the current.
Parameters:
args - Arguments passed to this Adapter.
Returns:
The URL as a complete and encoded servicepath.

getURLPAoidParameter

public static java.lang.String getURLPAoidParameter(Arguments args)
Creates an URL pointing to the currently running Service. This mehtod can be used if we want to link something back to the same service, as creating an Input form with missing parameters, where the target URL should be the same as the current.
Parameters:
args - Arguments passed to this Adapter.
Returns:
The URL as PAoid=nnn, where nnn is the service object id

createInputFields

public static void createInputFields(org.w3c.dom.Element simpleForm,
                                     java.lang.String[] missingParameters,
Arguments arg)
Creates a SimpleFormItem for every missing parameter. The newly created SimpleFormItem are put into the SimpleForm.

If a parameter caption exists, this caption is used as display text, otherwise the name of the parameter is used.

SimpleFormItem is only created for parameters who have usage = USER or if PAdebug is true.

Parameters:
simpleForm - The parent SimpleForm.
missingParameters - An array with missing parameter names.
arg - Arguments passed to this Adapter.

format

public static org.w3c.dom.NodeList format(org.w3c.dom.Document owner,
                                          java.lang.String name,
Arguments args,
                                          java.lang.Object[] objs)
Formats an argument caption string.
Parameters:
owner - the owner document.
name - the argument name.
args - the arguments.
objs - the format argument list.
Returns:
the formatted node list.

checkConditions

public static boolean checkConditions(ServiceContext sc,
                                      org.w3c.dom.Element wResult)
Checks if OutputFilter-condition match against value. Checks the proposed result and looks in the Element tree to find Filter-parameters. A FilterParamter is found as a name attribute in a SimpleTextItem or else as a tagname of the an Element.
Parameters:
sc - ServiceContext
Returns:
true if all condition is matched or if no OutputFilter exist.

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.