Class BTDataCollectionTemplateConversionCreateNewTemplateHeader
java.lang.Object
overit.geocall.bl.BusinessTask<DataCollectionTemplateConversionCreateNewTemplateHeaderEvent>
overit.geocallapp.wfm.core.bl.datacollection.converter.template.task.BTDataCollectionTemplateConversionCreateNewTemplateHeader
- All Implemented Interfaces:
Serializable,Tool
@Event(DataCollectionTemplateConversionCreateNewTemplateHeaderEvent.class)
public class BTDataCollectionTemplateConversionCreateNewTemplateHeader
extends BusinessTask<DataCollectionTemplateConversionCreateNewTemplateHeaderEvent>
Business task in order to insert a
When the
TemplateTree in a BODataCollectionTemplateHeader. When the
DataCollectionTemplateConversionCreateNewTemplateHeaderEvent is launched
the BT notices the call and starts the TemplateTree conversion based on the event's input. - Since:
- 13.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(DataCollectionTemplateConversionCreateNewTemplateHeaderEvent event, PoolKit poolKit) Coverts the givenTemplateTreeinto aBODataCollectionTemplateHeaderand add it to the event journal.protected BODataCollectionTemplateHeadercreateNewTemplateHeader(PoolKit poolKit, overit.geocallapp.wfm.survey.template.TemplateTree oldTemplateTree, Long newTemplateHeaderId) Creates or updates aBODataCollectionTemplateHeaderbased on the oldTemplateTree.protected LocalizedStringgetTemplateLocalizeDescription(HashGetter oldTemplateAttributes) Gets aLocalizedStringstarting from the ADTEDESCRIPTION of the old template.protected BODataCollectionTemplateHeadersearchTemplateHeader(PoolKit poolKit, overit.geocallapp.wfm.survey.template.TemplateTree oldTemplateTree) Search for aBODataCollectionTemplateHeaderwith the same code as theTemplateTreegiven as parameter.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTDataCollectionTemplateConversionCreateNewTemplateHeader
public BTDataCollectionTemplateConversionCreateNewTemplateHeader()
-
-
Method Details
-
body
protected void body(DataCollectionTemplateConversionCreateNewTemplateHeaderEvent event, PoolKit poolKit) throws DAException, DAValidateException Coverts the givenTemplateTreeinto aBODataCollectionTemplateHeaderand add it to the event journal.- Specified by:
bodyin classBusinessTask<DataCollectionTemplateConversionCreateNewTemplateHeaderEvent>- Parameters:
event- theDataCollectionTemplateConversionCreateNewTemplateHeaderEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
searchTemplateHeader
protected BODataCollectionTemplateHeader searchTemplateHeader(PoolKit poolKit, overit.geocallapp.wfm.survey.template.TemplateTree oldTemplateTree) throws DAException, DAValidateException Search for aBODataCollectionTemplateHeaderwith the same code as theTemplateTreegiven as parameter.- Parameters:
poolKit- thePoolKitoldTemplateTree- the old template- Returns:
- the
BODataCollectionTemplateHeaderif found, null otherwise. - Throws:
DAExceptionDAValidateException
-
createNewTemplateHeader
protected BODataCollectionTemplateHeader createNewTemplateHeader(PoolKit poolKit, overit.geocallapp.wfm.survey.template.TemplateTree oldTemplateTree, Long newTemplateHeaderId) throws DAValidateException, DAException, SQLException Creates or updates aBODataCollectionTemplateHeaderbased on the oldTemplateTree.- Parameters:
poolKit- thePoolKitoldTemplateTree- the old templatenewTemplateHeaderId- the new template header id (if present)- Returns:
- the created/updated
BODataCollectionTemplateHeader - Throws:
DAValidateExceptionDAExceptionSQLException
-
getTemplateLocalizeDescription
Gets aLocalizedStringstarting from the ADTEDESCRIPTION of the old template.- Parameters:
oldTemplateAttributes- old template attribute data- Returns:
- the
LocalizedStringwith the old template description.
-