[Yanel-commits] rev 57845 - public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager
michi at wyona.com
michi at wyona.com
Thu Apr 14 23:15:40 CEST 2011
Author: michi
Date: 2011-04-14 23:15:39 +0200 (Thu, 14 Apr 2011)
New Revision: 57845
Modified:
public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java
Log:
delete policy implemented
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 2011-04-14 16:45:05 UTC (rev 57844)
+++ public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java 2011-04-14 21:15:39 UTC (rev 57845)
@@ -186,11 +186,15 @@
sb.append("</head>");
sb.append("<body><h1>" + title + "</h1><p><div id=\"access-policy-editor-hook\"></div></p></body></html>");
}
+ } else if (policyUsecase.equals("delete")) {
+ log.warn("Delete policy: " + getPath());
+ getRealm().getPolicyManager().removePolicy(getPath());
+ sb.append("<html><body>Policy has been deleted: " + getPath() + "</body></html>");
} else {
//response.setContentType("text/html; charset=" + DEFAULT_ENCODING);
getEnvironment().getResponse().setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
sb.append("<html><body>Policy usecase not implemented yet: " + policyUsecase + "</body></html>");
- log.error("Policy usecase not implemented yet: " + policyUsecase);
+ log.warn("No such policy usecase implemented yet: " + policyUsecase);
}
return new ByteArrayInputStream(sb.toString().getBytes("utf-8"));
}
More information about the Yanel-commits
mailing list