[Yanel-commits] rev 41073 - public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu

michi at wyona.com michi at wyona.com
Tue Jan 20 16:38:38 CET 2009


Author: michi
Date: 2009-01-20 16:38:37 +0100 (Tue, 20 Jan 2009)
New Revision: 41073

Modified:
   public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/RevisionTransitions.java
Log:
javadoc added and comments cleaned

Modified: public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/RevisionTransitions.java
===================================================================
--- public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/RevisionTransitions.java	2009-01-20 15:36:34 UTC (rev 41072)
+++ public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/RevisionTransitions.java	2009-01-20 15:38:37 UTC (rev 41073)
@@ -6,7 +6,6 @@
 import org.apache.log4j.Logger;
 import org.wyona.yanel.core.Resource;
 import org.wyona.yanel.core.api.attributes.WorkflowableV1;
-import org.wyona.yanel.core.attributes.versionable.RevisionInformation;
 import org.wyona.yanel.core.workflow.Transition;
 import org.wyona.yanel.core.workflow.Workflow;
 import org.wyona.yanel.core.workflow.WorkflowException;
@@ -14,6 +13,11 @@
 
 
 /**
+ * Create an html representation of the transitions available on a given revision.
+ * This consists of an unordered list (<ul>) containing individual menu items,
+ * each of which is an html representation of an individual transition.
+ * NB: the exact form of the individual list item representation depends on the
+ * implementation of the ITransitionMenuContent passed to the ctor.
  * @author gary
  *
  */
@@ -26,7 +30,13 @@
     private String language;
     private ITransitionMenuContent menuItems;
 
-    
+    /**
+     * ctor.
+     * @param resource the resource which the transitions are "from"
+     * @param revn the revision of the resource which the transitions are "from"
+     * @param lang desired language of the resulting menu
+     * @param menuItems used to create the representation of each transition
+     */
     public RevisionTransitions(Resource resource, String revn, String lang, ITransitionMenuContent menuItems) {
         this.resource = resource;
         this.revision = revn;
@@ -43,12 +53,10 @@
             if (workflow != null) {
                 content = "<ul>";
 
-                WorkflowableV1 workflowable = (WorkflowableV1) this.resource;
-                String state = workflowable.getWorkflowState(revision);
+//                WorkflowableV1 workflowable = (WorkflowableV1) this.resource;
+//                String state = workflowable.getWorkflowState(revision);
 
                 Transition[] transitions = workflow.getTransitions();
-//                ITransitionMenuContent menuItems =
-//                    new TransitionMenuContentImpl(getResource(), state, getRevisionInfo().getName(), getMenuLanguageCode());
 
                 for (int i = 0; i < transitions.length; i++) {
                     content += menuItems.getTransitionElement(transitions[i]);



More information about the Yanel-commits mailing list