Package rst.svc
Class IplWsvPsaRstApiSvc
java.lang.Object
de.pisa.psa.rst.svc.PsaRstApiSvcBas
rst.svc.IplWsvPsaRstApiSvc
PSA_RST_API_SVC
-
Field Summary
Fields inherited from class de.pisa.psa.rst.svc.PsaRstApiSvcBas
COOKIE_JRAUTH, IAM_Key, IAM_Service, IAM_User_Info, Request, User
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
getCompanies
(String gid, String user, String language) Get a company recordjavax.ws.rs.core.Response
getDocuments
(String gid, String user, String language) get a documentjavax.ws.rs.core.Response
getDocumentsBlob
(String gid, String user) get the BLOB of a document as binary datajavax.ws.rs.core.Response
getMyContact
(String language) get the contact data of the current contact (identified by IAM)javax.ws.rs.core.Response
getPersons
(String gid, String user, String language) Get a person recordjavax.ws.rs.core.Response
getPhonenumbers
(String number) Search contacts by the phone numberjavax.ws.rs.core.Response
get the server versionjavax.ws.rs.core.Response
postCompanies
(String json, String user, String language) Create a new companyjavax.ws.rs.core.Response
postDocuments
(String json, String user, String language) create a new documentjavax.ws.rs.core.Response
postEurekaCompanies
(String json, String user, String language) EUREKA search for companiesjavax.ws.rs.core.Response
postMessages
(String json, String user, String language) create an internal messagejavax.ws.rs.core.Response
postSearchCompanies
(String json, String user, String language) Search multiple companiesjavax.ws.rs.core.Response
postSearchDocuments
(String json, String user, String language) search documentsjavax.ws.rs.core.Response
putAddresses
(String json, String gid, String user, String language) update an addressjavax.ws.rs.core.Response
putCompanies
(String json, String gid, String user, String language) update a companyMethods inherited from class de.pisa.psa.rst.svc.PsaRstApiSvcBas
createEvent, getAuthorizationHeader, getData, getIAMUserInfo, getIAMUserInfo, getLanguageFromRequest, getRequestCookie, getRequestHeader, getRequestHeaders, getRequestLanguages, getRequestMethod, getRequestPath, getRequestQuery, handleRequest, initialize, isSynchronous, loadConfiguration, newSsn, processEvent, setConfig, setEvent, validateIAM, validateKey
-
Constructor Details
-
IplWsvPsaRstApiSvc
public IplWsvPsaRstApiSvc()
-
-
Method Details
-
getCompanies
@GET @Path("companies/{id}") @Produces("application/json") public javax.ws.rs.core.Response getCompanies(@PathParam("id") String gid, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception Get a company record- Parameters:
gid
- PSC_GID of the companyuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- response with the company data
- Throws:
Exception
-
getPersons
@GET @Path("persons/{id}") @Produces("application/json") public javax.ws.rs.core.Response getPersons(@PathParam("id") String gid, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception Get a person record- Parameters:
gid
- PSC_GID of the personuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- response with the person data
- Throws:
Exception
-
postSearchCompanies
@POST @Path("search-companies") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postSearchCompanies(String json, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception Search multiple companies- Parameters:
json
- query in JSON formatuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- response with the companies
- Throws:
Exception
-
postEurekaCompanies
@POST @Path("eureka-companies") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postEurekaCompanies(String json, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception EUREKA search for companies- Parameters:
json
- query in JSON formatuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- response with the companies
- Throws:
Exception
-
postCompanies
@POST @Path("companies") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postCompanies(String json, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception Create a new company- Parameters:
json
- company datauser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- the created company
- Throws:
Exception
-
putCompanies
@PUT @Path("companies/{id}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response putCompanies(String json, @PathParam("id") String gid, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception update a company- Parameters:
json
- company datagid
- PSC_GID of the companyuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- the created company
- Throws:
Exception
-
putAddresses
@PUT @Path("addresses/{id}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response putAddresses(String json, @PathParam("id") String gid, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception update an address- Parameters:
json
- address datagid
- PSC_GID of the addressuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- updated address
- Throws:
Exception
-
getMyContact
@GET @Path("my/contact") @Produces("application/json") public javax.ws.rs.core.Response getMyContact(@QueryParam("language") String language) throws Exception get the contact data of the current contact (identified by IAM)- Parameters:
language
- the data language (e.g. GER / ENG)- Returns:
- contact data
- Throws:
Exception
-
getDocuments
@GET @Path("documents/{id}") @Produces("application/json") public javax.ws.rs.core.Response getDocuments(@PathParam("id") String gid, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception get a document- Parameters:
gid
- PSC_GID of the documentuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- response with the document data
- Throws:
Exception
-
getDocumentsBlob
@GET @Path("documents/blob/{id}") @Produces("application/octet-stream") public javax.ws.rs.core.Response getDocumentsBlob(@PathParam("id") String gid, @QueryParam("user") String user) throws Exception get the BLOB of a document as binary data- Parameters:
gid
- PSC_GID of the documentuser
- the user name to run the request with- Returns:
- binary data
- Throws:
Exception
-
postSearchDocuments
@POST @Path("search-documents") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postSearchDocuments(String json, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception search documents- Parameters:
json
- query in JSON formatuser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- response with the documents
- Throws:
Exception
-
postDocuments
@POST @Path("documents") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postDocuments(String json, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception create a new document- Parameters:
json
- document datauser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- response with the new document data
- Throws:
Exception
-
postMessages
@POST @Path("messages") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postMessages(String json, @QueryParam("user") String user, @QueryParam("language") String language) throws Exception create an internal message- Parameters:
json
- message datauser
- the user name to run the request withlanguage
- the data language (e.g. GER / ENG)- Returns:
- status code
- Throws:
Exception
-
getVersion
@GET @Path("version") @Produces("application/json") public javax.ws.rs.core.Response getVersion() throws Exceptionget the server version- Returns:
- version JSON
- Throws:
Exception
-
getPhonenumbers
@GET @Path("phonenumbers/{number}") @Produces("application/json") public javax.ws.rs.core.Response getPhonenumbers(@PathParam("number") String number) throws Exception Search contacts by the phone number- Parameters:
number
- the number to search- Returns:
- list of contacts
- Throws:
Exception
-