Update of /var/cvs/applications/richtext/src/org/mmbase/richtext/processors/xml
In directory
james.mmbase.org:/tmp/cvs-serv1731/src/org/mmbase/richtext/processors/xml
Modified Files:
MmxfGetString.java Wiki.java
Log Message:
if you opt for showing 'broken' relations, you can as not load any relations ad
all, and improvement performance
See also:
http://cvs.mmbase.org/viewcvs/applications/richtext/src/org/mmbase/richtext/processors/xml
Index: MmxfGetString.java
===================================================================
RCS file:
/var/cvs/applications/richtext/src/org/mmbase/richtext/processors/xml/MmxfGetString.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- MmxfGetString.java 1 Apr 2008 16:03:15 -0000 1.10
+++ MmxfGetString.java 22 Apr 2008 14:47:13 -0000 1.11
@@ -30,11 +30,14 @@
* This class implements the `get' for `mmxf' fields.
*
* @author Michiel Meeuwissen
- * @version $Id: MmxfGetString.java,v 1.10 2008/04/01 16:03:15 michiel Exp $
+ * @version $Id: MmxfGetString.java,v 1.11 2008/04/22 14:47:13 michiel Exp $
* @since MMBase-1.8
*/
public class MmxfGetString implements Processor {
+ public static String MODE_SHOWBROKEN =
"org.mmbase.richtext.wiki.show_broken";
+ public static String MODE_LOADRELATIONS =
"org.mmbase.richtext.wiki.load_relations";
+
private static final Logger log =
Logging.getLoggerInstance(MmxfGetString.class);
private static final int serialVersionUID = 1;
@@ -72,6 +75,9 @@
Generator generator = getGenerator(node.getCloud());
generator.setNamespaceAware(true);
generator.add(node, field);
+
+ Object loadRelations = node.getCloud().getProperty(MODE_LOADRELATIONS);
+ if (loadRelations == null || Casting.toBoolean(loadRelations)) {
org.mmbase.bridge.NodeList relatedNodes =
node.getRelatedNodes("object", "idrel", "destination");
if (log.isDebugEnabled()) {
log.debug("Idrelated " + relatedNodes);
@@ -82,6 +88,7 @@
log.debug("Idrelations " + relationsNodes);
}
generator.add(relationsNodes);
+ }
// TODO. With advent of 'blocks' one deeper level must be queried here
(see node.body.jspx)
return generator.getDocument();
@@ -181,7 +188,7 @@
return "";
}
} catch (Exception e) {
- log.error(e.getMessage(), e);
+ log.error(e.getClass() + ": " + e.getMessage(), e);
return value;
}
}
Index: Wiki.java
===================================================================
RCS file:
/var/cvs/applications/richtext/src/org/mmbase/richtext/processors/xml/Wiki.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Wiki.java 1 Apr 2008 16:03:34 -0000 1.3
+++ Wiki.java 22 Apr 2008 14:47:13 -0000 1.4
@@ -28,11 +28,13 @@
* id of the node).
*
* @author Michiel Meeuwissen
- * @version $Id: Wiki.java,v 1.3 2008/04/01 16:03:34 michiel Exp $
+ * @version $Id: Wiki.java,v 1.4 2008/04/22 14:47:13 michiel Exp $
* @todo something goes wrong if same node relation multiple times.
*/
class Wiki {
+
+
private static final Logger log = Logging.getLoggerInstance(Wiki.class);
private static final long serialVersionUID = 1L;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs