Package de.pisa.psa.rst.hdl
Class PsaRstApiEvtHdlDat
java.lang.Object
de.pisa.psa.rst.hdl.PsaRstApiEvtHdlDat
REST API: event handler data
- Since:
- 10.07.2023
- Author:
- weiland
-
Constructor Summary
ConstructorsConstructorDescriptionPsaRstApiEvtHdlDat
(de.pisa.psa.ifc.PsaDtoDat config, de.pisa.psa.ifc.PsaDtoDat event) Constructor -
Method Summary
Modifier and TypeMethodDescriptionde.pisa.psa.ifc.PsaDtoDat
get the configurationget the PSC_GID of the config recordgetDto()
get the data object that is configured for this requestde.pisa.psa.ifc.PsaDtoDat
getEvent()
get the eventget the PSC_GID of the event recordboolean
getIAM()
get if IAM should be used for authenticationget the email address of the IAM userde.pisa.psa.com.dxhub.iam.UserInfo
get the IAM user informationget the class that implements the event handlerreturn the PSC_GID of the access keyget the language to use for this requestget the request method from the configurationgetPath()
get the URL path from the configurationget the data of the recordget the PSC_GID of the record that was provided by the requestget the modified fields of the recordget the body of the requestget the header of the requestget the header of the request a mapget the query parameter of the requestget the path of the requestsplit the request path into tokensboolean
should the request be handled synchronouslygetUrl()
get the URL from the configurationgetUser()
get the user name to use for this requestvoid
setLanguage
(String language) Override the event languagetoString()
-
Constructor Details
-
PsaRstApiEvtHdlDat
public PsaRstApiEvtHdlDat(de.pisa.psa.ifc.PsaDtoDat config, de.pisa.psa.ifc.PsaDtoDat event) Constructor- Parameters:
config
- configurationevent
- event
-
-
Method Details
-
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
get the PSC_GID of the config record- Returns:
- GID
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getDto
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.PscExcshould the request be handled synchronously- Returns:
- true if synchronously
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getImplementation
get the class that implements the event handler- Returns:
- class
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getKeyGid
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.PscExcget if IAM should be used for authentication- Returns:
- true if IAM is used
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getUrl
get the URL from the configuration- Returns:
- URL
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getPath
get the URL path from the configuration- Returns:
- path
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getMethod
get the request method from the configuration- Returns:
- method (POST / PUT / GET / DELETE / PATCH)
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getIAMEmail
get the email address of the IAM user- Returns:
- email address
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getIAMUserInfo
public de.pisa.psa.com.dxhub.iam.UserInfo getIAMUserInfo() throws de.pisa.psc.srv.glb.PscExcget the IAM user information- Returns:
- always null because the data 8.2 model has not the necessary fields
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getEventGid
get the PSC_GID of the event record- Returns:
- GID
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getRecordGid
get the PSC_GID of the record that was provided by the request- Returns:
- GID
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getRecordData
get the data of the record- Returns:
- data (JSON of PsaDtoDat)
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getRecordModifiedFields
get the modified fields of the record- Returns:
- old data (JSON of a map)
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getRequestPath
get the path of the request- Returns:
- path
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getRequestPathTokens
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<String,String> getRequestParameter() throws de.pisa.psc.srv.glb.PscExcget the query parameter of the request- Returns:
- multi valued string map
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getRequestBody
get the body of the request- Returns:
- path
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getRequestHeader
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.JsonProcessingExceptionget 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
get the user name to use for this request- Returns:
- name
- Throws:
de.pisa.psc.srv.glb.PscExc
-
getLanguage
get the language to use for this request- Returns:
- language
- Throws:
de.pisa.psc.srv.glb.PscExc
-
setLanguage
Override the event language- Parameters:
language
- new language
-