summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE-common')
-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/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/UserRolesCommonServiceImpl.java3
7 files changed, 30 insertions, 21 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/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/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);
}
}