Removed unwanted codes from four components 41/108341/1
authorIndrijeet kumar <indriku1@in.ibm.com>
Wed, 27 May 2020 19:27:01 +0000 (00:57 +0530)
committerIndrijeet kumar <indriku1@in.ibm.com>
Wed, 27 May 2020 19:27:07 +0000 (00:57 +0530)
Removed unwanted codes from four components

Issue-ID: PORTAL-813
Change-Id: Ibb69f1c53c61bb06448ad0d73889b453e69f57f7
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequence.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceCrossTab.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceDashboard.java
ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/UserAccessException.java

index cbf3ee6..5c2d0c4 100644 (file)
@@ -43,7 +43,6 @@ import org.onap.portalsdk.analytics.model.definition.ReportDefinition;
 import org.onap.portalsdk.analytics.util.AppConstants;
 
 public class WizardSequence extends Vector {
-       // private String currentStep = AppConstants.WS_DEFINITION;
        private int currentStepIdx = 0;
 
        private String currentSubStep = "";
@@ -84,20 +83,10 @@ public class WizardSequence extends Vector {
                throw new IndexOutOfBoundsException();
        } // getStepIndex
 
-       /*
-        * private String getInitialStep() { return getStep(0); } // getInitialStep
-        * 
-        * private String getFinalStep() { return getStep(getStepCount()-1); } //
-        * getFinalStep
-        */
        private boolean isInitialStep(int index) {
                return (index == 0);
        } // isInitialStep
 
-       /*
-        * private boolean isInitialStep(String step) { return
-        * isInitialStep(getStepIndex(step)); } // isInitialStep
-        */
        private boolean isFinalStep(int index) {
                if (index == 0)
                        return false;
@@ -105,37 +94,14 @@ public class WizardSequence extends Vector {
                return (index == (getStepCount() - 1));
        } // isFinalStep
 
-       /*
-        * private boolean isFinalStep(String step) { return
-        * isFinalStep(getStepIndex(step)); } // isFinalStep
-        */
-
        private int getNextStepIndex(int index) {
                return (index == (getStepCount() - 1)) ? index : (index + 1);
        } // getNextStep
 
-       /*
-        * private String getNextStep(String step) { return
-        * getStep(getNextStepIndex(getStepIndex(step))); } // getNextStep
-        * 
-        * private String getNextStep(String step, String subStep) {
-        * if(subStep.length()>0) return step;
-        * 
-        * return getNextStep(step); } // getNextStep
-        */
        private int getPrevStepIndex(int index) {
                return (index == 0) ? index : (index - 1);
        } // getPrevStepIndex
 
-       /*
-        * private String getPrevStep(String step) { return
-        * getStep(getPrevStepIndex(getStepIndex(step))); } // getPrevStep
-        * 
-        * private String getPrevStep(String step, String subStep) {
-        * if(subStep.length()>0) return step;
-        * 
-        * return getPrevStep(step); } // getPrevStep
-        */
        // *****************************************************
        public int getStepCount() {
                return size();
@@ -165,8 +131,9 @@ public class WizardSequence extends Vector {
                if (action.equals(AppConstants.WA_BACK))
                        if (currentSubStep.length() > 0)
                                currentSubStep = "";
-                       else
+                       else{
                                currentStepIdx = getPrevStepIndex(currentStepIdx);
+                       }
                else if (action.equals(AppConstants.WA_NEXT)) {
                        if (currentSubStep.length() > 0)
                                currentSubStep = "";
@@ -178,10 +145,11 @@ public class WizardSequence extends Vector {
                                                                && (rdef.getDataSourceList().getDataSource().size() == 0))
                                                        currentSubStep = AppConstants.WSS_ADD;
                                                else if (getCurrentStep().equals(AppConstants.WS_COLUMNS)
-                                                               && (rdef.getAllColumns().size() == 0))
+                                                               && (rdef.getAllColumns().size() == 0)){
                                                        currentSubStep = (rdef.getReportType().equals(
                                                                        AppConstants.RT_CROSSTAB) ? AppConstants.WSS_ADD
                                                                        : AppConstants.WSS_ADD_MULTI);
+                                                               }
                        }
                } else if (action.equals(AppConstants.WA_EDIT) || action.equals(AppConstants.WA_ADD)
                                || action.equals(AppConstants.WA_ADD_MULTI)
index d649db4..76b2a9e 100644 (file)
@@ -51,7 +51,6 @@ public class WizardSequenceCrossTab extends WizardSequence {
                add(AppConstants.WS_FILTERS);
                add(AppConstants.WS_JAVASCRIPT);
                add(AppConstants.WS_USER_ACCESS);
-               //add(AppConstants.WS_SCHEDULE);
                if (userIsAuthorizedToSeeLog)
                        if (Globals.getEnableReportLog())
                                add(AppConstants.WS_REPORT_LOG);
index 2c7f3f8..42ebc41 100644 (file)
@@ -46,7 +46,6 @@ public class WizardSequenceDashboard extends WizardSequence {
                super();
 
                add(AppConstants.WS_USER_ACCESS);
-               //add(AppConstants.WS_SCHEDULE);
                if (userIsAuthorizedToSeeLog)
                        if (Globals.getEnableReportLog())
                                add(AppConstants.WS_REPORT_LOG);
index 46232ba..571bb11 100644 (file)
@@ -44,8 +44,6 @@ public class UserAccessException extends RaptorRuntimeException {
        } // UserAccessException
 
        public UserAccessException(String reportID, String userName, String accessType) {
-               //super("User " + userName + " does NOT have " + accessType + " permission for report "
-               //              + reportID);
                super("Access denied. Please contact Administrator");
        } // UserAccessException