Package de.pisa.psa.rst.hdl
Class PsaRstApiEvtExe
java.lang.Object
de.pisa.psa.rst.hdl.PsaRstApiEvtExe
REST API: event executor
- Since:
- 10.08.2023
- Author:
- weiland
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PsaRstApiEvtHdlDat
event dataprotected String
the session user -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addEvtLogQue
(PsaRstApiEvtLogQue.Rsp response) add a response to the event logprotected void
delete the event including the logsprotected void
handleAccessException
(de.pisa.psc.srv.glb.PscExc pex, PsaRstApiEvtLogQue.Rsp que_rsp) handle an access exceptionprotected void
handleCheckException
(de.pisa.psc.srv.glb.PscExc pex, PsaRstApiEvtLogQue.Rsp que_rsp) handle a data check exceptionprotected void
handleException
(Throwable exc, PsaRstApiEvtLogQue.Rsp que_rsp) handle exceptionsprotected void
handleJsonException
(de.pisa.psc.srv.glb.PscExc pex, PsaRstApiEvtLogQue.Rsp que_rsp) handle a JSON processing exceptionprotected void
handleUnexpectedException
(Throwable exc, de.pisa.psc.srv.glb.PscExc pex, PsaRstApiEvtLogQue.Rsp que_rsp) handle an unexpected exceptionprotected boolean
isAccessException
(de.pisa.psc.srv.glb.PscExc pex) check if an exception is caused by an access checkprotected boolean
isCheckException
(de.pisa.psc.srv.glb.PscExc pex) check if an exception is caused by a data checkjavax.ws.rs.core.Response
start processing the current eventstatic void
setNoLogging
(boolean no_logging) disable the event loggingvoid
set the session user
-
Field Details
-
Data
event data -
User
the session user
-
-
Constructor Details
-
PsaRstApiEvtExe
Constructor- Parameters:
data
- event data
-
-
Method Details
-
setUser
set the session user- Parameters:
user
- user name
-
setNoLogging
public static void setNoLogging(boolean no_logging) disable the event logging- Parameters:
no_logging
- true if the logging should be disabled for this thread
-
processEvent
start processing the current event- Returns:
- the generated response
- Throws:
Exception
-
deleteEvent
delete the event including the logs- Throws:
Exception
-
handleException
handle exceptions- Parameters:
exc
- exception to handleque_rsp
- the response handler for the log- Throws:
Exception
-
isCheckException
protected boolean isCheckException(de.pisa.psc.srv.glb.PscExc pex) check if an exception is caused by a data check- Parameters:
pex
- exception to check- Returns:
- to if check exception
-
isAccessException
protected boolean isAccessException(de.pisa.psc.srv.glb.PscExc pex) check if an exception is caused by an access check- Parameters:
pex
- exception to check- Returns:
- to if access exception
-
handleJsonException
handle a JSON processing exception- Parameters:
pex
- PisaCubes exceptionque_rsp
- the response handler for the log
-
handleCheckException
handle a data check exception- Parameters:
pex
- PisaCubes exceptionque_rsp
- the response handler for the log
-
handleAccessException
protected void handleAccessException(de.pisa.psc.srv.glb.PscExc pex, PsaRstApiEvtLogQue.Rsp que_rsp) handle an access exception- Parameters:
pex
- PisaCubes exceptionque_rsp
- the response handler for the log
-
handleUnexpectedException
protected void handleUnexpectedException(Throwable exc, de.pisa.psc.srv.glb.PscExc pex, PsaRstApiEvtLogQue.Rsp que_rsp) handle an unexpected exception- Parameters:
exc
- exceptionpex
- PisaCubes exceptionque_rsp
- the response handler for the log
-
addEvtLogQue
add a response to the event log- Parameters:
response
- response
-