[Yanel-commits] rev 59099 - public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Fri Jul 1 14:49:37 CEST 2011
Author: michi
Date: 2011-07-01 14:49:37 +0200 (Fri, 01 Jul 2011)
New Revision: 59099
Modified:
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
check yanel-path property
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-07-01 12:46:17 UTC (rev 59098)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2011-07-01 12:49:37 UTC (rev 59099)
@@ -393,9 +393,18 @@
return node.getCheckoutUserID();
}
+ /**
+ * @see org.wyona.yanel.core.api.attributes.VersionableV2#isCheckedOut()
+ */
public boolean isCheckedOut() throws Exception {
- Node node = getRealm().getRepository().getNode(getPath());
- return node.isCheckedOut();
+ String yanelPath = getResourceConfigProperty("yanel-path");
+ if (yanelPath != null) {
+ log.warn("Check whether checked-out for parameter yanel-path '" + yanelPath + "' not implemented yet!");
+ return false;
+ } else {
+ Node node = getRealm().getRepository().getNode(getPath());
+ return node.isCheckedOut();
+ }
}
/**
@@ -796,17 +805,21 @@
return;
}
- // INFO: If yanel-path property set, then it's not clear from where annotations should be read, hence let's check first if node (1:1) actually exists
- if (getRealm().getRepository().existsNode(getPath()) && getRealm().getRepository().getNode(getPath()).hasProperty("annotations")) {
- String aString = getRealm().getRepository().getNode(getPath()).getProperty("annotations").getString();
- String[] aArray = aString.split(", ");
- for(int i = 0; i < aArray.length; i++) {
- annotations.add(aArray[i]);
+ String yanelPath = getResourceConfigProperty("yanel-path");
+ if (yanelPath != null) {
+ log.warn("Read annotations for parameter yanel-path '" + yanelPath + "' not implemented yet!");
+ } else {
+ if (getRealm().getRepository().getNode(getPath()).hasProperty("annotations")) {
+ String aString = getRealm().getRepository().getNode(getPath()).getProperty("annotations").getString();
+ String[] aArray = aString.split(", ");
+ for(int i = 0; i < aArray.length; i++) {
+ annotations.add(aArray[i]);
+ }
+ annotationRead = true;
+ return;
+ } else {
+ log.warn("No annotations yet: " + getPath());
}
- annotationRead = true;
- return;
- } else {
- log.warn("No annotations yet: " + getPath());
}
}
More information about the Yanel-commits
mailing list