[Yanel-commits] rev 43132 -
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet
michi at wyona.com
michi at wyona.com
Thu Jun 4 07:01:24 CEST 2009
Author: michi
Date: 2009-06-04 07:01:23 +0200 (Thu, 04 Jun 2009)
New Revision: 43132
Modified:
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
Log:
TODO added
Modified: public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
===================================================================
--- public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java 2009-06-04 05:00:40 UTC (rev 43131)
+++ public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java 2009-06-04 05:01:23 UTC (rev 43132)
@@ -454,6 +454,9 @@
if (revisionName != null && ResourceAttributeHelper.hasAttributeImplemented(res, "Versionable", "2") && !isRollBack(request)) {
view = ((VersionableV2) res).getView(viewId, revisionName);
} else if (ResourceAttributeHelper.hasAttributeImplemented(res, "Workflowable", "1") && environment.getStateOfView().equals(StateOfView.LIVE)) {
+
+ // TODO: Check if resource actually exists, because even it doesn't exist, the workflowable interfaces can return something although it doesn't really make sense. For example if a resource type is workflowable, but it has no workflow associated with it, then WorkflowHelper.isLive will nevertheless return true, whereas WorkflowHelper.getLiveView will throw an exception!
+ // TODO: Check first on Viewable and sub-nest/move this "else if" into the "else" below!
WorkflowableV1 workflowable = (WorkflowableV1)res;
if (workflowable.isLive()) {
view = workflowable.getLiveView(viewId);
More information about the Yanel-commits
mailing list