Code Review
/
dmaap
/
datarouter.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Code style cleanup for prov authz and beans
[dmaap/datarouter.git]
/
datarouter-prov
/
src
/
main
/
java
/
org
/
onap
/
dmaap
/
datarouter
/
provisioning
/
beans
/
ExpiryRecord.java
diff --git
a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/ExpiryRecord.java
b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/ExpiryRecord.java
index
8e841e6
..
d812036
100644
(file)
--- a/
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/ExpiryRecord.java
+++ b/
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/ExpiryRecord.java
@@
-46,19
+46,31
@@
public class ExpiryRecord extends BaseLogRecord {
private int attempts;
\r
private String reason;
\r
\r
private int attempts;
\r
private String reason;
\r
\r
+ /**
\r
+ * ExpiryRecord constructor.
\r
+ * @param pp string array of ExpiryRecord attributes
\r
+ * @throws ParseException in case of parse error
\r
+ */
\r
public ExpiryRecord(String[] pp) throws ParseException {
\r
super(pp);
\r
String fileid = pp[5];
\r
public ExpiryRecord(String[] pp) throws ParseException {
\r
super(pp);
\r
String fileid = pp[5];
\r
- if (fileid.lastIndexOf('/') >= 0)
\r
+ if (fileid.lastIndexOf('/') >= 0)
{
\r
fileid = fileid.substring(fileid.lastIndexOf('/') + 1);
\r
fileid = fileid.substring(fileid.lastIndexOf('/') + 1);
\r
+ }
\r
this.subid = Integer.parseInt(pp[4]);
\r
this.fileid = fileid;
\r
this.attempts = Integer.parseInt(pp[10]);
\r
this.reason = pp[9];
\r
this.subid = Integer.parseInt(pp[4]);
\r
this.fileid = fileid;
\r
this.attempts = Integer.parseInt(pp[10]);
\r
this.reason = pp[9];
\r
- if (!reason.equals("notRetryable") && !reason.equals("retriesExhausted") && !reason.equals("diskFull"))
\r
+ if (!reason.equals("notRetryable") && !reason.equals("retriesExhausted") && !reason.equals("diskFull"))
{
\r
this.reason = "other";
\r
this.reason = "other";
\r
+ }
\r
}
\r
\r
}
\r
\r
+ /**
\r
+ * ExpiryRecord constructor from ResultSet.
\r
+ * @param rs ResultSet of ExpiryREcord attributes
\r
+ * @throws SQLException in case of error with SQL statement
\r
+ */
\r
public ExpiryRecord(ResultSet rs) throws SQLException {
\r
super(rs);
\r
this.subid = rs.getInt("DELIVERY_SUBID");
\r
public ExpiryRecord(ResultSet rs) throws SQLException {
\r
super(rs);
\r
this.subid = rs.getInt("DELIVERY_SUBID");
\r
@@
-99,6
+111,11
@@
public class ExpiryRecord extends BaseLogRecord {
this.reason = reason;
\r
}
\r
\r
this.reason = reason;
\r
}
\r
\r
+ /**
\r
+ * Method to reorder LOGJSONObject.
\r
+ * @param jo LOGJSONObject
\r
+ * @return LOGJSONObject
\r
+ */
\r
public LOGJSONObject reOrderObject(LOGJSONObject jo) {
\r
LinkedHashMap<String, Object> logrecordObj = new LinkedHashMap<>();
\r
\r
public LOGJSONObject reOrderObject(LOGJSONObject jo) {
\r
LinkedHashMap<String, Object> logrecordObj = new LinkedHashMap<>();
\r
\r
@@
-122,7
+139,7
@@
public class ExpiryRecord extends BaseLogRecord {
jo.put("expiryReason", reason);
\r
jo.put("attempts", attempts);
\r
\r
jo.put("expiryReason", reason);
\r
jo.put("attempts", attempts);
\r
\r
- return
this.
reOrderObject(jo);
\r
+ return reOrderObject(jo);
\r
}
\r
\r
@Override
\r
}
\r
\r
@Override
\r