Sonar Fixes, Formatting
[aaf/authz.git] / auth / auth-batch / src / main / java / org / onap / aaf / auth / batch / helpers / ExpireRange.java
index c7d4e7d..bb3a3e9 100644 (file)
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file 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.
@@ -47,7 +47,7 @@ public class ExpireRange {
     public final Range approveDelete ;
 
     private Range delRange;
-    
+
     public ExpireRange(final Access access) {
         ranges = new HashMap<>();
         intervalDates = new HashMap<>();
@@ -58,8 +58,8 @@ public class ExpireRange {
                 List<Range> lcred = getRangeList("cred");
                 List<Range> lur = getRangeList("ur");
                 List<Range> lx509 = getRangeList("x509");
-    
-                
+
+
                 /*
                    Range(Name, ReportingLevel, PeopleInterval, AppInterval, Start(Type,Qty) End(Type,Qty) )
                    Interval of -1 Means "only once"
@@ -70,25 +70,25 @@ public class ExpireRange {
                 lur.add(delRange);
                 lcred.add(delRange);
                 lx509.add(delRange);
-                
+
                 lcred.add(new Range(ONE_WEEK ,3,-1,1,0,0,GregorianCalendar.WEEK_OF_MONTH,1));
                 lcred.add(new Range(TWO_WEEK ,2,-1,-1,GregorianCalendar.WEEK_OF_MONTH,1,GregorianCalendar.WEEK_OF_MONTH,2));
                 lcred.add(new Range(ONE_MONTH,1,7,7,GregorianCalendar.WEEK_OF_MONTH,2,GregorianCalendar.MONTH,1));
                 lcred.add(new Range(TWO_MONTH,1,-1,-1,GregorianCalendar.MONTH,1,GregorianCalendar.MONTH,2));
-                
+
                 lur.add(  new Range(ONE_MONTH,1,-1,-1,0,0,GregorianCalendar.MONTH,1));
                 // Comment out until we can get some more clear actions in place for GUI
                 // lur.add(  new Range(ONE_MONTH,1,-1,-1,GregorianCalendar.WEEK_OF_MONTH,2,GregorianCalendar.MONTH,1));
                 // lur.add(  new Range(ONE_WEEK,2,-1,1,0,0,GregorianCalendar.WEEK_OF_MONTH,1));
-                
+
                 lx509.add(new Range(ONE_MONTH,1,-1,-1,GregorianCalendar.WEEK_OF_MONTH,2,GregorianCalendar.MONTH,1));
             }
     }
-    
+
     public Range newFutureRange() {
         return new Range("Approval",7,7,1,0,0,GregorianCalendar.MONTH,1);
     }
-    
+
     public Set<String> names() {
         Set<String> names = new HashSet<>();
         for(List<Range> lr : ranges.values()) {
@@ -99,7 +99,7 @@ public class ExpireRange {
 
         return names;
     }
-    
+
     private synchronized List<Range> getRangeList(final String key) {
         List<Range> rv = ranges.get(key);
         if(rv==null) {
@@ -108,7 +108,7 @@ public class ExpireRange {
         }
         return rv;
     }
-    
+
     public class Range {
         private final String name;
         private final int reportingLevel;
@@ -117,11 +117,11 @@ public class ExpireRange {
         private final Date start;
         private final Date end;
         private final Date lowerValid;
-        
+
         public Range(
-                final String name, final int reportingLevel, 
-                final int peopleInterval, final int appInterval,  
-                final int startGCType, final int startQty,  
+                final String name, final int reportingLevel,
+                final int peopleInterval, final int appInterval,
+                final int startGCType, final int startQty,
                 final int endGCType,final int endQty) {
             this.name = name;
             this.reportingLevel = reportingLevel;
@@ -135,7 +135,7 @@ public class ExpireRange {
                 gc.add(startGCType, startQty);
             }
             start = gc.getTime();
-            
+
             if(endGCType<0) {
                 gc.set(GregorianCalendar.YEAR, 1);
             } else {
@@ -143,7 +143,7 @@ public class ExpireRange {
                 gc.add(endGCType, endQty);
             }
             end = gc.getTime();
-            
+
 
             if(endGCType<0) {
                 gc.set(GregorianCalendar.YEAR, -1);
@@ -154,11 +154,11 @@ public class ExpireRange {
             lowerValid = gc.getTime();
 
         }
-        
+
         public String name() {
             return name;
         }
-        
+
         public int reportingLevel() {
             return reportingLevel;
         }
@@ -190,11 +190,11 @@ public class ExpireRange {
         public Date getStart() {
             return start;
         }
-        
+
         public Date getEnd() {
             return end;
         }
-        
+
         public boolean inRange(final Date date) {
             if(date==null) {
                 return false;
@@ -226,6 +226,6 @@ public class ExpireRange {
     public Date now() {
         return now;
     }
-    
+
 
 }