MIFOSX-1275 refactoring endpoint of standinginstruction history

This commit is contained in:
Madhukar
2014-07-01 15:11:21 +05:30
parent 342a0edc24
commit 4975a59b7e
3 changed files with 14 additions and 13 deletions
+11 -11
View File
@@ -318,7 +318,7 @@
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td>standinginstructions/history</td> <td>standinginstructionrunhistory</td>
<td></td> <td></td>
<td><a href="#standinginstructions_history">Standinginstructions History</a></td> <td><a href="#standinginstructions_history">Standinginstructions History</a></td>
<td></td> <td></td>
@@ -2010,7 +2010,7 @@
<tr> <tr>
<td></td> <td></td>
<td>scheduler?command=stop</td> <td>scheduler?command=stop</td>
<td><a href="#suspend_scheduler">Suspend a scheduler service</td> <td><a href="#suspend_scheduler">Suspend a scheduler service</a></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
@@ -2124,7 +2124,7 @@
<tr> <tr>
<td><a href="#notes">Notes</a></td> <td><a href="#notes">Notes</a></td>
<td>{resource}/{resourceId}/notes</td> <td>{resource}/{resourceId}/notes</td>
<td><a href="#resources_addnote">Add a Resource Note</td> <td><a href="#resources_addnote">Add a Resource Note</a></td>
<td><a href="#resource_notelist">Retrieve a Resource's Notes</a></td> <td><a href="#resource_notelist">Retrieve a Resource's Notes</a></td>
<td></td> <td></td>
<td></td> <td></td>
@@ -2141,7 +2141,7 @@
<tr> <tr>
<td><a href="#documents">Documents</a></td> <td><a href="#documents">Documents</a></td>
<td>{entityType}/{entityId}/documents</td> <td>{entityType}/{entityId}/documents</td>
<td><a href="#documents_create">Create a Document</td> <td><a href="#documents_create">Create a Document</a></td>
<td><a href="#documents_list">List All Document Details</a></td> <td><a href="#documents_list">List All Document Details</a></td>
<td></td> <td></td>
<td></td> <td></td>
@@ -2169,14 +2169,14 @@
<td><a href="#search">Search</a></td> <td><a href="#search">Search</a></td>
<td>search</td> <td>search</td>
<td></td> <td></td>
<td><a href="#search_resource">Search Resources</td> <td><a href="#search_resource">Search Resources</a></td>
<td></td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td><a href="#advance_search">AdHoc Search</a></td> <td><a href="#advance_search">AdHoc Search</a></td>
<td>search/advance</td> <td>search/advance</td>
<td><a href="#advance_search_resource">Advance Search</td> <td><a href="#advance_search_resource">Advance Search</a></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
@@ -24622,15 +24622,15 @@ No Request Body:
<dd>Use an sql fragment valid for the underlying standing instruction schema to filter results. e.g. name like %K%</dd> <dd>Use an sql fragment valid for the underlying standing instruction schema to filter results. e.g. name like %K%</dd>
</dl> </dl>
<p>Example Requests : </p> <p>Example Requests : </p>
<div class=apiClick>standinginstructions/history</div> <div class=apiClick>standinginstructionrunhistory</div>
<br> <br>
<div class=apiClick>standinginstructions/history?orderBy=name&sortOrder=DESC</div> <div class=apiClick>standinginstructionrunhistory?orderBy=name&sortOrder=DESC</div>
<br> <br>
<div class=apiClick>standinginstructions/history?offset=10&limit=50</div> <div class=apiClick>standinginstructionrunhistory?offset=10&limit=50</div>
<br> <br>
</div> </div>
<div class="method-example"> <div class="method-example">
<code class="method-declaration">GET https://DomainName/api/v1/standinginstructions/history</code> <code class="method-declaration">GET https://DomainName/api/v1/standinginstructionrunhistory</code>
<code class="method-response"> <code class="method-response">
{ {
"totalFilteredRecords": 2, "totalFilteredRecords": 2,
@@ -30856,7 +30856,7 @@ No Request Body:
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td>standinginstructions/history</td> <td>standinginstructionrunhistory</td>
<td></td> <td></td>
<td><a href="#standinginstructions_history">Standinginstructions History</a></td> <td><a href="#standinginstructions_history">Standinginstructions History</a></td>
<td></td> <td></td>
@@ -15,6 +15,7 @@ import com.jayway.restassured.specification.ResponseSpecification;
public class StandingInstructionsHelper { public class StandingInstructionsHelper {
private static final String STANDING_INSTRUCTIONS_URL = "/mifosng-provider/api/v1/standinginstructions"; private static final String STANDING_INSTRUCTIONS_URL = "/mifosng-provider/api/v1/standinginstructions";
private static final String STANDING_INSTRUCTIONS_RUNHISTORY_URL = "/mifosng-provider/api/v1/standinginstructionrunhistory";
private static final String LOCALE = "en_GB"; private static final String LOCALE = "en_GB";
private static final String OFFICE_ID = "1"; private static final String OFFICE_ID = "1";
private static final String INSTRUCTION_TYPE_FIXED = "1"; private static final String INSTRUCTION_TYPE_FIXED = "1";
@@ -98,7 +99,7 @@ public class StandingInstructionsHelper {
} }
public List<HashMap> getStandingInstructionHistory(Integer fromSavingsId, Integer fromAccountType, Integer fromClientId, Integer transferType) { public List<HashMap> getStandingInstructionHistory(Integer fromSavingsId, Integer fromAccountType, Integer fromClientId, Integer transferType) {
final String STANDING_INSTRUCTIONS_HISTORY_URL = STANDING_INSTRUCTIONS_URL + "/history?" + Utils.TENANT_IDENTIFIER final String STANDING_INSTRUCTIONS_HISTORY_URL = STANDING_INSTRUCTIONS_RUNHISTORY_URL + "?" + Utils.TENANT_IDENTIFIER
+ "&fromSavingsId=" + fromSavingsId + "&fromAccountType=" + fromAccountType + "&clientId=" + fromClientId + "&fromSavingsId=" + fromSavingsId + "&fromAccountType=" + fromAccountType + "&clientId=" + fromClientId
+ "&transferType=" + transferType; + "&transferType=" + transferType;
System.out.println("STANDING_INSTRUCTIONS_HISTORY_URL="+STANDING_INSTRUCTIONS_HISTORY_URL); System.out.println("STANDING_INSTRUCTIONS_HISTORY_URL="+STANDING_INSTRUCTIONS_HISTORY_URL);
@@ -30,7 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Path("/standinginstructions/history") @Path("/standinginstructionrunhistory")
@Component @Component
@Scope("singleton") @Scope("singleton")
public class StandingInstructionHistoryApiResource { public class StandingInstructionHistoryApiResource {