cleaning up MIFOSX-1024
This commit is contained in:
+12
-16
@@ -10,7 +10,14 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
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.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
@@ -103,23 +110,15 @@ public class MakercheckersApiResource {
|
||||
CommandProcessingResult result = null;
|
||||
if (is(commandParam, "approve")) {
|
||||
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);
|
||||
}
|
||||
|
||||
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) {
|
||||
return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue);
|
||||
}
|
||||
@@ -135,9 +134,6 @@ public class MakercheckersApiResource {
|
||||
return this.toApiJsonSerializerAudit.serialize(CommandProcessingResult.commandOnlyResult(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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 Integer clientId, final Integer loanId, final Integer savingsAccountId) {
|
||||
|
||||
Reference in New Issue
Block a user