[seam-commits] Seam SVN: r7889 - in trunk/examples/wiki/src/main/org/jboss/seam/wiki: core/template and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Apr 9 13:19:20 EDT 2008


Author: christian.bauer at jboss.com
Date: 2008-04-09 13:19:20 -0400 (Wed, 09 Apr 2008)
New Revision: 7889

Added:
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java
Modified:
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java
Log:
JBSEAM-2646, templates for document creation (only BlogEntry for now)

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java	2008-04-09 17:12:30 UTC (rev 7888)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java	2008-04-09 17:19:20 UTC (rev 7889)
@@ -24,7 +24,7 @@
 import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
 import org.jboss.seam.wiki.core.template.TemplateRegistry;
 import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
-import org.jboss.seam.wiki.core.template.WikiDocumentEditorTemplate;
+import org.jboss.seam.wiki.core.template.WikiDocumentEditorDefaults;
 import org.jboss.seam.wiki.preferences.Preferences;
 import org.hibernate.validator.Length;
 
@@ -101,9 +101,9 @@
                     defaults = (WikiDocumentDefaults)tplClass.newInstance();
                 }
 
-                if (WikiDocumentEditorTemplate.class.isAssignableFrom(tplClass)) {
+                if (WikiDocumentEditorDefaults.class.isAssignableFrom(tplClass)) {
                     getLog().debug("letting template set editor defaults");
-                    ((WikiDocumentEditorTemplate)defaults).setEditorDefaults(this);
+                    ((WikiDocumentEditorDefaults)defaults).setEditorDefaults(this);
                 }
 
             } catch (Exception ex) {

Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java (from rev 7888, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java	                        (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java	2008-04-09 17:19:20 UTC (rev 7889)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.template;
+
+import org.jboss.seam.wiki.core.action.DocumentHome;
+
+/**
+ * @author Christian Bauer
+ */
+public interface WikiDocumentEditorDefaults {
+
+    public void setEditorDefaults(DocumentHome editor);
+}

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java	2008-04-09 17:12:30 UTC (rev 7888)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java	2008-04-09 17:19:20 UTC (rev 7889)
@@ -7,7 +7,7 @@
 package org.jboss.seam.wiki.plugin.blogdirectory;
 
 import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
-import org.jboss.seam.wiki.core.template.WikiDocumentEditorTemplate;
+import org.jboss.seam.wiki.core.template.WikiDocumentEditorDefaults;
 import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
 import org.jboss.seam.wiki.core.action.DocumentHome;
 import org.jboss.seam.international.Messages;
@@ -16,7 +16,7 @@
  * @author Christian Bauer
  */
 @WikiDocumentTemplate("#{messages['blogDirectory.label.template.BlogEntry']}")
-public class BlogEntryDefaults extends WikiDocumentDefaults implements WikiDocumentEditorTemplate {
+public class BlogEntryDefaults extends WikiDocumentDefaults implements WikiDocumentEditorDefaults {
 
     @Override
     public String getName() {




More information about the seam-commits mailing list