[Yanel-commits] rev 21312 -
public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Tue Jan 2 09:22:42 CET 2007
Author: michi
Date: 2007-01-02 09:22:39 +0100 (Tue, 02 Jan 2007)
New Revision: 21312
Modified:
public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
Log:
creator started
Modified: public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java 2007-01-01 22:33:56 UTC (rev 21311)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java 2007-01-02 08:22:39 UTC (rev 21312)
@@ -220,7 +220,25 @@
*
*/
public void create(javax.servlet.http.HttpServletRequest request) {
- log.warn("Not implemented yet!");
+ // TODO: Move the major part of the following code into Yanel Core
+ // Create RTI ...
+ org.wyona.yanel.core.Path newPath = getPath();
+ log.error("DEBUG: New path: " + newPath);
+
+ try {
+ org.wyona.yarep.core.Repository rtiRepo = getRealm().getRTIRepository();
+
+ StringBuffer content = new StringBuffer("<{http://www.wyona.org/yanel/resource/1.0}calendar/>\n");
+ content.append("events-path: /new-calendar\n");
+ content.append("categories: none\n");
+ content.append("class: none\n");
+ content.append("user-ids: none\n");
+ java.io.Writer writer = rtiRepo.getWriter(new org.wyona.yarep.core.Path(newPath.getRTIPath().toString()));
+ writer.write(content.toString());
+ writer.close();
+ } catch(Exception e) {
+ log.error(e.getMessage(), e);
+ }
}
/**
@@ -250,7 +268,7 @@
*
*/
public String[] getPropertyNames() {
- log.warn("Not implemented yet!");
- return null;
+ String[] props = {"classes", "categories"};
+ return props;
}
}
More information about the Yanel-commits
mailing list