Interface ImportCockpitMappingService
-
- All Known Implementing Classes:
AbstractImportCockpitMappingService,DefaultImportCockpitMappingService
public interface ImportCockpitMappingServiceProvides service methods for the mapping handling and mapping validation. created at Nov 16, 2009 created by YanlingZhang
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MappingModelcopyMapping(ImportCockpitMappingModel sourceMappingModel, java.io.Reader reader)Creates and returns a new mapping that contains a copy of the mapping XML of a given ImportCockpitMapping object.java.util.List<ImportCockpitMappingModel>findMappingsWithUrl()Retrieves all mappings with a URL from the database.MappingModelloadMapping(ImportCockpitCronJobModel processModel)Loads a mapping from a job if available.MappingModelretrieveMapping(ImportCockpitCronJobModel processModel)Loads the mapping from a supplied cron job (ImportCockpitCronJobModel).voidvalidateAndSaveMapping(MappingModel mapping, java.lang.String mappingName, ImportCockpitCronJobModel processModel)Validates and saves the mappingvoidvalidateAndSaveMapping(MappingModel mapping, java.lang.String mappingName, ImportCockpitCronJobModel processModel, boolean saveAs)Validates and saves the mapping
-
-
-
Method Detail
-
retrieveMapping
MappingModel retrieveMapping(ImportCockpitCronJobModel processModel)
Loads the mapping from a supplied cron job (ImportCockpitCronJobModel). If there is no mapping specified for the job then a new one is being created.- Parameters:
processModel- job- Returns:
- mapping
-
loadMapping
MappingModel loadMapping(ImportCockpitCronJobModel processModel)
Loads a mapping from a job if available. If there is no mapping specified, no mapping will be created and the method will return null.- Parameters:
processModel- job- Returns:
- mapping
-
copyMapping
MappingModel copyMapping(ImportCockpitMappingModel sourceMappingModel, java.io.Reader reader)
Creates and returns a new mapping that contains a copy of the mapping XML of a given ImportCockpitMapping object.- Parameters:
sourceMappingModel- ,it is the ImportCockpitMappingreader- reader- Returns:
- a new mapping with a copied XML from an ImportCockpitMapping object
-
findMappingsWithUrl
java.util.List<ImportCockpitMappingModel> findMappingsWithUrl()
Retrieves all mappings with a URL from the database. Used by the "load mapping" functionality.- Returns:
- list of ImportCockpitMapping objects
-
validateAndSaveMapping
void validateAndSaveMapping(MappingModel mapping, java.lang.String mappingName, ImportCockpitCronJobModel processModel)
Validates and saves the mapping- Parameters:
mapping- mappingmappingName- mapping nameprocessModel- process- Throws:
ModelSavingException
-
validateAndSaveMapping
void validateAndSaveMapping(MappingModel mapping, java.lang.String mappingName, ImportCockpitCronJobModel processModel, boolean saveAs)
Validates and saves the mapping- Parameters:
mapping- mappingmappingName- mapping nameprocessModel- processsaveAs- saveAs as- Throws:
ModelSavingException
-
-