summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/conf/jaxrsBeans.groovy11
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/docs/README.txt1
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/lib/README.txt1
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/props/module.props1
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/routes/aaiResources.route4
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/routes/crud.route4
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/routes/helloWorld.route4
-rw-r--r--src/main/ajsc/crud-api_v1/crud-api/v1/routes/jaxrsExample.route5
-rw-r--r--src/main/assemble/ajsc_module_assembly.xml69
-rw-r--r--src/main/assemble/ajsc_props_assembly.xml26
-rw-r--r--src/main/assemble/ajsc_runtime_assembly.xml47
-rw-r--r--src/main/bin/start.sh56
-rw-r--r--src/main/config/ajsc-jetty.xml114
-rw-r--r--src/main/config/ajsc-override-web.xml53
-rw-r--r--src/main/config/ajscJetty.jksbin3736 -> 0 bytes
-rw-r--r--src/main/config/jul-redirect.properties13
-rw-r--r--src/main/config/keyfile27
-rw-r--r--src/main/config/runner-web.xml97
-rw-r--r--src/main/docker/Dockerfile2
-rw-r--r--src/main/java/org/onap/crud/CrudApplication.java46
-rw-r--r--src/main/java/org/onap/crud/config/JerseyConfig.java39
-rw-r--r--src/main/java/org/onap/crud/event/envelope/GraphEventEnvelope.java11
-rw-r--r--src/main/java/org/onap/crud/event/envelope/GraphEventHeader.java11
-rw-r--r--src/main/java/org/onap/crud/event/response/GraphEventResponseHandler.java11
-rw-r--r--src/main/java/org/onap/crud/event/response/GraphEventResponseMessage.java11
-rw-r--r--src/main/java/org/onap/crud/service/CrudRestService.java30
-rw-r--r--src/main/java/org/onap/crud/service/JaxrsEchoService.java11
-rw-r--r--src/main/resources/application.properties10
-rw-r--r--src/main/resources/logback.xml214
-rw-r--r--src/main/runtime/context/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.context1
-rw-r--r--src/main/runtime/context/default#0.context1
-rw-r--r--src/main/runtime/deploymentPackage/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.json1
-rw-r--r--src/main/runtime/shiroRole/ajscadmin.json1
-rw-r--r--src/main/runtime/shiroRole/contextadmin#__module.ajsc.namespace.name__.json1
-rw-r--r--src/main/runtime/shiroRole/contextadmin#default.json1
-rw-r--r--src/main/runtime/shiroUser/ajsc.json1
-rw-r--r--src/main/runtime/shiroUserRole/ajsc#ajscadmin.json1
-rw-r--r--src/main/runtime/shiroUserRole/ajsc#contextadmin#__module.ajsc.namespace.name__.json1
-rw-r--r--src/main/runtime/shiroUserRole/ajsc#contextadmin#default.json1
39 files changed, 358 insertions, 581 deletions
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/conf/jaxrsBeans.groovy b/src/main/ajsc/crud-api_v1/crud-api/v1/conf/jaxrsBeans.groovy
deleted file mode 100644
index 8ad9391..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/conf/jaxrsBeans.groovy
+++ /dev/null
@@ -1,11 +0,0 @@
-beans{
- xmlns cxf: "http://camel.apache.org/schema/cxf"
- xmlns jaxrs: "http://cxf.apache.org/jaxrs"
- xmlns util: "http://www.springframework.org/schema/util"
-
- echoService(org.onap.crud.service.JaxrsEchoService)
-
- util.list(id: 'jaxrsServices') {
- ref(bean:'echoService')
- }
-} \ No newline at end of file
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/docs/README.txt b/src/main/ajsc/crud-api_v1/crud-api/v1/docs/README.txt
deleted file mode 100644
index 3707179..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/docs/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-Place any docs here that you want to access within the ajsc upon deployment of your service.
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/lib/README.txt b/src/main/ajsc/crud-api_v1/crud-api/v1/lib/README.txt
deleted file mode 100644
index 639e21b..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/lib/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-3rd party JAR's needed by your jars (if any) for a ajsc deployment package go here... \ No newline at end of file
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/props/module.props b/src/main/ajsc/crud-api_v1/crud-api/v1/props/module.props
deleted file mode 100644
index 17ebc08..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/props/module.props
+++ /dev/null
@@ -1 +0,0 @@
-EXAMPLE.PROPERTY=EXAMLE_VALUE \ No newline at end of file
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/aaiResources.route b/src/main/ajsc/crud-api_v1/crud-api/v1/routes/aaiResources.route
deleted file mode 100644
index 4cc0182..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/aaiResources.route
+++ /dev/null
@@ -1,4 +0,0 @@
-<route xmlns="http://camel.apache.org/schema/spring" trace="true">
- <from uri="att-dme2-servlet:///resources?matchOnUriPrefix=true" />
- <to uri="cxfbean:aaiResourceService" />
-</route> \ No newline at end of file
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/crud.route b/src/main/ajsc/crud-api_v1/crud-api/v1/routes/crud.route
deleted file mode 100644
index 65420a3..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/crud.route
+++ /dev/null
@@ -1,4 +0,0 @@
-<route xmlns="http://camel.apache.org/schema/spring" trace="true">
- <from uri="att-dme2-servlet:///inventory?matchOnUriPrefix=true" />
- <to uri="cxfbean:crudRestService" />
-</route> \ No newline at end of file
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/helloWorld.route b/src/main/ajsc/crud-api_v1/crud-api/v1/routes/helloWorld.route
deleted file mode 100644
index bc3e178..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/helloWorld.route
+++ /dev/null
@@ -1,4 +0,0 @@
-<route xmlns="http://camel.apache.org/schema/spring" trace="true">
- <from uri="restlet:/__module_ajsc_namespace_name__/__module_ajsc_namespace_version__/helloWorld"/>
- <to uri="bean:helloWorld?method=speak"/>
-</route> \ No newline at end of file
diff --git a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/jaxrsExample.route b/src/main/ajsc/crud-api_v1/crud-api/v1/routes/jaxrsExample.route
deleted file mode 100644
index 5158e4f..0000000
--- a/src/main/ajsc/crud-api_v1/crud-api/v1/routes/jaxrsExample.route
+++ /dev/null
@@ -1,5 +0,0 @@
-<route xmlns="http://camel.apache.org/schema/spring" trace="true">
- <from uri="att-dme2-servlet:///__module_ajsc_namespace_name__/__module_ajsc_namespace_version__/echo-service/?matchOnUriPrefix=true" />
- <to uri="cxfbean:jaxrsServices" />
-</route>
-
diff --git a/src/main/assemble/ajsc_module_assembly.xml b/src/main/assemble/ajsc_module_assembly.xml
deleted file mode 100644
index 359f792..0000000
--- a/src/main/assemble/ajsc_module_assembly.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<!--
- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
--->
-<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>${version}</id>
- <includeBaseDirectory>false</includeBaseDirectory>
- <formats>
- <format>zip</format>
- </formats>
- <fileSets>
- <fileSet>
- <directory>${project.basedir}/target/versioned-ajsc/routes/</directory>
- <outputDirectory>${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/routes/</outputDirectory>
- <includes>
- <include>*.route</include>
- </includes>
-
- </fileSet>
-
- <fileSet>
- <directory>${project.basedir}/target/versioned-ajsc/docs/</directory>
- <outputDirectory>${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/docs/</outputDirectory>
- <includes>
- <include>*.*</include>
- <!-- <include>*.vm</include> -->
- </includes>
-
- </fileSet>
-
- <fileSet>
- <directory>${project.basedir}/target/versioned-ajsc/lib/</directory>
- <outputDirectory>${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/lib/</outputDirectory>
- <includes>
- <include>*.jar</include>
- </includes>
-
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/target/versioned-ajsc/extJars/</directory>
- <outputDirectory>${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/extJars/</outputDirectory>
- <includes>
- <include>*.jar</include>
- </includes>
- </fileSet>
-
- <!-- also try to grab outputs from the "jar" plugin's package phase -->
- <fileSet>
- <directory>${project.basedir}/target/</directory>
- <outputDirectory>${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/lib/</outputDirectory>
- <includes>
- <include>*.jar</include>
- </includes>
- </fileSet>
-
- <fileSet>
- <directory>${project.basedir}/target/versioned-ajsc/conf/</directory>
- <outputDirectory>${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/conf/</outputDirectory>
- <includes>
- <include>*.*</include>
- </includes>
-
- </fileSet>
- </fileSets>
-
-</assembly>
-
diff --git a/src/main/assemble/ajsc_props_assembly.xml b/src/main/assemble/ajsc_props_assembly.xml
deleted file mode 100644
index 6ee4093..0000000
--- a/src/main/assemble/ajsc_props_assembly.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
--->
-<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>${version}_properties</id>
- <includeBaseDirectory>false</includeBaseDirectory>
- <formats>
- <format>zip</format>
- </formats>
- <fileSets>
- <fileSet>
- <directory>${project.basedir}/target/versioned-ajsc/props</directory>
- <outputDirectory>${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/props/</outputDirectory>
- <includes>
- <include>*.props</include>
- </includes>
-
- </fileSet>
-
- </fileSets>
-
-</assembly>
-
diff --git a/src/main/assemble/ajsc_runtime_assembly.xml b/src/main/assemble/ajsc_runtime_assembly.xml
deleted file mode 100644
index c86d265..0000000
--- a/src/main/assemble/ajsc_runtime_assembly.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
--->
-<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>runtimeEnvironment</id>
- <includeBaseDirectory>false</includeBaseDirectory>
- <formats>
- <format>zip</format>
- </formats>
- <fileSets>
- <fileSet>
- <directory>${project.basedir}/target/versioned-runtime/context/</directory>
- <outputDirectory>runtime/context/</outputDirectory>
- <includes>
- <include>*.context</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/target/versioned-runtime/serviceProperties/</directory>
- <outputDirectory>runtime/serviceProperties/</outputDirectory>
- <includes>
- <include>*.props</include>
- </includes>
- </fileSet><fileSet>
- <directory>${project.basedir}/target/versioned-runtime/shiroRole</directory>
- <outputDirectory>runtime/shiroRole/</outputDirectory>
- <includes>
- <include>*.json</include>
- </includes>
- </fileSet><fileSet>
- <directory>${project.basedir}/target/versioned-runtime/shiroUser</directory>
- <outputDirectory>runtime/shiroUser/</outputDirectory>
- <includes>
- <include>*.json</include>
- </includes>
- </fileSet><fileSet>
- <directory>${project.basedir}/target/versioned-runtime/shiroUserRole</directory>
- <outputDirectory>runtime/shiroUserRole</outputDirectory>
- <includes>
- <include>*.json</include>
- </includes>
- </fileSet>
- </fileSets>
-</assembly> \ No newline at end of file
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh
index 1447175..cbd37bc 100644
--- a/src/main/bin/start.sh
+++ b/src/main/bin/start.sh
@@ -1,58 +1,26 @@
#!/bin/bash
-BASEDIR="/opt/app/crud-api/"
-AJSC_HOME="$BASEDIR"
-AJSC_CONF_HOME="$AJSC_HOME/bundleconfig/"
-
-# List of ajsc properties which are exposed for modification at deploy time
-declare -a MODIFY_PROP_LIST=("KEY_STORE_PASSWORD"
- "KEY_MANAGER_PASSWORD"
- "AJSC_JETTY_ThreadCount_MIN"
- "AJSC_JETTY_ThreadCount_MAX"
- "AJSC_JETTY_BLOCKING_QUEUE_SIZE")
-PROP_LIST_LENGTH=${#MODIFY_PROP_LIST[@]}
-
-for (( i=1; i<${PROP_LIST_LENGTH}+1; i++ ));
-do
- PROP_NAME=${MODIFY_PROP_LIST[$i-1]}
- PROP_VALUE=${!PROP_NAME}
- if [ ! -z "$PROP_VALUE" ]; then
- sed -i "s/$PROP_NAME.*$/$PROP_NAME=$PROP_VALUE/g" $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
- fi
-done
+APP_HOME="/opt/app/crud-api/"
if [ -z "$CONFIG_HOME" ]; then
echo "CONFIG_HOME must be set in order to start up process"
exit 1
fi
-# Add any spring bean configuration files to the Gizmo deployment
-if [ -n "$SERVICE_BEANS" ]; then
- echo "Adding the following dynamic service beans to the deployment: "
- mkdir -p /tmp/crud-api/v1/conf
- for f in `ls $SERVICE_BEANS`
- do
- cp $SERVICE_BEANS/$f /tmp/crud-api/v1/conf
- echo "Adding dynamic service bean $SERVICE_BEANS/$f"
- done
- jar uf /opt/app/crud-api/services/crud-api_v1.zip* -C /tmp/ crud-api
- rm -rf /tmp/crud-api
+if [ -z "$SERVICE_BEANS" ]; then
+ echo "SERVICE_BEANS must be set in order to start up process"
+ exit 1
fi
-CLASSPATH="$AJSC_HOME/lib/*"
-CLASSPATH="$CLASSPATH:$AJSC_HOME/extJars/"
-CLASSPATH="$CLASSPATH:$AJSC_HOME/etc/"
+if [ -z "$KEY_STORE_PASSWORD" ]; then
+ echo "KEY_STORE_PASSWORD must be set in order to start up process"
+ exit 1
+fi
-PROPS="-DAJSC_HOME=$AJSC_HOME"
-PROPS="$PROPS -DAJSC_CONF_HOME=$BASEDIR/bundleconfig/"
-PROPS="$PROPS -Dlogback.configurationFile=$BASEDIR/bundleconfig/etc/logback.xml"
-PROPS="$PROPS -DAJSC_SHARED_CONFIG=$AJSC_CONF_HOME"
-PROPS="$PROPS -DAJSC_SERVICE_NAMESPACE=crud-api"
-PROPS="$PROPS -DAJSC_SERVICE_VERSION=v1"
-PROPS="$PROPS -Dserver.port=9520"
+PROPS="-DAPP_HOME=$APP_HOME"
PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"
+PROPS="$PROPS -DKEY_STORE_PASSWORD=$KEY_STORE_PASSWORD"
JVM_MAX_HEAP=${MAX_HEAP:-1024}
-echo $CLASSPATH
-
-exec java -Xmx${JVM_MAX_HEAP}m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=// sslport=9520
+set -x
+exec java -Xmx${JVM_MAX_HEAP}m $PROPS -jar ${APP_HOME}/gizmo.jar
diff --git a/src/main/config/ajsc-jetty.xml b/src/main/config/ajsc-jetty.xml
deleted file mode 100644
index 4ad6fcc..0000000
--- a/src/main/config/ajsc-jetty.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
-<!-- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. -->
-<Configure id="ajsc-server" class="org.eclipse.jetty.server.Server">
- <!-- DO NOT REMOVE!!!! This is setting up the AJSC Context -->
- <New id="ajscContext" class="org.eclipse.jetty.webapp.WebAppContext">
- <Set name="contextPath"><SystemProperty name="AJSC_CONTEXT_PATH" /></Set>
- <Set name="extractWAR">true</Set>
- <Set name="tempDirectory"><SystemProperty name="AJSC_TEMP_DIR" /></Set>
- <Set name="war"><SystemProperty name="AJSC_WAR_PATH" /></Set>
- <Set name="descriptor"><SystemProperty name="AJSC_HOME" />/etc/runner-web.xml</Set>
- <Set name="overrideDescriptor"><SystemProperty name="AJSC_HOME" />/etc/ajsc-override-web.xml</Set>
- <Set name="throwUnavailableOnStartupException">true</Set>
- <Set name="servletHandler">
- <New class="org.eclipse.jetty.servlet.ServletHandler">
- <Set name="startWithUnavailable">false</Set>
- </New>
- </Set>
- <Set name="extraClasspath"><SystemProperty name="AJSC_HOME" />/extJars/gizmo.jar,<SystemProperty name="AJSC_HOME" />/extJars/json-20160212.jar,<SystemProperty name="AJSC_HOME" />/extJars/javax.ws.rs-api-2.0.1.jar,<SystemProperty name="AJSC_HOME" />/extJars/jersey-client-2.23.jar</Set>
- </New>
-
- <Set name="handler">
- <New id="Contexts"
- class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
- <Set name="Handlers">
- <Array type="org.eclipse.jetty.webapp.WebAppContext">
- <Item>
- <Ref refid="ajscContext" />
- </Item>
- </Array>
- </Set>
- </New>
- </Set>
-
- <Call name="addBean">
- <Arg>
- <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
- <Set name="contexts">
- <Ref refid="Contexts" />
- </Set>
- <Call id="extAppHotDeployProvider" name="addAppProvider">
- <Arg>
- <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
- <Set name="monitoredDirName"><SystemProperty name="AJSC_HOME" />/extApps</Set>
- <Set name="scanInterval">10</Set>
- <Set name="extractWars">true</Set>
- </New>
- </Arg>
- </Call>
- </New>
- </Arg>
- </Call>
-
- <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
- <Set name="keyStorePath">file:<SystemProperty name="CONFIG_HOME" />/auth/tomcat_keystore</Set>
- <Set name="KeyStorePassword">
- <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">
- <Arg><SystemProperty name="KEY_STORE_PASSWORD" /></Arg>
- </Call>
- </Set>
- <Set name="KeyManagerPassword">
- <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">
- <Arg><SystemProperty name="KEY_MANAGER_PASSWORD" /></Arg>
- </Call>
- </Set>
- <Set name="needClientAuth">true</Set>
- <Set name="wantClientAuth">true</Set>
- </New>
-
- <Call id="sslConnector" name="addConnector">
- <Arg>
- <New class="org.eclipse.jetty.server.ServerConnector">
- <Arg name="server">
- <Ref refid="ajsc-server" />
- </Arg>
- <Arg name="factories">
- <Array type="org.eclipse.jetty.server.ConnectionFactory">
- <Item>
- <New class="org.eclipse.jetty.server.SslConnectionFactory">
- <Arg name="next">http/1.1</Arg>
- <Arg name="sslContextFactory">
- <Ref refid="sslContextFactory" />
- </Arg>
- </New>
- </Item>
- <Item>
- <New class="org.eclipse.jetty.server.HttpConnectionFactory">
- <Arg name="config">
- <New class="org.eclipse.jetty.server.HttpConfiguration">
- <Call name="addCustomizer">
- <Arg>
- <New class="org.eclipse.jetty.server.SecureRequestCustomizer" />
- </Arg>
- </Call>
- </New>
- </Arg>
- </New>
- </Item>
- </Array>
- </Arg>
- <Set name="port"><SystemProperty name="AJSC_HTTPS_PORT" default="9520" /></Set>
- <Set name="idleTimeout">30000</Set>
- </New>
- </Arg>
- </Call>
-
- <Get name="ThreadPool">
- <Set name="minThreads"><SystemProperty name="AJSC_JETTY_ThreadCount_MIN" /></Set>
- <Set name="maxThreads"><SystemProperty name="AJSC_JETTY_ThreadCount_MAX" /></Set>
- <Set name="idleTimeout"><SystemProperty name="AJSC_JETTY_IDLETIME_MAX" /></Set>
- <Set name="detailedDump">false</Set>
- </Get>
-
-</Configure>
diff --git a/src/main/config/ajsc-override-web.xml b/src/main/config/ajsc-override-web.xml
deleted file mode 100644
index 84a7920..0000000
--- a/src/main/config/ajsc-override-web.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
--->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
- metadata-complete="false" version="3.0">
-
- <filter-mapping>
- <filter-name>InterceptorFilter</filter-name>
- <url-pattern>/services/*</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>InterceptorFilter</filter-name>
- <url-pattern>/rest/*</url-pattern>
- </filter-mapping>
-
- <filter-mapping>
- <filter-name>springSecurityFilterChain</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <servlet-mapping>
- <servlet-name>ManagementServlet</servlet-name>
- <url-pattern>/mgmt</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>RestletServlet</servlet-name>
- <url-pattern>/rest/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>CamelServlet</servlet-name>
- <url-pattern>/services/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>jsp</servlet-name>
- <url-pattern>*.jsp</url-pattern>
- <url-pattern>*.jspf</url-pattern>
- <url-pattern>*.jspx</url-pattern>
- <url-pattern>*.xsp</url-pattern>
- <url-pattern>*.JSP</url-pattern>
- <url-pattern>*.JSPF</url-pattern>
- <url-pattern>*.JSPX</url-pattern>
- <url-pattern>*.XSP</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>default</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app> \ No newline at end of file
diff --git a/src/main/config/ajscJetty.jks b/src/main/config/ajscJetty.jks
deleted file mode 100644
index 48cdbff..0000000
--- a/src/main/config/ajscJetty.jks
+++ /dev/null
Binary files differ
diff --git a/src/main/config/jul-redirect.properties b/src/main/config/jul-redirect.properties
deleted file mode 100644
index 8b6624d..0000000
--- a/src/main/config/jul-redirect.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-
-# Bridge JUL->slf4j Logging Configuration File
-#
-# This file bridges the JUL logging infrastructure into
-# SLF4J so JUL logs go to logback implementation provided
-# in this project. SLF4J also captures log4j and has
-# other framework options as well providing a common
-# logging infrastructure for capturing all logs from different
-# libraries using different frameworks in one place.
-
-# Global properties
-handlers=org.slf4j.bridge.SLF4JBridgeHandler
-.level= ALL
diff --git a/src/main/config/keyfile b/src/main/config/keyfile
deleted file mode 100644
index 882e86a..0000000
--- a/src/main/config/keyfile
+++ /dev/null
@@ -1,27 +0,0 @@
-ZuIwp0TkyVPDeX1Up-8JtkMWvjsCpoiu1_VKeWrtrvxunvAke8_tiFyHPPyb2nkhepFYj6tXzpfS
-rGz5XF_TH9NbsKaP8u0HV5clz2WriYQRvHS85vjY7hXxkpFuLb7zkLAPqTyIDpj7FiW61NzsRUAq
-TM8jH16jr7mBNnb56w24mNGOwznMPcIZKcjgZU1ekaPDFpWyhQElU7Y0q_94P_Gkk45r66Hj22sU
-OiOaaftmudZlswLw8-8Zaakqf2yW9HjMVfuYCwSodBHCW5rdB3Ctb5W36rnD_AQco3Ky2PgPmqvk
-QkJYuUHpbuDqVHqLOajlKSIGMTIqAIBg51fRaaONtD-Q5xzY8E5wO1YWTLKcP5tsNvUpzM8Wu3NS
-ynpGpUcvlTqWWsGzTbzOyamyKkdNdx97sSqjM25Zh1-ps48h6cddGYWpab7SUvqRCS11QBUyLTry
-2iwTEHMhHRIbo7PO99ALQfuq9gI1zKGfurJdvLBeBaFs5SCF0AiCZ3WcDO8Rv3HpxVZ2_ShbDxb0
-eMoO6SotXu51fj8Y3-WqsfZziQyEsHyqpg5uQ6yUtz01h5YHLEoVuotF1U4agmQR6kEkYk-wNOiZ
-v-8gaA9gtbLoAdKhuKFxQgQLNMf6GzVzZNujbmDzLoZAP_mXAv29aBPaf64Ugzv-Oa5GZdBgD-Xd
-_pahML-ionw99r0TnkpShYmDqMKhMdjaP3m87WIAZkIB-L-VTyKcEsJ4340VSzCOsv3waiM0S89u
-4cMcG5y-PLY8IoipIlLUPTWD3SjcQ9DV1Dt3T5KjdWLsj48D3W4K4e9PB8yxs0gtUjgVUR2_xEir
-G5eDO9Ac1eHFWGDFFP0SgG-TbHJUKlvy9mwLzmU0fC3xPjhqmIr-v0HxF7HN-tmb1LHDorno8tSN
-u7kUGcKSchIiFfvkd066crUb2mH7PnXTaWmAjyVj9VsBExFUYEdpHMAV4sAP9-RxZGDRt46UhrDK
-QZvvNhBVyOEjHPHWI4vl1r1v8HNH1_2jZu5DVJWyHWR56aCo1lhFH9_X6UAHUHbnXViDONZOVXlT
-9-WD0tk2zJGuwrhdZDAnPnAmjfwbwbpnr5Hmex1i1JiD7WVyP1kbfoej2TmdiYbxr9oBYaGQ29JI
-aHod7MQCLtvL1z5XgnDPLZ4y3_9SbqHKYbNa8UgZkTLF5EacGThYVFDLA9cbafHDtR1kMGE3vv4D
-EJ-0pAYTOGmKlVI7DwNyKsY9JTyudrxTqhOxi9jgcJNWiUaNe9yhL8Pyc2YBqUTTYhh_a2d1rvkZ
-0Gh1crviVxqBrIkRKaMRXZ4f1vDLz-3NvG_vwPOo8WRFo5nGmSdTw7CjBaigJ_cYCfDhoP11pEnw
-cndsZNcHs-v05LlxeIIMDD_f5Bvz-il_DLA4eK2HqgLdxh8ziSDl2azk14MJY4amzz6reEXUuKLV
-RsZGf_jbDGKhE2HuDQ5ovoLOi4OqE1oRuqh-dGxitrYouP2SN1l_1tCEMRth86FMV-6AQtZsvdUo
-y9MtQ7e35atjA8nHtgADlDTmJBKQiUHUsOZ77p1qp17HAFMovUkc739opfEYnKUn6Itpw5Ipm_Is
-ra6chJUfMpOFof5rb5OjqFAN27c_-mPo1lQU3ndYlKGh_n5V8ufX6v2Yri8WzOPf6hjVYotkmoMP
-NPAICDCB8W5ddBjsopzLVVEtaXDu9Qj6-zf77hT4iQ7rBd2Ner8iLqN3Kis0dvkNM3_uH8onau1G
-Y_YYw7PPSZyd2S_7Dd6G-IG4ayO6e5DD6oUwwekyiQI_3rTXNa_wldGxqW9u818010ekE4Qdlfcj
-beIn7fAeaOjReZ87hRgWyMs-EgTVHw8RL3yI_O6VvRTVRONRF1Y4C_-IYa8z-bfrwXx3BBd9TTgb
-EnS9wVOyC2OgUN6BhPLGLhxzkJ05nEjizXEc9t5EPYoSRwesajGGrrG_0-qWbuU5hKLPLkyeJLHb
-5HXOTVsrUR59Vov2M3_EswkxcImblox3k3VS2yihZMGyfqLzZIUXgd8ufkevKKU6DxwacGTb \ No newline at end of file
diff --git a/src/main/config/runner-web.xml b/src/main/config/runner-web.xml
deleted file mode 100644
index b51aff4..0000000
--- a/src/main/config/runner-web.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
--->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
- metadata-complete="false" version="3.0">
-
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/spring-servlet.xml,
- classpath:applicationContext.xml
- </param-value>
- </context-param>
-
- <context-param>
- <param-name>spring.profiles.default</param-name>
- <param-value>nooauth</param-value>
- </context-param>
-
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
- <servlet>
- <servlet-name>ManagementServlet</servlet-name>
- <servlet-class>ajsc.ManagementServlet</servlet-class>
- </servlet>
-
-
- <filter>
- <filter-name>InterceptorFilter</filter-name>
- <filter-class>ajsc.filters.InterceptorFilter</filter-class>
- <init-param>
- <param-name>preProcessor_interceptor_config_file</param-name>
- <param-value>/etc/PreProcessorInterceptors.properties</param-value>
- </init-param>
- <init-param>
- <param-name>postProcessor_interceptor_config_file</param-name>
- <param-value>/etc/PostProcessorInterceptors.properties</param-value>
- </init-param>
-
- </filter>
-
- <servlet>
- <servlet-name>RestletServlet</servlet-name>
- <servlet-class>ajsc.restlet.RestletSpringServlet</servlet-class>
- <init-param>
- <param-name>org.restlet.component</param-name>
- <param-value>restletComponent</param-value>
- </init-param>
- </servlet>
-
- <servlet>
- <servlet-name>CamelServlet</servlet-name>
- <servlet-class>ajsc.servlet.AjscCamelServlet</servlet-class>
- </servlet>
-
-
- <filter>
- <filter-name>springSecurityFilterChain</filter-name>
- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
- </filter>
-
- <servlet>
- <servlet-name>spring</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
-<!-- <servlet-mapping>
- <servlet-name>spring</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>-->
-
-<!-- BEGIN jsp -->
-
- <servlet id="jsp">
- <servlet-name>jsp</servlet-name>
- <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
- </servlet>
-
-
-
-
-
- <!-- BEGIN static content -->
- <servlet>
- <servlet-name>default</servlet-name>
- <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
- <init-param>
- <param-name>dirAllowed</param-name>
- <param-value>true</param-value>
- </init-param>
- </servlet>
- <!-- END static content -->
-</web-app>
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index 07fe188..10c4dd0 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -15,7 +15,7 @@ RUN export JAVA_HOME
# Build up the deployment folder structure
RUN mkdir -p $MICRO_HOME
-ADD swm/package/nix/dist_files/appl/gizmo/* $MICRO_HOME/
+COPY gizmo.jar $MICRO_HOME/
RUN mkdir -p $BIN_HOME
COPY *.sh $BIN_HOME
RUN chmod 755 $BIN_HOME/*
diff --git a/src/main/java/org/onap/crud/CrudApplication.java b/src/main/java/org/onap/crud/CrudApplication.java
new file mode 100644
index 0000000..d1446ba
--- /dev/null
+++ b/src/main/java/org/onap/crud/CrudApplication.java
@@ -0,0 +1,46 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.crud;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.jetty.util.security.Password;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.support.SpringBootServletInitializer;
+import org.springframework.context.annotation.ImportResource;
+
+/**
+ * Crud application class - SpringApplication.run
+ */
+@SpringBootApplication
+@ImportResource({"file:${SERVICE_BEANS}/*.xml"})
+public class CrudApplication extends SpringBootServletInitializer{// NOSONAR
+ public static void main(String[] args) {// NOSONAR
+ String keyStorePassword = System.getProperty("KEY_STORE_PASSWORD");
+ if(keyStorePassword==null || keyStorePassword.isEmpty()){
+ throw new RuntimeException("Env property KEY_STORE_PASSWORD not set");
+ }
+ Map<String, Object> props = new HashMap<>();
+ props.put("server.ssl.key-store-password", Password.deobfuscate(keyStorePassword));
+ new CrudApplication().configure(new SpringApplicationBuilder(CrudApplication.class).properties(props)).run(args);
+ }
+}
diff --git a/src/main/java/org/onap/crud/config/JerseyConfig.java b/src/main/java/org/onap/crud/config/JerseyConfig.java
new file mode 100644
index 0000000..654ff81
--- /dev/null
+++ b/src/main/java/org/onap/crud/config/JerseyConfig.java
@@ -0,0 +1,39 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.crud.config;
+
+import org.glassfish.jersey.server.ResourceConfig;
+import org.onap.crud.service.CrudRestService;
+import org.onap.crud.service.JaxrsEchoService;
+import org.springframework.stereotype.Component;
+
+/**
+ * Registers Crud Rest interface as JAX-RS endpoints.
+ */
+@Component
+public class JerseyConfig extends ResourceConfig {
+
+ public JerseyConfig(CrudRestService crudRestService, JaxrsEchoService jaxrsEchoService) {
+ register(crudRestService);
+ register(jaxrsEchoService);
+ }
+
+}
diff --git a/src/main/java/org/onap/crud/event/envelope/GraphEventEnvelope.java b/src/main/java/org/onap/crud/event/envelope/GraphEventEnvelope.java
index 13370a2..d793930 100644
--- a/src/main/java/org/onap/crud/event/envelope/GraphEventEnvelope.java
+++ b/src/main/java/org/onap/crud/event/envelope/GraphEventEnvelope.java
@@ -1,16 +1,15 @@
/**
* ============LICENSE_START=======================================================
- * Gizmo
+ * org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property.
- * Copyright © 2017 Amdocs
- * All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,8 +17,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.crud.event.envelope;
diff --git a/src/main/java/org/onap/crud/event/envelope/GraphEventHeader.java b/src/main/java/org/onap/crud/event/envelope/GraphEventHeader.java
index f70127d..4f914cf 100644
--- a/src/main/java/org/onap/crud/event/envelope/GraphEventHeader.java
+++ b/src/main/java/org/onap/crud/event/envelope/GraphEventHeader.java
@@ -1,16 +1,15 @@
/**
* ============LICENSE_START=======================================================
- * Gizmo
+ * org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property.
- * Copyright © 2017 Amdocs
- * All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,8 +17,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.crud.event.envelope;
diff --git a/src/main/java/org/onap/crud/event/response/GraphEventResponseHandler.java b/src/main/java/org/onap/crud/event/response/GraphEventResponseHandler.java
index 1fa056e..8146aa3 100644
--- a/src/main/java/org/onap/crud/event/response/GraphEventResponseHandler.java
+++ b/src/main/java/org/onap/crud/event/response/GraphEventResponseHandler.java
@@ -1,16 +1,15 @@
/**
* ============LICENSE_START=======================================================
- * Gizmo
+ * org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property.
- * Copyright © 2017 Amdocs
- * All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,8 +17,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.crud.event.response;
diff --git a/src/main/java/org/onap/crud/event/response/GraphEventResponseMessage.java b/src/main/java/org/onap/crud/event/response/GraphEventResponseMessage.java
index 5e4c6bd..1b7c390 100644
--- a/src/main/java/org/onap/crud/event/response/GraphEventResponseMessage.java
+++ b/src/main/java/org/onap/crud/event/response/GraphEventResponseMessage.java
@@ -1,16 +1,15 @@
/**
* ============LICENSE_START=======================================================
- * Gizmo
+ * org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property.
- * Copyright © 2017 Amdocs
- * All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,8 +17,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.crud.event.response;
diff --git a/src/main/java/org/onap/crud/service/CrudRestService.java b/src/main/java/org/onap/crud/service/CrudRestService.java
index 2af205a..b9062b0 100644
--- a/src/main/java/org/onap/crud/service/CrudRestService.java
+++ b/src/main/java/org/onap/crud/service/CrudRestService.java
@@ -20,20 +20,6 @@
*/
package org.onap.crud.service;
-import com.google.gson.JsonElement;
-
-import org.apache.cxf.jaxrs.ext.PATCH;
-import org.onap.aai.cl.api.Logger;
-import org.onap.aai.cl.eelf.LoggerFactory;
-import org.onap.aaiauth.auth.Auth;
-import org.onap.crud.exception.CrudException;
-import org.onap.crud.logging.CrudServiceMsgs;
-import org.onap.crud.logging.LoggingUtil;
-import org.onap.crud.util.CrudProperties;
-import org.onap.crud.util.CrudServiceConstants;
-import org.onap.crud.util.CrudServiceUtil;
-import org.slf4j.MDC;
-
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
@@ -57,7 +43,20 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriInfo;
+import org.apache.cxf.jaxrs.ext.PATCH;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.eelf.LoggerFactory;
+import org.onap.aaiauth.auth.Auth;
+import org.onap.crud.exception.CrudException;
+import org.onap.crud.logging.CrudServiceMsgs;
+import org.onap.crud.logging.LoggingUtil;
+import org.onap.crud.util.CrudProperties;
+import org.onap.crud.util.CrudServiceConstants;
+import org.onap.crud.util.CrudServiceUtil;
+import org.slf4j.MDC;
+import com.google.gson.JsonElement;
+@Path("/services/inventory")
public class CrudRestService {
private AbstractGraphDataService graphDataService;
@@ -72,14 +71,13 @@ public class CrudRestService {
this.graphDataService = graphDataService;
this.auth = new Auth(CrudServiceConstants.CRD_AUTH_FILE);
}
-
+
// For unit testing
public CrudRestService(AbstractGraphDataService graphDataService, Auth auth) throws Exception {
this.graphDataService = graphDataService;
this.auth = auth;
}
-
public enum Action {
POST, GET, PUT, DELETE, PATCH
}
diff --git a/src/main/java/org/onap/crud/service/JaxrsEchoService.java b/src/main/java/org/onap/crud/service/JaxrsEchoService.java
index 1c1e54b..dc01435 100644
--- a/src/main/java/org/onap/crud/service/JaxrsEchoService.java
+++ b/src/main/java/org/onap/crud/service/JaxrsEchoService.java
@@ -20,10 +20,6 @@
*/
package org.onap.crud.service;
-import org.onap.aai.cl.api.Logger;
-import org.onap.aai.cl.eelf.LoggerFactory;
-import org.onap.crud.logging.LoggingUtil;
-
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@@ -34,8 +30,13 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriInfo;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.eelf.LoggerFactory;
+import org.onap.crud.logging.LoggingUtil;
+import org.springframework.stereotype.Component;
-
+@Component
+@Path("/services/gizmo/v1/echo-service/")
public class JaxrsEchoService {
private static Logger logger = LoggerFactory.getInstance()
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
new file mode 100644
index 0000000..2a65bc3
--- /dev/null
+++ b/src/main/resources/application.properties
@@ -0,0 +1,10 @@
+server.port=9520
+
+SERVICE_BEANS=dynamic/conf
+
+server.ssl.key-store=${CONFIG_HOME}/auth/tomcat_keystore
+server.ssl.enabled=true
+server.ssl.client-auth=need
+server.ssl.enabled-protocols=TLSv1.1,TLSv1.2
+
+logging.config=classpath:logback.xml \ No newline at end of file
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
new file mode 100644
index 0000000..9a8d99a
--- /dev/null
+++ b/src/main/resources/logback.xml
@@ -0,0 +1,214 @@
+<configuration scan="true" scanPeriod="3 seconds" debug="false">
+ <!--<jmxConfigurator /> -->
+ <!-- directory path for all other type logs -->
+
+ <property name="logDir" value="${APP_HOME}/logs" />
+
+
+ <!-- specify the component name
+ <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <property name="componentName" value="AAI-CRUD" />
+
+ <!-- default eelf log file names -->
+ <property name="generalLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+
+ <property name="errorLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{RequestId}|%thread|Crud-Service|%mdc{PartnerName}|%logger||%.-5level|%msg%n" />
+ <property name="auditMetricPattern" value="%m%n" />
+
+ <property name="logDirectory" value="${logDir}/${componentName}" />
+
+ <!-- Example evaluator filter applied against console appender -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>${errorLogPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <!-- ============================================================================ -->
+ <!-- EELF Appenders -->
+ <!-- ============================================================================ -->
+
+ <!-- The EELFAppender is used to record events to the general application
+ log -->
+
+ <appender name="EELF"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${generalLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${errorLogPattern}</pattern>
+ </encoder>
+ </appender>
+ <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
+ <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELF" />
+ </appender>
+
+
+ <!-- EELF Audit Appender. This appender is used to record audit engine
+ related logging events. The audit logger and appender are specializations
+ of the EELF application root logger and appender. This can be used to segregate
+ Policy engine events from other components, or it can be eliminated to record
+ these events as part of the application root log. -->
+
+ <appender name="EELFAudit"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${auditLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${auditMetricPattern}</pattern>
+ </encoder>
+ </appender>
+ <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFAudit" />
+ </appender>
+
+ <appender name="EELFMetrics"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${metricsLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
+ %msg%n"</pattern> -->
+ <pattern>${auditMetricPattern}</pattern>
+ </encoder>
+ </appender>
+
+
+ <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFMetrics"/>
+ </appender>
+
+ <appender name="EELFDebug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${debugLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip
+ </fileNamePattern>
+ <maxHistory>60</maxHistory>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${errorLogPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFDebug" />
+ <includeCallerData>false</includeCallerData>
+ </appender>
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF loggers -->
+ <!-- ============================================================================ -->
+ <logger name="com.att.eelf" level="info" additivity="false">
+ <appender-ref ref="asyncEELF" />
+ <appender-ref ref="asyncEELFDebug" />
+ </logger>
+
+<!--
+ <logger name="com.att.eelf.security" level="info" additivity="false">
+ <appender-ref ref="asyncEELFSecurity" />
+ </logger>
+ <logger name="com.att.eelf.perf" level="info" additivity="false">
+ <appender-ref ref="asyncEELFPerformance" />
+ </logger>
+ <logger name="com.att.eelf.server" level="info" additivity="false">
+ <appender-ref ref="asyncEELFServer" />
+ </logger>
+ <logger name="com.att.eelf.policy" level="info" additivity="false">
+ <appender-ref ref="asyncEELFPolicy" />
+ </logger>
+-->
+ <logger name="com.att.eelf.audit" level="info" additivity="false">
+ <appender-ref ref="asyncEELFAudit" />
+ </logger>
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="asyncEELFMetrics" />
+ </logger>
+
+ <!-- Spring related loggers -->
+ <logger name="org.springframework" level="WARN" />
+ <logger name="org.springframework.beans" level="WARN" />
+ <logger name="org.springframework.web" level="WARN" />
+ <logger name="com.blog.spring.jms" level="WARN" />
+
+ <!-- AJSC Services (bootstrap services) -->
+ <logger name="ajsc" level="WARN" />
+ <logger name="ajsc.RouteMgmtService" level="WARN" />
+ <logger name="ajsc.ComputeService" level="WARN" />
+ <logger name="ajsc.VandelayService" level="WARN" />
+ <logger name="ajsc.FilePersistenceService" level="WARN" />
+ <logger name="ajsc.UserDefinedJarService" level="WARN" />
+ <logger name="ajsc.UserDefinedBeansDefService" level="WARN" />
+ <logger name="ajsc.LoggingConfigurationService" level="WARN" />
+
+ <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet
+ logging) -->
+ <logger name="ajsc.utils" level="WARN" />
+ <logger name="ajsc.utils.DME2Helper" level="WARN" />
+ <logger name="ajsc.filters" level="WARN" />
+ <logger name="ajsc.beans.interceptors" level="WARN" />
+ <logger name="ajsc.restlet" level="WARN" />
+ <logger name="ajsc.servlet" level="WARN" />
+ <logger name="com.att" level="INFO" />
+ <logger name="com.att.ajsc.csi.logging" level="WARN" />
+ <logger name="com.att.ajsc.filemonitor" level="WARN" />
+
+ <!-- CRUD Service loggers -->
+ <logger name="org.onap.crud" level="INFO" />
+
+ <!-- Other Loggers that may help troubleshoot -->
+ <logger name="net.sf" level="WARN" />
+ <logger name="org.apache" level="WARN" />
+ <logger name="org.apache.commons.httpclient" level="WARN" />
+ <logger name="org.apache.commons" level="WARN" />
+ <logger name="org.apache.coyote" level="WARN" />
+ <logger name="org.apache.jasper" level="WARN" />
+
+ <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
+ May aid in troubleshooting) -->
+ <logger name="org.apache.camel" level="WARN" />
+ <logger name="org.apache.cxf" level="WARN" />
+ <logger name="org.apache.camel.processor.interceptor" level="WARN" />
+ <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
+ <logger name="org.apache.cxf.service" level="WARN" />
+ <logger name="org.restlet" level="WARN" />
+ <logger name="org.apache.camel.component.restlet" level="WARN" />
+
+ <!-- logback internals logging -->
+ <logger name="ch.qos.logback.classic" level="WARN" />
+ <logger name="ch.qos.logback.core" level="WARN" />
+
+ <root>
+ <appender-ref ref="asyncEELF" />
+ <!-- <appender-ref ref="asyncEELFDebug" /> -->
+ </root>
+
+</configuration>
diff --git a/src/main/runtime/context/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.context b/src/main/runtime/context/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.context
deleted file mode 100644
index 8514196..0000000
--- a/src/main/runtime/context/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.context
+++ /dev/null
@@ -1 +0,0 @@
-{"context":{"contextClass":"ajsc.Context","contextId":"__module_ajsc_namespace_name__:__module_ajsc_namespace_version__","contextName":"__module_ajsc_namespace_name__","contextVersion":"__module_ajsc_namespace_version__","description":"__module_ajsc_namespace_name__ Context"}} \ No newline at end of file
diff --git a/src/main/runtime/context/default#0.context b/src/main/runtime/context/default#0.context
deleted file mode 100644
index d1b5ab4..0000000
--- a/src/main/runtime/context/default#0.context
+++ /dev/null
@@ -1 +0,0 @@
-{"context":{"contextClass":"ajsc.Context","contextId":"default:0","contextName":"default","contextVersion":"0","description":"Default Context"}} \ No newline at end of file
diff --git a/src/main/runtime/deploymentPackage/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.json b/src/main/runtime/deploymentPackage/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.json
deleted file mode 100644
index d0954cf..0000000
--- a/src/main/runtime/deploymentPackage/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.json
+++ /dev/null
@@ -1 +0,0 @@
-{"deploymentPackage":{"Class":"ajsc.DeploymentPackage","Id":"__module.ajsc.namespace.name__:__module_ajsc_namespace_version__","namespace":"__module_ajsc_namespace_name__","namespaceVersion":"__module_ajsc_namespace_version__","description":"__module_ajsc_namespace_name__ __module_ajsc_namespace_version__ - default description","userId":"ajsc"}} \ No newline at end of file
diff --git a/src/main/runtime/shiroRole/ajscadmin.json b/src/main/runtime/shiroRole/ajscadmin.json
deleted file mode 100644
index f5e981e..0000000
--- a/src/main/runtime/shiroRole/ajscadmin.json
+++ /dev/null
@@ -1 +0,0 @@
-{"shiroRoleClass":"ajsc.auth.ShiroRole","shiroRoleId":"ajscadmin","name":"ajscadmin","permissions":"[ajscadmin:*, ajsc:*]"} \ No newline at end of file
diff --git a/src/main/runtime/shiroRole/contextadmin#__module.ajsc.namespace.name__.json b/src/main/runtime/shiroRole/contextadmin#__module.ajsc.namespace.name__.json
deleted file mode 100644
index 2dae9f5..0000000
--- a/src/main/runtime/shiroRole/contextadmin#__module.ajsc.namespace.name__.json
+++ /dev/null
@@ -1 +0,0 @@
-{"shiroRoleClass":"ajsc.auth.ShiroRole","shiroRoleId":"contextadmin:__module_ajsc_namespace_name__","name":"contextadmin:__module_ajsc_namespace_name__","permissions":"[]"} \ No newline at end of file
diff --git a/src/main/runtime/shiroRole/contextadmin#default.json b/src/main/runtime/shiroRole/contextadmin#default.json
deleted file mode 100644
index 5de814e..0000000
--- a/src/main/runtime/shiroRole/contextadmin#default.json
+++ /dev/null
@@ -1 +0,0 @@
-{"shiroRoleClass":"ajsc.auth.ShiroRole","shiroRoleId":"contextadmin:default","name":"contextadmin:default","permissions":"[]"} \ No newline at end of file
diff --git a/src/main/runtime/shiroUser/ajsc.json b/src/main/runtime/shiroUser/ajsc.json
deleted file mode 100644
index f4c7855..0000000
--- a/src/main/runtime/shiroUser/ajsc.json
+++ /dev/null
@@ -1 +0,0 @@
-{"shiroUserClass":"ajsc.auth.ShiroUser","shiroUserId":"ajsc","passwordHash":"9471697417008c880720ba54c6038791ad7e98f3b88136fe34f4d31a462dd27a","permissions":"[*:*]","username":"ajsc"} \ No newline at end of file
diff --git a/src/main/runtime/shiroUserRole/ajsc#ajscadmin.json b/src/main/runtime/shiroUserRole/ajsc#ajscadmin.json
deleted file mode 100644
index cb8d483..0000000
--- a/src/main/runtime/shiroUserRole/ajsc#ajscadmin.json
+++ /dev/null
@@ -1 +0,0 @@
-{"shiroUserRoleClass":"ajsc.auth.ShiroUserRole","shiroUserRoleId":"ajsc:ajscadmin","roleId":"ajscadmin","userId":"ajsc"} \ No newline at end of file
diff --git a/src/main/runtime/shiroUserRole/ajsc#contextadmin#__module.ajsc.namespace.name__.json b/src/main/runtime/shiroUserRole/ajsc#contextadmin#__module.ajsc.namespace.name__.json
deleted file mode 100644
index 95d2361..0000000
--- a/src/main/runtime/shiroUserRole/ajsc#contextadmin#__module.ajsc.namespace.name__.json
+++ /dev/null
@@ -1 +0,0 @@
-{"shiroUserRoleClass":"ajsc.auth.ShiroUserRole","shiroUserRoleId":"ajsc:contextadmin:__module_ajsc_namespace_name__","roleId":"contextadmin:__module_ajsc_namespace_name__","userId":"ajsc"} \ No newline at end of file
diff --git a/src/main/runtime/shiroUserRole/ajsc#contextadmin#default.json b/src/main/runtime/shiroUserRole/ajsc#contextadmin#default.json
deleted file mode 100644
index 2bd5063..0000000
--- a/src/main/runtime/shiroUserRole/ajsc#contextadmin#default.json
+++ /dev/null
@@ -1 +0,0 @@
-{"shiroUserRoleClass":"ajsc.auth.ShiroUserRole","shiroUserRoleId":"ajsc:contextadmin:default","roleId":"contextadmin:default","userId":"ajsc"} \ No newline at end of file