summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-core/src/main/java
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-10-04 08:22:43 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-10-04 08:24:16 -0400
commit4031c6ae9074f898e768cbf5ccb5158a59a7072a (patch)
tree1aa2ff6ce771d6f605f8d4e89db18240623545f2 /ecomp-sdk/epsdk-core/src/main/java
parent3a2b5c60384feb490e878020bdb9c01f514d7856 (diff)
Repair redirect; correct javadoc site path
[PORTAL-53] Correct path for deployment of javadoc web site [PORTAL-78] Prevent SDJ from redirecting multiples times during single signon [St164634] Tone down the logging when communicating with the Partnering Applications Add missing license headers; drop FusionLicenseImpl. Issue: PORTAL-53 PORTAL-78 Change-Id: I3f8200d8e41754ade05e3f7b38d0db6bdd5e59e8 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/main/java')
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java12
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java2
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/ApplicationContextListener.java64
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManager.java73
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManagerUtils.java79
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/LicenseableClass.java62
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java4
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocatorImpl.java13
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/UserUtils.java20
9 files changed, 4 insertions, 325 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java
index 2ef50419..afd4f589 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java
@@ -201,22 +201,12 @@ public class Domain {
if (containerRowCol != null && containerRowCol.containsKey(String.valueOf(i) + String.valueOf(j))) {
Container c = containerRowCol.get(String.valueOf(i) + String.valueOf(j));
Position p = new Position();
- if (this.getName().equals("VNI")) {
- p.x = j * (interContWd - 2) + xsum + domainToLayoutWd;
- } else
- p.x = j * interContWd + xsum + domainToLayoutWd;
+ p.x = j * interContWd + xsum + domainToLayoutWd;
double ysum = 0;
for (int k = 0; k < i; k++) {
if (containerRowCol.containsKey(String.valueOf(k) + String.valueOf(j)))
ysum += containerRowCol.get(String.valueOf(k) + String.valueOf(j)).computeSize()
.getHeight();
-
- else if (j > 0 && containerRowCol.containsKey(String.valueOf(k) + String.valueOf(j - 1))
- && !containerRowCol.get(String.valueOf(i) + String.valueOf(j)).getName()
- .equals("AIC - Alpharetta")) {
- ysum += containerRowCol.get(String.valueOf(k) + String.valueOf(j - 1)).computeSize()
- .getHeight();
- }
}
p.y = domainToLayoutH + ysum + this.computeSize().getHeight() + domainToContH + i * interContH;
c.setP(p);
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java
index 09c8372d..c729eef4 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java
@@ -631,8 +631,6 @@ public class Layout {
else
newX = domainstoUpd.get(i).getP().getX() + 38;
- if (d.getName().equals("Datacenter with AIC"))
- newX += 5;
d.setDomainToLayoutWd(newX);
d.computeConatinerPositions();
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/ApplicationContextListener.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/ApplicationContextListener.java
deleted file mode 100644
index 89e9382f..00000000
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/ApplicationContextListener.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * ============LICENSE_START==========================================
- * ONAP Portal SDK
- * ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- *
- * Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the "License");
- * you may not use this software 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.
- *
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://creativecommons.org/licenses/by/4.0/
- *
- * Unless required by applicable law or agreed to in writing, documentation
- * 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============================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.onap.portalsdk.core.listener;
-
-import javax.servlet.ServletContext;
-import javax.servlet.annotation.WebListener;
-
-import org.onap.portalsdk.core.lm.FusionLicenseManagerUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.ContextRefreshedEvent;
-import org.springframework.stereotype.Component;
-
-@WebListener
-@Component
-public class ApplicationContextListener implements ApplicationListener<ContextRefreshedEvent> {
-
- @Autowired
- private ServletContext context;
- @Autowired
- private FusionLicenseManagerUtils fusionLicenseManagerUtils;
-
- @Override
- public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
- int licenseStatus = fusionLicenseManagerUtils.verifyLicense(context);
- context.setAttribute("licenseVerification", licenseStatus);
- }
-
-}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManager.java
deleted file mode 100644
index 1943c390..00000000
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * ============LICENSE_START==========================================
- * ONAP Portal SDK
- * ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- *
- * Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the "License");
- * you may not use this software 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.
- *
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://creativecommons.org/licenses/by/4.0/
- *
- * Unless required by applicable law or agreed to in writing, documentation
- * 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============================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.onap.portalsdk.core.lm;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletContext;
-
-public interface FusionLicenseManager {
-
- public static final int DEVELOPER_LICENSE = 0;
- public static final int EXPIRED_LICENSE = 1;
- public static final int VALID_LICENSE = 2;
- public static final int INVALID_LICENSE = 3;
- public static final int OPENSOURCE_LICENSE = 4;
-
- public void initKeyStoreParam();
-
- public void initCipherParam();
-
- public void initLicenseParam();
-
- public void doInitWork();
-
- public int installLicense();
-
- public int verifyLicense(ServletContext context);
-
- public void generateLicense(Map<String, String> clientInfoMap, List<String> ipAddressList) throws Exception;
-
- public String nvl(String s);
-
- public Date getExpiredDate();
-
- public void setExpiredDate(Date expiredDate);
-} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManagerUtils.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManagerUtils.java
deleted file mode 100644
index 9fb576f5..00000000
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManagerUtils.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * ============LICENSE_START==========================================
- * ONAP Portal SDK
- * ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- *
- * Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the "License");
- * you may not use this software 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.
- *
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://creativecommons.org/licenses/by/4.0/
- *
- * Unless required by applicable law or agreed to in writing, documentation
- * 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============================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.onap.portalsdk.core.lm;
-
-import java.util.Date;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-
-import org.onap.portalsdk.core.util.SystemProperties;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.servlet.support.RequestContextUtils;
-
-@Component
-public class FusionLicenseManagerUtils {
-
- @Autowired
- private FusionLicenseManager licenseManager;
-
- @Autowired
- private SystemProperties sysProps;
-
- public int verifyLicense(ServletContext context) {
- if (sysProps == null) {
- try {
- sysProps = new SystemProperties();
- sysProps.setServletContext(context);
- System.out.println(licenseManager);
- licenseManager.installLicense();
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
-
- return licenseManager.verifyLicense(context);
- }
-
- public static Date getLicenseExpiryDate(HttpServletRequest request) {
- WebApplicationContext ctx = RequestContextUtils.getWebApplicationContext(request);
- return ((FusionLicenseManager) ctx.getBean("fusionLicenseManager")).getExpiredDate();
- }
-}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/LicenseableClass.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/LicenseableClass.java
deleted file mode 100644
index 4d14a359..00000000
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/LicenseableClass.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * ============LICENSE_START==========================================
- * ONAP Portal SDK
- * ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- *
- * Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the "License");
- * you may not use this software 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.
- *
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://creativecommons.org/licenses/by/4.0/
- *
- * Unless required by applicable law or agreed to in writing, documentation
- * 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============================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.onap.portalsdk.core.lm;
-
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-
-/**
- * created by Alvin Alexander of http://devdaily.com. modified by Sundar
- * Ramalingam
- */
-public interface LicenseableClass {
- public String getApplicationName();
-
- public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException;
-
- public String getAlias();
-
- public String getPublicKeystorePassword();
-
- public String getKeyPasswd();
-
- public String getCipherParamPassword();
-
- public Class getClassToLicense();
-
-}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java
index d24bd503..e838e783 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java
@@ -87,10 +87,10 @@ public class ElementMapService {
// Used to build image file relative URLs
final String iconRelPath = SystemProperties.getProperty("element_map_icon_path");
- Map<String, Domain> resultAICDomain = layout.getDomainRowCol();
+ Map<String, Domain> resultDomain = layout.getDomainRowCol();
Map<String, List<Domain>> domainMap = new HashMap<>();
List<Domain> domainList = new ArrayList<>();
- for (Domain d : resultAICDomain.values()) {
+ for (Domain d : resultDomain.values()) {
d.setWidth(10 * d.computeSize().getWidth());
d.setHeight(10 * d.computeSize().getHeight());
d.setLeft(10 * d.getP().getX());
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocatorImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocatorImpl.java
index 704cd39a..fb705728 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocatorImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocatorImpl.java
@@ -96,17 +96,4 @@ public class ServiceLocatorImpl implements ServiceLocator {
return dirContext;
}
- // Get an LDAP directory context - LDAPv3-style
- /*
- * public InitialLdapContext getLdapContext() { //throws NamingException { if
- * (ldapContext == null) { Properties properties = new Properties(); // @todo -
- * need to parameterize context factoy class and url
- * properties.put(Context.INITIAL_CONTEXT_FACTORY,
- * AttLdap.DIR_INITIAL_CONTEXT_FACTORY); properties.put(Context.PROVIDER_URL,
- * AttLdap.DIR_PROVIDER_URL); properties.put(Context.SECURITY_PRINCIPAL,
- * AttLdap.DIR_SECURITY_PRINCIPAL); Control[] ctrl = null; try { ldapContext =
- * new InitialLdapContext(properties, ctrl); } catch (NamingException ne) { //
- * MJ FIX log exception? } } return ldapContext; }
- */
-
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/UserUtils.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/UserUtils.java
index 5395521b..89f34050 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/UserUtils.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/UserUtils.java
@@ -57,7 +57,6 @@ import org.onap.portalsdk.core.domain.Role;
import org.onap.portalsdk.core.domain.RoleFunction;
import org.onap.portalsdk.core.domain.User;
import org.onap.portalsdk.core.exception.SessionExpiredException;
-import org.onap.portalsdk.core.lm.FusionLicenseManager;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.menu.MenuBuilder;
import org.onap.portalsdk.core.restful.domain.EcompRole;
@@ -99,24 +98,7 @@ public class UserUtils {
String displayName = "";
if (SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME) != null)
displayName = SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME);
- switch (licenseVarificationFlag) {
- case FusionLicenseManager.DEVELOPER_LICENSE:
- session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),
- displayName + " [Development Version]");
- break;
- case FusionLicenseManager.EXPIRED_LICENSE:
- session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),
- displayName + " [LICENSE EXPIRED]");
- break;
- case FusionLicenseManager.VALID_LICENSE:
- session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME), displayName);
- break;
- default:
- session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),
- displayName + " [INVALID LICENSE]");
- break;
- }
-
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME), displayName);
session.setAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME),
MenuBuilder.filterMenu(applicationMenuData, request));
session.setAttribute(SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_ATTRIBUTE_NAME),