rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject svn commit: r1234334 - /incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/MessageBundleController.java
Date Sat, 21 Jan 2012 14:26:12 GMT
Author: jasha
Date: Sat Jan 21 14:26:12 2012
New Revision: 1234334

URL: http://svn.apache.org/viewvc?rev=1234334&view=rev
Log:
constants should be static as well

Modified:
    incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/MessageBundleController.java

Modified: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/MessageBundleController.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/MessageBundleController.java?rev=1234334&r1=1234333&r2=1234334&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/MessageBundleController.java
(original)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/MessageBundleController.java
Sat Jan 21 14:26:12 2012
@@ -29,7 +29,11 @@ import org.springframework.web.bind.anno
 import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.*;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
 
 /**
  * MessageBundle Controller
@@ -37,10 +41,10 @@ import java.util.*;
 @Controller
 @RequestMapping("/messagebundle/*")
 public class MessageBundleController  {
-    private final String CLIENT_MESSAGE_IDENTIFIER = "_rave_client.";
-    private final String CLIENT_MESSAGES_BUNDLE_NAME = "messages";
-    private final String JAVASCRIPT_CONTENT_TYPE = "text/javascript";
-    private final Integer CLIENT_MESSAGE_BUNDLE_CACHE_CONTROL_MAX_AGE = 60 * 60 * 24;   //
24 hours
+    private static final String CLIENT_MESSAGE_IDENTIFIER = "_rave_client.";
+    private static final String CLIENT_MESSAGES_BUNDLE_NAME = "messages";
+    private static final String JAVASCRIPT_CONTENT_TYPE = "text/javascript";
+    private static final Integer CLIENT_MESSAGE_BUNDLE_CACHE_CONTROL_MAX_AGE = 60 * 60 *
24;   // 24 hours
     private Map<Locale, String> clientMessagesCache;
     private AcceptHeaderLocaleResolver acceptHeaderLocaleResolver;
     private HttpHeaders clientMessagesResponseHeaders;
@@ -64,7 +68,7 @@ public class MessageBundleController  {
      * @return the JavaScript content to load from the client
      */
     @RequestMapping(value = {"/rave_client_messages.js"}, method = RequestMethod.GET)
-    public ResponseEntity<String> getClientMessages(HttpServletRequest request) { 
             
+    public ResponseEntity<String> getClientMessages(HttpServletRequest request) {
         return new ResponseEntity<String>(getClientMessagesJSForLocale(acceptHeaderLocaleResolver.resolveLocale(request)),
clientMessagesResponseHeaders, HttpStatus.OK);
     }
 



Mime
View raw message