org.openmobileis.examples.simpleappli.terminal.services
Class EditBaseDataService

java.lang.Object
  extended byorg.openmobileis.services.Service
      extended byorg.openmobileis.services.TemplateService
          extended byorg.openmobileis.services.SimpleEditService
              extended byorg.openmobileis.examples.simpleappli.terminal.services.EditBaseDataService
All Implemented Interfaces:
EditService, NavigationBarService

public final class EditBaseDataService
extends SimpleEditService
implements NavigationBarService

Title: OpenMobileIS project source
Description: SimpleEditService provide a base algorythm to develop and edit service. It manage the edited object in a session created using the name return by getSessionDatasName(). Implements the NavigationBarService interface to use the naviagation bar that provide simple way to naviagate along services.

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

Field Summary
 
Fields inherited from interface org.openmobileis.services.navigation.NavigationBarService
NAVBAR_ROOT
 
Constructor Summary
EditBaseDataService()
           
 
Method Summary
protected  java.lang.Object createSessionObject(HttpServletRequest req)
          call to create the session object.
 boolean displayFormExitMessage()
           
 boolean displayRecursive()
           
protected  void fillSessionObjectWithRequestData(java.lang.Object sessionDatas, HttpServletRequest req)
           
protected  void fillTemplateWithSessionData(java.lang.Object sessionDatas, TemplateModelRoot templateData)
           
protected  java.lang.String getDisplayServiceURI()
          return the URI of the service that display data after the data edition.
 java.lang.String getNavigationBarLabel(HttpServletRequest req)
           
 java.lang.String getServiceUri()
           
protected  java.lang.String getSessionDatasName()
           
protected  java.lang.String getTemplateName()
           
protected  void storeSessionObjectInDB(java.lang.Object sessionDatas, HttpServletRequest req, TemplateModelRoot templateData)
           
 
Methods inherited from class org.openmobileis.services.SimpleEditService
deleteSessionData, getErrorSessionAttributName, hasSessionData, isRemoveSession, isStoreMode, removeSessionData, runTemplate, setInputRequestParameterError
 
Methods inherited from class org.openmobileis.services.TemplateService
run
 
Methods inherited from class org.openmobileis.services.Service
equals, getNavigationBarLastServiceURI, hashCode, isNavigationService, runService, useWebCache
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmobileis.services.navigation.NavigationBarService
getNavigationBarLastServiceURI
 

Constructor Detail

EditBaseDataService

public EditBaseDataService()
Method Detail

fillTemplateWithSessionData

protected void fillTemplateWithSessionData(java.lang.Object sessionDatas,
                                           TemplateModelRoot templateData)
                                    throws ServiceException
Specified by:
fillTemplateWithSessionData in class SimpleEditService
Throws:
ServiceException

storeSessionObjectInDB

protected void storeSessionObjectInDB(java.lang.Object sessionDatas,
                                      HttpServletRequest req,
                                      TemplateModelRoot templateData)
                               throws ServiceException
Specified by:
storeSessionObjectInDB in class SimpleEditService
Throws:
ServiceException

fillSessionObjectWithRequestData

protected void fillSessionObjectWithRequestData(java.lang.Object sessionDatas,
                                                HttpServletRequest req)
                                         throws ServiceException
Specified by:
fillSessionObjectWithRequestData in class SimpleEditService
Throws:
ServiceException

getSessionDatasName

protected java.lang.String getSessionDatasName()
Specified by:
getSessionDatasName in class SimpleEditService

getTemplateName

protected java.lang.String getTemplateName()
Specified by:
getTemplateName in class SimpleEditService

createSessionObject

protected java.lang.Object createSessionObject(HttpServletRequest req)
                                        throws ServiceException
call to create the session object. Before been created while it's edited, an object is store in a session. The session object can be a new one (create it) or an object store in the database (get it from the database).

Specified by:
createSessionObject in class SimpleEditService
Throws:
ServiceException

getDisplayServiceURI

protected java.lang.String getDisplayServiceURI()
return the URI of the service that display data after the data edition. ServiceBaseURI is not mandatory

Specified by:
getDisplayServiceURI in class SimpleEditService

getServiceUri

public java.lang.String getServiceUri()
Specified by:
getServiceUri in class Service

getNavigationBarLabel

public java.lang.String getNavigationBarLabel(HttpServletRequest req)
Specified by:
getNavigationBarLabel in interface NavigationBarService

displayFormExitMessage

public boolean displayFormExitMessage()
Specified by:
displayFormExitMessage in interface NavigationBarService

displayRecursive

public boolean displayRecursive()
Specified by:
displayRecursive in interface NavigationBarService


Copyright 2005 e-Care. All Rights Reserved.