Package rst.svc
Class IplWsvPsaRstApiSvc
- java.lang.Object
-
- de.pisa.psa.rst.svc.PsaRstApiSvcBas
-
- rst.svc.IplWsvPsaRstApiSvc
-
@Path("api") public class IplWsvPsaRstApiSvc extends PsaRstApiSvcBas
PSA_RST_API_SVC
-
-
Field Summary
-
Fields inherited from class de.pisa.psa.rst.svc.PsaRstApiSvcBas
COOKIE_JRAUTH, IAM_Key, IAM_Service, Request, User
-
-
Constructor Summary
Constructors Constructor Description IplWsvPsaRstApiSvc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
getCompanies(java.lang.String gid, java.lang.String user, java.lang.String language)
Get a company recordjavax.ws.rs.core.Response
getDocuments(java.lang.String gid, java.lang.String user, java.lang.String language)
get a documentjavax.ws.rs.core.Response
getDocumentsBlob(java.lang.String gid, java.lang.String user)
get the BLOB of a document as binary datajavax.ws.rs.core.Response
getMyContact(java.lang.String language)
get the contact data of the current contact (identified by IAM)javax.ws.rs.core.Response
getPersons(java.lang.String gid, java.lang.String user, java.lang.String language)
Get a person recordjavax.ws.rs.core.Response
getVersion()
get the server versionjavax.ws.rs.core.Response
postCompanies(java.lang.String json, java.lang.String user, java.lang.String language)
Create a new companyjavax.ws.rs.core.Response
postDocuments(java.lang.String json, java.lang.String user, java.lang.String language)
create a new documentjavax.ws.rs.core.Response
postEurekaCompanies(java.lang.String json, java.lang.String user, java.lang.String language)
EUREKA search for companiesjavax.ws.rs.core.Response
postMessages(java.lang.String json, java.lang.String user, java.lang.String language)
create an internal messagejavax.ws.rs.core.Response
postSearchCompanies(java.lang.String json, java.lang.String user, java.lang.String language)
Search multiple companiesjavax.ws.rs.core.Response
postSearchDocuments(java.lang.String json, java.lang.String user, java.lang.String language)
search documentsjavax.ws.rs.core.Response
putAddresses(java.lang.String json, java.lang.String gid, java.lang.String user, java.lang.String language)
update an addressjavax.ws.rs.core.Response
putCompanies(java.lang.String json, java.lang.String gid, java.lang.String user, java.lang.String language)
update a company-
Methods 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
-
-
-
-
Method Detail
-
getCompanies
@GET @Path("companies/{id}") @Produces("application/json") public javax.ws.rs.core.Response getCompanies(@PathParam("id") java.lang.String gid, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
getPersons
@GET @Path("persons/{id}") @Produces("application/json") public javax.ws.rs.core.Response getPersons(@PathParam("id") java.lang.String gid, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
postSearchCompanies
@POST @Path("search-companies") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postSearchCompanies(java.lang.String json, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
postEurekaCompanies
@POST @Path("eureka-companies") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postEurekaCompanies(java.lang.String json, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
postCompanies
@POST @Path("companies") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postCompanies(java.lang.String json, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
putCompanies
@PUT @Path("companies/{id}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response putCompanies(java.lang.String json, @PathParam("id") java.lang.String gid, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
putAddresses
@PUT @Path("addresses/{id}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response putAddresses(java.lang.String json, @PathParam("id") java.lang.String gid, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
getMyContact
@GET @Path("my/contact") @Produces("application/json") public javax.ws.rs.core.Response getMyContact(@QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
getDocuments
@GET @Path("documents/{id}") @Produces("application/json") public javax.ws.rs.core.Response getDocuments(@PathParam("id") java.lang.String gid, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
getDocumentsBlob
@GET @Path("documents/blob/{id}") @Produces("application/octet-stream") public javax.ws.rs.core.Response getDocumentsBlob(@PathParam("id") java.lang.String gid, @QueryParam("user") java.lang.String user) throws java.lang.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:
java.lang.Exception
-
postSearchDocuments
@POST @Path("search-documents") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postSearchDocuments(java.lang.String json, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
postDocuments
@POST @Path("documents") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postDocuments(java.lang.String json, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
postMessages
@POST @Path("messages") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response postMessages(java.lang.String json, @QueryParam("user") java.lang.String user, @QueryParam("language") java.lang.String language) throws java.lang.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:
java.lang.Exception
-
getVersion
@GET @Path("version") @Produces("application/json") public javax.ws.rs.core.Response getVersion() throws java.lang.Exception
get the server version- Returns:
- version JSON
- Throws:
java.lang.Exception
-
-