You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2004/01/26 11:21:38 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultDocument.java Document.java PageEnvelope.java

michi       2004/01/26 02:21:38

  Modified:    src/java/org/apache/lenya/cms/cocoon/components/modules/input
                        PageEnvelopeModule.java
               src/java/org/apache/lenya/cms/publication
                        DefaultDocument.java Document.java
                        PageEnvelope.java
  Log:
  document name added
  
  Revision  Changes    Path
  1.33      +6 -4      cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java
  
  Index: PageEnvelopeModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- PageEnvelopeModule.java	16 Oct 2003 21:40:58 -0000	1.32
  +++ PageEnvelopeModule.java	26 Jan 2004 10:21:38 -0000	1.33
  @@ -1,5 +1,4 @@
   /*
  -$Id$
   <License>
   
    ============================================================================
  @@ -81,7 +80,8 @@
    * 
    * @see org.apache.lenya.cms.publication.PageEnvelope
    * 
  - * @author  andreas
  + * @author  Andreas Hartmann
  + * @version $Id$
    */
   public class PageEnvelopeModule extends AbstractPageEnvelopeModule implements Serviceable {
   
  @@ -136,9 +136,11 @@
                   value = envelope.getDocument();
               } else if (name.equals(PageEnvelope.DOCUMENT_ID)) {
                   value = envelope.getDocument().getId();
  -            } else if (name.equals(PageEnvelope.DOCUMENT_NODE_ID)) {
  +            } else if (name.equals(PageEnvelope.DOCUMENT_NAME)) {
  +                value = envelope.getDocument().getName();
  +            } else if (name.equals(PageEnvelope.DOCUMENT_NODE_ID)) { // FIXME: Why is this here?
                   value = envelope.getDocument().getNodeId();
  -            } else if (name.equals(PageEnvelope.DOCUMENT_LABEL)) {
  +            } else if (name.equals(PageEnvelope.DOCUMENT_LABEL)) { // FIXME: Why is this here?
                   value = envelope.getDocument().getLabel();
               } else if (name.equals(PageEnvelope.DOCUMENT_URL)) {
                   value = envelope.getDocument().getDocumentURL();
  
  
  
  1.38      +11 -3     cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
  
  Index: DefaultDocument.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultDocument.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- DefaultDocument.java	11 Dec 2003 16:55:41 -0000	1.37
  +++ DefaultDocument.java	26 Jan 2004 10:21:38 -0000	1.38
  @@ -1,5 +1,4 @@
   /*
  -$Id$
   <License>
   
    ============================================================================
  @@ -63,6 +62,7 @@
    * A typical CMS document.
    *
    * @author <a href="mailto:andreas@apache.org">Andreas Hartmann</a>
  + * @version $Id$
    */
   public class DefaultDocument implements Document {
       
  @@ -139,13 +139,21 @@
       }
   
       /**
  -     * @see org.apache.lenya.cms.publication.Document#getNodeId()
  +     * @see org.apache.lenya.cms.publication.Document#getName()
        */
  -    public String getNodeId() {
  +    public String getName() {
           String[] ids = id.split("/");
           String nodeId = ids[ids.length - 1];
   
           return nodeId;
  +    }
  +
  +    /**
  +     * @see org.apache.lenya.cms.publication.Document#getNodeId()
  +     * @deprecated replaced by getName()
  +     */
  +    public String getNodeId() {
  +        return getName();
       }
   
       /**
  
  
  
  1.21      +7 -1      cocoon-lenya/src/java/org/apache/lenya/cms/publication/Document.java
  
  Index: Document.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/Document.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Document.java	12 Sep 2003 10:01:15 -0000	1.20
  +++ Document.java	26 Jan 2004 10:21:38 -0000	1.21
  @@ -1,5 +1,4 @@
   /*
  -$Id$
   <License>
   
    ============================================================================
  @@ -62,6 +61,7 @@
    * A CMS document.
    *
    * @author <a href="mailto:andreas@apache.org">Andreas Hartmann</a>
  + * @version $Id$
    */
   public interface Document {
       
  @@ -73,6 +73,12 @@
        * @return the document-id of this document.
        */
       String getId();
  +    
  +    /**
  +     * Returns the document name of this document.
  +     * @return the document-name of this document.
  +     */
  +    String getName();
       
       /**
        * Instead of returning the full document-id for this
  
  
  
  1.54      +3 -1      cocoon-lenya/src/java/org/apache/lenya/cms/publication/PageEnvelope.java
  
  Index: PageEnvelope.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/PageEnvelope.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- PageEnvelope.java	10 Dec 2003 10:51:08 -0000	1.53
  +++ PageEnvelope.java	26 Jan 2004 10:21:38 -0000	1.54
  @@ -1,5 +1,4 @@
   /*
  - * $Id$ <License>
    * 
    * ============================================================================ The Apache Software
    * License, Version 1.1
  @@ -55,6 +54,7 @@
    * document.
    * 
    * @author <a href="mailto:andreas.hartmann@wyona.org">Andreas Hartmann</a>
  + * @version $Id$ <License>
    */
   public class PageEnvelope {
       public static final String PUBLICATION_ID = "publication-id";
  @@ -64,6 +64,7 @@
       public static final String DEFAULT_LANGUAGE = "default-language";
       public static final String DOCUMENT = "document";
       public static final String DOCUMENT_ID = "document-id";
  +    public static final String DOCUMENT_NAME = "document-name";
       public static final String DOCUMENT_TYPE = "document-type";
       public static final String DOCUMENT_NODE_ID = "document-node-id";
       public static final String DOCUMENT_LABEL = "document-label";
  @@ -283,6 +284,7 @@
               PageEnvelope.PUBLICATION,
               PageEnvelope.DOCUMENT,
               PageEnvelope.DOCUMENT_ID,
  +            PageEnvelope.DOCUMENT_NAME,
               PageEnvelope.DOCUMENT_NODE_ID,
               PageEnvelope.DOCUMENT_LABEL,
               PageEnvelope.DOCUMENT_URL,
  
  
  

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