[Yanel-commits] rev 45011 - public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager

michi at wyona.com michi at wyona.com
Wed Oct 14 11:15:50 CEST 2009


Author: michi
Date: 2009-10-14 11:15:50 +0200 (Wed, 14 Oct 2009)
New Revision: 45011

Modified:
   public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java
Log:
response status fixed

Modified: public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java	2009-10-14 08:33:33 UTC (rev 45010)
+++ public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java	2009-10-14 09:15:50 UTC (rev 45011)
@@ -29,7 +29,7 @@
 
 
 /**
- * 
+ * Resource which acts as interface for editing tools in order to update/edit access policies
  */
 public class PolicyManagerResource extends BasicXMLResource {
     
@@ -116,8 +116,7 @@
                         sb.append("<?xml version=\"1.0\"?><saved/>");
                     } catch(Exception e) {
                         log.error(e,e);
-                        //response.setStatus(response.SC_NOT_IMPLEMENTED);
-                        log.warn("TODO: Fix setting HTTP status code: " + HttpServletResponse.SC_NOT_IMPLEMENTED);
+                        getEnvironment().getResponse().setStatus(response.SC_NOT_IMPLEMENTED);
                         sb.append("<?xml version=\"1.0\"?><not-saved>" + e.getMessage() + "</not-saved>");
                     }
                 } else {
@@ -144,7 +143,7 @@
                 }
             } else {
                 //response.setContentType("text/html; charset=" + DEFAULT_ENCODING);
-                //response.setStatus(response.SC_NOT_IMPLEMENTED);
+                getEnvironment().getResponse().setStatus(response.SC_NOT_IMPLEMENTED);
                 sb.append("<html><body>Policy usecase not implemented yet: " + policyUsecase + "</body></html>");
                 log.error("Policy usecase not implemented yet: " + policyUsecase);
             }



More information about the Yanel-commits mailing list