DataMigration, other Batch
[aaf/authz.git] / auth / auth-batch / src / main / java / org / onap / aaf / auth / batch / reports / bodies / NotifyBody.java
index b36cf64..034286c 100644 (file)
@@ -39,6 +39,7 @@ import java.util.TreeMap;
 import org.onap.aaf.auth.batch.reports.Notify;
 import org.onap.aaf.auth.env.AuthzTrans;
 import org.onap.aaf.cadi.Access;
+import org.onap.aaf.cadi.config.Config;
 import org.onap.aaf.misc.env.APIException;
 
 public abstract class NotifyBody {
@@ -48,17 +49,19 @@ public abstract class NotifyBody {
        protected Map<String,List<List<String>>> rows;
        private final String name;
        private final String type;
+       protected final String env;
        private String date;
        private int escalation;
        private int count;
        
-       public NotifyBody(final String type, final String name) {
+       public NotifyBody(Access access, final String type, final String name) {
                rows = new TreeMap<>();
                this.name = name;
                this.type = type;
                date="";
                escalation = 1;
                count = 0;
+               env = access.getProperty(Config.AAF_ENV,"DEVL");
        }
        
        public void store(List<String> row) {
@@ -122,6 +125,8 @@ public abstract class NotifyBody {
         */
        protected abstract String user(List<String> row);
        
+       public abstract String subject();
+
        /**
         * Get Notify Body based on key of
         * type|name