From abe16d208c3a76040ff3b49f459e331dd5bd9c9f Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Mon, 22 May 2017 11:53:58 -0400 Subject: Update the ajsc to use 2.1.0 for all dependencies Add the named query jsons that was rejected due to another problem Update the necessary files to make it compatible with ajsc 2.1.0 Change-Id: I4f26e21ef69edff1003a21ead849d10c9cbb8e3a Signed-off-by: Venkata Harish K Kajur --- .../ajsc_aai/JaxrsErrorMessageLookupService.java | 128 ++++++++++----------- .../aai/dbgraphgen/ModelBasedProcessing.java | 6 +- .../aai/util/AAIAppServletContextListener.java | 40 +++---- 3 files changed, 87 insertions(+), 87 deletions(-) (limited to 'aai-traversal/src/main/java') diff --git a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java b/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java index ca78bac..04a7a09 100644 --- a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java +++ b/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java @@ -20,79 +20,79 @@ package org.openecomp.aai.ajsc_aai; -import java.util.HashMap; -import java.util.Map; +//import java.util.HashMap; +//import java.util.Map; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; +//import javax.ws.rs.GET; +//import javax.ws.rs.HeaderParam; +//import javax.ws.rs.Path; +//import javax.ws.rs.PathParam; +//import javax.ws.rs.Produces; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.context.ContextLoader; -import org.springframework.web.context.WebApplicationContext; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.web.context.ContextLoader; +//import org.springframework.web.context.WebApplicationContext; -import ajsc.ErrorMessageLookupService; +//import ajsc.ErrorMessageLookupService; -@Path("/errormessage") -public class JaxrsErrorMessageLookupService { +//@Path("/errormessage") +//public class JaxrsErrorMessageLookupService { - private final static Logger logger = LoggerFactory - .getLogger(ErrorMessageLookupService.class); + //private final static Logger logger = LoggerFactory + //.getLogger(ErrorMessageLookupService.class); - /** - * Gets the message. - * - * @param input the input - * @param errorCode the error code - * @param appId the app id - * @param operation the operation - * @param messageText the message text - * @param isRESTService the is REST service - * @param faultEntity the fault entity - * @param ConvID the conv ID - * @return the message - */ - @GET - @Path("/emls") - @Produces("text/plain") - public String getMessage(@PathParam("input") String input, - @HeaderParam("errorCode") String errorCode, - @HeaderParam("appId") String appId, - @HeaderParam("operation") String operation, - @HeaderParam("messageText") String messageText, - @HeaderParam("isRESTService") String isRESTService, - @HeaderParam("faultEntity") String faultEntity, - @HeaderParam("ConvID") String ConvID) { + //* + //Gets the message. + + //@param input the input + //@param errorCode the error code + //@param appId the app id + //@param operation the operation + //@param messageText the message text + //@param isRESTService the is REST service + //@param faultEntity the fault entity + //@param ConvID the conv ID + //@return the message + //@GET + //@Path("/emls") + //@Produces("text/plain") + //public String getMessage(@PathParam("input") String input, + //@HeaderParam("errorCode") String errorCode, + //@HeaderParam("appId") String appId, + //@HeaderParam("operation") String operation, + //@HeaderParam("messageText") String messageText, + //@HeaderParam("isRESTService") String isRESTService, + //@HeaderParam("faultEntity") String faultEntity, + //@HeaderParam("ConvID") String ConvID) { - Map headers = new HashMap(); - headers.put(errorCode, errorCode); - headers.put(appId, appId); - headers.put(operation, operation); - headers.put(messageText, messageText); - headers.put(isRESTService, isRESTService); - headers.put(faultEntity, faultEntity); - headers.put(ConvID, ConvID); + //Map headers = new HashMap(); + //headers.put(errorCode, errorCode); + //headers.put(appId, appId); + //headers.put(operation, operation); + //headers.put(messageText, messageText); + //headers.put(isRESTService, isRESTService); + //headers.put(faultEntity, faultEntity); + //headers.put(ConvID, ConvID); - WebApplicationContext applicationContext = ContextLoader - .getCurrentWebApplicationContext(); + //WebApplicationContext applicationContext = ContextLoader + //.getCurrentWebApplicationContext(); - ErrorMessageLookupService e = (ErrorMessageLookupService) applicationContext - .getBean("errorMessageLookupService"); + //ErrorMessageLookupService e = (ErrorMessageLookupService) applicationContext + //.getBean("errorMessageLookupService"); - String message = e.getExceptionDetails(appId, operation, errorCode, - messageText,isRESTService, faultEntity, ConvID); + //String message = e.getExceptionDetails(appId, operation, errorCode, + //messageText,isRESTService, faultEntity, ConvID); - System.out.println("Error code = " + errorCode); - System.out.println("appId = " + appId); - System.out.println("operation = " + operation); - System.out.println("messageText = " + messageText); - System.out.println("isRESTService = " + isRESTService); - System.out.println("faultEntity = " + faultEntity); - System.out.println("ConvID = " + ConvID); - return "The exception message is:\n " + message; - } + //System.out.println("Error code = " + errorCode); + //System.out.println("appId = " + appId); + //System.out.println("operation = " + operation); + //System.out.println("messageText = " + messageText); + //System.out.println("isRESTService = " + isRESTService); + //System.out.println("faultEntity = " + faultEntity); + //System.out.println("ConvID = " + ConvID); + //return "The exception message is:\n " + message; + //} + +//} -} diff --git a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java b/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java index f51e67b..6d9a277 100644 --- a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java +++ b/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java @@ -2140,7 +2140,7 @@ public class ModelBasedProcessing{ // processing for how we join to that model and will not try to go any "deeper". List linkagePtList = new ArrayList<>(); Iterator > vpI = thisLevelElemVtx.properties("linkage-points"); - //DEBUG -- AAI-8002 + // I am not sure why, but since "linkage-points" is an xml-element-wrapper in the OXM definition, // we get back the whole array of Strings in one String - but still use the "vtx.properties()" to // get it - but only look at the first thing returned by the iterator. @@ -2505,7 +2505,7 @@ public class ModelBasedProcessing{ List linkagePtList = new ArrayList (); Iterator > vpI = elVert.properties("linkage-points"); - //DEBUG -- AAI-8002 + // I am not sure why, but since "linkage-points" is an xml-element-wrapper in the OXM definition, // we get back the whole array of Strings in one String - but still use the "vtx.properties()" to // get it - but only look at the first thing returned by the iterator. @@ -2624,7 +2624,7 @@ public class ModelBasedProcessing{ // but that after that, we connect to a p-interface followed by a pserver. // It might have been more clear to define it in the other direction, but for now, that is it. (16-07) String linkagePointStr = linkagePointStrVal; - // --- DEBUG For AAI-8002 + // We are getting these with more than linkage thing in one string. // Ie. "pserver|lag-interface|l-interface, pserver|p-interface|l-interface, vlan|l-interface" linkagePointStr = linkagePointStr.replace("[", ""); diff --git a/aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java b/aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java index 97b7edb..8c5a4aa 100644 --- a/aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java +++ b/aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java @@ -25,7 +25,7 @@ import java.io.IOException; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; -import org.apache.activemq.broker.BrokerService; +//import org.apache.activemq.broker.BrokerService; import org.openecomp.aai.dbmap.AAIGraph; import org.openecomp.aai.exceptions.AAIException; @@ -38,7 +38,7 @@ public class AAIAppServletContextListener implements ServletContextListener { private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(AAIAppServletContextListener.class.getName()); - private BrokerService broker = new BrokerService(); + //private BrokerService broker = new BrokerService(); /** * Destroys Context @@ -50,12 +50,12 @@ public class AAIAppServletContextListener implements ServletContextListener { AAIGraph.getInstance().graphShutdown(); LOGGER.info("AAIGraph shutdown"); - try { - broker.stop(); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + //try { + ////broker.stop(); + //} catch (Exception e) { + //// TODO Auto-generated catch block + //e.printStackTrace(); + //} } /** @@ -80,25 +80,25 @@ public class AAIAppServletContextListener implements ServletContextListener { ModelInjestor.getInstance(); // Jsm internal broker for aai events - broker = new BrokerService(); - broker.addConnector("tcp://localhost:61446"); - broker.setPersistent(false); - broker.setUseJmx(false); - broker.setSchedulerSupport(false); - broker.start(); - - LOGGER.info("A&AI Server initialization succcessful."); + //broker = new BrokerService(); + //broker.addConnector("tcp://localhost:61446"); + //broker.setPersistent(false); + //broker.setUseJmx(false); + //broker.setSchedulerSupport(false); + //broker.start(); + + LOGGER.info("AAI Server initialization succcessful."); System.setProperty("org.openecomp.aai.serverStarted", "true"); } catch (AAIException e) { ErrorLogHelper.logException(e); - throw new RuntimeException("AAIException caught while initializing A&AI server", e); + throw new RuntimeException("AAIException caught while initializing AAI server", e); } catch (IOException e) { ErrorLogHelper.logError("AAI_4000", e.getMessage()); - throw new RuntimeException("IOException caught while initializing A&AI server", e); + throw new RuntimeException("IOException caught while initializing AAI server", e); } catch (Exception e) { - LOGGER.error("Unknown failure while initializing A&AI Server", e); - throw new RuntimeException("Unknown failure while initializing A&AI server", e); + LOGGER.error("Unknown failure while initializing AAI Server", e); + throw new RuntimeException("Unknown failure while initializing AAI server", e); } } } -- cgit 1.2.3-korg