added api_get_url value to audit api response data
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ public class AuditsApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<String>(Arrays.asList("id", "actionName", "entityName", "resourceId",
|
||||
"subresourceId", "maker", "madeOnDate", "checker", "checkedOnDate", "processingResult", "commandAsJson", "officeName",
|
||||
"groupLevelName", "groupName", "clientName", "loanAccountNo", "savingsAccountNo", "clientId", "loanId"));
|
||||
"groupLevelName", "groupName", "clientName", "loanAccountNo", "savingsAccountNo", "clientId", "loanId", "resourceGetUrl"));
|
||||
|
||||
private final String resourceNameForPermissions = "AUDIT";
|
||||
|
||||
|
||||
@@ -49,12 +49,14 @@ public final class AuditData {
|
||||
private final Long clientId;
|
||||
@SuppressWarnings("unused")
|
||||
private final Long loanId;
|
||||
@SuppressWarnings("unused")
|
||||
private final String resourceGetUrl;
|
||||
|
||||
public AuditData(final Long id, final String actionName, final String entityName, final Long resourceId, final Long subresourceId,
|
||||
final String maker, final DateTime madeOnDate, final String checker, final DateTime checkedOnDate,
|
||||
final String processingResult, final String commandAsJson, final String officeName, final String groupLevelName,
|
||||
final String groupName, final String clientName, final String loanAccountNo, final String savingsAccountNo,
|
||||
final Long clientId, final Long loanId) {
|
||||
final Long clientId, final Long loanId, final String resourceGetUrl) {
|
||||
|
||||
this.id = id;
|
||||
this.actionName = actionName;
|
||||
@@ -75,6 +77,7 @@ public final class AuditData {
|
||||
this.savingsAccountNo = savingsAccountNo;
|
||||
this.clientId = clientId;
|
||||
this.loanId = loanId;
|
||||
this.resourceGetUrl = resourceGetUrl;
|
||||
}
|
||||
|
||||
public void setCommandAsJson(final String commandAsJson) {
|
||||
|
||||
+3
-2
@@ -99,7 +99,7 @@ public class AuditReadPlatformServiceImpl implements AuditReadPlatformService {
|
||||
|
||||
String partSql = " aud.id as id, aud.action_name as actionName, aud.entity_name as entityName,"
|
||||
+ " aud.resource_id as resourceId, aud.subresource_id as subresourceId,aud.client_id as clientId, aud.loan_id as loanId,"
|
||||
+ " mk.username as maker, aud.made_on_date as madeOnDate, "
|
||||
+ " mk.username as maker, aud.made_on_date as madeOnDate, " + " aud.api_get_url as resourceGetUrl, "
|
||||
+ "ck.username as checker, aud.checked_on_date as checkedOnDate, ev.enum_message_property as processingResult "
|
||||
+ commandAsJsonString + ", "
|
||||
+ " o.name as officeName, gl.level_name as groupLevelName, g.display_name as groupName, c.display_name as clientName, "
|
||||
@@ -134,6 +134,7 @@ public class AuditReadPlatformServiceImpl implements AuditReadPlatformService {
|
||||
final String checker = rs.getString("checker");
|
||||
final DateTime checkedOnDate = JdbcSupport.getDateTime(rs, "checkedOnDate");
|
||||
final String processingResult = rs.getString("processingResult");
|
||||
final String resourceGetUrl = rs.getString("resourceGetUrl");
|
||||
String commandAsJson;
|
||||
// commandAsJson might not be on the select list of columns
|
||||
try {
|
||||
@@ -151,7 +152,7 @@ public class AuditReadPlatformServiceImpl implements AuditReadPlatformService {
|
||||
|
||||
return new AuditData(id, actionName, entityName, resourceId, subresourceId, maker, madeOnDate, checker, checkedOnDate,
|
||||
processingResult, commandAsJson, officeName, groupLevelName, groupName, clientName, loanAccountNo, savingsAccountNo,
|
||||
clientId, loanId);
|
||||
clientId, loanId, resourceGetUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user