[Yanel-commits] rev 31940 -
public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect
michi at wyona.com
michi at wyona.com
Thu Feb 14 15:34:49 CET 2008
Author: michi
Date: 2008-02-14 15:34:49 +0100 (Thu, 14 Feb 2008)
New Revision: 31940
Modified:
public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java
Log:
variables set globally
Modified: public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java
===================================================================
--- public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java 2008-02-14 14:32:52 UTC (rev 31939)
+++ public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java 2008-02-14 14:34:49 UTC (rev 31940)
@@ -53,6 +53,10 @@
private static Category log = Category.getInstance(RedirectResource.class);
public static String IDENTITY_MAP_KEY = "identity-map";
+
+ // Only a temporary variable needed during creation (roundtrip)
+ private String defaultHrefSetByCreator;
+ private static String REDIRECT_URL = "redirectURL";
/**
*
@@ -172,7 +176,7 @@
*
*/
public void create(HttpServletRequest request) {
- log.warn("Not implemented yet!");
+ log.warn("Do nothing! Only resource configuration is needed.");
}
/**
@@ -194,7 +198,7 @@
*/
public HashMap createRTIProperties(HttpServletRequest request) {
HashMap map = new HashMap();
- map.put("href", request.getParameter("rp.redirectURL"));
+ map.put("href", request.getParameter("rp." + REDIRECT_URL));
return map;
}
@@ -202,18 +206,16 @@
* @see org.wyona.yanel.core.api.attributes.CreatableV1#getProperty(String)
*/
public Object getProperty(String name) {
- return null;
-/*
-Object property = properties.get(name);
-return property;
-*/
+ log.error("DEBUG: name: " + name);
+ return defaultHrefSetByCreator;
}
/**
* @see org.wyona.yanel.core.api.attributes.CreatableV1#setProperty(String, Object)
*/
public void setProperty(String name, Object value) {
- log.warn("Not implemented yet!");
+ log.error("DEBUG: name: " + name);
+ defaultHrefSetByCreator = (String) value;
}
/**
@@ -221,7 +223,7 @@
*/
public String[] getPropertyNames() {
String[] pn = new String[1];
- pn[0] = "redirectURL";
+ pn[0] = REDIRECT_URL;
return pn;
}
}
More information about the Yanel-commits
mailing list