You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/08/14 18:22:43 UTC

svn commit: r431376 - in /lenya/trunk/src/modules/sitetree: java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java resources/javascript/navtree.js sitemap.xmap

Author: andreas
Date: Mon Aug 14 09:22:40 2006
New Revision: 431376

URL: http://svn.apache.org/viewvc?rev=431376&view=rev
Log:
Renamed documentId to path in sitetree fragment generator and DefaultSiteTree

Modified:
    lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
    lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
    lenya/trunk/src/modules/sitetree/resources/javascript/navtree.js
    lenya/trunk/src/modules/sitetree/sitemap.xmap

Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java?rev=431376&r1=431375&r2=431376&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java (original)
+++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java Mon Aug 14 09:22:40 2006
@@ -23,25 +23,19 @@
 import java.util.Map;
 
 import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.generation.ServiceableGenerator;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.DocumentUtil;
 import org.apache.lenya.cms.publication.Publication;
+import org.apache.lenya.cms.publication.PublicationException;
 import org.apache.lenya.cms.publication.PublicationUtil;
-import org.apache.lenya.cms.repository.RepositoryUtil;
-import org.apache.lenya.cms.repository.Session;
 import org.apache.lenya.cms.site.Link;
 import org.apache.lenya.cms.site.SiteException;
 import org.apache.lenya.cms.site.SiteManager;
+import org.apache.lenya.cms.site.SiteStructure;
 import org.apache.lenya.cms.site.tree.SiteTree;
 import org.apache.lenya.cms.site.tree.SiteTreeNode;
 import org.xml.sax.SAXException;
@@ -49,18 +43,17 @@
 
 /**
  * Generates a fragment of the navigation XML from the sitetree, corresponding to a given node. The
- * node is specified by the sitemap parameters area/documentid. If the sitemap parameter initialTree
+ * node is specified by the sitemap parameters area/path. If the sitemap parameter initialTree
  * is true, the top nodes of the tree will be generated and the node given by the sitemap parameters
- * area/documentid will be unfolded. If initialTree is false, only the children of the selected node
+ * area/path will be unfolded. If initialTree is false, only the children of the selected node
  * will be generated.
  */
 public class SitetreeFragmentGenerator extends ServiceableGenerator {
 
     protected Publication publication;
-    protected DocumentFactory identityMap;
 
-    /** Parameter which denotes the documentid of the clicked node */
-    protected String uuid;
+    /** Parameter which denotes the path of the clicked node */
+    protected String path;
 
     /** Parameter which denotes the area of the clicked node */
     protected String area;
@@ -77,10 +70,9 @@
      * Convenience object, so we don't need to create an AttributesImpl for every element.
      */
     protected AttributesImpl attributes;
-    private Document document;
 
     protected static final String PARAM_AREA = "area";
-    protected static final String PARAM_DOCUMENTID = "uuid";
+    protected static final String PARAM_PATH = "path";
     protected static final String PARAM_INITIAL = "initial";
     protected static final String PARAM_AREAS = "areas";
 
@@ -122,7 +114,7 @@
         }
 
         this.area = par.getParameter(PARAM_AREA, null);
