Package de.pisa.psa.rst.dto
Class PsaRstApiEvtIfcApp
java.lang.Object
de.pisa.psa.rst.dto.PsaRstApiEvtIfcApp
Handler class for the event interface
- Since:
- 07.08.2023
- Author:
- weiland
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPsaRstApiEvtIfcApp
(de.pisa.psc.srv.dto.PscDto dto) PsaRstApiEvtIfcApp constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkConfigIgnore
(de.pisa.psc.srv.dto.PscDto config_dto, int config_row) check if a configuration should be ignored because of an ignore flagprotected List<de.pisa.psa.ifc.PsaDtoDat>
createEvents
(List<de.pisa.psa.ifc.PsaDtoDat> cnf_dto_lis, String gid, String data, String mod_fld, Boolean syn_overwrite) create the eventsvoid
delRecEvt
(int row) trigger an event on a deletion of a record (delRec)de.pisa.psc.srv.dto.PscDto
getDto()
get the data objectprotected boolean
ignoreRecord
(int row) ignore a record for the event generation?protected List<de.pisa.psa.ifc.PsaDtoDat>
loadConfigurations
(Predicate<String> method_filter) load the configurationsvoid
processEvent
(int row, Predicate<String> method_filter) create and process the eventvoid
putRecEvt
(int row) trigger an event on a modification of a record (putRec)
-
Field Details
-
Dto
protected final de.pisa.psc.srv.dto.PscDto Dtothe data object -
Ssn
protected final de.pisa.psc.srv.glb.PscSsn Ssnsession
-
-
Constructor Details
-
PsaRstApiEvtIfcApp
public PsaRstApiEvtIfcApp(de.pisa.psc.srv.dto.PscDto dto) PsaRstApiEvtIfcApp constructor- Parameters:
dto
- data object
-
-
Method Details
-
putRecEvt
trigger an event on a modification of a record (putRec)- Parameters:
row
- the modified row- Throws:
Exception
-
delRecEvt
trigger an event on a deletion of a record (delRec)- Parameters:
row
- the deleted row- Throws:
Exception
-
getDto
public de.pisa.psc.srv.dto.PscDto getDto()get the data object- Returns:
- data object
-
processEvent
create and process the event- Parameters:
row
- record to processmethod_filter
- filter for the methods in the configuration- Throws:
Exception
-
ignoreRecord
ignore a record for the event generation?- Parameters:
row
- row to check- Returns:
- true if the record should be ignored
- Throws:
Exception
-
loadConfigurations
protected List<de.pisa.psa.ifc.PsaDtoDat> loadConfigurations(Predicate<String> method_filter) throws Exception load the configurations- Parameters:
method_filter
- filter for the methods in the configuration- Returns:
- the associated configurations
- Throws:
Exception
-
checkConfigIgnore
protected boolean checkConfigIgnore(de.pisa.psc.srv.dto.PscDto config_dto, int config_row) throws Exception check if a configuration should be ignored because of an ignore flag- Parameters:
config_dto
- config dtoconfig_row
- config row- Returns:
- true if configuration should be ignored
- Throws:
Exception
-
createEvents
protected List<de.pisa.psa.ifc.PsaDtoDat> createEvents(List<de.pisa.psa.ifc.PsaDtoDat> cnf_dto_lis, String gid, String data, String mod_fld, Boolean syn_overwrite) throws Exception create the events- Parameters:
cnf_dto_lis
- configurationsgid
- PSC_GID of the recorddata
- JSON of the recordmod_fld
- JSON map of modified fieldssyn_overwrite
- overwrite the SYN flag of the configuration- Returns:
- created events
- Throws:
Exception
-