org.openmobileis.services
Class MainSubEditService

java.lang.Object
  extended byorg.openmobileis.services.Service
      extended byorg.openmobileis.services.TemplateService
          extended byorg.openmobileis.services.SimpleEditService
              extended byorg.openmobileis.services.MainSubEditService
All Implemented Interfaces:
EditService

public abstract class MainSubEditService
extends SimpleEditService

Use for a MultiEdition The MainSubEditService is the main Edit of the multi edition. The other edit service must be SubEditService The MainSubEditService implementation is the same that the implementation of the SubEditService or the SimpleEditService. It's transparency for the programmer. author : Manuel Gomez


Constructor Summary
MainSubEditService()
           
 
Method Summary
protected abstract  java.lang.Object createSessionObject(HttpServletRequest req)
           
protected abstract  void fillSessionObjectWithRequestData(java.lang.Object sessionDatas, HttpServletRequest req)
           
protected abstract  void fillTemplateWithSessionData(java.lang.Object sessionDatas, TemplateModelRoot templateData)
           
protected abstract  java.lang.String getDisplayServiceURI()
           
protected abstract  java.lang.String getSessionDatasName()
           
protected abstract  java.lang.String getTemplateName()
           
protected  boolean isStoreMode(HttpServletRequest req)
          return true if this request is use to store object in db (default mode).
 java.lang.String runTemplate(HttpServletRequest req, HttpServletResponse res, TemplateModelRoot templateData)
          Extends this method to develop specific process.
protected abstract  void storeSessionObjectInDB(java.lang.Object sessionDatas, HttpServletRequest req, TemplateModelRoot templateData)
           
 
Methods inherited from class org.openmobileis.services.SimpleEditService
deleteSessionData, getErrorSessionAttributName, hasSessionData, isRemoveSession, removeSessionData, setInputRequestParameterError
 
Methods inherited from class org.openmobileis.services.TemplateService
run
 
Methods inherited from class org.openmobileis.services.Service
equals, getNavigationBarLastServiceURI, getServiceUri, hashCode, isNavigationService, runService, useWebCache
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainSubEditService

public MainSubEditService()
Method Detail

runTemplate

public java.lang.String runTemplate(HttpServletRequest req,
                                    HttpServletResponse res,
                                    TemplateModelRoot templateData)
                             throws ServletException,
                                    java.io.IOException
Description copied from class: TemplateService
Extends this method to develop specific process. Return the template relatif path to be use to process TemplateModel.

Overrides:
runTemplate in class SimpleEditService
Throws:
ServletException
java.io.IOException

isStoreMode

protected boolean isStoreMode(HttpServletRequest req)
Description copied from class: SimpleEditService
return true if this request is use to store object in db (default mode). To force form edition return false. The storeSessionObjectInDB is not call.

Overrides:
isStoreMode in class SimpleEditService
Returns:
true to store object false to force edit from edition.

fillTemplateWithSessionData

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

storeSessionObjectInDB

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

fillSessionObjectWithRequestData

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

getSessionDatasName

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

getTemplateName

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

createSessionObject

protected abstract java.lang.Object createSessionObject(HttpServletRequest req)
                                                 throws ServiceException
Specified by:
createSessionObject in class SimpleEditService
Throws:
ServiceException

getDisplayServiceURI

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


Copyright 2006 OpenMobileIS. All Rights Reserved.