|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.portlet.context.PortletApplicationObjectSupport
org.springframework.web.portlet.handler.PortletContentGenerator
org.springframework.web.portlet.mvc.AbstractController
org.springframework.web.portlet.mvc.BaseCommandController
org.springframework.web.portlet.mvc.AbstractFormController
org.springframework.web.portlet.mvc.SimpleFormController
com.ferri.portlet.factura.action.ViewFacturaAction
public class ViewFacturaAction
Controlador de les pantalles de llistat.jsp i manteniment.jsp de la entitat Factura
Field Summary | |
---|---|
private ClientService |
clientService
|
private FacturaService |
facturaService
|
private static org.apache.commons.logging.Log |
log
|
private static String |
PAGE_LIST
|
private static String |
PAGE_MANT
|
private javax.servlet.ServletContext |
servletContext
|
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 | |
---|---|
ViewFacturaAction()
|
Method Summary | |
---|---|
private void |
buscar(javax.portlet.PortletRequest request)
Cerca un llistat d'entitats Factura que compleixin els criteris i ordenació passats per formulari request. |
private void |
cobrar(javax.portlet.PortletRequest request)
Cambia l'estat de l'entitat Factura a Cobrada. |
private void |
defecte(javax.portlet.PortletRequest request)
Carrega el llistat amb tots els elements Factura i l'afegeix a la request. |
private void |
editar(javax.portlet.PortletRequest request)
Carrega una entitat Factura en request a partir del número pasat també per request. |
private void |
enviar(javax.portlet.PortletRequest request)
Genera un pdf de l'entitat Factura, i l'envia com attachment en un mail preformat d'aquesta entitat als destinataris passats per formulari en la request. |
private void |
getClientsAutoComplete(javax.portlet.PortletRequest request)
Carrega un String en el atribut request 'arrayClientAutocomplete' amb la relació de NIF separada per comes de tots els clients amb la forma '"NIF1","NIF2","NIF3",...'. |
ClientService |
getClientService()
|
FacturaService |
getFacturaService()
|
private void |
getMails(javax.portlet.PortletRequest request)
Metode que cerca els emails vinculats a un client, sempre el seu, i opcionalment el de la gestoria i l'administrador: sempre que es traci d'una comunitat. |
private Boolean |
guardar(javax.portlet.PortletRequest request)
Guarda una entitat Factura, previa validació, amb tots els camps del forumlari pasats per request: pot crear-lo de nou si no existeix o actualitzar-lo si esxisteix. |
void |
handleActionRequest(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
org.springframework.web.portlet.ModelAndView |
handleRenderRequest(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
void |
setClientService(ClientService clientService)
|
void |
setFacturaService(FacturaService facturaService)
|
void |
setServletContext(javax.servlet.ServletContext servletContext)
|
private void |
subElements(javax.portlet.PortletRequest request)
Carrega els llistats d'elements secundaris: Estat, i l'afegeix a la request. |
private boolean |
validaBusqueda(FacturaDTO dto,
javax.portlet.PortletRequest request)
Valida els camps del formulari de cerca en format data o import per entitats Factura. |
private boolean |
validaCamps(FacturaDTO dto,
javax.portlet.PortletRequest request)
Valida els camps del formulari de l'entitat Factura abans de guardar-los. |
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, handleActionRequestInternal, handleInvalidSubmit, handleRenderRequestInternal, 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, getWebBindingInitializer, initApplicationContext, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setRenderCommandAndErrors, setValidateOnBinding, setValidator, setValidators, setWebBindingInitializer, suppressBinding, useDirectFieldAccess |
Methods inherited from class org.springframework.web.portlet.mvc.AbstractController |
---|
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 |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private FacturaService facturaService
private ClientService clientService
private javax.servlet.ServletContext servletContext
private static final String PAGE_MANT
private static final String PAGE_LIST
Constructor Detail |
---|
public ViewFacturaAction()
Method Detail |
---|
public void handleActionRequest(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws Exception
handleActionRequest
in interface org.springframework.web.portlet.mvc.Controller
handleActionRequest
in class org.springframework.web.portlet.mvc.AbstractController
Exception
public org.springframework.web.portlet.ModelAndView handleRenderRequest(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws Exception
handleRenderRequest
in interface org.springframework.web.portlet.mvc.Controller
handleRenderRequest
in class org.springframework.web.portlet.mvc.AbstractController
Exception
private void defecte(javax.portlet.PortletRequest request) throws CommonServiceException
request
-
CommonServiceException
private void getClientsAutoComplete(javax.portlet.PortletRequest request) throws CommonServiceException
request
-
CommonServiceException
private void getMails(javax.portlet.PortletRequest request) throws CommonServiceException
request
- amb la informació, s'afegeis el llistat 'llistaMails' per referencia
CommonServiceException
private Boolean guardar(javax.portlet.PortletRequest request) throws Exception
request
-
Exception
private void enviar(javax.portlet.PortletRequest request) throws CommonServiceException
request
-
CommonServiceException
private void cobrar(javax.portlet.PortletRequest request) throws CommonServiceException
request
-
CommonServiceException
private void editar(javax.portlet.PortletRequest request) throws Exception
request
-
Exception
private void buscar(javax.portlet.PortletRequest request) throws Exception
request
-
Exception
private void subElements(javax.portlet.PortletRequest request) throws CommonServiceException
request
-
CommonServiceException
private boolean validaCamps(FacturaDTO dto, javax.portlet.PortletRequest request)
dto
- FacturaDTOrequest
-
private boolean validaBusqueda(FacturaDTO dto, javax.portlet.PortletRequest request)
dto
- FacturaDTOrequest
-
public FacturaService getFacturaService()
public void setFacturaService(FacturaService facturaService)
facturaService
- the facturaService to setpublic ClientService getClientService()
public void setClientService(ClientService clientService)
clientService
- the clientService to setpublic void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext
in interface org.springframework.web.context.ServletContextAware
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |