Rework of the unit tests (mainly IT)
[clamp.git] / src / main / java / org / onap / clamp / clds / service / rs / JaxrsLogService.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP CLAMP
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights
6  *                             reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License"); 
9  * you may not use this file except in compliance with the License. 
10  * You may obtain a copy of the License at
11  * 
12  * http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software 
15  * distributed under the License is distributed on an "AS IS" BASIS, 
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
17  * See the License for the specific language governing permissions and 
18  * limitations under the License.
19  * ============LICENSE_END============================================
20  * ===================================================================
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23
24 package org.onap.clamp.clds.service.rs;
25
26 import io.swagger.annotations.Api;
27
28 import javax.ws.rs.*;
29 import javax.ws.rs.core.MediaType;
30
31
32 /**
33  * Service to invoke example Camunda process.
34  * <p>
35  * Try testing by using:
36  * http://[hostname]:[serverPort]/jaxrsservices/log/log-message/your-message-here
37  */
38 @Api(value = "/log")
39 @Path("/log")
40 @Produces({MediaType.TEXT_PLAIN})
41 public interface JaxrsLogService {
42
43     /**
44      * REST service that executes example camunda process to log input message.
45      *
46      * @param logMessageText
47      * @return output from service - comment on what was done
48      */
49     @GET
50     @Path("/log-message/{logMessageText}")
51     @Produces(MediaType.TEXT_PLAIN)
52     String logMessage(@PathParam("logMessageText") String logMessageText, @QueryParam("javamail") String javamail, @QueryParam("springmail") String springmail, @QueryParam("commonsmail") String commonsmail);
53
54     /**
55      * REST service that executes example camunda process to log input message.
56      *
57      * @return output from service - comment on what was done
58      */
59     @POST
60     @Path("/postLogHist")
61     @Produces(MediaType.TEXT_PLAIN)
62     @Consumes(MediaType.APPLICATION_JSON)
63     String postLogMessage(String histEventList);
64
65     /**
66      * REST service that executes example camunda process to log input message.
67      *
68      * @param startTime
69      * @param endTime
70      * @param serviceName
71      * @return output from service - comment on what was done
72      */
73     @GET
74     @Path("/createLog/{startTime}/{endTime}/{serviceName}")
75     @Produces(MediaType.TEXT_PLAIN)
76     String createLogMessage(@PathParam("startTime") String startTime, @PathParam("endTime") String endTime, @PathParam("serviceName") String serviceName);
77
78     /**
79      * REST service that executes example camunda process to log input message.
80      *
81      * @param procInstId
82      * @param histEventList
83      * @return output from service - comment on what was done
84      */
85     @GET
86     @Path("/createLogHist/{procInstId}/{histEventList}")
87     @Produces(MediaType.TEXT_PLAIN)
88     String createLogMessageUsingHistory(@PathParam("procInstId") String procInstId, @PathParam("histEventList") String histEventList);
89
90     /**
91      * REST service that executes example camunda process to log input message.
92      *
93      * @param procInstId
94      * @return output from service - comment on what was done
95      */
96     @GET
97     @Path("/histLog/{procInstId}")
98     @Produces(MediaType.TEXT_PLAIN)
99     String CreateHistLog(@PathParam("procInstId") String procInstId);
100
101 }