changeset 186:7845b90dee18

New attribute 'readonly' for response.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 01 Jul 2013 12:44:58 +0200
parents 4eba85fa3651
children 1a92e9ea68ba
files src/main/java/de/intevation/lada/rest/Response.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/Response.java	Mon Jul 01 12:43:51 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/Response.java	Mon Jul 01 12:44:58 2013 +0200
@@ -26,6 +26,7 @@
     private Object data;
     private Map<String, String> errors;
     private Map<String, String> warnings;
+    private Boolean readonly;
 
     public Response(boolean success, int code, Object data) {
         this.success = success;
@@ -33,6 +34,7 @@
         this.data = data;
         this.errors = new HashMap<String, String>();
         this.warnings = new HashMap<String, String>();
+        this.readonly = Boolean.FALSE;
     }
 
     public Boolean getSuccess() {
@@ -75,6 +77,14 @@
         this.warnings = this.convertCodes(warnings);
     }
 
+    public Boolean getReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(Boolean readonly) {
+        this.readonly = readonly;
+    }
+
     private HashMap<String, String> convertCodes(Map<String, Integer> codes) {
         HashMap<String, String> converted = new HashMap<String, String>();
         if (codes == null || codes.isEmpty()) {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)