Class PsaRstApiEvtHdlDat


  • public class PsaRstApiEvtHdlDat
    extends java.lang.Object
    REST API: event handler data
    Since:
    10.07.2023
    Author:
    weiland
    • Constructor Summary

      Constructors 
      Constructor Description
      PsaRstApiEvtHdlDat​(de.pisa.psa.ifc.PsaDtoDat config, de.pisa.psa.ifc.PsaDtoDat event)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.pisa.psa.ifc.PsaDtoDat getConfig()
      get the configuration
      java.lang.String getConfigGid()
      get the PSC_GID of the config record
      java.lang.String getDto()
      get the data object that is configured for this request
      de.pisa.psa.ifc.PsaDtoDat getEvent()
      get the event
      java.lang.String getEventGid()
      get the PSC_GID of the event record
      boolean getIAM()
      get if IAM should be used for authentication
      java.lang.String getIAMEmail()
      get the email address of the IAM user
      java.lang.String getImplementation()
      get the class that implements the event handler
      java.lang.String getKeyGid()
      return the PSC_GID of the access key
      java.lang.String getLanguage()
      get the language to use for this request
      java.lang.String getMethod()
      get the request method from the configuration
      java.lang.String getPath()
      get the URL path from the configuration
      java.lang.String getRecordData()
      get the data of the record
      java.lang.String getRecordGid()
      get the PSC_GID of the record that was provided by the request
      java.lang.String getRecordModifiedFields()
      get the modified fields of the record
      java.lang.String getRequestBody()
      get the body of the request
      java.lang.String getRequestHeader()
      get the header of the request
      HeaderMap getRequestHeaderMap()
      get the header of the request a map
      de.pisa.psc.srv.svc.MapToList<java.lang.String,​java.lang.String> getRequestParameter()
      get the query parameter of the request
      java.lang.String getRequestPath()
      get the path of the request
      java.util.List<java.lang.String> getRequestPathTokens()
      split the request path into tokens
      boolean getSynchronous()
      should the request be handled synchronously
      java.lang.String getUrl()
      get the URL from the configuration
      java.lang.String getUser()
      get the user name to use for this request
      void setLanguage​(java.lang.String language)
      Override the event language
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PsaRstApiEvtHdlDat

        public PsaRstApiEvtHdlDat​(de.pisa.psa.ifc.PsaDtoDat config,
                                  de.pisa.psa.ifc.PsaDtoDat event)
        Constructor
        Parameters:
        config - configuration
        event - event
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • getConfig

        public de.pisa.psa.ifc.PsaDtoDat getConfig()
        get the configuration
        Returns:
        configuration object
      • getEvent

        public de.pisa.psa.ifc.PsaDtoDat getEvent()
        get the event
        Returns:
        event object
      • getConfigGid

        public java.lang.String getConfigGid()
                                      throws de.pisa.psc.srv.glb.PscExc
        get the PSC_GID of the config record
        Returns:
        GID
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getDto

        public java.lang.String getDto()
                                throws de.pisa.psc.srv.glb.PscExc
        get the data object that is configured for this request
        Returns:
        data object
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getSynchronous

        public boolean getSynchronous()
                               throws de.pisa.psc.srv.glb.PscExc
        should the request be handled synchronously
        Returns:
        true if synchronously
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getImplementation

        public java.lang.String getImplementation()
                                           throws de.pisa.psc.srv.glb.PscExc
        get the class that implements the event handler
        Returns:
        class
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getKeyGid

        public java.lang.String getKeyGid()
                                   throws de.pisa.psc.srv.glb.PscExc
        return the PSC_GID of the access key
        Returns:
        GID
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getIAM

        public boolean getIAM()
                       throws de.pisa.psc.srv.glb.PscExc
        get if IAM should be used for authentication
        Returns:
        true if IAM is used
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getUrl

        public java.lang.String getUrl()
                                throws de.pisa.psc.srv.glb.PscExc
        get the URL from the configuration
        Returns:
        URL
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getPath

        public java.lang.String getPath()
                                 throws de.pisa.psc.srv.glb.PscExc
        get the URL path from the configuration
        Returns:
        path
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getMethod

        public java.lang.String getMethod()
                                   throws de.pisa.psc.srv.glb.PscExc
        get the request method from the configuration
        Returns:
        method (POST / PUT / GET / DELETE / PATCH)
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getIAMEmail

        public java.lang.String getIAMEmail()
                                     throws de.pisa.psc.srv.glb.PscExc
        get the email address of the IAM user
        Returns:
        email address
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getEventGid

        public java.lang.String getEventGid()
                                     throws de.pisa.psc.srv.glb.PscExc
        get the PSC_GID of the event record
        Returns:
        GID
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRecordGid

        public java.lang.String getRecordGid()
                                      throws de.pisa.psc.srv.glb.PscExc
        get the PSC_GID of the record that was provided by the request
        Returns:
        GID
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRecordData

        public java.lang.String getRecordData()
                                       throws de.pisa.psc.srv.glb.PscExc
        get the data of the record
        Returns:
        data (JSON of PsaDtoDat)
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRecordModifiedFields

        public java.lang.String getRecordModifiedFields()
                                                 throws de.pisa.psc.srv.glb.PscExc
        get the modified fields of the record
        Returns:
        old data (JSON of a map)
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRequestPath

        public java.lang.String getRequestPath()
                                        throws de.pisa.psc.srv.glb.PscExc
        get the path of the request
        Returns:
        path
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRequestPathTokens

        public java.util.List<java.lang.String> getRequestPathTokens()
                                                              throws de.pisa.psc.srv.glb.PscExc
        split the request path into tokens
        Returns:
        a list with the path tokens
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRequestParameter

        public de.pisa.psc.srv.svc.MapToList<java.lang.String,​java.lang.String> getRequestParameter()
                                                                                                   throws de.pisa.psc.srv.glb.PscExc
        get the query parameter of the request
        Returns:
        multi valued string map
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRequestBody

        public java.lang.String getRequestBody()
                                        throws de.pisa.psc.srv.glb.PscExc
        get the body of the request
        Returns:
        path
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRequestHeader

        public java.lang.String getRequestHeader()
                                          throws de.pisa.psc.srv.glb.PscExc
        get the header of the request
        Returns:
        json of a multi valued map
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getRequestHeaderMap

        public HeaderMap getRequestHeaderMap()
                                      throws de.pisa.psc.srv.glb.PscExc,
                                             com.fasterxml.jackson.core.JsonProcessingException
        get the header of the request a map
        Returns:
        multi valued map with strings to a list of strings
        Throws:
        de.pisa.psc.srv.glb.PscExc
        com.fasterxml.jackson.core.JsonProcessingException
      • getUser

        public java.lang.String getUser()
                                 throws de.pisa.psc.srv.glb.PscExc
        get the user name to use for this request
        Returns:
        name
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • getLanguage

        public java.lang.String getLanguage()
                                     throws de.pisa.psc.srv.glb.PscExc
        get the language to use for this request
        Returns:
        language
        Throws:
        de.pisa.psc.srv.glb.PscExc
      • setLanguage

        public void setLanguage​(java.lang.String language)
        Override the event language
        Parameters:
        language - new language