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 2003/10/26 20:28:42 UTC

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

andreas     2003/10/26 11:28:42

  Modified:    src/java/org/apache/lenya/cms/publication
                        URLInformation.java
  Log:
  added getCompleteArea()
  
  Revision  Changes    Path
  1.3       +15 -4     cocoon-lenya/src/java/org/apache/lenya/cms/publication/URLInformation.java
  
  Index: URLInformation.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/URLInformation.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- URLInformation.java	8 Sep 2003 19:29:54 -0000	1.2
  +++ URLInformation.java	26 Oct 2003 19:28:42 -0000	1.3
  @@ -64,6 +64,7 @@
       
       private String publicationId = null;
       private String area = null;
  +	private String completeArea = null;
       private String documentUrl = null;
       
       /**
  @@ -74,6 +75,14 @@
           return area;
       }
   
  +	/**
  +	 * Returns the complete area (including the "info-" prefix).
  +	 * @return A string.
  +	 */
  +	public String getCompleteArea() {
  +		return completeArea;
  +	}
  +
       /**
        * Returns the document URL.
        * @return A string.
  @@ -103,7 +112,7 @@
           this.publicationId = fragments[0];
           
           if (fragments.length > 1) {
  -            String completeArea = fragments[1];
  +            this.completeArea = fragments[1];
               
               if (url.length() > (this.publicationId + "/" + completeArea).length()) {
                   this.documentUrl = url.substring((this.publicationId + "/" + completeArea).length());
  @@ -113,9 +122,11 @@
               }
               
               if (completeArea.startsWith(Publication.INFO_AREA_PREFIX)) {
  -                completeArea = completeArea.substring(Publication.INFO_AREA_PREFIX.length());
  +				this.area = completeArea.substring(Publication.INFO_AREA_PREFIX.length());
  +            }
  +            else {
  +            	this.area = completeArea;
               }
  -            this.area = completeArea;
           }
       }
       
  
  
  

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