diff options
author | Jonathan Gathman <jgonap@stl.gathman.org> | 2020-04-17 11:54:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-17 11:54:24 +0000 |
commit | 028f1ab9273171339b477d80f30a790df2344517 (patch) | |
tree | 4ebedb1bee08ad40a535191b4e97ffb735d5f947 /auth/auth-batch | |
parent | 861b557b294032f9443ee1fca6b42d7252e92481 (diff) | |
parent | 27ed5fad6ca00a7089927e9bc5cdd93f1d5c1651 (diff) |
Merge "test commit. sonar fixes"
Diffstat (limited to 'auth/auth-batch')
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java index f346f7dd..4d6af8a0 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java @@ -48,7 +48,7 @@ public class ApprovedRpt extends Batch { private Date now; private Writer approvedW; private CSV historyR; - private static String yr_mon; + private static String yearMon; public ApprovedRpt(AuthzTrans trans) throws APIException, IOException, OrganizationException { super(trans.env()); @@ -64,7 +64,7 @@ public class ApprovedRpt extends Batch { historyR = new CSV(env.access(),args()[1]).setDelimiter('|'); - yr_mon = args()[0]; + yearMon = args()[0]; } finally { tt0.done(); } @@ -73,34 +73,12 @@ public class ApprovedRpt extends Batch { @Override protected void run(AuthzTrans trans) { try { -// ResultSet results; -// Statement stmt = new SimpleStatement( "select dateof(id), approver, status, user, type, memo from authz.approved;" ); -// results = session.execute(stmt); -// Iterator<Row> iter = results.iterator(); -// Row row; - /* - * while (iter.hasNext()) { - ++totalLoaded; - row = iter.next(); - d = row.getTimestamp(0); - if(d.after(begin)) { - approvedW.row("aprvd", - Chrono.dateOnlyStamp(d), - row.getString(1), - row.getString(2), - row.getString(3), - row.getString(4), - row.getString(5) - ); - } - } - */ GregorianCalendar gc = new GregorianCalendar(); gc.add(GregorianCalendar.MONTH, -2); approvedW.comment("date, approver, status, user, role, memo"); historyR.visit(row -> { String s = row.get(7); - if(s.equals(yr_mon)) { + if(s.equals(yearMon)) { String target = row.get(5); if("user_role".equals(target)) { String action = row.get(1); |