[Yanel-commits] rev 48297 -
public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager
michi at wyona.com
michi at wyona.com
Thu Mar 25 16:13:31 CET 2010
Author: michi
Date: 2010-03-25 16:13:31 +0100 (Thu, 25 Mar 2010)
New Revision: 48297
Modified:
public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java
Log:
if no usecase specified, then use read
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 2010-03-25 15:09:13 UTC (rev 48296)
+++ public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java 2010-03-25 15:13:31 UTC (rev 48297)
@@ -50,7 +50,10 @@
*/
@Override
public View getView(String viewId) throws Exception {
- String policyRequestPara = getEnvironment().getRequest().getParameter("yanel.policy");
+ String policyRequestPara = getEnvironment().getRequest().getParameter(PARAMETER_USECASE);
+ if (policyRequestPara == null) {
+ policyRequestPara = "read";
+ }
if (policyRequestPara.equals("update")) {
String getXML = getEnvironment().getRequest().getParameter("get");
String postXML = getEnvironment().getRequest().getParameter("post");
@@ -83,6 +86,8 @@
String policyUsecase = "read";
if (request.getParameter(PARAMETER_USECASE) != null) {
policyUsecase = request.getParameter(PARAMETER_USECASE);
+ } else {
+ log.warn("No usecase set, hence use default usecase: " + policyUsecase);
}
String backToRealm = org.wyona.yanel.core.util.PathUtil.backToRealm(getPath());
@@ -127,9 +132,9 @@
}
} else {
//response.setContentType("text/html; charset=" + DEFAULT_ENCODING);
- String identitiesURL = backToRealm + getPath().substring(1) + "?yanel.policy=update&get=identities";
- String policyURL = backToRealm + getPath().substring(1) + "?yanel.policy=update&get=policy";
- String saveURL = backToRealm + getPath().substring(1) + "?yanel.policy=update&post=policy"; // This doesn't seem to work with all browsers!
+ String identitiesURL = backToRealm + getPath().substring(1) + "?" + PARAMETER_USECASE + "=update&get=identities";
+ String policyURL = backToRealm + getPath().substring(1) + "?" + PARAMETER_USECASE + "=update&get=policy";
+ String saveURL = backToRealm + getPath().substring(1) + "?" + PARAMETER_USECASE +"=update&post=policy"; // This doesn't seem to work with all browsers!
String cancelURL = getReferer(backToRealm);
log.warn("DEBUG: Cancel URL: " + cancelURL);
More information about the Yanel-commits
mailing list