From 92927f8985ae5f381143b8b295df2f466e4349ae Mon Sep 17 00:00:00 2001 From: Ravi Geda Date: Mon, 30 Apr 2018 16:54:51 +0100 Subject: Migrate to Spring Boot Convert from AJSC to Spring Boot micro service Change-Id: I17bed6d10a00b35dbc63f5dd2b93642b1b3eb7a5 Issue-ID: AAI-1040 Signed-off-by: Ravi Geda --- .../crud-api_v1/crud-api/v1/conf/jaxrsBeans.groovy | 11 -- .../ajsc/crud-api_v1/crud-api/v1/docs/README.txt | 1 - .../ajsc/crud-api_v1/crud-api/v1/lib/README.txt | 1 - .../crud-api_v1/crud-api/v1/props/module.props | 1 - .../crud-api/v1/routes/aaiResources.route | 4 - .../ajsc/crud-api_v1/crud-api/v1/routes/crud.route | 4 - .../crud-api/v1/routes/helloWorld.route | 4 - .../crud-api/v1/routes/jaxrsExample.route | 5 - src/main/assemble/ajsc_module_assembly.xml | 69 ------- src/main/assemble/ajsc_props_assembly.xml | 26 --- src/main/assemble/ajsc_runtime_assembly.xml | 47 ----- src/main/bin/start.sh | 56 ++---- src/main/config/ajsc-jetty.xml | 114 ----------- src/main/config/ajsc-override-web.xml | 53 ----- src/main/config/ajscJetty.jks | Bin 3736 -> 0 bytes src/main/config/jul-redirect.properties | 13 -- src/main/config/keyfile | 27 --- src/main/config/runner-web.xml | 97 ---------- src/main/docker/Dockerfile | 2 +- src/main/java/org/onap/crud/CrudApplication.java | 46 +++++ .../java/org/onap/crud/config/JerseyConfig.java | 39 ++++ .../crud/event/envelope/GraphEventEnvelope.java | 11 +- .../onap/crud/event/envelope/GraphEventHeader.java | 11 +- .../event/response/GraphEventResponseHandler.java | 11 +- .../event/response/GraphEventResponseMessage.java | 11 +- .../org/onap/crud/service/CrudRestService.java | 30 ++- .../org/onap/crud/service/JaxrsEchoService.java | 11 +- src/main/resources/application.properties | 10 + src/main/resources/logback.xml | 214 +++++++++++++++++++++ ...ame__#__module.ajsc.namespace.version__.context | 1 - src/main/runtime/context/default#0.context | 1 - ...e.name__#__module.ajsc.namespace.version__.json | 1 - src/main/runtime/shiroRole/ajscadmin.json | 1 - ...ontextadmin#__module.ajsc.namespace.name__.json | 1 - .../runtime/shiroRole/contextadmin#default.json | 1 - src/main/runtime/shiroUser/ajsc.json | 1 - src/main/runtime/shiroUserRole/ajsc#ajscadmin.json | 1 - ...ontextadmin#__module.ajsc.namespace.name__.json | 1 - .../shiroUserRole/ajsc#contextadmin#default.json | 1 - .../onap/crud/event/GraphEventEnvelopeTest.java | 20 ++ .../response/GraphEventResponseHandlerTest.java | 20 ++ .../java/org/onap/crud/test/util/TestUtil.java | 20 ++ .../onap/schema/RelationshipSchemaLoaderTest.java | 14 +- 43 files changed, 424 insertions(+), 589 deletions(-) delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/conf/jaxrsBeans.groovy delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/docs/README.txt delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/lib/README.txt delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/props/module.props delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/routes/aaiResources.route delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/routes/crud.route delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/routes/helloWorld.route delete mode 100644 src/main/ajsc/crud-api_v1/crud-api/v1/routes/jaxrsExample.route delete mode 100644 src/main/assemble/ajsc_module_assembly.xml delete mode 100644 src/main/assemble/ajsc_props_assembly.xml delete mode 100644 src/main/assemble/ajsc_runtime_assembly.xml delete mode 100644 src/main/config/ajsc-jetty.xml delete mode 100644 src/main/config/ajsc-override-web.xml delete mode 100644 src/main/config/ajscJetty.jks delete mode 100644 src/main/config/jul-redirect.properties delete mode 100644 src/main/config/keyfile delete mode 100644 src/main/config/runner-web.xml create mode 100644 src/main/java/org/onap/crud/CrudApplication.java create mode 100644 src/main/java/org/onap/crud/config/JerseyConfig.java create mode 100644 src/main/resources/application.properties create mode 100644 src/main/resources/logback.xml delete mode 100644 src/main/runtime/context/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.context delete mode 100644 src/main/runtime/context/default#0.context delete mode 100644 src/main/runtime/deploymentPackage/__module.ajsc.namespace.name__#__module.ajsc.namespace.version__.json delete mode 100644 src/main/runtime/shiroRole/ajscadmin.json delete mode 100644 src/main/runtime/shiroRole/contextadmin#__module.ajsc.namespace.name__.json delete mode 100644 src/main/runtime/shiroRole/contextadmin#default.json delete mode 100644 src/main/runtime/shiroUser/ajsc.json delete mode 100644 src/main/runtime/shiroUserRole/ajsc#ajscadmin.json delete mode 100644 src/main/runtime/shiroUserRole/ajsc#contextadmin#__module.ajsc.namespace.name__.json delete mode 100644 src/main/runtime/shiroUserRole/ajsc#contextadmin#default.json (limited to 'src') 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 @@ - - - - \ 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 @@ - - - - \ 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 @@ - - - - \ 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 @@ - - - - - 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 @@ - - - ${version} - false - - zip - - - - ${project.basedir}/target/versioned-ajsc/routes/ - ${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/routes/ - - *.route - - - - - - ${project.basedir}/target/versioned-ajsc/docs/ - ${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/docs/ - - *.* - - - - - - - ${project.basedir}/target/versioned-ajsc/lib/ - ${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/lib/ - - *.jar - - - - - ${project.basedir}/target/versioned-ajsc/extJars/ - ${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/extJars/ - - *.jar - - - - - - ${project.basedir}/target/ - ${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/lib/ - - *.jar - - - - - ${project.basedir}/target/versioned-ajsc/conf/ - ${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/conf/ - - *.* - - - - - - - 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 @@ - - - ${version}_properties - false - - zip - - - - ${project.basedir}/target/versioned-ajsc/props - ${module.ajsc.namespace.name}/${module.ajsc.namespace.version}/props/ - - *.props - - - - - - - - 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 @@ - - - runtimeEnvironment - false - - zip - - - - ${project.basedir}/target/versioned-runtime/context/ - runtime/context/ - - *.context - - - - ${project.basedir}/target/versioned-runtime/serviceProperties/ - runtime/serviceProperties/ - - *.props - - - ${project.basedir}/target/versioned-runtime/shiroRole - runtime/shiroRole/ - - *.json - - - ${project.basedir}/target/versioned-runtime/shiroUser - runtime/shiroUser/ - - *.json - - - ${project.basedir}/target/versioned-runtime/shiroUserRole - runtime/shiroUserRole - - *.json - - - - \ 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 @@ - - - - - - - - true - - - /etc/runner-web.xml - /etc/ajsc-override-web.xml - true - - - false - - - /extJars/gizmo.jar,/extJars/json-20160212.jar,/extJars/javax.ws.rs-api-2.0.1.jar,/extJars/jersey-client-2.23.jar - - - - - - - - - - - - - - - - - - - - - - - - /extApps - 10 - true - - - - - - - - - file:/auth/tomcat_keystore - - - - - - - - - - - true - true - - - - - - - - - - - - - http/1.1 - - - - - - - - - - - - - - - - - - - - - - 30000 - - - - - - - - - false - - - 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 @@ - - - - - - InterceptorFilter - /services/* - - - InterceptorFilter - /rest/* - - - - springSecurityFilterChain - /* - - - - ManagementServlet - /mgmt - - - - RestletServlet - /rest/* - - - - CamelServlet - /services/* - - - - jsp - *.jsp - *.jspf - *.jspx - *.xsp - *.JSP - *.JSPF - *.JSPX - *.XSP - - - default - /* - - \ 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 Binary files a/src/main/config/ajscJetty.jks and /dev/null 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 @@ - - - - - - contextConfigLocation - /WEB-INF/spring-servlet.xml, - classpath:applicationContext.xml - - - - - spring.profiles.default - nooauth - - - - org.springframework.web.context.ContextLoaderListener - - - - ManagementServlet - ajsc.ManagementServlet - - - - - InterceptorFilter - ajsc.filters.InterceptorFilter - - preProcessor_interceptor_config_file - /etc/PreProcessorInterceptors.properties - - - postProcessor_interceptor_config_file - /etc/PostProcessorInterceptors.properties - - - - - - RestletServlet - ajsc.restlet.RestletSpringServlet - - org.restlet.component - restletComponent - - - - - CamelServlet - ajsc.servlet.AjscCamelServlet - - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - - spring - org.springframework.web.servlet.DispatcherServlet - 1 - - - - - - - - jsp - org.apache.jasper.servlet.JspServlet - - - - - - - - - default - org.eclipse.jetty.servlet.DefaultServlet - - dirAllowed - true - - - - 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 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${errorLogPattern} + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + + INFO + + 256 + + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + + ${auditMetricPattern} + + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + 256 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 diff --git a/src/test/java/org/onap/crud/event/GraphEventEnvelopeTest.java b/src/test/java/org/onap/crud/event/GraphEventEnvelopeTest.java index 51100d5..e280c95 100644 --- a/src/test/java/org/onap/crud/event/GraphEventEnvelopeTest.java +++ b/src/test/java/org/onap/crud/event/GraphEventEnvelopeTest.java @@ -1,3 +1,23 @@ +/** + * ============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.event; import static org.hamcrest.Matchers.is; diff --git a/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java b/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java index 5c0da98..9330556 100644 --- a/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java +++ b/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java @@ -1,3 +1,23 @@ +/** + * ============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.event.response; import static org.hamcrest.Matchers.is; diff --git a/src/test/java/org/onap/crud/test/util/TestUtil.java b/src/test/java/org/onap/crud/test/util/TestUtil.java index 69732ae..1fcb46e 100644 --- a/src/test/java/org/onap/crud/test/util/TestUtil.java +++ b/src/test/java/org/onap/crud/test/util/TestUtil.java @@ -1,3 +1,23 @@ +/** + * ============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.test.util; import java.io.File; diff --git a/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java b/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java index 22fead0..4e6590d 100644 --- a/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java +++ b/src/test/java/org/onap/schema/RelationshipSchemaLoaderTest.java @@ -20,18 +20,16 @@ */ package org.onap.schema; -import static org.junit.Assert.*; -import edu.emory.mathcs.backport.java.util.Arrays; -import org.junit.Before; -import org.junit.Test; -import org.onap.crud.exception.CrudException; - +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; - -import static org.junit.Assert.*; +import org.junit.Before; +import org.junit.Test; +import org.onap.crud.exception.CrudException; public class RelationshipSchemaLoaderTest { -- cgit 1.2.3-korg