Package de.pisa.psa.rst.dto
Class FindConfiguration
java.lang.Object
de.pisa.psa.rst.dto.FindConfiguration
Helper class for finding a REST API configuration for creating events
- Since:
- 14.11.2024
- Author:
- weiland
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected de.pisa.psc.srv.svc.LamUti.ConsumerE<de.pisa.psc.srv.dto.PscDto>
handler if more than one configuration was foundprotected de.pisa.psc.srv.svc.LamUti.RunnableE
handler if not configuration was foundprotected final de.pisa.psc.srv.glb.PscSsn
session -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkRecords
(de.pisa.psc.srv.dto.PscDto dto) check the found configuration recordsfind the configuration for CreateEvents based on a given filterList<de.pisa.psa.ifc.PsaDtoDat>
find the configuration data based on a given filterprotected de.pisa.psc.srv.dto.PscDto
find the configuration recordsprotected List<CreateEvents.Config>
mapRecordsToConfig
(de.pisa.psc.srv.dto.PscDto dto) map the configuration records to event configurationsprotected List<de.pisa.psa.ifc.PsaDtoDat>
mapRecordsToData
(de.pisa.psc.srv.dto.PscDto dto) map the configuration records to record datavoid
setAmbiguousConfigurationHandler
(de.pisa.psc.srv.svc.LamUti.ConsumerE<de.pisa.psc.srv.dto.PscDto> handler) Set the handler if more than one configuration was foundvoid
setNoConfigurationHandler
(de.pisa.psc.srv.svc.LamUti.RunnableE handler) Set the handler of no configuration was found
-
Field Details
-
Ssn
protected final de.pisa.psc.srv.glb.PscSsn Ssnsession -
No_Configuration_Handler
protected de.pisa.psc.srv.svc.LamUti.RunnableE No_Configuration_Handlerhandler if not configuration was found -
Ambiguous_Configuration_Handler
protected de.pisa.psc.srv.svc.LamUti.ConsumerE<de.pisa.psc.srv.dto.PscDto> Ambiguous_Configuration_Handlerhandler if more than one configuration was found
-
-
Constructor Details
-
FindConfiguration
public FindConfiguration(de.pisa.psc.srv.glb.PscSsn ssn) Constructor- Parameters:
ssn
- session
-
-
Method Details
-
setNoConfigurationHandler
public void setNoConfigurationHandler(de.pisa.psc.srv.svc.LamUti.RunnableE handler) Set the handler of no configuration was found- Parameters:
handler
- handler
-
setAmbiguousConfigurationHandler
public void setAmbiguousConfigurationHandler(de.pisa.psc.srv.svc.LamUti.ConsumerE<de.pisa.psc.srv.dto.PscDto> handler) Set the handler if more than one configuration was found- Parameters:
handler
- handler which receives the configuration data object (PSA_RST_API_CNF)
-
findConfig
public List<CreateEvents.Config> findConfig(PsaRstApiCnfApp.ConfigurationFilter filter) throws Exception find the configuration for CreateEvents based on a given filter- Parameters:
filter
- filter to apply- Returns:
- list of configurations
- Throws:
Exception
-
findData
public List<de.pisa.psa.ifc.PsaDtoDat> findData(PsaRstApiCnfApp.ConfigurationFilter filter) throws Exception find the configuration data based on a given filter- Parameters:
filter
- filter to apply- Returns:
- list of records
- Throws:
Exception
-
findRecords
protected de.pisa.psc.srv.dto.PscDto findRecords(PsaRstApiCnfApp.ConfigurationFilter filter) throws Exception find the configuration records- Parameters:
filter
- filter to apply- Returns:
- configuration data object (PSA_RST_API_CNF)
- Throws:
Exception
-
checkRecords
check the found configuration records- Parameters:
dto
- configuration data object (PSA_RST_API_CNF)- Throws:
Exception
-
mapRecordsToData
protected List<de.pisa.psa.ifc.PsaDtoDat> mapRecordsToData(de.pisa.psc.srv.dto.PscDto dto) throws Exception map the configuration records to record data- Parameters:
dto
- configuration data object (PSA_RST_API_CNF)- Returns:
- list of record data
- Throws:
Exception
-
mapRecordsToConfig
protected List<CreateEvents.Config> mapRecordsToConfig(de.pisa.psc.srv.dto.PscDto dto) throws Exception map the configuration records to event configurations- Parameters:
dto
- configuration data object (PSA_RST_API_CNF)- Returns:
- list of event configurations
- Throws:
Exception
-