details:   https://code.openbravo.com/erp/devel/pi/rev/991ea0215b59
changeset: 28571:991ea0215b59
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Fri Feb 05 08:58:12 2016 +0100
summary:   related to issue 32039: reuse constant for upaged ds requests

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java
 |  4 +++-
 
modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
       |  6 ++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 09569ec4f2f0 -r 991ea0215b59 
modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java
       Thu Feb 04 10:14:27 2016 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java
       Fri Feb 05 08:58:12 2016 +0100
@@ -52,9 +52,11 @@
  */
 @ApplicationScoped
 public class CachedPreference {
+  public static final String ALLOW_UNPAGED_DS_MANUAL_REQUEST = 
"OBJSON_AllowUnpagedDatasourceManualRequest";
+
   private static final Logger log = 
LoggerFactory.getLogger(CachedPreference.class);
   private List<String> propertyList = new ArrayList<String>(
-      Arrays.asList("OBJSON_AllowUnpagedDatasourceManualRequest"));
+      Arrays.asList(ALLOW_UNPAGED_DS_MANUAL_REQUEST));
   private Map<String, String> cachedPreference = new HashMap<String, String>();
 
   /**
diff -r 09569ec4f2f0 -r 991ea0215b59 
modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
--- 
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
     Thu Feb 04 10:14:27 2016 +0100
+++ 
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
     Fri Feb 05 08:58:12 2016 +0100
@@ -74,8 +74,6 @@
 
   private static final String ADD_FLAG = "_doingAdd";
 
-  private static final String ALLOW_UNPAGED_DS_MANUAL_REQUEST = 
"OBJSON_AllowUnpagedDatasourceManualRequest";
-
   @Inject
   private CachedPreference cachedPreference;
 
@@ -476,8 +474,8 @@
 
         // for standard tab and selector datasources pagination is mandatory
         throw new OBException(OBMessageUtils.messageBD("OBJSON_NoPagedFetch"));
-      } else if 
(!"Y".equals(cachedPreference.getPreferenceValue(ALLOW_UNPAGED_DS_MANUAL_REQUEST))
-          && !isWsCall) {
+      } else if (!"Y".equals(cachedPreference
+          
.getPreferenceValue(CachedPreference.ALLOW_UNPAGED_DS_MANUAL_REQUEST)) && 
!isWsCall) {
         throw new 
OBException(OBMessageUtils.messageBD("OBJSON_NoPagedFetchManual"));
       }
     }

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to