it.eng.spagobi.services.modules
Class DetailChecksModule

java.lang.Object
  extended by it.eng.spago.dispatching.service.DefaultRequestContext
      extended by it.eng.spago.dispatching.module.AbstractModule
          extended by it.eng.spagobi.services.modules.DetailChecksModule
All Implemented Interfaces:
it.eng.spago.dispatching.module.ModuleIFace, it.eng.spago.dispatching.service.RequestContextIFace, it.eng.spago.dispatching.service.ServiceIFace, it.eng.spago.init.InitializerIFace, java.io.Serializable

public class DetailChecksModule
extends it.eng.spago.dispatching.module.AbstractModule

Implements a module which handles all values constraints management: has methods for values constraint load detail, modify/insertion and deleting operations. The service method has a switch for all these operations, differentiated the ones from the others by a message String.

Author:
sulis
See Also:
Serialized Form

Field Summary
private  java.lang.Boolean back
           
private  java.lang.String modalita
           
 
Constructor Summary
DetailChecksModule()
           
 
Method Summary
private  void delDetailCheck(it.eng.spago.base.SourceBean request, java.lang.String mod, it.eng.spago.base.SourceBean response)
          Deletes a value constraint choosed by user from the values constraints list.
private  void getDetailCheck(java.lang.String key, it.eng.spago.base.SourceBean response)
          Gets the detail of a value comstraint choosed by the user from the values constraints list.
 void init(it.eng.spago.base.SourceBean config)
           
 void labelControl(java.lang.String label, java.lang.Integer checkId)
          During a value constraint insertion/modify, controls if the label given to the value constraint is yet in use.
private  void modDetailCheck(it.eng.spago.base.SourceBean request, java.lang.String mod, it.eng.spago.base.SourceBean response)
          Inserts/Modifies the detail of a value constraint according to the user request.
private  void newDetailCheck(it.eng.spago.base.SourceBean response)
          Instantiates a new parametere object when a new value constraint insertion is required, in order to prepare the page for the insertion.
private  Check recoverCheckDetails(it.eng.spago.base.SourceBean request)
           
 void service(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Reads the operation asked by the user and calls the insertion, modify, detail and deletion methods
 
Methods inherited from class it.eng.spago.dispatching.module.AbstractModule
getConfig, getModule, getPage, getSharedData, setModule, setPage, setSharedData
 
Methods inherited from class it.eng.spago.dispatching.service.DefaultRequestContext
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse, setRequestContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modalita

private java.lang.String modalita

back

private java.lang.Boolean back
Constructor Detail

DetailChecksModule

public DetailChecksModule()
Method Detail

init

public void init(it.eng.spago.base.SourceBean config)
Specified by:
init in interface it.eng.spago.init.InitializerIFace
Overrides:
init in class it.eng.spago.dispatching.module.AbstractModule

service

public void service(it.eng.spago.base.SourceBean request,
                    it.eng.spago.base.SourceBean response)
             throws java.lang.Exception
Reads the operation asked by the user and calls the insertion, modify, detail and deletion methods

Parameters:
request - The Source Bean containing all request parameters
response - The Source Bean containing all response parameters
Throws:
exception - If an exception occurs
java.lang.Exception

getDetailCheck

private void getDetailCheck(java.lang.String key,
                            it.eng.spago.base.SourceBean response)
                     throws EMFUserError
Gets the detail of a value comstraint choosed by the user from the values constraints list. It reaches the key from the request and asks to the DB all detail value constraint information, by calling the method loadCheckbyID.

Parameters:
key - The choosed value constraint id key
response - The response Source Bean
Throws:
EMFUserError - If an exception occurs

modDetailCheck

private void modDetailCheck(it.eng.spago.base.SourceBean request,
                            java.lang.String mod,
                            it.eng.spago.base.SourceBean response)
                     throws EMFUserError,
                            it.eng.spago.base.SourceBeanException
Inserts/Modifies the detail of a value constraint according to the user request. When a value constraint is modified, the modifyCheck method is called; when a new value constraint is added, the insertCheck method is called. These two cases are differentiated by the mod String input value.

Parameters:
request - The request information contained in a SourceBean Object
mod - A request string used to differentiate insert/modify operations
response - The response SourceBean
Throws:
EMFUserError - If an exception occurs
it.eng.spago.base.SourceBeanException - If a SourceBean exception occurs

recoverCheckDetails

private Check recoverCheckDetails(it.eng.spago.base.SourceBean request)
                           throws EMFUserError
Throws:
EMFUserError

delDetailCheck

private void delDetailCheck(it.eng.spago.base.SourceBean request,
                            java.lang.String mod,
                            it.eng.spago.base.SourceBean response)
                     throws EMFUserError,
                            it.eng.spago.base.SourceBeanException
Deletes a value constraint choosed by user from the values constraints list.

Parameters:
request - The request SourceBean
mod - A request string used to differentiate delete operation
response - The response SourceBean
Throws:
EMFUserError - If an Exception occurs
it.eng.spago.base.SourceBeanException - If a SourceBean Exception occurs

newDetailCheck

private void newDetailCheck(it.eng.spago.base.SourceBean response)
                     throws EMFUserError
Instantiates a new parametere object when a new value constraint insertion is required, in order to prepare the page for the insertion.

Parameters:
response - The response SourceBean
Throws:
EMFUserError - If an Exception occurred

labelControl

public void labelControl(java.lang.String label,
                         java.lang.Integer checkId)
                  throws EMFUserError
During a value constraint insertion/modify, controls if the label given to the value constraint is yet in use.

Parameters:
label - The label of the check to insert/modify
checkId - The id of the check to insert/modify
Throws:
EMFUserError - If any Exception occurred