From ea736d0c60f042d4e6255136da789724ee178193 Mon Sep 17 00:00:00 2001 From: ramverma Date: Thu, 29 Nov 2018 13:47:30 +0000 Subject: Fixing issues in apex documents Change-Id: Ibc07c20fa8ac1018443a3c061613fdaecc5efb83 Issue-ID: POLICY-1280 Signed-off-by: ramverma --- client/client-common/pom.xml | 32 ++++- .../client-common/src/main/assembly/resources.xml | 32 +++++ client/client-deployment/pom.xml | 103 +++++++--------- .../src/main/assembly/resources.xml | 32 +++++ client/client-editor/pom.xml | 119 +++++++++---------- .../client-editor/src/main/assembly/resources.xml | 32 +++++ .../editor/rest/handling/RestCommandHandler.java | 30 ++--- client/client-full/pom.xml | 129 ++++++++------------- client/client-monitoring/pom.xml | 118 +++++++++---------- .../src/main/assembly/resources.xml | 32 +++++ 10 files changed, 365 insertions(+), 294 deletions(-) create mode 100644 client/client-common/src/main/assembly/resources.xml create mode 100644 client/client-deployment/src/main/assembly/resources.xml create mode 100644 client/client-editor/src/main/assembly/resources.xml create mode 100644 client/client-monitoring/src/main/assembly/resources.xml (limited to 'client') diff --git a/client/client-common/pom.xml b/client/client-common/pom.xml index 92174c87f..da0aa392c 100644 --- a/client/client-common/pom.xml +++ b/client/client-common/pom.xml @@ -17,7 +17,8 @@ SPDX-License-Identifier: Apache-2.0 ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.apex-pdp.client @@ -26,9 +27,36 @@ client-common - jar + pom ${project.artifactId} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + make shared resources + + single + + package + + + src/main/assembly/resources.xml + + + + + + + + + + apexSite diff --git a/client/client-common/src/main/assembly/resources.xml b/client/client-common/src/main/assembly/resources.xml new file mode 100644 index 000000000..2a6d326cc --- /dev/null +++ b/client/client-common/src/main/assembly/resources.xml @@ -0,0 +1,32 @@ + + + resources + + zip + + false + + + src/main/resources + + + + \ No newline at end of file diff --git a/client/client-deployment/pom.xml b/client/client-deployment/pom.xml index 02ecb4ae6..25972ea47 100644 --- a/client/client-deployment/pom.xml +++ b/client/client-deployment/pom.xml @@ -36,11 +36,6 @@ core-deployment ${project.version} - - org.onap.policy.apex-pdp.client - client-common - ${project.version} - org.glassfish.jersey.containers jersey-container-grizzly2-http @@ -65,42 +60,67 @@ commons-cli commons-cli + + + org.onap.policy.apex-pdp.client + client-common + ${project.version} + resources + zip + provided + + install ${project.build.directory}/classes - + + org.apache.maven.plugins maven-dependency-plugin - unpack-examples - validate + unpack-shared-resources - unpack + unpack-dependencies + generate-resources - - - org.onap.policy.apex-pdp.client - client-common - ${project.version} - jar - false - ${project.build.directory}/classes/webapp - META-INF/ - - - true - true + ${project.build.directory}/classes/webapp + + client-common + org.onap.policy.apex-pdp.client + true + true + jar + zip + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + make shared resources + + single + + package + + + src/main/assembly/resources.xml + + org.apache.maven.plugins maven-shade-plugin @@ -196,45 +216,6 @@ - - only-eclipse - - - m2e.version - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.0,) - - unpack - - - - - - - - - - - - - - - apexSite diff --git a/client/client-deployment/src/main/assembly/resources.xml b/client/client-deployment/src/main/assembly/resources.xml new file mode 100644 index 000000000..f0632c54e --- /dev/null +++ b/client/client-deployment/src/main/assembly/resources.xml @@ -0,0 +1,32 @@ + + + resources + + zip + + false + + + target/classes/webapp + deployment + + + \ No newline at end of file diff --git a/client/client-editor/pom.xml b/client/client-editor/pom.xml index 4bae1013d..a72f88c76 100644 --- a/client/client-editor/pom.xml +++ b/client/client-editor/pom.xml @@ -17,7 +17,8 @@ SPDX-License-Identifier: Apache-2.0 ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.apex-pdp.client @@ -44,11 +45,6 @@ core-infrastructure ${project.version} - - org.onap.policy.apex-pdp.client - client-common - ${project.version} - org.glassfish.jersey.containers jersey-container-grizzly2-http @@ -90,43 +86,67 @@ ${version.jersey} test + + + org.onap.policy.apex-pdp.client + client-common + ${project.version} + resources + zip + provided + + install ${project.build.directory}/classes - + + org.apache.maven.plugins maven-dependency-plugin - unpack-examples - validate + unpack-shared-resources - unpack + unpack-dependencies + generate-resources - - - org.onap.policy.apex-pdp.client - client-common - ${project.version} - jar - false - ${project.build.directory}/classes/webapp - META-INF/ - webapp/css/styles.css, webapp/css/interfaceAssets.css - - - true - true + ${project.build.directory}/classes/webapp + + client-common + org.onap.policy.apex-pdp.client + true + true + jar + zip + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + make shared resources + + single + + package + + + src/main/assembly/resources.xml + + org.apache.maven.plugins maven-shade-plugin @@ -158,14 +178,18 @@ - - + + reference.conf - + log4j.properties - + org.onap.policy.apex.client.editor.rest.ApexEditorMain @@ -218,45 +242,6 @@ - - only-eclipse - - - m2e.version - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.0,) - - unpack - - - - - - - - - - - - - - - apexSite diff --git a/client/client-editor/src/main/assembly/resources.xml b/client/client-editor/src/main/assembly/resources.xml new file mode 100644 index 000000000..0205c3d5d --- /dev/null +++ b/client/client-editor/src/main/assembly/resources.xml @@ -0,0 +1,32 @@ + + + resources + + zip + + false + + + target/classes/webapp + editor + + + \ No newline at end of file diff --git a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java index 5921c8960..968a98572 100644 --- a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java +++ b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java @@ -5,15 +5,15 @@ * 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. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -38,7 +38,7 @@ public interface RestCommandHandler { * @return the apex api result the result of the execution */ public ApexApiResult executeRestCommand(final RestSession session, final RestCommandType commandType, - final RestCommand command); + final RestCommand command); /** * Process a REST command. @@ -50,7 +50,7 @@ public interface RestCommandHandler { * @return the apex api result the result of the execution */ public ApexApiResult executeRestCommand(final RestSession session, final RestCommandType commandType, - final RestCommand command, final String jsonString); + final RestCommand command, final String jsonString); /** * Process a REST command. @@ -63,7 +63,7 @@ public interface RestCommandHandler { * @return the apex api result the result of the execution */ public ApexApiResult executeRestCommand(final RestSession session, final RestCommandType commandType, - final RestCommand command, final String name, final String version); + final RestCommand command, final String name, final String version); /** * Get an unsupported command result message. @@ -71,16 +71,17 @@ public interface RestCommandHandler { * @param session the Apex editor session * @param commandType the type of REST command to execute * @param command the REST command to execute + * @return the apex api result the result of the execution */ public default ApexApiResult getUnsupportedCommandResultMessage(final RestSession session, - final RestCommandType commandType, final RestCommand command) { + final RestCommandType commandType, final RestCommand command) { return new ApexApiResult(Result.FAILED, "session " + session.getSessionId() + ", command type " + commandType - + ", command" + command + " invalid"); + + ", command" + command + " invalid"); } - + /** * Convert blank incoming fields to nulls. - * + * * @param incomingField the field to check * @return null if the field is blank, otherwise, the field trimmed */ @@ -88,13 +89,12 @@ public interface RestCommandHandler { if (incomingField == null) { return null; } - - String trimmedField = incomingField.trim(); - + + final String trimmedField = incomingField.trim(); + if (trimmedField.isEmpty()) { return null; - } - else { + } else { return trimmedField; } } diff --git a/client/client-full/pom.xml b/client/client-full/pom.xml index ae987c55c..591dcada3 100644 --- a/client/client-full/pom.xml +++ b/client/client-full/pom.xml @@ -51,9 +51,40 @@ jersey-container-grizzly2-http ${version.jersey} + + + + org.onap.policy.apex-pdp.client + client-monitoring + ${project.version} + resources + zip + provided + + + org.onap.policy.apex-pdp.client + client-deployment + ${project.version} + resources + zip + provided + + + org.onap.policy.apex-pdp.client + client-editor + ${project.version} + resources + zip + provided + + + + + + install ${project.build.directory}/classes - + + org.apache.maven.plugins maven-dependency-plugin - unpack-examples - validate + unpack-MONITOR-resources - unpack + unpack-dependencies + generate-resources - - - org.onap.policy.apex-pdp.client - client-monitoring - ${project.version} - jar - false - ${project.build.directory}/classes/webapp/monitoring-temp - META-INF/, org/ - - - org.onap.policy.apex-pdp.client - client-deployment - ${project.version} - jar - false - ${project.build.directory}/classes/webapp/deployment-temp - META-INF/, org/ - - - org.onap.policy.apex-pdp.client - client-editor - ${project.version} - jar - false - ${project.build.directory}/classes/webapp/editor-temp - META-INF/, org/ - - - true - true + ${project.build.directory}/classes/webapp + + org.onap.policy.apex-pdp.client + client-monitoring, client-deployment, client-editor + true + jar + zip + provided - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - initialize - - - - - - - - - - - - - - - - - - run - - - - - org.apache.maven.plugins maven-shade-plugin @@ -265,20 +241,7 @@ maven-dependency-plugin [2.0,) - unpack - - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [1.0,) - - run + unpack-dependencies diff --git a/client/client-monitoring/pom.xml b/client/client-monitoring/pom.xml index 17f2cc178..6d0c34e6e 100644 --- a/client/client-monitoring/pom.xml +++ b/client/client-monitoring/pom.xml @@ -17,7 +17,8 @@ SPDX-License-Identifier: Apache-2.0 ============LICENSE_END========================================================= --> - + 4.0.0 org.onap.policy.apex-pdp.client @@ -35,11 +36,6 @@ core-deployment ${project.version} - - org.onap.policy.apex-pdp.client - client-common - ${project.version} - org.glassfish.jersey.containers jersey-container-grizzly2-http @@ -64,42 +60,67 @@ mockito-all test + + + org.onap.policy.apex-pdp.client + client-common + ${project.version} + resources + zip + provided + + install ${project.build.directory}/classes - + + org.apache.maven.plugins maven-dependency-plugin - unpack-examples - validate + unpack-shared-resources - unpack + unpack-dependencies + generate-resources - - - org.onap.policy.apex-pdp.client - client-common - ${project.version} - jar - false - ${project.build.directory}/classes/webapp - META-INF/ - - - true - true + ${project.build.directory}/classes/webapp + + client-common + org.onap.policy.apex-pdp.client + true + jar + zip + true + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + make shared resources + + single + + package + + + src/main/assembly/resources.xml + + org.apache.maven.plugins maven-shade-plugin @@ -131,14 +152,18 @@ - - + + reference.conf - + log4j.properties - + org.onap.policy.apex.client.monitoring.rest.ApexMonitoringRestMain @@ -191,45 +216,6 @@ - - only-eclipse - - - m2e.version - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.0,) - - unpack - - - - - - - - - - - - - - - apexSite diff --git a/client/client-monitoring/src/main/assembly/resources.xml b/client/client-monitoring/src/main/assembly/resources.xml new file mode 100644 index 000000000..bed1588b6 --- /dev/null +++ b/client/client-monitoring/src/main/assembly/resources.xml @@ -0,0 +1,32 @@ + + + resources + + zip + + false + + + target/classes/webapp + monitoring + + + \ No newline at end of file -- cgit 1.2.3-korg