removed code smells in SendNotification & AppUtils 21/108621/1
authorIndrijeet kumar <indriku1@in.ibm.com>
Mon, 1 Jun 2020 11:16:02 +0000 (16:46 +0530)
committerIndrijeet kumar <indriku1@in.ibm.com>
Mon, 1 Jun 2020 11:16:12 +0000 (16:46 +0530)
removed code smells in SendNotification & AppUtils

Issue-ID: PORTAL-813
Change-Id: I03fdeb83e5b2379935025ee7c9ab4882eebfbc89
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendNotifications.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/AppUtils.java

index c13e2ba..fba9fee 100644 (file)
@@ -346,18 +346,6 @@ public class SendNotifications {
                         }
                     }
 
-                    // schedulerUtil.getAndExecute("select c.column_value from table(CR_DISSECTURL(p_formfields)) c
-                    // where substr(c.column_value, 1, instr(c.column_value, '=')-1) = substr(" + result.v_name +
-                    // ",1,instr(" + result.v_name + ",'_auto')-1)||'_Hr'", new Executor() {
-                    //
-                    // @Override
-                    // public void execute(ResultSet rs) throws SQLException {
-                    //
-                    // result.v_hour = rs.getString("column_value");
-                    // }
-                    //
-                    // });
-
                     if (result.v_hour.length() > 0) {
                         result.v_hour_value = result.v_hour.substring(result.v_hour.indexOf('=') + 1);
                     }
index 972cf72..245ae55 100644 (file)
@@ -135,10 +135,6 @@ public class AppUtils /* implements IAppUtils */{
                return Globals.getAppUtils().isUserInRole(request,roleId);
        } // isUserInRole
 
-//     public static boolean isUserInRole(String userId, String roleId) throws RaptorException {
-//             return Globals.getAppUtils().isUserInRole(userId, roleId);
-//     } // isUserInRole
-
        public static Vector getUserRoles(HttpServletRequest request) throws RaptorException {
                return Globals.getAppUtils().getUserRoles(request);
        } // getUserRoles
@@ -146,10 +142,6 @@ public class AppUtils /* implements IAppUtils */{
        public static Vector getUserRoles(String userID) throws RaptorException {
                return Globals.getAppUtils().getUserRoles(userID);
        } // getUserRoles
-       
-//     public static Vector getUserRoles(HttpServletRequest request) throws RaptorException {
-//             return Globals.getAppUtils().getUserRoles(request);
-//     } // getUserRoles
 
        public static void resetUserCache() {
                Globals.getAppUtils().resetUserCache();
@@ -170,12 +162,6 @@ public class AppUtils /* implements IAppUtils */{
                else return isUserInRole(request, getSuperRoleID());
        } // isSuperUser
 
-       /*public static boolean isSuperUser(String userId)  throws RaptorException {
-               if(Globals.isAdminRoleEquivalenttoSuperRole()) return isAdminUser(userId);
-               else return isUserInRole(userId, getSuperRoleID());
-       } // isSuperUser
-       */
-
        public static boolean isAdminUser(HttpServletRequest request) throws RaptorException {
                if (isSuperUser(request))
                        return true;
@@ -186,18 +172,6 @@ public class AppUtils /* implements IAppUtils */{
                return false;
        } // isAdminUser
 
-       /*public static boolean isAdminUser(String userId) throws RaptorException {
-               if (isSuperUser(userId))
-                       return true;
-
-               for (int i = 0; i < getAdminRoleIDs().size(); i++)
-                       if (isUserInRole(userId, (String) getAdminRoleIDs().get(i)))
-                               return true;
-
-               return false;
-       } // isAdminUser
-       */
-
        public static String getTempFolderPath() {
                String path = Globals.getAppUtils().getTempFolderPath();
         if (path.endsWith(File.separator) || path.endsWith("/")){
@@ -266,19 +240,6 @@ public class AppUtils /* implements IAppUtils */{
                return Globals.getAppUtils().getFolderPathAdj();
        } // getBaseFolderURL
 
-
-       /*
-        * public static String getReportExecuteActionURL() { return
-        * Globals.getAppUtils().getReportExecuteActionURL(); } //
-        * getReportExecuteActionURL
-        * 
-        * public static String getDataViewActionURL() { return
-        * Globals.getAppUtils().getDataViewActionURL(); } // getDataViewActionURL
-        * 
-        * public static String getDataViewActionParam() { return
-        * Globals.getAppUtils().getDataViewActionParam(); } //
-        * getDataViewActionParam
-        */
        public static String getDirectAccessURL() {
                return Globals.getAppUtils().getDirectAccessURL();
        } // getDirectAccessURL