summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/main/java/org/onap/portalapp
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/onap/portalapp')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java23
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java8
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/model/Result.java10
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicUtil.java3
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java6
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduler/SchedulerRestInterface.java2
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImpl.java4
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java4
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java3
9 files changed, 37 insertions, 26 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java
index c3837621..f5453a75 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java
@@ -3,6 +3,8 @@
* ONAP Portal
* ===================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2018 IBM.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -372,20 +374,21 @@ public class PostSearchBean extends SearchBase {
public boolean isCriteriaUpdated() {
+ final boolean flag = true;
if(user==null&&userOrig==null)
return false;
else if(user==null||userOrig==null)
return true;
- else
- return (! (
- Utilities.nvl(user.getFirstName()).equals(Utilities.nvl(userOrig.getFirstName()))&&
- Utilities.nvl(user.getLastName()).equals(Utilities.nvl(userOrig.getLastName()))&&
- //Utilities.nvl(user.getHrid()).equals(Utilities.nvl(userOrig.getHrid()))&&
- Utilities.nvl(user.getOrgUserId()).equals(Utilities.nvl(userOrig.getOrgUserId()))&&
- Utilities.nvl(user.getOrgCode()).equals(Utilities.nvl(userOrig.getOrgCode()))&&
- Utilities.nvl(user.getEmail()).equals(Utilities.nvl(userOrig.getEmail()))&&
- Utilities.nvl(user.getOrgManagerUserId()).equals(Utilities.nvl(userOrig.getOrgManagerUserId()))&&
- true));
+ else {
+ boolean value = Utilities.nvl(user.getFirstName()).equals(Utilities.nvl(userOrig.getFirstName()))&&
+ Utilities.nvl(user.getLastName()).equals(Utilities.nvl(userOrig.getLastName()))&&
+ //Utilities.nvl(user.getHrid()).equals(Utilities.nvl(userOrig.getHrid()))&&
+ Utilities.nvl(user.getOrgUserId()).equals(Utilities.nvl(userOrig.getOrgUserId()))&&
+ Utilities.nvl(user.getOrgCode()).equals(Utilities.nvl(userOrig.getOrgCode()))&&
+ Utilities.nvl(user.getEmail()).equals(Utilities.nvl(userOrig.getEmail()))&&
+ Utilities.nvl(user.getOrgManagerUserId()).equals(Utilities.nvl(userOrig.getOrgManagerUserId()));
+ return (!(value && flag));
+ }
} // isCriteriaUpdated
} // PostSearchBean
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java
index 13b86995..b9f46492 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java
@@ -3,6 +3,8 @@
* ONAP Portal
* ===================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2018 IBM.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -52,11 +54,11 @@ import org.springframework.context.annotation.Configuration;
public class NotificationCleanupConfig implements ApplicationContextAware {
// Once every 10 minutes should be adequate
- public final static int CLEANUP_PERIOD_MINUTES = 10;
+ public static final int CLEANUP_PERIOD_MINUTES = 10;
private static ApplicationContext applicationContext;
- public void setApplicationContext(ApplicationContext context) throws BeansException {
+ public void setApplicationContext(ApplicationContext context) {
applicationContext = context;
}
@@ -69,7 +71,7 @@ public class NotificationCleanupConfig implements ApplicationContextAware {
public void StartSchedular() {
TimerTask task = new NotificationCleanup();
Timer timer = new Timer();
- timer.schedule(task, 1000, CLEANUP_PERIOD_MINUTES * 60 * 1000);
+ timer.schedule(task, 1000, (long) CLEANUP_PERIOD_MINUTES * 60 * 1000);
}
@Bean
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/model/Result.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/model/Result.java
index 216ae3af..8b099970 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/model/Result.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/model/Result.java
@@ -3,6 +3,8 @@
* ONAP Portal
* ===================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2018 IBM.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -38,18 +40,18 @@
package org.onap.portalapp.model;
public class Result {
- private String result;
+ private String results;
public Result(String result) {
- this.result = result;
+ this.results = result;
}
public String getResult() {
- return result;
+ return results;
}
public void setResult(String result) {
- this.result = result;
+ this.results = result;
}
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicUtil.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicUtil.java
index 308528d5..9667bfef 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicUtil.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicUtil.java
@@ -115,7 +115,8 @@ public class MusicUtil {
oos.flush();
}
} catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed to serialize ");
+ String message="Failed to serialize ";
+ logger.error(EELFLoggerDelegate.errorLogger, message, e);
}
return ByteBuffer.wrap(bo.toByteArray());
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java
index 3160032f..ab88dd6e 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java
@@ -3,6 +3,8 @@
* ONAP Portal
* ===================================================================
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modification Copyright (C) 2018 IBM.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -320,7 +322,7 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
@SuppressWarnings("unused")
private String decrypted(String encrypted) throws Exception {
String result = "";
- if (encrypted != null & encrypted.length() > 0) {
+ if (encrypted != null && encrypted.length() > 0) {
try {
result = CipherUtil.decryptPKC(encrypted, SystemProperties.getProperty(SystemProperties.Decryption_Key));
} catch (Exception e) {
@@ -333,7 +335,7 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
private String encrypted(String decryptedPwd) throws Exception {
String result = "";
- if (decryptedPwd != null & decryptedPwd.length() > 0) {
+ if (decryptedPwd != null && decryptedPwd.length() > 0) {
try {
result = CipherUtil.encryptPKC(decryptedPwd,
SystemProperties.getProperty(SystemProperties.Decryption_Key));
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduler/SchedulerRestInterface.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduler/SchedulerRestInterface.java
index 825d33a2..1886b8b5 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduler/SchedulerRestInterface.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduler/SchedulerRestInterface.java
@@ -157,7 +157,7 @@ public class SchedulerRestInterface implements SchedulerRestInterfaceIfc {
client = HttpsBasicClient.getClient();
}
} catch (Exception e) {
- logger.debug(EELFLoggerDelegate.debugLogger, "Unable to initialize rest client");
+ logger.debug(EELFLoggerDelegate.debugLogger, "Unable to initialize rest client",e.getMessage());
}
logger.debug(EELFLoggerDelegate.debugLogger, "Client Initialized");
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImpl.java
index a2ff3149..74cf1726 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/BasicAuthAccountServiceImpl.java
@@ -221,7 +221,7 @@ public class BasicAuthAccountServiceImpl implements BasicAuthAccountService{
private String decryptedPassword(String encryptedPwd) throws Exception {
String result = "";
- if (encryptedPwd != null & encryptedPwd.length() > 0) {
+ if (encryptedPwd != null && encryptedPwd.length() > 0) {
try {
result = CipherUtil.decryptPKC(encryptedPwd,
SystemProperties.getProperty(SystemProperties.Decryption_Key));
@@ -235,7 +235,7 @@ public class BasicAuthAccountServiceImpl implements BasicAuthAccountService{
private String encryptedPassword(String decryptedPwd) throws Exception {
String result = "";
- if (decryptedPwd != null & decryptedPwd.length() > 0) {
+ if (decryptedPwd != null && decryptedPwd.length() > 0) {
try {
result = CipherUtil.encryptPKC(decryptedPwd,
SystemProperties.getProperty(SystemProperties.Decryption_Key));
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java
index 4c68fc9c..4197d232 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java
@@ -897,8 +897,8 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
* @throws Exception
*/
@SuppressWarnings("unchecked")
- @Transactional(rollbackFor = Exception.class)
- private boolean addRoleInEcompDB(Role addRoleInDB, EPApp app) throws Exception {
+ @Transactional(rollbackFor = Exception.class)
+ public boolean addRoleInEcompDB(Role addRoleInDB, EPApp app) throws Exception {
boolean result = false;
EPRole epRole = null;
Set<RoleFunction> roleFunctionList = addRoleInDB.getRoleFunctions();
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
index e3ce07ff..2eb7c948 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
@@ -887,7 +887,8 @@ public class UserRolesCommonServiceImpl {
addRemoteUser(roleInAppForUserList, userId, app, mapper, searchService,
applicationsRestClientService);
} catch (Exception e) {
- logger.debug(EELFLoggerDelegate.debugLogger, e.getMessage());
+ String message=e.getMessage();
+ logger.error(EELFLoggerDelegate.errorLogger, message, e);
}
}