Anyframe Web

anyframe.web.springmvc.controller.ria.mip
Class AnyframeMiPController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.springframework.web.servlet.mvc.BaseCommandController
                      extended by org.springframework.web.servlet.mvc.AbstractFormController
                          extended by org.springframework.web.servlet.mvc.SimpleFormController
                              extended by anyframe.web.springmvc.controller.AnyframeFormController
                                  extended by anyframe.web.springmvc.controller.ria.mip.AnyframeMiPController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.context.MessageSourceAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller
Direct Known Subclasses:
AnyframeMiPDispatchController

public abstract class AnyframeMiPController
extends AnyframeFormController

Abstract AnyframeMiController Class which provide convert data, operation, set message features.
This Class contains useful methods using 'MIPlatform' that is a software package of X-Internet.

Author:
Jonghoon Kim

Field Summary
 
Fields inherited from class anyframe.web.springmvc.controller.AnyframeFormController
LAST_MODIFIED_METHOD_SUFFIX, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
 
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController
DEFAULT_COMMAND_NAME
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
AnyframeMiPController()
           
 
Method Summary
 java.util.HashMap convertDatasetToListMap(java.lang.Class cls, com.tobesoft.platform.data.Dataset ds)
           This method converts Dataset into ListMap(VO LIST). if Dataset's status is 'insert', a key of Map is 'insert' if Dataset's status is 'update', a key of Map is 'update' if Dataset's status is 'delete', a key of Map is 'delete'
 java.util.HashMap convertDatasetToListMap(java.lang.Class cls, com.tobesoft.platform.data.Dataset ds, boolean convertToCamenCase)
           This method converts Dataset into ListMap(VO LIST). if Dataset's status is 'insert', a key of Map is 'insert' if Dataset's status is 'update', a key of Map is 'update' if Dataset's status is 'delete', a key of Map is 'delete'
 com.tobesoft.platform.data.Dataset convertVoListToDataset(java.lang.String dataSetName, java.util.List voList, boolean isCheck)
           This method converts Value Object(VO) List into Dataset(MiPlatform).
 com.tobesoft.platform.data.Dataset convertVoToDataset(java.lang.String dataSetName, java.lang.Object obj, boolean isCheck)
           This method converts Value Object(VO) into Dataset(MiPlatform).
abstract  void operate(com.tobesoft.platform.PlatformRequest platformRequest, com.tobesoft.platform.data.VariableList inVl, com.tobesoft.platform.data.DatasetList inDl, com.tobesoft.platform.data.VariableList outVl, com.tobesoft.platform.data.DatasetList outDl)
          Call Business Method
 org.springframework.web.servlet.ModelAndView process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Separate Dataset and Variable from current HTTP request
 void setResultMessage(com.tobesoft.platform.data.VariableList outVl, int code, java.lang.String msg)
          Set a result message
 
Methods inherited from class anyframe.web.springmvc.controller.AnyframeFormController
bind, getExceptionHandler, getLastModified, getLogger, getMethodNameResolver, getSuccess_add, getSuccess_addView, getSuccess_delete, getSuccess_get, getSuccess_list, getSuccess_update, handleInvalidSubmit, handleNoSuchRequestHandlingMethod, handleRequestInternal, initBinder, invokeNamedMethod, isShowNewForm, newCommandObject, onSubmit, postProcess, preProcess, processCheckedException, processFinally, processUnCheckedException, setDelegate, setMessageSource, setMethodNameResolver, setShowNewForm, setSuccess_add, setSuccess_addView, setSuccess_delete, setSuccess_get, setSuccess_list, setSuccess_update
 
Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, isFormChangeRequest, onFormChange, onFormChange, onSubmit, onSubmit, processFormSubmission, referenceData, referenceData, setFormView, setSuccessView, showForm, showForm, suppressValidation
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController
currentFormObject, formBackingObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, isBindOnNewForm, isFormSubmission, isSessionForm, onBindOnNewForm, onBindOnNewForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm
 
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, getWebBindingInitializer, initApplicationContext, isValidateOnBinding, onBind, onBind, onBindAndValidate, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, setWebBindingInitializer, suppressBinding, suppressValidation, suppressValidation, useDirectFieldAccess
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnyframeMiPController

