Class RegistrationPackageEnrichmentService
- java.lang.Object
-
- com.eduix.genexp.enrichment.AbstractEnrichmentService
-
- com.eduix.genexp.enrichment.paid_eduction.BaseEnrichmentService
-
- com.eduix.genexp.enrichment.paid_eduction.RegistrationPackageEnrichmentService
-
- All Implemented Interfaces:
EnrichmentService
public class RegistrationPackageEnrichmentService extends BaseEnrichmentService
Service for enriching registration packages.- Author:
- Jarkko Leponiemi
-
-
Field Summary
Fields Modifier and Type Field Description private com.eduix.studentregistry.configuration.service.ConfigurationCodesconfigurationCodesprivate static ElementDeleteMarkerdeleteMarkerprivate Map<String,fi.integrationhouse.mp.paid_education.dto.EnrollmentConfigurationDto>enrollmentConfigurationsprivate ExportServiceexportServiceprivate longlastConfigurationReadprivate static org.slf4j.Loggerlogprivate fi.integrationhouse.mp.paid_education.service.RegistrationPackageManagerregistrationPackageManagerprivate StringregistrationUrlprivate TemporaryRegistrationPackageClientrestClientprivate com.eduix.esp.unit.service.UnitManagerunitManager-
Fields inherited from class com.eduix.genexp.enrichment.paid_eduction.BaseEnrichmentService
exportConfig, organisationMapper, tagManager
-
Fields inherited from class com.eduix.genexp.enrichment.AbstractEnrichmentService
name
-
-
Constructor Summary
Constructors Constructor Description RegistrationPackageEnrichmentService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private DateaddDatesTimes(fi.integrationhouse.mp.paid_education.dto.RegistrationPackage registrationPackage, EnrichmentContext enrichmentContext)EnrichmentContextenrich(EnrichmentContext enrichmentContext, boolean inPlace)Enrich the study element in the given enrichment contextprivate List<ExportQuota>from(fi.integrationhouse.mp.paid_education.dto.Quota quota)private ExportRegistrationPackagefrom(fi.integrationhouse.mp.paid_education.dto.RegistrationPackage registrationPackage)Create exportable registaration package.private Floatfrom(BigDecimal d)ElementDeleteMarkergetElementDeleteMarker()private Set<String>getRootOrganisationCodes(fi.integrationhouse.mp.paid_education.dto.RegistrationPackage registrationPackage)private List<ExportTag>getTags(String registrationPackageId)Map<String,Class<?>>getTypeClassMappings()private voidinitEnrollmentConfigurations()Initialize registration package enrollment configurations.booleanisApplicable(String type)booleanisProcessable(EnrichmentContext enrichmentContext)voidsetConfigurationCodes(com.eduix.studentregistry.configuration.service.ConfigurationCodes configurationCodes)voidsetExportService(ExportService exportService)voidsetRegistrationPackageManager(fi.integrationhouse.mp.paid_education.service.RegistrationPackageManager registrationPackageManager)voidsetRegistrationUrl(String registrationUrl)voidsetRestClient(TemporaryRegistrationPackageClient restClient)voidsetUnitManager(com.eduix.esp.unit.service.UnitManager unitManager)-
Methods inherited from class com.eduix.genexp.enrichment.paid_eduction.BaseEnrichmentService
getQuotaTag, setExportConfig, setOrganisationMapper, setTagManager
-
Methods inherited from class com.eduix.genexp.enrichment.AbstractEnrichmentService
getName
-
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
deleteMarker
private static final ElementDeleteMarker deleteMarker
-
enrollmentConfigurations
private Map<String,fi.integrationhouse.mp.paid_education.dto.EnrollmentConfigurationDto> enrollmentConfigurations
-
lastConfigurationRead
private long lastConfigurationRead
-
registrationPackageManager
private fi.integrationhouse.mp.paid_education.service.RegistrationPackageManager registrationPackageManager
-
configurationCodes
private com.eduix.studentregistry.configuration.service.ConfigurationCodes configurationCodes
-
unitManager
private com.eduix.esp.unit.service.UnitManager unitManager
-
exportService
private ExportService exportService
-
restClient
private TemporaryRegistrationPackageClient restClient
-
registrationUrl
private String registrationUrl
-
-
Method Detail
-
isApplicable
public boolean isApplicable(String type)
- Specified by:
isApplicablein interfaceEnrichmentService- Overrides:
isApplicablein classAbstractEnrichmentService- Parameters:
type- study element typ- Returns:
- true, if enrichment service is applicable for given study elemenrt type
-
isProcessable
public boolean isProcessable(EnrichmentContext enrichmentContext)
- Specified by:
isProcessablein interfaceEnrichmentService- Overrides:
isProcessablein classAbstractEnrichmentService- Parameters:
enrichmentContext- the current enrichment context- Returns:
- true, if enrichment service is currently processable for given context
-
getTypeClassMappings
public Map<String,Class<?>> getTypeClassMappings()
- Specified by:
getTypeClassMappingsin interfaceEnrichmentService- Overrides:
getTypeClassMappingsin classAbstractEnrichmentService
-
initEnrollmentConfigurations
private void initEnrollmentConfigurations()
Initialize registration package enrollment configurations.
-
enrich
public EnrichmentContext enrich(EnrichmentContext enrichmentContext, boolean inPlace)
Description copied from interface:EnrichmentServiceEnrich the study element in the given enrichment context- Parameters:
enrichmentContext- the current enrichment contextinPlace- true, in enrichment does not create a new context- Returns:
- the updated enrichment context
-
getElementDeleteMarker
public ElementDeleteMarker getElementDeleteMarker()
- Specified by:
getElementDeleteMarkerin interfaceEnrichmentService- Overrides:
getElementDeleteMarkerin classAbstractEnrichmentService- Returns:
- the deletion marker for this enrichment service
-
getRootOrganisationCodes
private Set<String> getRootOrganisationCodes(fi.integrationhouse.mp.paid_education.dto.RegistrationPackage registrationPackage)
-
from
private ExportRegistrationPackage from(fi.integrationhouse.mp.paid_education.dto.RegistrationPackage registrationPackage)
Create exportable registaration package.- Parameters:
registrationPackage- the source information- Returns:
- exportable registration package
-
addDatesTimes
private Date addDatesTimes(fi.integrationhouse.mp.paid_education.dto.RegistrationPackage registrationPackage, EnrichmentContext enrichmentContext)
-
from
private List<ExportQuota> from(fi.integrationhouse.mp.paid_education.dto.Quota quota)
-
from
private Float from(BigDecimal d)
-
setRegistrationPackageManager
public void setRegistrationPackageManager(fi.integrationhouse.mp.paid_education.service.RegistrationPackageManager registrationPackageManager)
-
setConfigurationCodes
public void setConfigurationCodes(com.eduix.studentregistry.configuration.service.ConfigurationCodes configurationCodes)
-
setUnitManager
public void setUnitManager(com.eduix.esp.unit.service.UnitManager unitManager)
-
setExportService
public void setExportService(ExportService exportService)
-
setRestClient
public void setRestClient(TemporaryRegistrationPackageClient restClient)
-
setRegistrationUrl
public void setRegistrationUrl(String registrationUrl)
-
-