svn commit: r603396 - /lenya/trunk/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Tue Dec 11 14:44:08 2007
New Revision: 603396

URL: http://svn.apache.org/viewvc?rev=603396&view=rev
Log:
Converting links to UUID-based URIs in TinyMCE.

Modified:
    lenya/trunk/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java

Modified: lenya/trunk/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java?rev=603396&r1=603395&r2=603396&view=diff
==============================================================================
--- lenya/trunk/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java (original)
+++ lenya/trunk/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java Tue Dec 11 14:44:08 2007
@@ -29,6 +29,7 @@
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.lenya.cms.cocoon.source.SourceUtil;
+import org.apache.lenya.cms.linking.LinkConverter;
 import org.apache.lenya.cms.publication.ResourceType;
 import org.apache.lenya.cms.usecase.DocumentUsecase;
 import org.apache.lenya.cms.usecase.UsecaseException;
@@ -171,10 +172,12 @@
      * @throws Exception if an error occurs.
      */
     protected void saveDocument(String encoding, String content) throws Exception {
-        saveXMLFile(encoding, content, getSourceDocument());
+        org.apache.lenya.cms.publication.Document doc = getSourceDocument();
+        saveXMLFile(encoding, content, doc);
+        LinkConverter converter = new LinkConverter(this.manager, getLogger());
+        converter.convertUrlsToUuids(doc, false);
 
-        WorkflowUtil.invoke(this.manager, getSession(), getLogger(), getSourceDocument(),
-                getEvent());
+        WorkflowUtil.invoke(this.manager, getSession(), getLogger(), doc, getEvent());
     }
 
     /**
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.