Oracle9i Application Server Wireless Edition Developer's Guide Release 1.1 Part Number A86700-01 |
|
This document describes the Wireless Edition Personalization Portal API. Each section of this document presents a different topic. These sections include:
The Personalization Portal API classes are designed to allow you to customize a version of the Wireless Edition Personalization Portal. They provide a streamlined set of classes for portal customization. There are also built in syntax checks to verify data model logic.
The use of the Personalization Portal is a sequence of Hypertext Transaction Protocol (HTTP) requests. Each request begins with the user selecting a JavaServer Page (JSP) link which issues the request. The user enters data and clicks a button which causes the JSP to retrieve, update, or create a new repository object. Each request is controlled by classes which have been grouped into controllers based around the type of operation being performed.
Note: For detailed information regarding the Personalization Portal API, see the Oracle9i Application Server Wireless Edition Javadoc. |
The Wireless Edition Personalization Portal is represented by a default set of JavaServer Pages (JSP) which allow you to personalize folder, service, bookmark, alert, alert address, locationmark, and profile repository objects. The Personalization Portal API enables you to create your own JSPs. The classes are categorized by specific function. Combining these functions is one method of creating your own JSP framework. See Chapter 4, "Rebranding the Personalization Portal" for other methods of creating your own JSPs.
The API is categorized into the following controllers. Each of them is stateless and can be used as a Java singleton class. Calls to these classes are not context sensitive.
RequestController handles operations related to requests and session control such as:
Table 5-1 Request Controller API Examples
GroupController is used to handle group related operations such as:
UserController oversees operations involving users, such as:
ServiceController regulates operations for service, folder, and bookmark objects such as:
AlertController handles operations of alerts and alert address settings such as:
LocationMarkController manages operations with locationmarks including:
The following diagram displays the flow of operations in an HTTP request. RequestController handles authenticating the user and initializing the request. Other controllers are called depending on the parameters of objectId, the current request, and any input from the user in the form of input strings.
The following code samples demonstrate an example of an HTTP session based on the process illustrated in Figure 5-1.
try { // request is HttpServletRequest // -1 means the application Session will never expire // until the HttpSession expires RequestController.getInstance().login(request, -1); } catch (PortalException pe) { }
try // request is HttpServeltRequest Request _mRequest = RequestController.getInstance().initRequest(request); } catch (PortalException pe) { }
try { //_mRequest is oracle.panama.rt.Request //currentUser is current user with type of //oracle.panama.model.User //currentService is current service in Request with type of //oracle.panama.model.Service User currentUser = UserController.getInstance().getCurrentUser(_mRequest); Service currentService = ServiceController.getInstance().getCurrentService(_mRequest); } catch (PortalException pe) { }
try { //inputHash is assigned with a hashtable of //inputArgument name-value pairs Hashtable inputHash = ServiceController.getInstance(). getInputArguments(currentService.getId()); //display inputArgument name and value, //and modify some of the values in inputHash .. //update the inputArgument values of the current service ServiceController.getInstance(). setInputArguments(currentService.getId(), inputHash); } catch (PortalException pe) { }
//_mRequest is oracle.panama.rt.Request RequestController.getInstance().freeRequest(_mRequest);
|
![]() Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|