X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-batch%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fbatch%2Fupdate%2FNotifyCredExpiring.java;h=ab563fe883085d0e88d365e52ad329b0273d7e92;hb=59ffb7d529245c3bd0233dbf6cb0ae9fe9ccb856;hp=ab7525b6ab3984e17d53f2d4649f6f6c25289489;hpb=613846477296bd3888ba6e5f939afe688b486ad7;p=aaf%2Fauthz.git diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyCredExpiring.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyCredExpiring.java index ab7525b6..ab563fe8 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyCredExpiring.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyCredExpiring.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2018 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,14 +29,10 @@ import java.io.IOException; import java.io.PrintStream; import java.text.ParseException; import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; import java.util.Date; -import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; @@ -42,21 +40,10 @@ import org.onap.aaf.auth.batch.Batch; import org.onap.aaf.auth.batch.BatchPrincipal; import org.onap.aaf.auth.batch.actions.Email; import org.onap.aaf.auth.batch.actions.EmailPrint; -import org.onap.aaf.auth.batch.actions.Message; -import org.onap.aaf.auth.batch.helpers.Cred; -import org.onap.aaf.auth.batch.helpers.NS; import org.onap.aaf.auth.batch.helpers.Notification; import org.onap.aaf.auth.batch.helpers.UserRole; -import org.onap.aaf.auth.batch.helpers.Notification.TYPE; -import org.onap.aaf.auth.dao.cass.CredDAO; -import org.onap.aaf.auth.dao.hl.Question; import org.onap.aaf.auth.env.AuthzTrans; -import org.onap.aaf.auth.layer.Result; -import org.onap.aaf.auth.org.EmailWarnings; -import org.onap.aaf.auth.org.Organization; -import org.onap.aaf.auth.org.Organization.Identity; import org.onap.aaf.auth.org.OrganizationException; -import org.onap.aaf.auth.org.OrganizationFactory; import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.util.CSV; import org.onap.aaf.misc.env.APIException; @@ -83,7 +70,7 @@ public class NotifyCredExpiring extends Batch { private CSV csv; private CSVInfo csvInfo; - public NotifyCredExpiring(AuthzTrans trans) throws APIException, IOException, OrganizationException { + public NotifyCredExpiring(AuthzTrans trans) throws APIException, IOException, OrganizationException, CadiException { super(trans.env()); TimeTaken tt = trans.start("Connect to Cluster", Env.REMOTE); try { @@ -119,7 +106,7 @@ public class NotifyCredExpiring extends Batch { } else { File f = new File(logDir(),args()[0]); System.out.println("Reading " + f.getCanonicalPath()); - csv = new CSV(f); + csv = new CSV(env.access(),f); } if(args().length<2) { @@ -131,11 +118,7 @@ public class NotifyCredExpiring extends Batch { } csvInfo = new CSVInfo(System.err); - try { - csv.visit(csvInfo); - } catch (CadiException e) { - throw new APIException(e); - } + csv.visit(csvInfo); Notification.load(trans, session, Notification.v2_0_18);