com.germinus.merlin.controller.assignments
Class AssignmentEditController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.portlet.context.PortletApplicationObjectSupport
          extended by org.springframework.web.portlet.handler.PortletContentGenerator
              extended by org.springframework.web.portlet.mvc.AbstractController
                  extended by org.springframework.web.portlet.mvc.BaseCommandController
                      extended by org.springframework.web.portlet.mvc.AbstractFormController
                          extended by org.springframework.web.portlet.mvc.SimpleFormController
                              extended by com.germinus.merlin.controller.assignments.AssignmentEditController
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.portlet.context.PortletContextAware, org.springframework.web.portlet.mvc.Controller

public class AssignmentEditController
extends org.springframework.web.portlet.mvc.SimpleFormController
implements org.springframework.beans.factory.InitializingBean

This controller fill the fields in details page with the adequate values of the assignment to edit. Also make the update of the assignment in the edit page.

Since:
1.0, 2.0
Version:
1.0, 2.0
Author:
Rui Quintas, Jesús Rodríguez Martínez Gérminus XXI

Field Summary
 
Fields inherited from class org.springframework.web.portlet.mvc.BaseCommandController
DEFAULT_COMMAND_NAME
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
AssignmentEditController()
           
 
Method Summary
 void afterPropertiesSet()
           
 AssignmentManager getAssignmentManager()
           
 CourseManager getCourseManagement()
           
 com.germinus.liferay.util.ILiferayUtil getLiferayUtil()
           
 IMerlinUtil getMerlinUtil()
           
 void handleActionRequestInternal(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
          Save the changes in assignment edition
 org.springframework.web.portlet.ModelAndView handleRenderRequestInternal(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          If are the parameter assignment it is returned to the page of details and return a assignment object.
 void setAssignmentManager(AssignmentManager assignmentsManagement)
           
 void setCourseManager(CourseManager courseManager)
           
 void setLiferayUtil(com.germinus.liferay.util.ILiferayUtil liferayUtil)
           
 void setMerlinUtil(IMerlinUtil merlinUtil)
           
 
Methods inherited from class org.springframework.web.portlet.mvc.SimpleFormController
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, onFormChange, onFormChange, onSubmitAction, onSubmitAction, onSubmitAction, onSubmitRender, onSubmitRender, onSubmitRender, processFormSubmission, referenceData, referenceData, renderFormSubmission, setFormView, setSuccessView, showForm, showForm, suppressValidation
 
Methods inherited from class org.springframework.web.portlet.mvc.AbstractFormController
formBackingObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, getFormSubmitParameterName, getInvalidSubmitParameterName, getRenderParameters, handleInvalidSubmit, isBindOnNewForm, isFormSubmission, isInvalidSubmission, isRedirectAction, isSessionForm, onBindOnNewForm, onBindOnNewForm, passRenderParameters, renderInvalidSubmit, setBindOnNewForm, setFormSubmit, setInvalidSubmit, setRedirectAction, setRenderParameters, setSessionForm, showForm, showForm, showNewForm
 
Methods inherited from class org.springframework.web.portlet.mvc.BaseCommandController
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getRenderCommand, getRenderCommandSessionAttributeName, getRenderErrors, getRenderErrorsSessionAttributeName, getValidator, getValidators, initApplicationContext, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setRenderCommandAndErrors, setValidateOnBinding, setValidator, setValidators, suppressBinding, useDirectFieldAccess
 
Methods inherited from class org.springframework.web.portlet.mvc.AbstractController
handleActionRequest, handleRenderRequest, isRenderWhenMinimized, isSynchronizeOnSession, setRenderWhenMinimized, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.portlet.handler.PortletContentGenerator
applyCacheSeconds, cacheForSeconds, check, checkAndPrepare, checkAndPrepare, getCacheSeconds, isRequireSession, preventCaching, setCacheSeconds, setRequireSession
 
Methods inherited from class org.springframework.web.portlet.context.PortletApplicationObjectSupport
getPortletContext, getTempDir, isContextRequired, setPortletContext
 
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

AssignmentEditController

public AssignmentEditController()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

getAssignmentManager

public AssignmentManager getAssignmentManager()
Returns:
the assignmentManager

getCourseManagement

public CourseManager getCourseManagement()
Returns:
the courseManager

handleActionRequestInternal

public void handleActionRequestInternal(javax.portlet.ActionRequest request,
                                        javax.portlet.ActionResponse response)
                                 throws java.lang.Exception
Save the changes in assignment edition

Overrides:
handleActionRequestInternal in class org.springframework.web.portlet.mvc.AbstractFormController
Parameters:
request -
response -
Throws:
java.lang.Exception

handleRenderRequestInternal

public org.springframework.web.portlet.ModelAndView handleRenderRequestInternal(javax.portlet.RenderRequest request,
                                                                                javax.portlet.RenderResponse response)
                                                                         throws java.lang.Exception
If are the parameter assignment it is returned to the page of details and return a assignment object. If the parameter assignment dont exist it is returned to the main page of assignments list. Process the render request and return a ModelAndView object which the DispatcherPortlet will render.

Overrides:
handleRenderRequestInternal in class org.springframework.web.portlet.mvc.AbstractFormController
Parameters:
request -
response -
Returns:
ModelAndView
Throws:
java.lang.Exception

setAssignmentManager

public void setAssignmentManager(AssignmentManager assignmentsManagement)
Parameters:
assignmentManager - the assignmentManager to set

setCourseManager

public void setCourseManager(CourseManager courseManager)
Parameters:
courseManager - the courseManager to set

getLiferayUtil

public com.germinus.liferay.util.ILiferayUtil getLiferayUtil()
Returns:
the liferayUtil

setLiferayUtil

public void setLiferayUtil(com.germinus.liferay.util.ILiferayUtil liferayUtil)
Parameters:
liferayUtil - the liferayUtil to set

getMerlinUtil

public IMerlinUtil getMerlinUtil()
Returns:
the merlinUtil

setMerlinUtil

public void setMerlinUtil(IMerlinUtil merlinUtil)
Parameters:
merlinUtil - the merlinUtil to set


Copyright © 2008. All Rights Reserved.