Class PsaRstApiEvtIfcApp


  • public class PsaRstApiEvtIfcApp
    extends java.lang.Object
    Handler class for the event interface
    Since:
    07.08.2023
    Author:
    weiland
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected de.pisa.psc.srv.dto.PscDto Dto
      the data object
      protected de.pisa.psc.srv.glb.PscSsn Ssn
      session
    • Constructor Summary

      Constructors 
      Constructor Description
      PsaRstApiEvtIfcApp​(de.pisa.psc.srv.dto.PscDto dto)
      PsaRstApiEvtIfcApp constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean checkConfigIgnore​(de.pisa.psc.srv.dto.PscDto config_dto, int config_row)
      check if a configuration should be ignored because of an ignore flag
      protected java.util.List<de.pisa.psa.ifc.PsaDtoDat> createEvents​(java.util.List<de.pisa.psa.ifc.PsaDtoDat> cnf_dto_lis, java.lang.String gid, java.lang.String data, java.lang.String mod_fld, java.lang.Boolean syn_overwrite)
      create the events
      void delRecEvt​(int row)
      trigger an event on a deletion of a record (delRec)
      de.pisa.psc.srv.dto.PscDto getDto()
      get the data object
      protected boolean ignoreRecord​(int row)
      ignore a record for the event generation?
      protected java.util.List<de.pisa.psa.ifc.PsaDtoDat> loadConfigurations​(java.util.function.Predicate<java.lang.String> method_filter)
      load the configurations
      protected void processEvent​(int row, java.util.function.Predicate<java.lang.String> method_filter)
      create and process the event
      void putRecEvt​(int row)
      trigger an event on a modification of a record (putRec)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Dto

        protected final de.pisa.psc.srv.dto.PscDto Dto
        the data object
      • Ssn

        protected final de.pisa.psc.srv.glb.PscSsn Ssn
        session
    • Constructor Detail

      • PsaRstApiEvtIfcApp

        public PsaRstApiEvtIfcApp​(de.pisa.psc.srv.dto.PscDto dto)
        PsaRstApiEvtIfcApp constructor
        Parameters:
        dto - data object
    • Method Detail

      • putRecEvt

        public void putRecEvt​(int row)
                       throws java.lang.Exception
        trigger an event on a modification of a record (putRec)
        Parameters:
        row - the modified row
        Throws:
        java.lang.Exception
      • delRecEvt

        public void delRecEvt​(int row)
                       throws java.lang.Exception
        trigger an event on a deletion of a record (delRec)
        Parameters:
        row - the deleted row
        Throws:
        java.lang.Exception
      • getDto

        public de.pisa.psc.srv.dto.PscDto getDto()
        get the data object
        Returns:
        data object
      • processEvent

        protected void processEvent​(int row,
                                    java.util.function.Predicate<java.lang.String> method_filter)
                             throws java.lang.Exception
        create and process the event
        Parameters:
        row - record to process
        method_filter - filter for the methods in the configuration
        Throws:
        java.lang.Exception
      • ignoreRecord

        protected boolean ignoreRecord​(int row)
                                throws java.lang.Exception
        ignore a record for the event generation?
        Parameters:
        row - row to check
        Returns:
        true if the record should be ignored
        Throws:
        java.lang.Exception
      • loadConfigurations

        protected java.util.List<de.pisa.psa.ifc.PsaDtoDat> loadConfigurations​(java.util.function.Predicate<java.lang.String> method_filter)
                                                                        throws java.lang.Exception
        load the configurations
        Parameters:
        method_filter - filter for the methods in the configuration
        Returns:
        the associated configurations
        Throws:
        java.lang.Exception
      • checkConfigIgnore

        protected boolean checkConfigIgnore​(de.pisa.psc.srv.dto.PscDto config_dto,
                                            int config_row)
                                     throws java.lang.Exception
        check if a configuration should be ignored because of an ignore flag
        Parameters:
        config_dto - config dto
        config_row - config row
        Returns:
        true if configuration should be ignored
        Throws:
        java.lang.Exception
      • createEvents

        protected java.util.List<de.pisa.psa.ifc.PsaDtoDat> createEvents​(java.util.List<de.pisa.psa.ifc.PsaDtoDat> cnf_dto_lis,
                                                                         java.lang.String gid,
                                                                         java.lang.String data,
                                                                         java.lang.String mod_fld,
                                                                         java.lang.Boolean syn_overwrite)
                                                                  throws java.lang.Exception
        create the events
        Parameters:
        cnf_dto_lis - configurations
        gid - PSC_GID of the record
        data - JSON of the record
        mod_fld - JSON map of modified fields
        syn_overwrite - overwrite the SYN flag of the configuration
        Returns:
        created events
        Throws:
        java.lang.Exception