Package de.pisa.psa.rst.hdl.out
Class PsaRstApiEvtHdlOut
- java.lang.Object
-
- de.pisa.psa.rst.hdl.PsaRstApiEvtHdl
-
- de.pisa.psa.rst.hdl.out.PsaRstApiEvtHdlOut
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
PsaRstApiEvtHdlOutDelete
,PsaRstApiEvtHdlOutGet
,PsaRstApiEvtHdlOutPatch
,PsaRstApiEvtHdlOutPost
,PsaRstApiEvtHdlOutPut
public abstract class PsaRstApiEvtHdlOut extends PsaRstApiEvtHdl
REST API: outgoing event handler- Since:
- 07.08.2023
- Author:
- weiland
-
-
Field Summary
-
Fields inherited from class de.pisa.psa.rst.hdl.PsaRstApiEvtHdl
Default_External_Language, Default_User, Force_IAM_User, Max_Records
-
-
Constructor Summary
Constructors Constructor Description PsaRstApiEvtHdlOut(PsaRstApiEvtHdlDat data)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.client.Entity<?>
getEntity(java.lang.Object entity, javax.ws.rs.core.MediaType type)
get an entityjava.lang.String
getIAMKey()
set the key for the IAM propertiesjava.lang.String
getRequestBody()
get the request bodyjava.lang.String
getRequestHeader()
get the request headerjava.lang.String
getRequestPath()
get the request pathprotected de.pisa.psc.srv.rst.PscRstCli
newRestClient(java.lang.String url)
create a new REST clientprotected javax.ws.rs.core.Response
sendDeleteRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type)
send a DELETE requestprotected javax.ws.rs.core.Response
sendGetRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type)
send a GET requestprotected javax.ws.rs.core.Response
sendPatchRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type)
send a PATCH requestprotected javax.ws.rs.core.Response
sendPostRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type)
send a POST requestprotected javax.ws.rs.core.Response
sendPutRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type)
send a PUT requestjavax.ws.rs.core.Response
sendRequest(java.lang.Object entity, javax.ws.rs.core.MediaType type)
send a REST requestjavax.ws.rs.core.Response
sendRequest(javax.ws.rs.core.Response record)
send a REST requestprotected void
setAuthorization(de.pisa.psc.srv.rst.PscRstCli client)
set the authorization for the REST clientvoid
setIAMKey(java.lang.String key)
get the key for the IAM propertiesvoid
setRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity)
set the request datavoid
setRequestBody(java.lang.Object body)
set the request bodyvoid
setRequestHeader(java.lang.String header)
set the request headervoid
setRequestPath(java.lang.String path)
set the request path-
Methods inherited from class de.pisa.psa.rst.hdl.PsaRstApiEvtHdl
buildResponse, cloneRecords, close, fetchContact, fetchEureka, fetchEurekaRecords, fetchIAMContact, fetchRecord, fetchRecord, fetchRecords, findEmail, getActiveEventHandler, getContinuation, getData, getEurekaDtoQuery, getExternalCommunicationLanguage, getFetchRecordKeyField, getField, getIAMUser, getJsonIncludeEmpty, getQuery, getSsn, getSsnUsr, getSysSsn, handleEvent, isIAMUser, loadRecord, newDto, newObject, newPsaRstApiObjLis, noEventLogging, queryEureka, queryEurekaRecords, queryRecord, queryRecords, setActiveEventHandler, setExternalLanguage, setJsonIncludeEmpty, toJson
-
-
-
-
Constructor Detail
-
PsaRstApiEvtHdlOut
public PsaRstApiEvtHdlOut(PsaRstApiEvtHdlDat data)
Constructor- Parameters:
data
- event data
-
-
Method Detail
-
setRequest
public void setRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity)
set the request data- Parameters:
client
- REST cliententity
- payload entity
-
setRequestPath
public void setRequestPath(java.lang.String path)
set the request path- Parameters:
path
- path
-
getRequestPath
public java.lang.String getRequestPath()
get the request path- Returns:
- path
-
setRequestBody
public void setRequestBody(java.lang.Object body)
set the request body- Parameters:
body
- body
-
getRequestBody
public java.lang.String getRequestBody()
get the request body- Returns:
- body
-
setRequestHeader
public void setRequestHeader(java.lang.String header)
set the request header- Parameters:
header
- header
-
getRequestHeader
public java.lang.String getRequestHeader()
get the request header- Returns:
- header
-
setIAMKey
public void setIAMKey(java.lang.String key)
get the key for the IAM properties- Parameters:
key
- key
-
getIAMKey
public java.lang.String getIAMKey()
set the key for the IAM properties- Returns:
- key
-
sendRequest
public javax.ws.rs.core.Response sendRequest(javax.ws.rs.core.Response record) throws java.lang.Exception
send a REST request- Parameters:
record
- record data to send- Returns:
- response of the called end point
- Throws:
java.lang.Exception
-
newRestClient
protected de.pisa.psc.srv.rst.PscRstCli newRestClient(java.lang.String url) throws java.net.URISyntaxException
create a new REST client- Parameters:
url
- target URL- Returns:
- client
- Throws:
java.net.URISyntaxException
-
sendRequest
public javax.ws.rs.core.Response sendRequest(java.lang.Object entity, javax.ws.rs.core.MediaType type) throws java.lang.Exception
send a REST request- Parameters:
entity
- payload entitytype
- media type of the entity- Returns:
- response of the called end point
- Throws:
java.lang.Exception
-
setAuthorization
protected void setAuthorization(de.pisa.psc.srv.rst.PscRstCli client) throws java.lang.Exception
set the authorization for the REST client- Parameters:
client
- REST client- Throws:
java.lang.Exception
-
getEntity
protected javax.ws.rs.client.Entity<?> getEntity(java.lang.Object entity, javax.ws.rs.core.MediaType type)
get an entity- Parameters:
entity
- entity objecttype
- type of the entity- Returns:
- entity
-
sendPostRequest
protected javax.ws.rs.core.Response sendPostRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type) throws java.lang.Exception
send a POST request- Parameters:
client
- REST cliententity
- payload entitytype
- media type of the entity- Returns:
- response of the called end point
- Throws:
java.lang.Exception
-
sendPutRequest
protected javax.ws.rs.core.Response sendPutRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type) throws java.lang.Exception
send a PUT request- Parameters:
client
- REST cliententity
- payload entitytype
- media type of the entity- Returns:
- response of the called end point
- Throws:
java.lang.Exception
-
sendPatchRequest
protected javax.ws.rs.core.Response sendPatchRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type) throws java.lang.Exception
send a PATCH request- Parameters:
client
- REST cliententity
- payload entitytype
- media type of the entity- Returns:
- response of the called end point
- Throws:
java.lang.Exception
-
sendGetRequest
protected javax.ws.rs.core.Response sendGetRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type) throws java.lang.Exception
send a GET request- Parameters:
client
- REST cliententity
- payload entitytype
- media type of the entity- Returns:
- response of the called end point
- Throws:
java.lang.Exception
-
sendDeleteRequest
protected javax.ws.rs.core.Response sendDeleteRequest(de.pisa.psc.srv.rst.PscRstCli client, java.lang.Object entity, javax.ws.rs.core.MediaType type) throws java.lang.Exception
send a DELETE request- Parameters:
client
- REST cliententity
- payload entitytype
- media type of the entity- Returns:
- response of the called end point
- Throws:
java.lang.Exception
-
-