Code Review
/
aaf
/
authz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Changes from Batch Test
[aaf/authz.git]
/
auth
/
auth-batch
/
src
/
main
/
java
/
org
/
onap
/
aaf
/
auth
/
batch
/
reports
/
bodies
/
NotifyBody.java
diff --git
a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java
b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java
index
b36cf64
..
82c1f2c
100644
(file)
--- a/
auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java
+++ b/
auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java
@@
-46,19
+46,24
@@
public abstract class NotifyBody {
private static final Map<String,NotifyBody> bodyMap = new HashMap<>();
protected Map<String,List<List<String>>> rows;
private static final Map<String,NotifyBody> bodyMap = new HashMap<>();
protected Map<String,List<List<String>>> rows;
+ protected final String env;
+ protected final String gui_url;
+
private final String name;
private final String type;
private String date;
private int escalation;
private int count;
private final String name;
private final String type;
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;
rows = new TreeMap<>();
this.name = name;
this.type = type;
date="";
escalation = 1;
count = 0;
+ env = access.getProperty("CASS_ENV","DEVL");
+ gui_url = access.getProperty("GUI_URL", "");
}
public void store(List<String> row) {
}
public void store(List<String> row) {
@@
-122,6
+127,8
@@
public abstract class NotifyBody {
*/
protected abstract String user(List<String> row);
*/
protected abstract String user(List<String> row);
+ public abstract String subject();
+
/**
* Get Notify Body based on key of
* type|name
/**
* Get Notify Body based on key of
* type|name
@@
-190,16
+197,24
@@
public abstract class NotifyBody {
}
}
}
}
- protected void print
ln
(StringBuilder sb, int indent, Object ... objs) {
+ protected void print(StringBuilder sb, int indent, Object ... objs) {
for(int i=0;i<indent;++i) {
sb.append(' ');
}
for(Object o : objs) {
sb.append(o.toString());
}
for(int i=0;i<indent;++i) {
sb.append(' ');
}
for(Object o : objs) {
sb.append(o.toString());
}
+ }
+
+ protected void println(StringBuilder sb, int indent, Object ... objs) {
+ print(sb,indent,objs);
sb.append('\n');
}
sb.append('\n');
}
-
+
+ protected void printf(StringBuilder sb, int indent, String fmt, Object ... objs) {
+ print(sb,indent,String.format(fmt, objs));
+ }
+
protected String printCell(StringBuilder sb, int indent, String current, String prev) {
if(current.equals(prev)) {
println(sb,indent,DUPL);
protected String printCell(StringBuilder sb, int indent, String current, String prev) {
if(current.equals(prev)) {
println(sb,indent,DUPL);