Remove diffutils dependency
[aai/traversal.git] / aai-traversal / src / main / java / org / onap / aai / ajsc_aai / JaxrsErrorMessageLookupService.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *    http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  *
20  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21  */
22 package org.onap.aai.ajsc_aai;
23
24 //import java.util.HashMap;
25 //import java.util.Map;
26
27 //import javax.ws.rs.GET;
28 //import javax.ws.rs.HeaderParam;
29 //import javax.ws.rs.Path;
30 //import javax.ws.rs.PathParam;
31 //import javax.ws.rs.Produces;
32
33 //import org.slf4j.Logger;
34 //import org.slf4j.LoggerFactory;
35 //import org.springframework.web.context.ContextLoader;
36 //import org.springframework.web.context.WebApplicationContext;
37
38 //import ajsc.ErrorMessageLookupService;
39
40 //@Path("/errormessage")
41 //public class JaxrsErrorMessageLookupService {
42
43         //private final static Logger logger = LoggerFactory
44                         //.getLogger(ErrorMessageLookupService.class);
45
46         //*
47          //Gets the message.
48         
49          //@param input the input
50          //@param errorCode the error code
51          //@param appId the app id
52          //@param operation the operation
53          //@param messageText the message text
54          //@param isRESTService the is REST service
55          //@param faultEntity the fault entity
56          //@param ConvID the conv ID
57          //@return the message
58         //@GET
59         //@Path("/emls")
60         //@Produces("text/plain")
61         //public String getMessage(@PathParam("input") String input,
62                         //@HeaderParam("errorCode") String errorCode,
63                         //@HeaderParam("appId") String appId,
64                         //@HeaderParam("operation") String operation,
65                         //@HeaderParam("messageText") String messageText,
66                         //@HeaderParam("isRESTService") String isRESTService,
67                         //@HeaderParam("faultEntity") String faultEntity,
68                         //@HeaderParam("ConvID") String ConvID) {
69
70                 //Map<String, String> headers = new HashMap<String, String>();
71                 //headers.put(errorCode, errorCode);
72                 //headers.put(appId, appId);
73                 //headers.put(operation, operation);
74                 //headers.put(messageText, messageText);
75                 //headers.put(isRESTService, isRESTService);
76                 //headers.put(faultEntity, faultEntity);
77                 //headers.put(ConvID, ConvID);
78                 
79                 //WebApplicationContext applicationContext = ContextLoader
80                                 //.getCurrentWebApplicationContext();
81
82                 //ErrorMessageLookupService e = (ErrorMessageLookupService) applicationContext
83                                 //.getBean("errorMessageLookupService");
84
85                 //String message = e.getExceptionDetails(appId, operation, errorCode,
86                                 //messageText,isRESTService, faultEntity, ConvID);
87
88                 //System.out.println("Error code = " + errorCode);
89                 //System.out.println("appId = " + appId);
90                 //System.out.println("operation = " + operation);
91                 //System.out.println("messageText = " + messageText);
92                 //System.out.println("isRESTService = " + isRESTService);
93                 //System.out.println("faultEntity = " + faultEntity);
94                 //System.out.println("ConvID = " + ConvID);
95                 //return "The exception message is:\n " + message;
96         //}
97
98 //}
99