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

michi at wyona.com michi at wyona.com
Wed Jul 11 10:48:02 CEST 2007


Author: michi
Date: 2007-07-11 10:48:01 +0200 (Wed, 11 Jul 2007)
New Revision: 25913

Modified:
   public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java
Log:
introspectable added

Modified: public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java	2007-07-11 08:17:36 UTC (rev 25912)
+++ public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java	2007-07-11 08:48:01 UTC (rev 25913)
@@ -47,6 +47,7 @@
 import org.wyona.yanel.core.Resource;
 import org.wyona.yanel.core.ResourceConfiguration;
 import org.wyona.yanel.core.api.attributes.CreatableV2;
+import org.wyona.yanel.core.api.attributes.IntrospectableV1;
 import org.wyona.yanel.core.api.attributes.ModifiableV2;
 import org.wyona.yanel.core.api.attributes.ViewableV1;
 import org.wyona.yanel.core.attributes.viewable.View;
@@ -72,7 +73,7 @@
 /**
  * 
  */
-public class WikiResource extends Resource implements ViewableV1, CreatableV2, ModifiableV2 {
+public class WikiResource extends Resource implements ViewableV1, CreatableV2, IntrospectableV1, ModifiableV2 {
 
     private static Category log = Category.getInstance(WikiResource.class);
     private final String XML_MIME_TYPE = "application/xml";
@@ -467,4 +468,23 @@
     protected DataPath getDataPathImplementation() {
         return new DefaultDataPath();
     }
+
+    /**
+     *
+     */
+    public String getIntrospection() throws Exception {
+        StringBuffer sb = new StringBuffer("<?xml version=\"1.0\"?>");
+        sb.append("<introspection xmlns=\"http://www.wyona.org/neutron/2.0\">");
+
+        sb.append("<resource name=\"Some Wiki Page\">");
+        sb.append("<edit mime-type=\"text/plain\">");
+        sb.append("<checkout url=\"?yanel.resource.viewid=txt&amp;yanel.resource.usecase=checkout\" method=\"GET\"/>");
+        sb.append("<checkin  url=\"?yanel.resource.usecase=checkin\"  method=\"PUT\"/>");
+        sb.append("<release-lock url=\"?yanel.resource.usecase=release-lock\" method=\"GET\"/>");
+        sb.append("</edit>");
+        sb.append("</resource>");
+
+        sb.append("</introspection>");
+        return sb.toString();
+    }
 }




More information about the Yanel-commits mailing list