Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.rt.hook
Class FolderRendererPolicy

java.lang.Object
  |
  +--oracle.panama.rt.hook.FolderRendererPolicy
All Implemented Interfaces:
FolderRendererHook

public class FolderRendererPolicy
extends java.lang.Object
implements FolderRendererHook

The default implementation of the FolderRendererHook.

Since:
iAS Wireless Edition Release 2.0
Version:
$Revision: 1.00 $
Author:
twilsher

Nested Class Summary
 class FolderRendererPolicy.PapzSetupActionImpl
          Special version of setup action for actions that will invoke PapzLite Constructs the correct URL

 

Field Summary
static java.lang.String BOTTOMIMAGE
           
static java.lang.String LOGO_IMAGE
           
static java.lang.String SETUP_IMAGE
           
static java.lang.String TOPIMAGE
           

 

Method Summary
 org.w3c.dom.Element createServiceMenu(ServiceContext serviceContext)
          Create the service menu, using a MobilXML SimpleMenu tag.
 org.w3c.dom.Element createServiceMenuItem(ServiceContext context, org.w3c.dom.Element parent, Service currService)
          Create a service menu item, using a MobilXML SimpleMenuItem tag.
 org.w3c.dom.Element createVisualDeviceTitle(ServiceContext context)
          Get the MobileXML for the title
 org.w3c.dom.Element createVoiceServiceMenuItem(ServiceContext context, org.w3c.dom.Element parent, Service currService)
           
 org.w3c.dom.Element getBody(ServiceContext context)
          Helper to create the folder body
 Service[] getCurrentServices(ServiceContext context)
          Get all visible services in the given folder.
 User getCurrentUser(ServiceContext context)
          Convenience method for getting the current user given a Service Context This method should probably move to the ServiceContext interface
 FolderSetupAction getEditPresetsAction(ServiceContext context)
           
 FolderSetupAction getEditServicesAction(ServiceContext context)
           
 FolderSetupAction getEditUserInfoAction(ServiceContext context)
           
 FolderSetupAction getEditUserProfileAction(ServiceContext context)
           
 java.lang.String getFolderName(ServiceContext context)
          Get the 'canonical' title to use for the current folder.
 org.w3c.dom.Element getFooter(ServiceContext context)
          Add a footer with setup buttons etc.
 org.w3c.dom.Element getFooter(ServiceContext context, boolean addSetupMenu)
          Add a footer with setup buttons etc.
 org.w3c.dom.Element getHeader(ServiceContext context)
          Get the MobileXML for the header of the current folder
 org.w3c.dom.Element getHeader(ServiceContext context, java.lang.String headerName, java.lang.String imageName)
          Get the MobileXML for the header of the current folder, using the specified title and image
static FolderRendererPolicy getInstance()
          The "thread-safe" singleton getter
 FolderSetupAction getLoginAction(ServiceContext context)
           
 FolderSetupAction getLogoffAction(ServiceContext context)
           
 FolderSetupAction getRegisterAction(ServiceContext context)
           
 org.w3c.dom.Element invoke(Folder folder, ServiceContext context)
          Invoke the renderer using the service context.
 org.w3c.dom.Element invokeOld(Folder folder, ServiceContext context)
          Invoke the renderer using the service context.

 

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

 

Field Detail

TOPIMAGE

public static java.lang.String TOPIMAGE

BOTTOMIMAGE

public static java.lang.String BOTTOMIMAGE

LOGO_IMAGE

public static java.lang.String LOGO_IMAGE

SETUP_IMAGE

public static java.lang.String SETUP_IMAGE
Method Detail

createServiceMenu

public org.w3c.dom.Element createServiceMenu(ServiceContext serviceContext)
Create the service menu, using a MobilXML SimpleMenu tag. This method can be overriden in order to display services After the menu has been created, the method createServiceMenuItem will be called for each service, and will insert a SimpleMenuItem tag for that service using the SimpleMenu as the parent node. This means that if this method is overridden to use a different tag than SimpleMenu, the createSimpleMenuItem method should also be overriden.
Returns:
Element SimpleMenu node for the services
See Also:
createServiceMenuItem

createServiceMenuItem

