[Yanel-commits] rev 57618 - public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Thu Mar 31 17:50:32 CEST 2011
Author: michi
Date: 2011-03-31 17:50:31 +0200 (Thu, 31 Mar 2011)
New Revision: 57618
Modified:
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
implements versionable V3
Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2011-03-31 15:48:55 UTC (rev 57617)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2011-03-31 15:50:31 UTC (rev 57618)
@@ -44,6 +44,7 @@
import org.wyona.yanel.core.api.attributes.ModifiableV2;
import org.wyona.yanel.core.api.attributes.TranslatableV1;
import org.wyona.yanel.core.api.attributes.VersionableV2;
+import org.wyona.yanel.core.api.attributes.VersionableV3;
import org.wyona.yanel.core.api.attributes.ViewableV1;
import org.wyona.yanel.core.api.attributes.ViewableV2;
import org.wyona.yanel.core.api.attributes.WorkflowableV1;
@@ -66,7 +67,7 @@
/**
* Generic resource handling XML data and transforming it using XSLT, etc.
*/
-public class XMLResource extends BasicXMLResource implements ModifiableV2, VersionableV2, CreatableV2, IntrospectableV1, TranslatableV1, WorkflowableV1, AnnotatableV1, CommentableV1 {
+public class XMLResource extends BasicXMLResource implements ModifiableV2, VersionableV2, VersionableV3, CreatableV2, IntrospectableV1, TranslatableV1, WorkflowableV1, AnnotatableV1, CommentableV1 {
private static Logger log = Logger.getLogger(XMLResource.class);
@@ -299,6 +300,26 @@
}
/**
+ * @see org.wyona.yanel.core.api.attributes.VersionableV3#getRevisions(boolean)
+ */
+ public java.util.Iterator<RevisionInformation> getRevisions(boolean reverse) throws Exception {
+ if (org.wyona.commons.clazz.ClazzUtil.implementsInterface(getRepoNode(), "org.wyona.yarep.core.attributes.VersionableV1")) {
+ org.wyona.yarep.core.attributes.VersionableV1 versionableNode = (org.wyona.yarep.core.attributes.VersionableV1) getRepoNode();
+ return new org.wyona.yanel.core.attributes.versionable.RevisionInformationIterator(versionableNode.getRevisions(reverse));
+/*
+ java.util.Iterator it = versionableNode.getRevisions(false);
+ while (it.hasNext()) {
+ log.warn("DEBUG: Revision: " + ((Revision)it.next()).getRevisionName());
+ }
+ log.warn("Implementation not finished yet!");
+ return null;
+*/
+ } else {
+ return null;
+ }
+ }
+
+ /**
* @see org.wyona.yanel.core.api.attributes.VersionableV2#getRevisions()
*/
public RevisionInformation[] getRevisions() throws Exception {
More information about the Yanel-commits
mailing list