cleaning up MIFOSX-1024
This commit is contained in:
@@ -13006,17 +13006,17 @@ Content-Type: application/json
|
|||||||
<code class="method-response">{ "auditId": 1 } </code>
|
<code class="method-response">{ "auditId": 1 } </code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="makercheckers_reject" name="makercheckers_approve" class="old-syle-anchor"> </a>
|
<a id="makercheckers_reject" name="makercheckers_reject" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Reject Maker Checker Entry</h4>
|
<h4>Reject Maker Checker Entry</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">
|
<code class="method-declaration">
|
||||||
PUT https://DomainName/api/v1/makercheckers/{auditId}
|
POST https://DomainName/api/v1/makercheckers/{auditId}?command=reject
|
||||||
</code>
|
</code>
|
||||||
<code class="method-request">
|
<code class="method-request">
|
||||||
PUT makercheckers/1
|
POST makercheckers/1?command=reject
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
</code>
|
</code>
|
||||||
<code class="method-response">{ "auditId": 1 } </code>
|
<code class="method-response">{ "auditId": 1 } </code>
|
||||||
@@ -30552,11 +30552,11 @@ No Request Body:
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>makercheckers/{auditId}</td>
|
<td>makercheckers/{auditId}?command=reject</td>
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td><a href="#makercheckers_reject">Reject Maker Checker Entry</a></td>
|
<td><a href="#makercheckers_reject">Reject Maker Checker Entry</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#scheduler_jobs">Scheduler jobs</a></td>
|
<td><a href="#scheduler_jobs">Scheduler jobs</a></td>
|
||||||
|
|||||||
+12
-16
@@ -10,7 +10,14 @@ import java.util.Collection;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.ws.rs.*;
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.DELETE;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.QueryParam;
|
||||||
import javax.ws.rs.core.Context;
|
import javax.ws.rs.core.Context;
|
||||||
import javax.ws.rs.core.MediaType;
|
import javax.ws.rs.core.MediaType;
|
||||||
import javax.ws.rs.core.UriInfo;
|
import javax.ws.rs.core.UriInfo;
|
||||||
@@ -103,23 +110,15 @@ public class MakercheckersApiResource {
|
|||||||
CommandProcessingResult result = null;
|
CommandProcessingResult result = null;
|
||||||
if (is(commandParam, "approve")) {
|
if (is(commandParam, "approve")) {
|
||||||
result = this.writePlatformService.approveEntry(auditId);
|
result = this.writePlatformService.approveEntry(auditId);
|
||||||
}else {
|
} else if (is(commandParam, "reject")) {
|
||||||
|
final Long id = this.writePlatformService.rejectEntry(auditId);
|
||||||
|
result = CommandProcessingResult.commandOnlyResult(id);
|
||||||
|
} else {
|
||||||
throw new UnrecognizedQueryParamException("command", commandParam);
|
throw new UnrecognizedQueryParamException("command", commandParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.toApiJsonSerializerAudit.serialize(result);
|
return this.toApiJsonSerializerAudit.serialize(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PUT
|
|
||||||
@Path("{auditId}")
|
|
||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
|
||||||
public String rejectMakerCheckerEntry(@PathParam("auditId") final Long auditId) {
|
|
||||||
final Long id = this.writePlatformService.rejectEntry(auditId);
|
|
||||||
|
|
||||||
return this.toApiJsonSerializerAudit.serialize(CommandProcessingResult.commandOnlyResult(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean is(final String commandParam, final String commandValue) {
|
private boolean is(final String commandParam, final String commandValue) {
|
||||||
return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue);
|
return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue);
|
||||||
}
|
}
|
||||||
@@ -135,9 +134,6 @@ public class MakercheckersApiResource {
|
|||||||
return this.toApiJsonSerializerAudit.serialize(CommandProcessingResult.commandOnlyResult(id));
|
return this.toApiJsonSerializerAudit.serialize(CommandProcessingResult.commandOnlyResult(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String getExtraCriteria(final String actionName, final String entityName, final Long resourceId, final Long makerId,
|
private String getExtraCriteria(final String actionName, final String entityName, final Long resourceId, final Long makerId,
|
||||||
final String makerDateTimeFrom, final String makerDateTimeTo, final Integer officeId, final Integer groupId,
|
final String makerDateTimeFrom, final String makerDateTimeTo, final Integer officeId, final Integer groupId,
|
||||||
final Integer clientId, final Integer loanId, final Integer savingsAccountId) {
|
final Integer clientId, final Integer loanId, final Integer savingsAccountId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user