Oracle Portal-to-Go Implementation Guide Release 1.0.2.2 A86635-02 |
|
This document explains how to create and manage logical devices. Topics include:
A logical device is a repository object that represents either a physical device, such as a Nokia mobile phone, or an abstract device, such as email. Logical devices represent the interface between Portal-to-Go transformers and the target devices or applications.
Portal-to-Go determines the type of device that is requesting a service using the user agent parameter of the HTTP request. When adding support for a new device type, you generally need to:
In many cases, when adding support for a new device type, you can simply modify or re-use an existing transformer or logical device.
You use the Logical Devices form sequence in the Portal-to-Go Service Designer to create a logical device in the repository.
To display the form sequence:
The first form in the Create New Device sequence has the following parameters:
The second form in the Create New Device sequence appears as follows:
The second form in the Create New Device sequence includes the following parameter:
Parameter | Value |
---|---|
Login Page |
The XSLT stylesheet that generates the login page for the device. Click Import and choose an XSLT stylesheet from the Open dialog. |
The third form in the Create New Device sequence appears as follows:
The third form in the Create New Device sequence has the following parameter:
Parameter | Value |
---|---|
Error Page |
The XSLT stylesheet that generates the error page for the device. Click Import and choose an XSLT stylesheet from the Open dialog. |
Click Finish to create the object in the repository.
The Portal-to-Go Service Designer enables you to modify a logical device in the repository. To modify a logical device:
To delete a logical device from the repository:
When Portal-to-Go receives a service request, it determines the device type that submitted the request by querying the user agent parameter of the HTTP header. The System.properties file specifies the Portal-to-Go class that queries the header and makes the determination:
locator.useragent.class=oracle.panama.core.xform.UserAgentImpl
The UserAgentImpl
class is a generic implementation of the UserAgent
interface. The UserAgent
interface takes the HTTP user agent parameter and returns the device type as a string corresponding to the device name in the repository. If the device type is unknown, it returns NULL.
You can create your own implementation of the UserAgent
interface to implement specialized logic for determining the client device type. For example, if the HTTP gateway that passes requests to Portal-to-Go includes the telephone number of the client, you can implement a user agent that uses the telephone number to retrieve end user information from a directory.
Once you implement your own user agent, you must point the user agent class locator in the System.properties file to your implementation:
locator.useragent.class=oracle.panama.core.xform.MyUserAgentImpl
Portal-to-Go uses a properties file, useragent.properties, to map the HTTP user agent parameter to a logical device in the Portal-to-Go repository. The UserAgentImpl
class retrieves this information from useragent.properties dynamically. When you add logical devices to the repository, you should map the device to the corresponding HTTP user agent parameter in the useragent.properties file.
To determine what information Portal-to-Go actually receives in the HTTP header, you can check the Portal-to-Go system log files. For full request manager logging, set the request manager debug flag. Using the probe monitor, click Debug, then click "Change debug flag".
Note: The useragent.properties file also specifies the default logical device that Portal-to-Go uses if it cannot determine the device type. By default, this is set to WML11. |
The useragent.properties file uses the following syntax to map an HTTP user agent parameter to a Portal-to-Go logical device:
[ID].useragent=[UserAgent startstring from HTTP Request] [ID].logicaldevice=[which logical device to use]
The logical device should appear on the line immediately following the corresponding user agent string. They should use the same ID, which is simply a unique number in the useragent.properties file. The ID associates a user agent string in the request with a logical device. For example:
30.useragent=MOTO 30.logicaldevice=Motorola
The UserAgentImpl
class matches the actual header string to the longest matching user agent mapping in the useragent.properties file. That is, given the following mappings:
42.useragent=UP.Browser/3.01-IG01 42.logicaldevice=HDML 43.useragent=UP.Browser 43.logicaldevice=WML11
The UserAgentImpl
class would match the header string "UP.Browser/3.01" to the HDML logical device, rather than the WML11 logical device.
Once you create or modify a device mapping, you can restart Portal-to-Go or force a re-read of the property file using the probe runtime monitor (on port 8090), so that the changes to the property file take effect.
|
Copyright © 2000 Oracle Corporation. All Rights Reserved. |
|