diff options
Diffstat (limited to 'sdnr/wt/odlux/core')
7 files changed, 25 insertions, 19 deletions
diff --git a/sdnr/wt/odlux/core/features/pom.xml b/sdnr/wt/odlux/core/features/pom.xml index 051de3d0a..5d81f954c 100644 --- a/sdnr/wt/odlux/core/features/pom.xml +++ b/sdnr/wt/odlux/core/features/pom.xml @@ -50,11 +50,6 @@ <dependency> <groupId>${project.groupId}</groupId> - <artifactId>sdnr-wt-odlux-core-model</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> <artifactId>sdnr-wt-odlux-core-provider</artifactId> <version>${project.version}</version> </dependency> diff --git a/sdnr/wt/odlux/core/installer/pom.xml b/sdnr/wt/odlux/core/installer/pom.xml index 89de0b142..9cd173f11 100755 --- a/sdnr/wt/odlux/core/installer/pom.xml +++ b/sdnr/wt/odlux/core/installer/pom.xml @@ -50,7 +50,7 @@ <dependencies> <dependency> - <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <groupId>${project.groupId}</groupId> <artifactId>${application.name}-feature</artifactId> <version>${project.version}</version> <type>xml</type> @@ -63,7 +63,7 @@ </exclusions> </dependency> <dependency> - <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <groupId>${project.groupId}</groupId> <artifactId>${application.name}-provider</artifactId> <version>${project.version}</version> </dependency> diff --git a/sdnr/wt/odlux/core/model/pom.xml b/sdnr/wt/odlux/core/model/pom.xml index faec06761..c16705f58 100644 --- a/sdnr/wt/odlux/core/model/pom.xml +++ b/sdnr/wt/odlux/core/model/pom.xml @@ -58,5 +58,7 @@ <artifactId>org.osgi.compendium</artifactId> <scope>provided</scope> </dependency> + </dependencies> + </project> diff --git a/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java b/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java index bbe36c840..636c9db29 100644 --- a/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java +++ b/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java @@ -203,7 +203,7 @@ public class ClassLoaderUtil { private Enumeration<E> determineCurrentEnumeration() { if (cur != null && !cur.hasMoreElements()) { - if (!enums.isEmpty()) { + if (enums.size() > 0) { cur = enums.removeLast(); } else { cur = null; diff --git a/sdnr/wt/odlux/core/provider/pom.xml b/sdnr/wt/odlux/core/provider/pom.xml index 7436b3768..94a239aa4 100644 --- a/sdnr/wt/odlux/core/provider/pom.xml +++ b/sdnr/wt/odlux/core/provider/pom.xml @@ -49,16 +49,14 @@ <dependencies> <dependency> - <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <groupId>${project.groupId}</groupId> <artifactId>sdnr-wt-odlux-core-model</artifactId> <version>${project.version}</version> - <scope>provided</scope> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>sdnr-wt-odlux-framework</artifactId> <version>${project.version}</version> - <scope>provided</scope> </dependency> <dependency> <groupId>org.osgi</groupId> @@ -77,7 +75,6 @@ <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> - <scope>provided</scope> </dependency> <dependency> <groupId>org.mockito</groupId> @@ -90,14 +87,14 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> - <artifactId>sdnr-wt-common</artifactId> - <version>${project.version}</version> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> <scope>test</scope> </dependency> <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-server</artifactId> + <groupId>${project.groupId}</groupId> + <artifactId>sdnr-wt-common</artifactId> + <version>${project.version}</version> <scope>test</scope> </dependency> </dependencies> diff --git a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java index c1cf875fc..82df2f0cd 100644 --- a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java +++ b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java @@ -48,14 +48,18 @@ public class IndexOdluxBundle extends OdluxBundle implements OdluxBundleResource private static final String ENABLE_OAUTH_DEFAULT = "false"; private static final String ENV_ENABLE_ODLUX_RBAC = "ENABLE_ODLUX_RBAC"; private static final String ENABLE_ODLUX_RBAC_DEFAULT = "false"; + private static final String ENV_TRANSPORTPCEGUIURL = "TRPCEGUIURL"; + private static final String TRANSPORTPCEGUIURL_DEFAULT = ""; private final boolean oauthEnabled; private final boolean policyEnabled; + private final String transportPceGuiUrl; public IndexOdluxBundle() { super(null, BUNDLENAME_APP); this.oauthEnabled = "true".equals(getEnvVar(ENV_ENABLE_OAUTH, ENABLE_OAUTH_DEFAULT)); this.policyEnabled = "true".equals(getEnvVar(ENV_ENABLE_ODLUX_RBAC, ENABLE_ODLUX_RBAC_DEFAULT)); + this.transportPceGuiUrl = getEnvVar(ENV_TRANSPORTPCEGUIURL, TRANSPORTPCEGUIURL_DEFAULT); LOG.info("instantiating index with oauthEnabled={} and policyEnabled={}",this.oauthEnabled, this.policyEnabled); } @@ -134,8 +138,15 @@ public class IndexOdluxBundle extends OdluxBundle implements OdluxBundleResource } private String generateConfigureJson() { - return String.format("{\"authentication\":\"%s\",\"enablePolicy\":%s}", this.oauthEnabled ? "oauth" : "basic", - String.valueOf(this.policyEnabled)); + StringBuilder sb = new StringBuilder(); + sb.append(String.format("{\"authentication\":\"%s\",\"enablePolicy\":%s", this.oauthEnabled ? "oauth" : "basic", + String.valueOf(this.policyEnabled))); + if (this.transportPceGuiUrl != null && this.transportPceGuiUrl.length() > 0) { + sb.append(String.format(",\"transportpceUrl\":\"%s\"}", this.transportPceGuiUrl)); + } else { + sb.append("}"); + } + return sb.toString(); } private static String getEnvVar(String v, String defaultValue) { diff --git a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java index b8afc3329..62e73ef1d 100644 --- a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java +++ b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java @@ -88,4 +88,5 @@ public class ResFilesServlet extends HttpServlet { return t; } + } |