From 7a62b37210323d800479588f20210679dea4949e Mon Sep 17 00:00:00 2001 From: John Woodlock Date: Thu, 31 May 2012 17:43:10 +1000 Subject: [PATCH] api doc and error update --- APIFolder/api.htm | 2 +- APIFolder/docUpdateComments.txt | 3 -- .../ReadExtraDataAndReportingServiceImpl.java | 49 ++++++------------- 3 files changed, 15 insertions(+), 39 deletions(-) diff --git a/APIFolder/api.htm b/APIFolder/api.htm index 85feae17f..45f073289 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -1717,7 +1717,7 @@ Request Body:{ } { - "entityId": 10 + "entityId": 16 } diff --git a/APIFolder/docUpdateComments.txt b/APIFolder/docUpdateComments.txt index c782c7bea..8afe85255 100644 --- a/APIFolder/docUpdateComments.txt +++ b/APIFolder/docUpdateComments.txt @@ -63,9 +63,6 @@ when adjusting a disbursal - The server encountered an internal error () that pr list of loan transactions not available (except in summary presume repayments has repayments and waivers and adjusts) --------------------------------------------------------- -Additional Fields -put right message for parameter not recognized etc.(plus tht 9 other jpwwrongmsg items) - should be able to get clients by branch as well (but not for now) also get loans of different status's by branch etc (but not for now) diff --git a/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java b/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java index 297c1d661..1c999d2b6 100644 --- a/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosng/platform/ReadExtraDataAndReportingServiceImpl.java @@ -48,8 +48,7 @@ public class ReadExtraDataAndReportingServiceImpl implements db_connection = null; } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), "DataSource: " - + dataSource); + e.getMessage(), "DataSource: " + dataSource); } } @@ -82,8 +81,7 @@ public class ReadExtraDataAndReportingServiceImpl implements // out.close(); } catch (Exception e) { throw new PlatformDataIntegrityException( - "error.msg.exception.error", "JPWWRONGMSG - " - + e.getMessage()); + "error.msg.exception.error", e.getMessage()); } } }; @@ -140,12 +138,6 @@ public class ReadExtraDataAndReportingServiceImpl implements public GenericResultset retrieveGenericResultset(final String name, final String type, final Map queryParams) { - if (name == null) { - throw new PlatformDataIntegrityException( - "error.msg.report.name.null", - "JPWWRONGMSG - Report Name is null."); - } - long startTime = System.currentTimeMillis(); logger.info("STARTING REPORT: " + name + " Type: " + type); @@ -225,7 +217,7 @@ public class ReadExtraDataAndReportingServiceImpl implements } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), "Sql: " + sql); + e.getMessage(), "Sql: " + sql); } return result; @@ -321,7 +313,7 @@ public class ReadExtraDataAndReportingServiceImpl implements db_connection = null; } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), "Input Sql: " + inputSql); + e.getMessage(), "Input Sql: " + inputSql); } return sql; @@ -359,8 +351,7 @@ public class ReadExtraDataAndReportingServiceImpl implements db_connection = null; } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), - "Additional Fields Type: " + type); + e.getMessage(), "Additional Fields Type: " + type); } return additionalFieldsSets; @@ -474,9 +465,8 @@ public class ReadExtraDataAndReportingServiceImpl implements } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), - "Additional Fields Type: " + type + " Set: " + set - + " Id: " + id); + e.getMessage(), "Additional Fields Type: " + type + + " Set: " + set + " Id: " + id); } return result; @@ -506,15 +496,6 @@ public class ReadExtraDataAndReportingServiceImpl implements logger.info("updateExtraData - type: " + type + " set: " + set + " id: " + id); - logger.info("startjpw: "); - Set keys = queryParams.keySet(); - String pValue = ""; - for (String key : keys) { - pValue = queryParams.get(key); - logger.info("jpw: " + key + " - " + pValue); - } - logger.info("endjpw: "); - checkResourceTypeThere(type, set); String fullDatasetName = getFullDatasetName(type, set); String transType = getTransType(type, fullDatasetName, id); @@ -533,9 +514,8 @@ public class ReadExtraDataAndReportingServiceImpl implements db_connection = null; } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), - "Additional Fields Type: " + type + " Set: " + set - + " Id: " + id); + e.getMessage(), "Additional Fields Type: " + type + + " Set: " + set + " Id: " + id); } } @@ -563,9 +543,8 @@ public class ReadExtraDataAndReportingServiceImpl implements } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), - "Additional Fields Type: " + type + " Set: " + set - + " Sql: " + sql); + e.getMessage(), "Additional Fields Type: " + type + + " Set: " + set + " Sql: " + sql); } } @@ -601,9 +580,9 @@ public class ReadExtraDataAndReportingServiceImpl implements db_connection = null; } catch (SQLException e) { throw new PlatformDataIntegrityException("error.msg.sql.error", - "JPWWRONGMSG - " + e.getMessage(), - "Additional Fields Type: " + type + " Full Set Name: " - + fullDatasetName + " Sql: " + sql); + e.getMessage(), "Additional Fields Type: " + type + + " Full Set Name: " + fullDatasetName + + " Sql: " + sql); } return transType;