diff --git a/mifosng-provider/src/main/java/org/mifosplatform/organisation/teller/api/TellerJournalApiResource.java b/mifosng-provider/src/main/java/org/mifosplatform/organisation/teller/api/TellerJournalApiResource.java index 077b275a8..45b03306f 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/organisation/teller/api/TellerJournalApiResource.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/organisation/teller/api/TellerJournalApiResource.java @@ -5,6 +5,15 @@ */ package org.mifosplatform.organisation.teller.api; +import java.util.Collection; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + import org.mifosplatform.infrastructure.core.serialization.DefaultToApiJsonSerializer; import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext; import org.mifosplatform.organisation.teller.data.TellerData; @@ -15,10 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; -import javax.ws.rs.*; -import javax.ws.rs.core.MediaType; -import java.util.Collection; - @Path("cashiersjournal") @Component @Scope("singleton") @@ -29,8 +34,8 @@ public class TellerJournalApiResource { private final TellerManagementReadPlatformService readPlatformService; @Autowired - public TellerJournalApiResource(final PlatformSecurityContext securityContext, final DefaultToApiJsonSerializer jsonSerializer, - final TellerManagementReadPlatformService readPlatformService) { + public TellerJournalApiResource(final PlatformSecurityContext securityContext, + final DefaultToApiJsonSerializer jsonSerializer, final TellerManagementReadPlatformService readPlatformService) { super(); this.securityContext = securityContext; this.jsonSerializer = jsonSerializer; @@ -38,13 +43,14 @@ public class TellerJournalApiResource { } @GET - @Consumes({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) + @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) public String getJournalData(@QueryParam("officeId") final Long officeId, @QueryParam("tellerId") final Long tellerId, - @QueryParam("cashierId") final Long cashierId, @QueryParam("dateRange") final String dateRange) { + @QueryParam("cashierId") final Long cashierId, @QueryParam("dateRange") final String dateRange) { final DateRange dateRangeHolder = DateRange.fromString(dateRange); - final Collection journals = this.readPlatformService.getJournals(officeId, tellerId, cashierId, dateRangeHolder.getStartDate(), dateRangeHolder.getEndDate()); + final Collection journals = this.readPlatformService.getJournals(officeId, tellerId, cashierId, + dateRangeHolder.getStartDate(), dateRangeHolder.getEndDate()); return this.jsonSerializer.serialize(journals); }