|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spago.dispatching.service.DefaultRequestContext
it.eng.spago.dispatching.module.AbstractModule
it.eng.spagobi.services.modules.DetailModalitiesValueModule
public class DetailModalitiesValueModule
Implements a module which handles all predefined List of Values (LOV) management:
has methods for LOV 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.
Field Summary | |
---|---|
private it.eng.spago.error.EMFErrorHandler |
errorHandler
|
private it.eng.spago.base.SessionContainer |
session
|
Constructor Summary | |
---|---|
DetailModalitiesValueModule()
|
Method Summary | |
---|---|
private ModalitiesValue |
addFixLovItem(it.eng.spago.base.SourceBean request,
ModalitiesValue modVal)
Inserts a new Fixed LOV item in the FixedLov Wizard. |
private void |
delDetailModValue(it.eng.spago.base.SourceBean request,
java.lang.String mod,
it.eng.spago.base.SourceBean response)
Deletes a value choosed by user from the LOV list. |
private int |
findIndexOfFixedLovItemToDelete(java.lang.Object indexOfFixedLovItemToDeleteObj)
Finds the index of the fixed lov item to delete. |
private void |
getDetailModValue(java.lang.String key,
it.eng.spago.base.SourceBean response)
Gets the detail of a value choosed by the user from the predefined List of Values. |
void |
init(it.eng.spago.base.SourceBean config)
|
void |
labelControl(it.eng.spago.base.SourceBean request,
java.lang.String mod)
Controls if the label choosed by user is yet in use. |
private void |
loadValuesDomain(it.eng.spago.base.SourceBean response)
Loads into the Response Source Bean all the Input Type Domain objects |
private void |
modDetailModValue(it.eng.spago.base.SourceBean request,
java.lang.String mod,
it.eng.spago.base.SourceBean response)
Inserts/Modifies the detail of a value according to the user request. |
private void |
newDetailModValue(it.eng.spago.base.SourceBean response)
Instantiates a new Value |
private void |
prepareDetailModalitiesValuePage(ModalitiesValue modVal,
java.lang.String mod,
it.eng.spago.base.SourceBean response)
Sets some attributes into the response SourceBean. |
private LovDetailList |
recoverLovWizardValues(it.eng.spago.base.SourceBean request,
int indexOfFixedLovItemToDelete)
Recovers all the fix lov items from the request, apart from the one with index indexOfFixedListItemToDelete, that will be ignorated. |
private QueryDetail |
recoverQueryWizardValues(it.eng.spago.base.SourceBean request)
Recover all Query Wizard values when a value is inserted or modified, choosing "Query Statement" as the input type. |
private ScriptDetail |
recoverScriptWizardValues(it.eng.spago.base.SourceBean request)
Recover all Script Wizard values when a value is inserted or modified, choosing "Script to Load Values" as the input type. |
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. |
private void |
testLovBeforeSave(it.eng.spago.base.SourceBean request,
it.eng.spago.base.SourceBean response,
java.lang.Object objectToTest)
Tests the ModalitiesValue before saving and sets some attributes to the response SourceBean for the correct visualization of the test result page. |
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 |
---|
private it.eng.spago.error.EMFErrorHandler errorHandler
private it.eng.spago.base.SessionContainer session
Constructor Detail |
---|
public DetailModalitiesValueModule()
Method Detail |
---|
public void init(it.eng.spago.base.SourceBean config)
init
in interface it.eng.spago.init.InitializerIFace
init
in class it.eng.spago.dispatching.module.AbstractModule
public void service(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response) throws java.lang.Exception
When a new value is defined, the user has to use a wizard to build all the new value definition. There are some methods written for this aim.
request
- The Source Bean containing all request parametersresponse
- The Source Bean containing all response parameters
exception
- If an exception occurs
java.lang.Exception
private void getDetailModValue(java.lang.String key, it.eng.spago.base.SourceBean response) throws EMFUserError
loadModalitiesValueByID
.
key
- The choosed parameter use mode id keyresponse
- The response Source Bean
EMFUserError
- If an exception occursprivate void modDetailModValue(it.eng.spago.base.SourceBean request, java.lang.String mod, it.eng.spago.base.SourceBean response) throws EMFUserError, it.eng.spago.base.SourceBeanException
modifyModalitiesValue
method is called; when a new parameter use mode is added, the inserModalitiesValue
method is called. These two cases are differentiated by the mod
String input value .
request
- The request information contained in a SourceBean Objectmod
- A request string used to differentiate insert/modify operationsresponse
- The response SourceBean
EMFUserError
- If an exception occurs
it.eng.spago.base.SourceBeanException
- If a SourceBean exception occursprivate void prepareDetailModalitiesValuePage(ModalitiesValue modVal, java.lang.String mod, it.eng.spago.base.SourceBean response) throws it.eng.spago.base.SourceBeanException, EMFUserError, it.eng.spago.error.EMFInternalError
modVal
- The ModalitiesValue to visualizemod
- The modality (insert/modify)response
- The SourceBean to set
it.eng.spago.base.SourceBeanException
EMFUserError
it.eng.spago.error.EMFInternalError
private void testLovBeforeSave(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response, java.lang.Object objectToTest) throws it.eng.spago.base.SourceBeanException
request
- The request SourceBeanresponse
- The response SourceBeanobjectToTest
- The object to test. It is:
- null in case on manual input;
- a QueryDetail in case of query;
- a LovDetailList in case of Fix Lov;
- a ScriptDetail in case of script.
it.eng.spago.base.SourceBeanException
private void delDetailModValue(it.eng.spago.base.SourceBean request, java.lang.String mod, it.eng.spago.base.SourceBean response) throws EMFUserError, it.eng.spago.base.SourceBeanException
request
- The request SourceBeanmod
- A request string used to differentiate delete operationresponse
- The response SourceBean
EMFUserError
- If an Exception occurs
it.eng.spago.base.SourceBeanException
- If a SourceBean Exception occursprivate void newDetailModValue(it.eng.spago.base.SourceBean response) throws EMFUserError
Value object when a new value
insertion in the LOV list is required, in order to prepare the page for the insertion.
- Parameters:
response
- The response SourceBean
- Throws:
EMFUserError
- If an Exception occurred
private void loadValuesDomain(it.eng.spago.base.SourceBean response) throws EMFUserError
response
- The response Source Bean
EMFUserError
- If any exception occurredprivate QueryDetail recoverQueryWizardValues(it.eng.spago.base.SourceBean request)
request
- The request SourceBeanprivate ScriptDetail recoverScriptWizardValues(it.eng.spago.base.SourceBean request)
request
- The request SourceBeanprivate ModalitiesValue addFixLovItem(it.eng.spago.base.SourceBean request, ModalitiesValue modVal) throws it.eng.spago.base.SourceBeanException
request
- The request SourceBeanmodVal
- The ModalitiesValue to modify with the new entry
it.eng.spago.base.SourceBeanException
- If a SourceBean Exception occurredprivate int findIndexOfFixedLovItemToDelete(java.lang.Object indexOfFixedLovItemToDeleteObj)
indexOfFixedListItemToDeleteObj
- The object obtained from the SourceBean request
as an attribute with key "indexOfFixedListItemToDelete"private LovDetailList recoverLovWizardValues(it.eng.spago.base.SourceBean request, int indexOfFixedLovItemToDelete) throws java.lang.Exception
request
- The request SourceBeanindexOfFixedListItemToDelete
- The index of the item to be ignorated.
java.lang.Exception
- If an Exception occurredpublic void labelControl(it.eng.spago.base.SourceBean request, java.lang.String mod) throws EMFUserError
request
- The request Source Beanmod
- The modality
EMFUserError
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |