org.openmobileis.services.common
Class CallingServiceManager

java.lang.Object
  extended byorg.openmobileis.services.common.CallingServiceManager

public final class CallingServiceManager
extends java.lang.Object

Title: OpenMobileIS project source
Description: Calling service manager is use to keep an historic of different service call to be able to return to a calling service when a specific function has been done. It can be use to profide facility to fill form. For exemple in a form if you want to provide search to fill a property, you register the form calling service and after search the search result service redirect to the registered form service. For each session a calling service is created. Use the service session to get current calling service. Multiple calling service can be registered. A stack structure is use to push and pop service. The stack can only be peek. Return URL contain a call to the RegisteredServicePopService that pop the URI and call the registered service URI

Since:
JDK 1.1
Version:
1.0.
Author:
Philippe Delrieu

Constructor Summary
CallingServiceManager()
          Constructor for CallingServiceManager.
 
Method Summary
 void clearStack()
          clear the service URI stack
 java.util.Hashtable getCallingServiceParameters()
          return the registered service parameters that is on the top of the stack return null if no service is registered
 java.lang.String getCallingServiceURL()
          Verify if a service is registered and return the service url that manage calling service redirection.
 Array getRegistedCallingServiceList()
          return the stack of registered service.
 boolean isEmpty()
          Tests if this calling service stack is empty.
 java.lang.String peekCallingService()
          Looks at the calling service URI at the top of this stack without removing it from the stack.
 boolean peekToTheSpecifiedCallingService(java.lang.String serviceURI)
          pop the stack until the specified calling service URI is found.
 java.lang.String popCallingService()
          Removes the calling service URI at the top of this stack and returns that calling service URI as the value of this function.
 void pushCallingService(java.lang.String serviceURI, HttpServletRequest req)
          push the specified service name on the calling service stack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallingServiceManager

public CallingServiceManager()
Constructor for CallingServiceManager.

Method Detail

getRegistedCallingServiceList

public Array getRegistedCallingServiceList()
return the stack of registered service. This stack is use to keep an historic of service call to access a function. during service call. Service URI are push on the stack. To return to the last registered service us pop or peek

Returns:
: the registered service name. Null if no service is registered

getCallingServiceParameters

public java.util.Hashtable getCallingServiceParameters()
return the registered service parameters that is on the top of the stack return null if no service is registered


pushCallingService

public void pushCallingService(java.lang.String serviceURI,
                               HttpServletRequest req)
push the specified service name on the calling service stack


popCallingService

public java.lang.String popCallingService()
Removes the calling service URI at the top of this stack and returns that calling service URI as the value of this function. return null if no service is registered


peekCallingService

public java.lang.String peekCallingService()
Looks at the calling service URI at the top of this stack without removing it from the stack. return the calling service URI return null if no service is registered


getCallingServiceURL

public java.lang.String getCallingServiceURL()
Verify if a service is registered and return the service url that manage calling service redirection. return null if not calling service is registered.


isEmpty

public boolean isEmpty()
Tests if this calling service stack is empty.


peekToTheSpecifiedCallingService

public boolean peekToTheSpecifiedCallingService(java.lang.String serviceURI)
pop the stack until the specified calling service URI is found. The service is not removed from the calling service URI stack. If the service is not found, the stack is not modified. return true if the service URI is found, false otherwise.


clearStack

public void clearStack()
clear the service URI stack



Copyright 2005 e-Care. All Rights Reserved.