summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-02-07 11:09:32 -0600
committerInstrumental <jonathan.gathman@att.com>2019-02-07 11:12:23 -0600
commite2fa0e67712b92c69f6863afe10c1c973a068e3e (patch)
tree57a477bc5edd1e228c4c3197c5b90542a92edf9d /auth/auth-batch
parente43bc462af00e9c05384313514b279e11372fd79 (diff)
Add Batch in Config image
Change Images to run as aaf Issue-ID: AAF-740 Change-Id: If5b8583dc19ac4095ba9b25715e9330d2a0ed5fc Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-batch')
-rw-r--r--auth/auth-batch/pom.xml2
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/PrepExtend.java2
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyApprovals.java19
3 files changed, 13 insertions, 10 deletions
diff --git a/auth/auth-batch/pom.xml b/auth/auth-batch/pom.xml
index 1994d9e8..fb32d2de 100644
--- a/auth/auth-batch/pom.xml
+++ b/auth/auth-batch/pom.xml
@@ -226,7 +226,7 @@
<classifier>tests</classifier>
<archive>
<manifest>
- <mainClass>org.onap.aaf.auth.Batch</mainClass>
+ <mainClass>org.onap.aaf.auth.batch.Batch</mainClass>
</manifest>
<manifestEntries>
<Sealed>true</Sealed>
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/PrepExtend.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/PrepExtend.java
index 3e0dd011..d0eab007 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/PrepExtend.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/PrepExtend.java
@@ -82,7 +82,7 @@ public class PrepExtend extends Batch {
Date now = gc.getTime();
int ifrom = 0;
- int ito = 0;
+ int ito = 4;
for(int i=0; i< args().length;++i) {
switch(args()[i]) {
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyApprovals.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyApprovals.java
index c88eecde..4acf269d 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyApprovals.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/NotifyApprovals.java
@@ -43,9 +43,12 @@ import org.onap.aaf.auth.dao.cass.FutureDAO;
import org.onap.aaf.auth.dao.cass.HistoryDAO;
import org.onap.aaf.auth.env.AuthzTrans;
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.auth.org.Organization.Identity;
+import org.onap.aaf.cadi.Access;
+import org.onap.aaf.cadi.CadiException;
+import org.onap.aaf.cadi.config.RegistrationPropHolder;
import org.onap.aaf.misc.env.APIException;
import org.onap.aaf.misc.env.util.Chrono;
@@ -59,9 +62,11 @@ public class NotifyApprovals extends Batch {
private final PrintStream ps;
private final AuthzTrans noAvg;
- public NotifyApprovals(AuthzTrans trans) throws APIException, IOException, OrganizationException {
+ public NotifyApprovals(AuthzTrans trans) throws APIException, IOException, OrganizationException, CadiException {
super(trans.env());
-
+ Access access = trans.env().access();
+ RegistrationPropHolder rph = new RegistrationPropHolder(access, 0);
+ String guiURL = rph.replacements(access.getProperty(GUI_URL,"https://%P/gui"),"","");
noAvg = env.newTransNoAvg();
noAvg.setUser(new BatchPrincipal("batch:NotifyApprovals"));
@@ -77,13 +82,11 @@ public class NotifyApprovals extends Batch {
maxEmails = Integer.parseInt(trans.getProperty("MAX_EMAILS","3"));
}
email.subject("AAF Approval Notification (ENV: %s)",batchEnv);
- email.preamble("AAF (MOTS 22830) is the AT&T Authorization System used by many AT&T Tools and Applications." +
+ email.preamble("AAF is the ONAP Authorization System." +
"\n Your approval is required, which you may enter on the following page:"
+ "\n\n\t%s/approve\n\n"
- ,env.getProperty(GUI_URL));
- email.signature("Sincerely,\nAAF Team (Our MOTS# 22830)\n"
- + "https://wiki.web.att.com/display/aaf/Contact+Us\n"
- + "(Use 'Other Misc Requests (TOPS)')");
+ ,guiURL);
+ email.signature("Sincerely,\nAAF Team\n");
Approval.load(trans, session, Approval.v2_0_17);
Future.load(trans, session, Future.v2_0_17); // Skip the Construct Data