public org.w3c.dom.Element createServiceMenuItem(ServiceContext context,
                                                 org.w3c.dom.Element parent,
Service currService)
Create a service menu item, using a MobilXML SimpleMenuItem tag. This method can be overriden in order to display services differently. After the menu has been created, the method createServiceMenuItem will be called for each service, and will insert a SimpleMenuItem tag for that service using the SimpleMenu as the parent node. This means that if the createServiceMenu method is overridden to use a different tag than SimpleMenu, the createSimpleMenuItem method should also be overriden.
Returns:
Element SimpleMenuItem node for the spoecified service
See Also:
createServiceMenu

getInstance

public static FolderRendererPolicy getInstance()
The "thread-safe" singleton getter
Returns:
the FolderRendererPolicy

getFolderName

public java.lang.String getFolderName(ServiceContext context)
Get the 'canonical' title to use for the current folder. If this is the users home folder, the users name will be returned, otherwise the name of the current folder.
Returns:
String display name of current folder

getCurrentUser

public User getCurrentUser(ServiceContext context)
Convenience method for getting the current user given a Service Context This method should probably move to the ServiceContext interface
Returns:
The current User

getCurrentServices

public Service[] getCurrentServices(ServiceContext context)
Get all visible services in the given folder. This will include all group services
Returns:
Service[] list of current services

invoke

public org.w3c.dom.Element invoke(Folder folder,
ServiceContext context)
                           throws PanamaRuntimeException
Invoke the renderer using the service context.
Specified by:
invoke in interface FolderRendererHook
Parameters:
folder - the Folder to be rendered
context - the ServiceContext that contains all parameters
Returns:
Element an XML DOM element compliant to the SimpleResult DTD
Throws:
<{PanamaRuntimeException}>
PanamaRuntimeException

invokeOld

public org.w3c.dom.Element invokeOld(Folder folder,
ServiceContext context)
                              throws PanamaRuntimeException
Invoke the renderer using the service context.
Parameters:
folder - the Folder to be rendered
context - the ServiceContext that contains all parameters
Returns:
Element an XML DOM element compliant to the SimpleResult DTD
Throws:
<{PanamaRuntimeException}>
PanamaRuntimeException

getBody

public org.w3c.dom.Element getBody(ServiceContext context)
Helper to create the folder body

createVoiceServiceMenuItem

public org.w3c.dom.Element createVoiceServiceMenuItem(ServiceContext context,
                                                      org.w3c.dom.Element parent,
Service currService)

getLoginAction

public FolderSetupAction getLoginAction(ServiceContext context)
Returns:
the action to use for logging in this user

getLogoffAction

public FolderSetupAction getLogoffAction(ServiceContext context)
Returns:
the action to use for logging off this user

getRegisterAction

public FolderSetupAction getRegisterAction(ServiceContext context)
Returns:
the action to use for registering this user

getEditServicesAction

public FolderSetupAction getEditServicesAction(ServiceContext context)
Returns:
the action to use for setting up services

getEditUserInfoAction

public FolderSetupAction getEditUserInfoAction(ServiceContext context)
Returns:
the action to use for editing user info

getEditUserProfileAction

public FolderSetupAction getEditUserProfileAction(ServiceContext context)
Returns:
the action to use for editing user profiles

getEditPresetsAction

public FolderSetupAction getEditPresetsAction(ServiceContext context)
Returns:
the action to use for editing user presets

getHeader

public org.w3c.dom.Element getHeader(ServiceContext context)
Get the MobileXML for the header of the current folder
Returns:
Element simpleResult the SimpleXML tag that encloses the page header

createVisualDeviceTitle

public org.w3c.dom.Element createVisualDeviceTitle(ServiceContext context)
Get the MobileXML for the title
Returns:
Element simpleResult the SimpleXML tag for the title

getHeader

public org.w3c.dom.Element getHeader(ServiceContext context,
                                     java.lang.String headerName,
                                     java.lang.String imageName)
Get the MobileXML for the header of the current folder, using the specified title and image
Returns:
Element simpleResult the SimpleXML tag that encloses the page header

getFooter

public org.w3c.dom.Element getFooter(ServiceContext context)
Add a footer with setup buttons etc.
Returns:
Element simpleResult the MobileXML element -- will be inserted as child of SimpleResult

getFooter

public org.w3c.dom.Element getFooter(ServiceContext context,
                                     boolean addSetupMenu)
Add a footer with setup buttons etc.
Returns:
Element simpleResult the MobileXML element -- will be inserted as child of SimpleResult

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.