You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2003/08/07 17:50:27 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultSiteTree.java Publication.java

egli        2003/08/07 08:50:27

  Modified:    src/java/org/apache/lenya/cms/publication
                        DefaultSiteTree.java Publication.java
  Log:
  Added a new constructor to DefaultSiteTree which doesn't
  require you to specify a filename.
  Instead it asks for a pub dir and an area.
  
  The other constructors are deprecated.
  
  Also the publication now has a getter method which allows
  you to request the sitetree for a specific area.
  
  Revision  Changes    Path
  1.25      +222 -142  cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java
  
  Index: DefaultSiteTree.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultSiteTree.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DefaultSiteTree.java	25 Jul 2003 16:42:45 -0000	1.24
  +++ DefaultSiteTree.java	7 Aug 2003 15:50:27 -0000	1.25
  @@ -79,7 +79,6 @@
   import javax.xml.parsers.ParserConfigurationException;
   import javax.xml.transform.TransformerException;
   
  -
   /**
    * DOCUMENT ME!
    *
  @@ -88,21 +87,38 @@
    */
   public class DefaultSiteTree implements SiteTree {
       private static Category log = Category.getInstance(DefaultSiteTree.class);
  -    public static final String NAMESPACE_URI = "http://apache.org/cocoon/lenya/sitetree/1.0";
  +
  +    public static final String NAMESPACE_URI =
  +        "http://apache.org/cocoon/lenya/sitetree/1.0";
  +    public static final String SITE_TREE_FILENAME = "sitetree.xml";
  +
       private Document document = null;
       private File treefile = null;
   
       /**
  +     * Create a DefaultSiteTree
  +     * 
  +     * @param pubDir the publication directory
  +     * @param area the area
  +     * 
  +     * @throws SiteTreeException if an error occurs
  +     */
  +    protected DefaultSiteTree(File pubDir, String area)
  +        throws SiteTreeException {
  +        this(new File(pubDir, area + File.separator + SITE_TREE_FILENAME));
  +    }
  +
  +    /**
        * Create a DefaultSiteTree from a filename.
        *
        * @param treefilename file name of the tree
  -     * 
  -     * @throws ParserConfigurationException if an error occurs
  -     * @throws SAXException if the xml in the treefile is not valid
  -     * @throws IOException if the file cannot be opened
  +     *
  +     * @throws SiteTreeException if an error occurs
  +     *  
  +     * @deprecated use the DefaultSiteTree(File pubDir, String area) constructor instead.
        */
       public DefaultSiteTree(String treefilename)
  -        throws ParserConfigurationException, SAXException, IOException {
  +        throws SiteTreeException {
           this(new File(treefilename));
       }
   
  @@ -111,21 +127,30 @@
        *
        * @param treefile the file containing the tree
        * 
  -     * @throws ParserConfigurationException if an error occurs
  -     * @throws SAXException  if the xml in the treefile is not valid
  -     * @throws IOException  if the file cannot be opened
  +     * @throws SiteTreeException if an error occurs
  +     * 
  +     * @deprecated this constructor will be private in the future
        */
  -    public DefaultSiteTree(File treefile)
  -        throws ParserConfigurationException, SAXException, IOException {
  +    public DefaultSiteTree(File treefile) throws SiteTreeException {
           this.treefile = treefile;
   
  -        if (!treefile.isFile()) {
  -            //the treefile doesn't exist, so create it
  -            document = createDocument();
  -        } else {
  -            // Read tree
  -            document = DocumentHelper.readDocument(treefile);
  +        try {
  +            if (!treefile.isFile()) {
  +                //the treefile doesn't exist, so create it
  +
  +                document = createDocument();
  +            } else {
  +                // Read tree
  +                document = DocumentHelper.readDocument(treefile);
  +            }
  +        } catch (ParserConfigurationException e) {
  +			throw new SiteTreeException(e);
  +        } catch (SAXException e) {
  +			throw new SiteTreeException(e);
  +        } catch (IOException e) {
  +			throw new SiteTreeException(e);
           }
  +
       }
   
       /**
  @@ -139,8 +164,11 @@
           document = DocumentHelper.createDocument(NAMESPACE_URI, "site", null);
   
           Element root = document.getDocumentElement();
  -        root.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
  -        root.setAttribute("xsi:schemaLocation",
  +        root.setAttribute(
  +            "xmlns:xsi",
  +            "http://www.w3.org/2001/XMLSchema-instance");
  +        root.setAttribute(
  +            "xsi:schemaLocation",
               "http://apache.org/cocoon/lenya/sitetree/1.0  ../../../../resources/entities/sitetree.xsd");
   
           return document;
  @@ -168,8 +196,11 @@
                   if (attributes != null) {
                       Node idAttribute = attributes.getNamedItem("id");
   
  -                    if ((idAttribute != null) && idAttribute.getNodeValue().equals(ids.get(0))) {
  -                        return findNode(nodes.item(i), ids.subList(1, ids.size()));
  +                    if ((idAttribute != null)
  +                        && idAttribute.getNodeValue().equals(ids.get(0))) {
  +                        return findNode(
  +                            nodes.item(i),
  +                            ids.subList(1, ids.size()));
                       }
                   }
               }
  @@ -191,14 +222,24 @@
        * @see org.apache.lenya.cms.publication.SiteTree#addNode(org.apache.lenya.cms.publication.SiteTreeNode)
        */
       public void addNode(SiteTreeNode node) throws SiteTreeException {
  -        this.addNode(node.getAbsoluteParentId(), node.getId(), node.getLabels(), node.getHref(),
  -            node.getSuffix(), node.hasLink());
  +        this.addNode(
  +            node.getAbsoluteParentId(),
  +            node.getId(),
  +            node.getLabels(),
  +            node.getHref(),
  +            node.getSuffix(),
  +            node.hasLink());
       }
   
       /** (non-Javadoc)
        * @see org.apache.lenya.cms.publication.SiteTree#addNode(java.lang.String, org.apache.lenya.cms.publication.Label[], java.lang.String, java.lang.String, boolean)
        */
  -    public void addNode(String documentid, Label[] labels, String href, String suffix, boolean link)
  +    public void addNode(
  +        String documentid,
  +        Label[] labels,
  +        String href,
  +        String suffix,
  +        boolean link)
           throws SiteTreeException {
           String parentid = "";
           StringTokenizer st = new StringTokenizer(documentid, "/");
  @@ -215,8 +256,14 @@
       /** (non-Javadoc)
        * @see org.apache.lenya.cms.publication.SiteTree#addNode(java.lang.String, java.lang.String, org.apache.lenya.cms.publication.Label[], java.lang.String, java.lang.String, boolean)
        */
  -    public void addNode(String parentid, String id, Label[] labels, String href, String suffix,
  -        boolean link) throws SiteTreeException {
  +    public void addNode(
  +        String parentid,
  +        String id,
  +        Label[] labels,
  +        String href,
  +        String suffix,
  +        boolean link)
  +        throws SiteTreeException {
           Node parentNode = getNodeInternal(parentid);
   
           if (parentNode == null) {
  @@ -229,13 +276,19 @@
           Node childNode = getNodeInternal(parentid + "/" + id);
   
           if (childNode != null) {
  -            log.info("This node: " + parentid + "/" + id + " has already been inserted");
  +            log.info(
  +                "This node: "
  +                    + parentid
  +                    + "/"
  +                    + id
  +                    + " has already been inserted");
   
               return;
           }
   
           // Add node
  -        NamespaceHelper helper = new NamespaceHelper(NAMESPACE_URI, "", document);
  +        NamespaceHelper helper =
  +            new NamespaceHelper(NAMESPACE_URI, "", document);
           Element child = helper.createElement(SiteTreeNodeImpl.NODE_NAME);
           child.setAttribute(SiteTreeNodeImpl.ID_ATTRIBUTE_NAME, id);
   
  @@ -253,11 +306,14 @@
   
           for (int i = 0; i < labels.length; i++) {
               String labelName = labels[i].getLabel();
  -            Element label = helper.createElement(SiteTreeNodeImpl.LABEL_NAME, labelName);
  +            Element label =
  +                helper.createElement(SiteTreeNodeImpl.LABEL_NAME, labelName);
               String labelLanguage = labels[i].getLanguage();
   
               if ((labelLanguage != null) && (labelLanguage.length() > 0)) {
  -                label.setAttribute(SiteTreeNodeImpl.LANGUAGE_ATTRIBUTE_NAME, labelLanguage);
  +                label.setAttribute(
  +                    SiteTreeNodeImpl.LANGUAGE_ATTRIBUTE_NAME,
  +                    labelLanguage);
               }
   
               child.appendChild(label);
  @@ -267,29 +323,29 @@
           log.debug("Tree has been modified: " + document.getDocumentElement());
       }
   
  -	/**
  -	 *  (non-Javadoc)
  -	 * @see org.apache.lenya.cms.publication.SiteTree#addLabel(java.lang.String, org.apache.lenya.cms.publication.Label)
  -	 */
  +    /**
  +     *  (non-Javadoc)
  +     * @see org.apache.lenya.cms.publication.SiteTree#addLabel(java.lang.String, org.apache.lenya.cms.publication.Label)
  +     */
       public void addLabel(String documentId, Label label) {
           SiteTreeNode node = getNode(documentId);
           if (node != null) {
               node.addLabel(label);
           }
       }
  -	
  -	/**
  -	 *  (non-Javadoc)
  -	 * @see org.apache.lenya.cms.publication.SiteTree#removeLabel(java.lang.String, org.apache.lenya.cms.publication.Label)
  -	 */
  -	public void removeLabel(String documentId, Label label) {
  -		SiteTreeNode node = getNode(documentId);
  -		if (node != null) {
  -			node.removeLabel(label);
  -		}
  -	}
  -	
  -	/** (non-Javadoc)
  +
  +    /**
  +     *  (non-Javadoc)
  +     * @see org.apache.lenya.cms.publication.SiteTree#removeLabel(java.lang.String, org.apache.lenya.cms.publication.Label)
  +     */
  +    public void removeLabel(String documentId, Label label) {
  +        SiteTreeNode node = getNode(documentId);
  +        if (node != null) {
  +            node.removeLabel(label);
  +        }
  +    }
  +
  +    /** (non-Javadoc)
        * @see org.apache.lenya.cms.publication.SiteTree#removeNode(java.lang.String)
        */
       public SiteTreeNode removeNode(String documentId) {
  @@ -359,97 +415,121 @@
           return new SiteTreeNodeImpl(node);
       }
   
  -	/**
  -	 * Move up the node amongst its siblings.
  -	 * 
  -	 * @param documentid The document id for the node.
  -	 * @throws SiteTreeException if the moving failed.
  -	 */
  -	public void moveUp(String documentid)
  -		throws SiteTreeException {
  -			Node node = this.getNodeInternal(documentid);
  -			if (node == null) {
  -			  throw new SiteTreeException("Node to move: " + documentid + " not found");
  -			}
  -			Node parentNode = node.getParentNode();
  -			if (parentNode == null) {
  -			  throw new SiteTreeException("Parentid of node with documentid: " + documentid + " not found");
  -			}
  -			
  -			Node previousNode;
  -			try {
  -				previousNode = XPathAPI.selectSingleNode(node, "(preceding-sibling::*[local-name() = 'node'])[last()]");
  -			} catch (TransformerException e) {
  -				throw new SiteTreeException(e);
  -			}
  -			
  -			if (previousNode == null){
  -			  log.warn("Couldn't found a preceding sibling");
  -              return;
  -			}
  -			Node insertNode=parentNode.removeChild(node);
  -			parentNode.insertBefore(insertNode,previousNode);
  -	}
  -
  -	/**
  -	 * Move down the node amongst its siblings.
  -	 * 
  -	 * @param documentid The document id for the node.
  -	 * @throws SiteTreeException if the moving failed.
  -	 */
  -	public void moveDown(String documentid)
  -		throws SiteTreeException {
  -			Node node = this.getNodeInternal(documentid);
  -			if (node == null) {
  -			  throw new SiteTreeException("Node to move: " + documentid + " not found");
  -			}
  -			Node parentNode = node.getParentNode();
  -			if (parentNode == null) {
  -			  throw new SiteTreeException("Parentid of node with documentid: " + documentid + " not found");
  -			}
  -			Node nextNode;
  -			try {
  -				nextNode = XPathAPI.selectSingleNode(node, "following-sibling::*[local-name() = 'node'][position()=2]");
  -			} catch (TransformerException e) {
  -				throw new SiteTreeException(e);
  -			}
  -			
  -			Node insertNode=parentNode.removeChild(node);
  -	
  -			if (nextNode == null){
  -				log.warn("Couldn't found the second following sibling");
  -                parentNode.appendChild(insertNode);
  -			} else {
  - 				parentNode.insertBefore(insertNode,nextNode);
  -			}
  -	}
  -
  -	/** (non-Javadoc)
  -	 * @see org.apache.lenya.cms.publication.SiteTree#importSubtree(org.apache.lenya.cms.publication.SiteTreeNode, org.apache.lenya.cms.publication.SiteTreeNode, java.lang.String)
  -	 */
  -	public void importSubtree(SiteTreeNode newParent, SiteTreeNode subtreeRoot, String newid) throws SiteTreeException{
  -		assert subtreeRoot != null;
  -		assert newParent != null;
  -        String parentId = parentId=newParent.getAbsoluteParentId()+"/"+newParent.getId();
  -		String id = newid;
  -
  -		this.addNode(parentId, id, subtreeRoot.getLabels(), subtreeRoot.getHref(), subtreeRoot.getSuffix(),
  -			 subtreeRoot.hasLink());
  -		newParent = this.getNode(parentId+"/"+id);                  
  -		if (newParent == null) {
  -			throw new SiteTreeException("The added node  " + newParent.toString() + " not found");
  -		}
  -		SiteTreeNode[] children = subtreeRoot.getChildren();
  -		if (children == null) {
  -			log.info("The node " + subtreeRoot.toString() + " has no children");
  -			return;
  -		} else {
  -			for (int i = 0; i < children.length; i++) {
  -				SiteTreeNode node=children[i];
  -				importSubtree(newParent,children[i],children[i].getId());
  -			}
  -		}	
  -	}
  +    /**
  +     * Move up the node amongst its siblings.
  +     * 
  +     * @param documentid The document id for the node.
  +     * @throws SiteTreeException if the moving failed.
  +     */
  +    public void moveUp(String documentid) throws SiteTreeException {
  +        Node node = this.getNodeInternal(documentid);
  +        if (node == null) {
  +            throw new SiteTreeException(
  +                "Node to move: " + documentid + " not found");
  +        }
  +        Node parentNode = node.getParentNode();
  +        if (parentNode == null) {
  +            throw new SiteTreeException(
  +                "Parentid of node with documentid: "
  +                    + documentid
  +                    + " not found");
  +        }
  +
  +        Node previousNode;
  +        try {
  +            previousNode =
  +                XPathAPI.selectSingleNode(
  +                    node,
  +                    "(preceding-sibling::*[local-name() = 'node'])[last()]");
  +        } catch (TransformerException e) {
  +            throw new SiteTreeException(e);
  +        }
  +
  +        if (previousNode == null) {
  +            log.warn("Couldn't found a preceding sibling");
  +            return;
  +        }
  +        Node insertNode = parentNode.removeChild(node);
  +        parentNode.insertBefore(insertNode, previousNode);
  +    }
  +
  +    /**
  +     * Move down the node amongst its siblings.
  +     * 
  +     * @param documentid The document id for the node.
  +     * @throws SiteTreeException if the moving failed.
  +     */
  +    public void moveDown(String documentid) throws SiteTreeException {
  +        Node node = this.getNodeInternal(documentid);
  +        if (node == null) {
  +            throw new SiteTreeException(
  +                "Node to move: " + documentid + " not found");
  +        }
  +        Node parentNode = node.getParentNode();
  +        if (parentNode == null) {
  +            throw new SiteTreeException(
  +                "Parentid of node with documentid: "
  +                    + documentid
  +                    + " not found");
  +        }
  +        Node nextNode;
  +        try {
  +            nextNode =
  +                XPathAPI.selectSingleNode(
  +                    node,
  +                    "following-sibling::*[local-name() = 'node'][position()=2]");
  +        } catch (TransformerException e) {
  +            throw new SiteTreeException(e);
  +        }
  +
  +        Node insertNode = parentNode.removeChild(node);
  +
  +        if (nextNode == null) {
  +            log.warn("Couldn't found the second following sibling");
  +            parentNode.appendChild(insertNode);
  +        } else {
  +            parentNode.insertBefore(insertNode, nextNode);
  +        }
  +    }
  +
  +    /** (non-Javadoc)
  +     * @see org.apache.lenya.cms.publication.SiteTree#importSubtree(org.apache.lenya.cms.publication.SiteTreeNode, org.apache.lenya.cms.publication.SiteTreeNode, java.lang.String)
  +     */
  +    public void importSubtree(
  +        SiteTreeNode newParent,
  +        SiteTreeNode subtreeRoot,
  +        String newid)
  +        throws SiteTreeException {
  +        assert subtreeRoot != null;
  +        assert newParent != null;
  +        String parentId =
  +            parentId =
  +                newParent.getAbsoluteParentId() + "/" + newParent.getId();
  +        String id = newid;
  +
  +        this.addNode(
  +            parentId,
  +            id,
  +            subtreeRoot.getLabels(),
  +            subtreeRoot.getHref(),
  +            subtreeRoot.getSuffix(),
  +            subtreeRoot.hasLink());
  +        newParent = this.getNode(parentId + "/" + id);
  +        if (newParent == null) {
  +            throw new SiteTreeException(
  +                "The added node  " + newParent.toString() + " not found");
  +        }
  +        SiteTreeNode[] children = subtreeRoot.getChildren();
  +        if (children == null) {
  +            log.info("The node " + subtreeRoot.toString() + " has no children");
  +            return;
  +        } else {
  +            for (int i = 0; i < children.length; i++) {
  +                SiteTreeNode node = children[i];
  +                importSubtree(newParent, children[i], children[i].getId());
  +            }
  +        }
  +    }
   
       /**
        * Save the DefaultSiteTree.
  @@ -458,6 +538,6 @@
        * @throws TransformerException if the document could not be transformed
        */
       public void save() throws IOException, TransformerException {
  -       DocumentHelper.writeDocument(document, treefile);
  +        DocumentHelper.writeDocument(document, treefile);
       }
   }
  
  
  
  1.21      +50 -23    cocoon-lenya/src/java/org/apache/lenya/cms/publication/Publication.java
  
  Index: Publication.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/Publication.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Publication.java	5 Aug 2003 16:28:07 -0000	1.20
  +++ Publication.java	7 Aug 2003 15:50:27 -0000	1.21
  @@ -63,9 +63,10 @@
   import org.xml.sax.SAXException;
   
   import java.io.File;
  -import java.io.IOException; 
  +import java.io.IOException;
   import java.util.ArrayList;
   import java.util.Arrays;
  +import java.util.HashMap;
   
   /**
    * A publication.
  @@ -73,7 +74,7 @@
    * @author <a href="mailto:andreas.hartmann@wyona.org">Andreas Hartmann</a>
    */
   public class Publication {
  -	private static Category log = Category.getInstance(Publication.class);
  +    private static Category log = Category.getInstance(Publication.class);
   
       public static final String AUTHORING_AREA = "authoring";
       public static final String LIVE_AREA = "live";
  @@ -88,7 +89,7 @@
       public static final String PUBLICATION_PREFIX =
           "lenya" + File.separator + "pubs";
       public static final String PUBLICATION_PREFIX_URI = "lenya/pubs";
  -	public static final String CONFIGURATION_PATH = "config";
  +    public static final String CONFIGURATION_PATH = "config";
   
       private static final String[] areas =
           { AUTHORING_AREA, LIVE_AREA, INFO_AREA, ADMIN_AREA };
  @@ -101,6 +102,7 @@
       private DocumentIdToPathMapper mapper = new DefaultDocumentIdToPathMapper();
       private ArrayList languages = new ArrayList();
       private String defaultLanguage = null;
  +    private HashMap siteTrees = null;
   
       /** 
        * Creates a new instance of Publication
  @@ -138,25 +140,26 @@
   
           Configuration config;
           String pathMapperClassName = "";
  -        
  +
           try {
               config = builder.buildFromFile(configFile);
               pathMapperClassName = config.getChild(PATH_MAPPER).getValue();
   
  -			Class pathMapperClass = Class.forName(pathMapperClassName);
  -			mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance();
  -			
  -
  -			Configuration[] languages = config.getChild(LANGUAGES).getChildren();
  -			for (int i = 0; i < languages.length; i++) {
  -				Configuration languageConfig = languages[i];
  +            Class pathMapperClass = Class.forName(pathMapperClassName);
  +            mapper = (DocumentIdToPathMapper)pathMapperClass.newInstance();
  +
  +            Configuration[] languages =
  +                config.getChild(LANGUAGES).getChildren();
  +            for (int i = 0; i < languages.length; i++) {
  +                Configuration languageConfig = languages[i];
                   String language = languageConfig.getValue();
                   this.languages.add(language);
  -                if (languageConfig.getAttribute(DEFAULT_LANGUAGE_ATTR, null) != null) {
  +                if (languageConfig.getAttribute(DEFAULT_LANGUAGE_ATTR, null)
  +                    != null) {
                       defaultLanguage = language;
                   }
               }
  -			
  +
           } catch (ConfigurationException e) {
               throw new PublicationException(
                   "Problem with config file: " + configFile.getAbsolutePath(),
  @@ -170,17 +173,20 @@
                   "Could not find config file: " + configFile.getAbsolutePath(),
                   e);
           } catch (ClassNotFoundException e) {
  -			throw new PublicationException(
  -				"Cannot instantiate documentToPathMapper: " + pathMapperClassName,
  -				e);
  +            throw new PublicationException(
  +                "Cannot instantiate documentToPathMapper: "
  +                    + pathMapperClassName,
  +                e);
           } catch (InstantiationException e) {
  -			throw new PublicationException(
  -				"Cannot instantiate documentToPathMapper: " + pathMapperClassName,
  -				e);
  +            throw new PublicationException(
  +                "Cannot instantiate documentToPathMapper: "
  +                    + pathMapperClassName,
  +                e);
           } catch (IllegalAccessException e) {
  -			throw new PublicationException(
  -				"Cannot instantiate documentToPathMapper: " + pathMapperClassName,
  -				e);
  +            throw new PublicationException(
  +                "Cannot instantiate documentToPathMapper: "
  +                    + pathMapperClassName,
  +                e);
           }
       }
   
  @@ -275,4 +281,25 @@
           return (String[])languages.toArray(new String[languages.size()]);
       }
   
  +    /**
  +     * Get the sitetree for a specific area of this publication. 
  +     * Sitetrees are created on demand and are cached.
  +     * 
  +     * @param area the area
  +     * @return the sitetree for the specified area
  +     * 
  +     * @throws SiteTreeException if an error occurs 
  +     */
  +    public DefaultSiteTree getSiteTree(String area) throws SiteTreeException {
  +
  +        DefaultSiteTree sitetree = null;
  +
  +        if (siteTrees.containsKey(area)) {
  +            sitetree = (DefaultSiteTree)siteTrees.get(area);
  +        } else {
  +            sitetree = new DefaultSiteTree(getDirectory(), area);
  +            siteTrees.put(area, sitetree);
  +        }
  +        return sitetree;
  +    }
   }
  
  
  

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


Re: cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultSiteTree.java Publication.java

Posted by Michael Wechner <mi...@wyona.org>.
Gregor J. Rothfuss wrote:
> egli@apache.org wrote:
> 
>> egli        2003/08/07 08:50:27
>>
>>   Modified:    src/java/org/apache/lenya/cms/publication
>>                         DefaultSiteTree.java Publication.java
>>   The other constructors are deprecated.
> 
> 
> didnt we agree to refrain from deprecation during a dev cycle?

yes, I think so (but only stuff which was also created within the same 
dev cycle)

Thanks

Michael
> 


-- 
Michael Wechner
Wyona Ltd.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


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


Re: cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultSiteTree.java Publication.java

Posted by Christian Egli <ch...@wyona.com>.
"Gregor J. Rothfuss" <gr...@apache.org> writes:

> egli@apache.org wrote:
> 
> > egli        2003/08/07 08:50:27
> >   Modified:    src/java/org/apache/lenya/cms/publication
> >                         DefaultSiteTree.java Publication.java
> >   The other constructors are deprecated.
> 
> didnt we agree to refrain from deprecation during a dev cycle?

Did we? If I'd just delete the old constructors (or make them private
in this case) I'd be changing a lot of ant tasks that Edith just
did. I don't really want to do this right now so I simply deprecated
it to be cleaned up at a later time.

I already did change the creator ant tasks to the new interface. The
junit test case is failing. Investigating.

-- 
Christian Egli       christian.egli@wyona.com   +41 1 272 9161
                     Wyona AG, Hardstrasse 219, CH-8005 Zurich
Open Source CMS      http://www.wyona.org http://www.wyona.com 

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


Re: cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultSiteTree.java Publication.java

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
>> didnt we agree to refrain from deprecation during a dev cycle?
> 
> Only for new code, or am I wrong here?

new code from the current dev cycle, yes.

> BTW - it's a bit hard to check if a snippet was implemented
> during the current cycle ...

true :)

-- 
Gregor J. Rothfuss
Wyona Ltd.  -   Open Source Content Management   -   Apache Lenya
http://wyona.com                   http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com                       gregor@apache.org


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


Re: cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultSiteTree.java Publication.java

Posted by Andreas Hartmann <an...@apache.org>.
Gregor J. Rothfuss wrote:

> egli@apache.org wrote:
> 
>> egli        2003/08/07 08:50:27
>>
>>   Modified:    src/java/org/apache/lenya/cms/publication
>>                         DefaultSiteTree.java Publication.java
>>   The other constructors are deprecated.
> 
> 
> didnt we agree to refrain from deprecation during a dev cycle?

Only for new code, or am I wrong here?
BTW - it's a bit hard to check if a snippet was implemented
during the current cycle ...

Andreas



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


Re: cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultSiteTree.java Publication.java

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
egli@apache.org wrote:

> egli        2003/08/07 08:50:27
> 
>   Modified:    src/java/org/apache/lenya/cms/publication
>                         DefaultSiteTree.java Publication.java
>   The other constructors are deprecated.

didnt we agree to refrain from deprecation during a dev cycle?

-- 
Gregor J. Rothfuss
Wyona Ltd.  -   Open Source Content Management   -   Apache Lenya
http://wyona.com                   http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com                       gregor@apache.org


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