-        this.uuid = par.getParameter(PARAM_DOCUMENTID, null);
+        this.path = par.getParameter(PARAM_PATH, null);
 
         if (par.isParameter(PARAM_INITIAL)) {
             this.initialTree = Boolean.valueOf(par.getParameter(PARAM_INITIAL, null))
@@ -141,7 +133,7 @@
 
         if (this.getLogger().isDebugEnabled()) {
             this.getLogger().debug("Parameter area: " + this.area);
-            this.getLogger().debug("Parameter documentid: " + this.uuid);
+            this.getLogger().debug("Parameter path: " + this.path);
             this.getLogger().debug("Parameter initialTree: " + this.initialTree);
             String areasStr = "";
             for (int i = 0; i < this.areas.length; i++) {
@@ -151,8 +143,6 @@
         }
 
         try {
-            Session session = RepositoryUtil.getSession(this.manager, request);
-            this.identityMap = DocumentUtil.createDocumentFactory(this.manager, session);
             this.publication = PublicationUtil.getPublication(this.manager, _objectModel);
         } catch (Exception e) {
             throw new ProcessingException("Could not create publication: ", e);
@@ -174,7 +164,7 @@
             this.attributes.clear();
             if (!this.initialTree) {
                 this.attributes.addAttribute("", ATTR_AREA, ATTR_AREA, "CDATA", this.area);
-                this.attributes.addAttribute("", ATTR_BASE, ATTR_BASE, "CDATA", this.uuid);
+                this.attributes.addAttribute("", ATTR_BASE, ATTR_BASE, "CDATA", this.path);
             }
 
             this.contentHandler.startElement(URI,
@@ -220,24 +210,20 @@
         }
 
         try {
-            this.document = identityMap.get(this.publication,
-                    this.area,
-                    this.uuid,
-                    this.publication.getDefaultLanguage());
+            
+            SiteStructure site = this.publication.getArea(this.area).getSite();
 
-            SiteTreeNode node = (SiteTreeNode) this.document.getLink().getNode();
+            SiteTreeNode node = (SiteTreeNode) site.getNode(this.path);
             if (this.getLogger().isDebugEnabled()) {
-                this.getLogger().debug("Node with documentid " + this.uuid + " found.");
+                this.getLogger().debug("Node with path " + this.path + " found.");
             }
             if (node == null)
-                throw new SiteException("Node with documentid " + this.uuid + " not found.");
+                throw new SiteException("Node with path " + this.path + " not found.");
 
             SiteTreeNode[] children = node.getChildren();
 
             addNodes(children);
-        } catch (DocumentBuildException e) {
-            throw new ProcessingException(e);
-        } catch (DocumentException e) {
+        } catch (PublicationException e) {
             throw new ProcessingException(e);
         }
     }
@@ -257,7 +243,7 @@
 
     /**
      * Generates the top node of the given area and then calls a recursive method to traverse the
-     * tree, if the node given by area/documentid is in this area.
+     * tree, if the node given by area/path is in this area.
      * @param siteArea
      * @throws SiteException
      * @throws SAXException
@@ -265,15 +251,13 @@
      */
     protected void generateFragmentInitial(String siteArea) throws SiteException, SAXException,
             ProcessingException {
-
+        
         ServiceSelector selector = null;
         SiteManager siteManager = null;
         try {
             selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
             siteManager = (SiteManager) selector.select(this.publication.getSiteManagerHint());
-            SiteTree siteTree = (SiteTree) siteManager.getSiteStructure(this.identityMap,
-                    this.publication,
-                    siteArea);
+            SiteTree siteTree = (SiteTree) this.publication.getArea(siteArea).getSite();
 
             String label = "";
             String isFolder = "";
@@ -303,11 +287,11 @@
             startNode(NODE_SITE);
 
             if (this.area.equals(siteArea)) {
-                generateFragmentRecursive(siteTree.getTopNodes(), this.uuid);
+                generateFragmentRecursive(siteTree.getTopNodes(), this.path);
             }
 
             endNode(NODE_SITE);
-        } catch (ServiceException e) {
+        } catch (Exception e) {
             throw new ProcessingException(e);
         } finally {
             if (selector != null) {
@@ -320,27 +304,27 @@
     }
 
     /**
-     * Follows the documentid to find the way in the sitetree to the specified node and opens all
+     * Follows the path to find the way in the sitetree to the specified node and opens all
      * folders on its way.
      * @param nodes
-     * @param docid
+     * @param path
      * @throws SiteException
      * @throws SAXException
      */
-    protected void generateFragmentRecursive(SiteTreeNode[] nodes, String docid)
+    protected void generateFragmentRecursive(SiteTreeNode[] nodes, String path)
             throws SiteException, SAXException {
         String nodeid;
         String childid;
 
         if (nodes == null)
             return;
-        if (docid.startsWith("/"))
-            docid = docid.substring(1);
-        if (docid.indexOf("/") != -1) {
-            nodeid = docid.substring(0, docid.indexOf("/"));
-            childid = docid.substring(docid.indexOf("/") + 1);
+        if (path.startsWith("/"))
+            path = path.substring(1);
+        if (path.indexOf("/") != -1) {
+            nodeid = path.substring(0, path.indexOf("/"));
+            childid = path.substring(path.indexOf("/") + 1);
         } else {
-            nodeid = docid;
+            nodeid = path;
             childid = "";
         }
 

Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java?rev=431376&r1=431375&r2=431376&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java (original)
+++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java Mon Aug 14 09:22:40 2006
@@ -173,7 +173,7 @@
      * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(org.apache.lenya.cms.site.tree.SiteTreeNode,
      *      java.lang.String)
      */
-    public synchronized void addNode(SiteTreeNode node, String refDocumentId) throws SiteException {
+    public synchronized void addNode(SiteTreeNode node, String refpath) throws SiteException {
         SiteTreeNode target = addNode(node.getParent().getPath(),
                 node.getName(),
                 node.getUuid(),
@@ -181,7 +181,7 @@
                 node.getHref(),
                 node.getSuffix(),
                 node.hasLink(),
-                refDocumentId);
+                refpath);
         copyLinks(node, target);
     }
 
@@ -214,7 +214,7 @@
      *      java.lang.String)
      */
     public synchronized SiteTreeNode addNode(String path, String uuid, boolean visibleInNav,
-            String href, String suffix, boolean link, String refDocumentId) throws SiteException {
+            String href, String suffix, boolean link, String refpath) throws SiteException {
         StringBuffer buf = new StringBuffer();
         StringTokenizer st = new StringTokenizer(path, "/");
         int length = st.countTokens();
@@ -224,16 +224,16 @@
         }
         String parentid = buf.toString();
         String id = st.nextToken();
-        return addNode(parentid, id, uuid, visibleInNav, href, suffix, link, refDocumentId);
+        return addNode(parentid, id, uuid, visibleInNav, href, suffix, link, refpath);
     }
 
     /**
      * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(java.lang.String, String,
      *      org.apache.lenya.cms.site.Label[], boolean, java.lang.String, java.lang.String, boolean)
      */
-    public synchronized SiteTreeNode addNode(String documentid, String uuid, boolean visibleInNav,
+    public synchronized SiteTreeNode addNode(String path, String uuid, boolean visibleInNav,
             String href, String suffix, boolean link) throws SiteException {
-        return addNode(documentid, uuid, visibleInNav, href, suffix, link, null);
+        return addNode(path, uuid, visibleInNav, href, suffix, link, null);
     }
 
     /**
@@ -252,7 +252,7 @@
      *      boolean, java.lang.String)
      */
     public synchronized SiteTreeNode addNode(String parentid, String id, String uuid,
-            boolean visibleInNav, String href, String suffix, boolean link, String refDocumentId)
+            boolean visibleInNav, String href, String suffix, boolean link, String refpath)
             throws SiteException {
 
         Node parentNode = getNodeInternal(parentid);
@@ -301,8 +301,8 @@
         }
 
         // Add Node
-        if (refDocumentId != null && !refDocumentId.equals("")) {
-            Node nextSibling = getNodeInternal(refDocumentId);
+        if (refpath != null && !refpath.equals("")) {
+            Node nextSibling = getNodeInternal(refpath);
             if (nextSibling != null) {
                 parentNode.insertBefore(child, nextSibling);
             } else {
@@ -336,9 +336,9 @@
      * @see org.apache.lenya.cms.site.tree.SiteTree#removeLabel(java.lang.String,
      *      org.apache.lenya.cms.site.Label)
      */
-    public synchronized void removeLabel(String documentId, String language) {
+    public synchronized void removeLabel(String path, String language) {
         try {
-            SiteTreeNode node = (SiteTreeNode) getNode(documentId);
+            SiteTreeNode node = (SiteTreeNode) getNode(path);
             node.removeLabel(language);
             saveDocument();
         } catch (SiteException e) {
@@ -349,12 +349,12 @@
     /**
      * @see org.apache.lenya.cms.site.tree.SiteTree#removeNode(java.lang.String)
      */
-    public synchronized SiteTreeNode removeNode(String documentId) {
-        assert documentId != null;
+    public synchronized SiteTreeNode removeNode(String path) {
+        assert path != null;
 
         Node node;
         try {
-            node = removeNodeInternal(documentId);
+            node = removeNodeInternal(path);
         } catch (SiteException e) {
             throw new RuntimeException(e);
         }
@@ -369,12 +369,12 @@
 
     /**
      * removes the node corresponding to the given document-id and returns it
-     * @param documentId the document-id of the Node to be removed
+     * @param path the document-id of the Node to be removed
      * @return the <code>Node</code> that was removed
      * @throws SiteException
      */
-    private synchronized Node removeNodeInternal(String documentId) throws SiteException {
-        Node node = this.getNodeInternal(documentId);
+    private synchronized Node removeNodeInternal(String path) throws SiteException {
+        Node node = this.getNodeInternal(path);
         Node parentNode = node.getParentNode();
         Node newNode = parentNode.removeChild(node);
         try {
@@ -388,13 +388,13 @@
     /**
      * Find a node for a given document-id
      * 
-     * @param documentId the document-id of the Node that we're trying to get
+     * @param path the document-id of the Node that we're trying to get
      * 
      * @return the Node if there is a Node for the given document-id, null otherwise
      * @throws SiteException
      */
-    private synchronized Node getNodeInternal(String documentId) throws SiteException {
-        StringTokenizer st = new StringTokenizer(documentId, "/");
+    private synchronized Node getNodeInternal(String path) throws SiteException {
+        StringTokenizer st = new StringTokenizer(path, "/");
         ArrayList ids = new ArrayList();
 
         while (st.hasMoreTokens()) {
@@ -453,17 +453,17 @@
 
     /**
      * Move up the node amongst its siblings.
-     * @param documentid The document id for the node.
+     * @param path The document id for the node.
      * @throws SiteException if the moving failed.
      */
-    public synchronized void moveUp(String documentid) throws SiteException {
-        Node node = this.getNodeInternal(documentid);
+    public synchronized void moveUp(String path) throws SiteException {
+        Node node = this.getNodeInternal(path);
         if (node == null) {
-            throw new SiteException("Node to move: " + documentid + " not found");
+            throw new SiteException("Node to move: " + path + " not found");
         }
         Node parentNode = node.getParentNode();
         if (parentNode == null) {
-            throw new SiteException("Parentid of node with documentid: " + documentid
+            throw new SiteException("Parentid of node with path: " + path
                     + " not found");
         }
 
@@ -487,17 +487,17 @@
     /**
      * Move down the node amongst its siblings.
      * 
-     * @param documentid The document id for the node.
+     * @param path The document id for the node.
      * @throws SiteException if the moving failed.
      */
-    public synchronized void moveDown(String documentid) throws SiteException {
-        Node node = this.getNodeInternal(documentid);
+    public synchronized void moveDown(String path) throws SiteException {
+        Node node = this.getNodeInternal(path);
         if (node == null) {
-            throw new SiteException("Node to move: " + documentid + " not found");
+            throw new SiteException("Node to move: " + path + " not found");
         }
         Node parentNode = node.getParentNode();
         if (parentNode == null) {
-            throw new SiteException("Parentid of node with documentid: " + documentid
+            throw new SiteException("Parentid of node with path: " + path
                     + " not found");
         }
         Node nextNode;
@@ -524,7 +524,7 @@
      *      org.apache.lenya.cms.site.tree.SiteTreeNode, java.lang.String, java.lang.String)
      */
     public synchronized void importSubtree(SiteTreeNode newParent, SiteTreeNode subtreeRoot,
-            String newid, String refDocumentId) throws SiteException {
+            String newid, String refpath) throws SiteException {
         assert subtreeRoot != null;
         assert newParent != null;
         String parentId = newParent.getPath();
@@ -539,7 +539,7 @@
                 subtreeRoot.getHref(),
                 subtreeRoot.getSuffix(),
                 subtreeRoot.hasLink(),
-                refDocumentId);
+                refpath);
         copyLinks(subtreeRoot, targetRoot);
 
         newParent = (SiteTreeNode) this.getNode(parentId + "/" + id);
@@ -561,9 +561,9 @@
      * @see org.apache.lenya.cms.site.tree.SiteTree#setLabel(java.lang.String,
      *      org.apache.lenya.cms.site.Label)
      */
-    public synchronized void setLabel(String documentId, String language, String label) {
+    public synchronized void setLabel(String path, String language, String label) {
         try {
-            SiteTreeNode node = (SiteTreeNode) getNode(documentId);
+            SiteTreeNode node = (SiteTreeNode) getNode(path);
             if (node != null) {
                 SiteTreeLink link = new SiteTreeLink(this.factory, node, label, language);
                 node.setLink(link);

Modified: lenya/trunk/src/modules/sitetree/resources/javascript/navtree.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/resources/javascript/navtree.js?rev=431376&r1=431375&r2=431376&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/resources/javascript/navtree.js (original)
+++ lenya/trunk/src/modules/sitetree/resources/javascript/navtree.js Mon Aug 14 09:22:40 2006
@@ -26,7 +26,7 @@
     this.href = '';
     this.label = '';
     this.area = '';
-    this.documentid = '';
+    this.path = '';
     this.isprotected = true;
     this.existsChosenLanguage = true;
     this.langSuffix = '';
@@ -41,7 +41,7 @@
   
     newItem.isfolder = isNodeFolder(node);
     newItem.area = this.area;
-    newItem.documentid = '/' + node.getAttribute('basic-url');
+    newItem.path = '/' + node.getAttribute('basic-url');
     newItem.isprotected = isNodeProtected(node);
     newItem.href = node.getAttribute('href');
     newItem.label = getLabel(node);
@@ -53,8 +53,8 @@
 
 NavNode.prototype.getLoadSubTreeURL = function() {
     area = this.area;
-    documentid = this.documentid;  
-    return encodeURI(CONTEXT_PREFIX + '/' + PUBLICATION_ID + PIPELINE_PATH + '?area='+area+'&documentid='+documentid+'&language='+CHOSEN_LANGUAGE+'&areas='+ALL_AREAS+'&lenya.module=sitetree');
+    path = this.path;  
+    return encodeURI(CONTEXT_PREFIX + '/' + PUBLICATION_ID + PIPELINE_PATH + '?area='+area+'&path='+path+'&language='+CHOSEN_LANGUAGE+'&areas='+ALL_AREAS+'&lenya.module=sitetree');
 }
 
 NavNode.prototype.getStyle = function() {
@@ -62,7 +62,7 @@
         return 'lenya-info-root';
     } else if (this.isprotected) {
         return 'lenya-info-protected';
-    } else if (this.documentid == CUT_DOCUMENT_ID) {
+    } else if (this.path == CUT_DOCUMENT_ID) {
         return 'lenya-info-cut';
     } else if (!this.existsChosenLanguage) {
         return 'lenya-info-nolanguage';
@@ -129,21 +129,21 @@
     this._currentId = 0;
 };
 
-NavTree.prototype.loadInitialTree = function(area, documentid) {
-    var url = encodeURI(CONTEXT_PREFIX + '/' + PUBLICATION_ID + PIPELINE_PATH + '?area='+area+'&documentid='+documentid+'&language='+CHOSEN_LANGUAGE+'&initial=true&areas='+ALL_AREAS+'&lenya.module=sitetree');
+NavTree.prototype.loadInitialTree = function(area, path) {
+    var url = encodeURI(CONTEXT_PREFIX + '/' + PUBLICATION_ID + PIPELINE_PATH + '?area='+area+'&path='+path+'&language='+CHOSEN_LANGUAGE+'&initial=true&areas='+ALL_AREAS+'&lenya.module=sitetree');
     
     callback = function(fragment, param) {
         var tree = param[0];
         var area = param[1];
-        var documentid = param[2];
+        var path = param[2];
         tree.initialTreeLoaded(fragment);
-        var selectedItem = tree.getItemByPath(PUBLICATION_ID+'/'+area+documentid)
+        var selectedItem = tree.getItemByPath(PUBLICATION_ID+'/'+area+path)
         if (selectedItem != false) {
             tree.select(selectedItem);
         }
     }
     
-    var param = new Array(this, area, documentid);
+    var param = new Array(this, area, path);
     loadAsyncXML(url, callback, param);
 };
 
@@ -175,7 +175,7 @@
   
   newSite.isfolder = isNodeFolder(site);
   newSite.area = siteArea;
-  newSite.documentid = '/';
+  newSite.path = '/';
   newSite.isprotected = isNodeProtected(site);
   newSite.href = langSuffix;
   newSite.langSuffix = langSuffix;

Modified: lenya/trunk/src/modules/sitetree/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/sitemap.xmap?rev=431376&r1=431375&r2=431376&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/sitemap.xmap (original)
+++ lenya/trunk/src/modules/sitetree/sitemap.xmap Mon Aug 14 09:22:40 2006
@@ -124,7 +124,7 @@
         <map:generate type="sitetree-fragment">
           <map:parameter name="areas" value="{request-param:areas}"/>
           <map:parameter name="area" value="{request-param:area}"/>
-          <map:parameter name="uuid" value="{page-envelope:document-uuid}"/>
+          <map:parameter name="path" value="{request-param:path}"/>
           <map:parameter name="initial" value="{request-param:initial}"/>
         </map:generate>
         <!-- <map:call resource="i18n"/> -->



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org


Re: svn commit: r431376 - in /lenya/trunk/src/modules/sitetree: java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java resources/javascript/navtree.js sitemap.xmap

Posted by Joern Nettingsmeier <po...@uni-due.de>.
Andreas Hartmann wrote:
> Joern Nettingsmeier wrote:
>> andreas@apache.org wrote:
>>> Author: andreas
>>> Date: Mon Aug 14 09:22:40 2006
>>> New Revision: 431376
>>>
>>> URL: http://svn.apache.org/viewvc?rev=431376&view=rev
>>> Log:
>>> Renamed documentId to path in sitetree fragment generator and
>>> DefaultSiteTree
>>
>> how can these be equivalent? since we have flat storage, the uuid is
>> orthogonal to the sitetree layout, right?
> 
> The former document ID (/foo/bar/baz) is now called path, because
> it is the same string as the path of the document node in the site
> structure.

i see. thanks for explaining.

>>> -          <map:parameter name="uuid"
>>> value="{page-envelope:document-uuid}"/>
>>> +          <map:parameter name="path" value="{request-param:path}"/>
>>
>> do i understand correctly that this is a change in sematics, not a
>> simple rename?
> 
> Actually I just changed it back, I had changed it from document-id
> to document-uuid before which was wrong since the sitetree is based
> on paths and not UUIDs.

ah, ok.

-- 
"I don't need backups. I need restore!" - Trad.

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-due.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r431376 - in /lenya/trunk/src/modules/sitetree: java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java resources/javascript/navtree.js sitemap.xmap

Posted by Andreas Hartmann <an...@apache.org>.
Joern Nettingsmeier wrote:
> andreas@apache.org wrote:
>> Author: andreas
>> Date: Mon Aug 14 09:22:40 2006
>> New Revision: 431376
>>
>> URL: http://svn.apache.org/viewvc?rev=431376&view=rev
>> Log:
>> Renamed documentId to path in sitetree fragment generator and DefaultSiteTree
> 
> how can these be equivalent? since we have flat storage, the uuid is
> orthogonal to the sitetree layout, right?

The former document ID (/foo/bar/baz) is now called path, because
it is the same string as the path of the document node in the site structure.


>> Modified: lenya/trunk/src/modules/sitetree/sitemap.xmap
>> URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/sitemap.xmap?rev=431376&r1=431375&r2=431376&view=diff
>> ==============================================================================
>> --- lenya/trunk/src/modules/sitetree/sitemap.xmap (original)
>> +++ lenya/trunk/src/modules/sitetree/sitemap.xmap Mon Aug 14 09:22:40 2006
>> @@ -124,7 +124,7 @@
>>          <map:generate type="sitetree-fragment">
>>            <map:parameter name="areas" value="{request-param:areas}"/>
>>            <map:parameter name="area" value="{request-param:area}"/>
>> -          <map:parameter name="uuid" value="{page-envelope:document-uuid}"/>
>> +          <map:parameter name="path" value="{request-param:path}"/>
> 
> do i understand correctly that this is a change in sematics, not a
> simple rename?

Actually I just changed it back, I had changed it from document-id
to document-uuid before which was wrong since the sitetree is based
on paths and not UUIDs.

Thanks for commenting this!

-- Andreas


-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r431376 - in /lenya/trunk/src/modules/sitetree: java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java java/src/org/apache/lenya/cms/site/tree/DefaultSiteTree.java resources/javascript/navtree.js sitemap.xmap

Posted by Joern Nettingsmeier <po...@uni-due.de>.
andreas@apache.org wrote:
> Author: andreas
> Date: Mon Aug 14 09:22:40 2006
> New Revision: 431376
> 
> URL: http://svn.apache.org/viewvc?rev=431376&view=rev
> Log:
> Renamed documentId to path in sitetree fragment generator and DefaultSiteTree

how can these be equivalent? since we have flat storage, the uuid is
orthogonal to the sitetree layout, right?

> Modified: lenya/trunk/src/modules/sitetree/sitemap.xmap
> URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/sitemap.xmap?rev=431376&r1=431375&r2=431376&view=diff
> ==============================================================================
> --- lenya/trunk/src/modules/sitetree/sitemap.xmap (original)
> +++ lenya/trunk/src/modules/sitetree/sitemap.xmap Mon Aug 14 09:22:40 2006
> @@ -124,7 +124,7 @@
>          <map:generate type="sitetree-fragment">
>            <map:parameter name="areas" value="{request-param:areas}"/>
>            <map:parameter name="area" value="{request-param:area}"/>
> -          <map:parameter name="uuid" value="{page-envelope:document-uuid}"/>
> +          <map:parameter name="path" value="{request-param:path}"/>

do i understand correctly that this is a change in sematics, not a
simple rename?

thx,

jörn



-- 
"I don't need backups. I need restore!" - Trad.

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-due.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org