public AnyframeMiPController()
Method Detail

setResultMessage

public void setResultMessage(com.tobesoft.platform.data.VariableList outVl,
                             int code,
                             java.lang.String msg)
Set a result message

Parameters:
outVl - output VariabeList
code - result code
msg - result message

process

public org.springframework.web.servlet.ModelAndView process(javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
                                                     throws java.lang.Exception
Separate Dataset and Variable from current HTTP request

Overrides:
process in class AnyframeFormController
Parameters:
request - current HTTP request
respons - current HTTP response
Throws:
java.lang.Exception
See Also:
MethodNameResolver.getHandlerMethodName(javax.servlet.http.HttpServletRequest), AnyframeFormController.invokeNamedMethod(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse), AnyframeFormController.handleNoSuchRequestHandlingMethod(org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

operate

public abstract void operate(com.tobesoft.platform.PlatformRequest platformRequest,
                             com.tobesoft.platform.data.VariableList inVl,
                             com.tobesoft.platform.data.DatasetList inDl,
                             com.tobesoft.platform.data.VariableList outVl,
                             com.tobesoft.platform.data.DatasetList outDl)
                      throws java.lang.Exception
Call Business Method

Parameters:
request - current HTTP request
inVl - input VariableList
inDl - input DatasetList
outVl - output VariableList
outDl - output DatasetList
Throws:
java.lang.Exception

convertVoListToDataset

public com.tobesoft.platform.data.Dataset convertVoListToDataset(java.lang.String dataSetName,
                                                                 java.util.List voList,
                                                                 boolean isCheck)
                                                          throws javax.servlet.ServletException,
                                                                 java.lang.Exception

This method converts Value Object(VO) List into Dataset(MiPlatform).

Parameters:
dataSetName - a name of Dataset
voList - VO List to be converted into Dataset
isCheck - if isCheck is 'true', when create Dataset, add check column to Dataset.
Returns:
Dataset
Throws:
javax.servlet.ServletException
java.lang.Exception

convertVoToDataset

public com.tobesoft.platform.data.Dataset convertVoToDataset(java.lang.String dataSetName,
                                                             java.lang.Object obj,
                                                             boolean isCheck)
                                                      throws javax.servlet.ServletException,
                                                             java.lang.Exception

This method converts Value Object(VO) into Dataset(MiPlatform).

Parameters:
dataSetName - a name of Dataset
obj - Value Object(VO) to be converted into Dataset
isCheck - if isCheck is 'true', when create Dataset, add check column to Dataset.
Returns:
Dataset
Throws:
javax.servlet.ServletException
java.lang.Exception

convertDatasetToListMap

public java.util.HashMap convertDatasetToListMap(java.lang.Class cls,
                                                 com.tobesoft.platform.data.Dataset ds)
                                          throws javax.servlet.ServletException,
                                                 java.lang.Exception

This method converts Dataset into ListMap(VO LIST). if Dataset's status is 'insert', a key of Map is 'insert' if Dataset's status is 'update', a key of Map is 'update' if Dataset's status is 'delete', a key of Map is 'delete'

Parameters:
cls - VO Class.
ds - Dataset to be converted into Value Object(VO) List.
Returns:
HashMap
Throws:
javax.servlet.ServletException
java.lang.Exception

convertDatasetToListMap

public java.util.HashMap convertDatasetToListMap(java.lang.Class cls,
                                                 com.tobesoft.platform.data.Dataset ds,
                                                 boolean convertToCamenCase)
                                          throws javax.servlet.ServletException,
                                                 java.lang.Exception

This method converts Dataset into ListMap(VO LIST). if Dataset's status is 'insert', a key of Map is 'insert' if Dataset's status is 'update', a key of Map is 'update' if Dataset's status is 'delete', a key of Map is 'delete'

Parameters:
cls - VO Class.
ds - Dataset to be converted into Value Object(VO) List.
convertToCamenCase - if Dataset's column name include '_'(underscore) and attribute names of VO are Camelcase, this is 'true' ex) Dataset's column name is 'test_sample', a attribute name of VO is 'testSample' this value must be true.
Returns:
HashMap
Throws:
javax.servlet.ServletException
java.lang.Exception

Anyframe Web

Copyright © 2008-2009 Samsung SDS. All Rights Reserved.