cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal/samples/profiles/layout portal.xml
Date Tue, 02 Sep 2003 08:34:21 GMT
cziegeler    2003/09/02 01:34:21

  Modified:    src/blocks/portal/samples/profiles/copletdata portal.xml
               src/blocks/portal/conf portal.samplesxconf
               src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
                        AbstractCompositeAspect.java
               src/blocks/portal/java/org/apache/cocoon/portal/layout
                        CompositeLayout.java Layout.java
                        AbstractLayout.java layout.xml
               src/blocks/portal/java/org/apache/cocoon/portal/coplet
                        CopletData.java CopletBaseData.java copletdata.xml
               src/blocks/portal/java/org/apache/cocoon/portal/layout/impl
                        CompositeLayoutImpl.java
               src/blocks/portal/samples/profiles/layout portal.xml
  Log:
  Removing obsolete code for static layouts and maxpage function. 
  Aspects are now used
  
  Revision  Changes    Path
  1.6       +0 -13     cocoon-2.1/src/blocks/portal/samples/profiles/copletdata/portal.xml
  
  Index: portal.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/samples/profiles/copletdata/portal.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- portal.xml	27 May 2003 14:07:16 -0000	1.5
  +++ portal.xml	2 Sep 2003 08:34:17 -0000	1.6
  @@ -2,7 +2,6 @@
   <coplets>
      <coplet-data id="Newsweek" name="standard">
         <title>Newsweek</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -12,7 +11,6 @@
   
      <coplet-data id="NYTBusiness" name="standard">
         <title>NYT Business</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -22,7 +20,6 @@
   
      <coplet-data id="BBCNews" name="standard">
         <title>BBC News</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -32,7 +29,6 @@
   
      <coplet-data id="CNET News" name="standard">
         <title>CNET News</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -42,7 +38,6 @@
   
      <coplet-data id="CNET Business" name="standard">
         <title>CNET Business News</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -52,7 +47,6 @@
   
      <coplet-data id="CSTNews" name="standard">
         <title>Chicago Sunday Times</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -62,7 +56,6 @@
   
      <coplet-data id="CNNEurope" name="standard">
         <title>CNN Europe</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -72,7 +65,6 @@
   
      <coplet-data id="ML Weblog" name="standard">
         <title>ML's Weblog</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -82,7 +74,6 @@
   
      <coplet-data id="CZ Weblog" name="standard">
         <title>CZ's Weblog</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -100,7 +91,6 @@
   
      <coplet-data id="Weblog" name="standard">
         <title>Another Weblog</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -110,7 +100,6 @@
   
      <coplet-data id="Introduction" name="standard">
         <title>Cocoon Introduction</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -120,7 +109,6 @@
   
      <coplet-data id="Overview" name="standard">
         <title>Cocoon Overview</title>
  -      <maxpageable>true</maxpageable>
         <coplet-base-data>URICoplet</coplet-base-data>
         <attribute>
         	<name>uri</name>
  @@ -128,4 +116,3 @@
         </attribute>
      </coplet-data>
   </coplets>
  -
  
  
  
  1.5       +51 -0     cocoon-2.1/src/blocks/portal/conf/portal.samplesxconf
  
  Index: portal.samplesxconf
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/conf/portal.samplesxconf,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- portal.samplesxconf	20 Aug 2003 12:05:35 -0000	1.4
  +++ portal.samplesxconf	2 Sep 2003 08:34:17 -0000	1.5
  @@ -101,18 +101,42 @@
               <renderers default="column">
                   <renderer name="column"/>
               </renderers>
  +            <aspects>
  +               <aspect name="static"
  +                       class="java.lang.Boolean"
  +                       store="persistent"
  +                       auto-create="true"
  +                       value="false">
  +               </aspect>
  +            </aspects>
           </layout>
           <layout name="row" 
                   class="org.apache.cocoon.portal.layout.impl.CompositeLayout">
               <renderers default="row">
                   <renderer name="row"/>
               </renderers>
  +            <aspects>
  +               <aspect name="static"
  +                       class="java.lang.Boolean"
  +                       store="persistent"
  +                       auto-create="true"
  +                       value="false">
  +               </aspect>
  +            </aspects>
           </layout>
           <layout name="tab" 
                   class="org.apache.cocoon.portal.layout.impl.CompositeLayout">
               <renderers default="tab">
                   <renderer name="tab"/>
               </renderers>
  +            <aspects>
  +               <aspect name="static"
  +                       class="java.lang.Boolean"
  +                       store="persistent"
  +                       auto-create="true"
  +                       value="false">
  +               </aspect>
  +            </aspects>
           </layout>
           <layout name="frame" 
                   class="org.apache.cocoon.portal.layout.impl.FrameLayout"
  @@ -120,12 +144,28 @@
               <renderers default="frame">
                   <renderer name="frame"/>
               </renderers>
  +            <aspects>
  +               <aspect name="static"
  +                       class="java.lang.Boolean"
  +                       store="persistent"
  +                       auto-create="true"
  +                       value="false">
  +               </aspect>
  +            </aspects>
           </layout>
           <layout name="coplet" 
                   class="org.apache.cocoon.portal.layout.impl.CopletLayout">
               <renderers default="window">
                   <renderer name="window"/>
               </renderers>
  +            <aspects>
  +               <aspect name="static"
  +                       class="java.lang.Boolean"
  +                       store="persistent"
  +                       auto-create="true"
  +                       value="false">
  +               </aspect>
  +            </aspects>
           </layout>
           <layout name="link"
                   class="org.apache.cocoon.portal.layout.impl.LinkLayout"
  @@ -144,6 +184,12 @@
                          store="session"
                          auto-create="false">
                  </aspect>
  +               <aspect name="static"
  +                       class="java.lang.Boolean"
  +                       store="persistent"
  +                       auto-create="true"
  +                       value="false">
  +               </aspect>
               </aspects>
            </layout>
       </layouts>
  @@ -166,6 +212,11 @@
                           store="persistent"
                           auto-create="true"
                           value="false"/>
  +                <aspect name="maxpageable"
  +                        class="java.lang.Boolean"
  +                        store="persistent"
  +                        auto-create="true"
  +                        value="true"/>
               </coplet-data-aspects>
               
               <coplet-instance-data-aspects>
  
  
  
  1.4       +2 -3      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java
  
  Index: AbstractCompositeAspect.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractCompositeAspect.java	18 Jul 2003 14:41:45 -0000	1.3
  +++ AbstractCompositeAspect.java	2 Sep 2003 08:34:17 -0000	1.4
  @@ -102,8 +102,7 @@
        */
       protected void processLayout(Layout layout, PortalService service, ContentHandler handler)
throws SAXException {
           final String rendererName = layout.getRendererName();
  -        Renderer renderer = null;
  -        renderer = service.getComponentManager().getRenderer(rendererName);
  +        final Renderer renderer = service.getComponentManager().getRenderer(rendererName);
           renderer.toSAX(layout, service, handler);
       }
   
  
  
  
  1.8       +10 -1     cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/CompositeLayout.java
  
  Index: CompositeLayout.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/CompositeLayout.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CompositeLayout.java	31 Jul 2003 14:37:05 -0000	1.7
  +++ CompositeLayout.java	2 Sep 2003 08:34:17 -0000	1.8
  @@ -77,6 +77,11 @@
   	 */
   	void addItem(Item item);
   
  +    /**
  +     * Get the item at the index
  +     * @param index
  +     * @return The item or null
  +     */
   	Item getItem(int index);
   
   	/**
  @@ -91,6 +96,10 @@
   	 */
   	int getSize();
       
  +    /**
  +     * Remove an item
  +     * @param item
  +     */
       void removeItem(Item item);
       
   }
  
  
  
  1.8       +1 -5      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java
  
  Index: Layout.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Layout.java	3 Jul 2003 08:00:00 -0000	1.7
  +++ Layout.java	2 Sep 2003 08:34:17 -0000	1.8
  @@ -81,8 +81,4 @@
   
       void setParent(Item item);
   
  -    boolean isStatic();
  -
  -    void setStatic(boolean value);
  -    
   }
  
  
  
  1.10      +1 -19     cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
  
  Index: AbstractLayout.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractLayout.java	14 Jun 2003 16:58:02 -0000	1.9
  +++ AbstractLayout.java	2 Sep 2003 08:34:17 -0000	1.10
  @@ -72,8 +72,6 @@
       
       protected Item parent;
       
  -    protected boolean _static;
  -    
       protected Map parameters = new SequencedHashMap();
        
       /* (non-Javadoc)
  @@ -105,22 +103,6 @@
           this.parent = item;
       }
   
  -	/* (non-Javadoc)
  -	 * @see org.apache.cocoon.portal.layout.Layout#isStatic()
  -	 */
  -	public boolean isStatic() {
  -		return _static;
  -
  -	}
  -
  -	/* (non-Javadoc)
  -	 * @see org.apache.cocoon.portal.layout.Layout#setStatic(boolean)
  -	 */
  -	public void setStatic(boolean value) {
  -		this._static = value;
  -
  -	}
  -      
       /* (non-Javadoc)
        * @see org.apache.cocoon.portal.layout.Layout#getLayoutRendererName()
        */
  
  
  
  1.2       +0 -3      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml
  
  Index: layout.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- layout.xml	29 Jul 2003 06:52:15 -0000	1.1
  +++ layout.xml	2 Sep 2003 08:34:17 -0000	1.2
  @@ -33,9 +33,6 @@
           <field name="parameters" type="org.exolab.castor.mapping.MapItem" collection="map"
handler="org.apache.cocoon.portal.util.ParameterFieldHandler">
               <bind-xml name="parameter" />
           </field>
  -        <field name="static" type="boolean">
  -            <bind-xml name="static" node="attribute" />
  -        </field>
       </class>
       
       <class name="org.apache.cocoon.portal.layout.impl.LinkLayout"
  
  
  
  1.9       +4 -37     cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/CopletData.java
  
  Index: CopletData.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/CopletData.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CopletData.java	10 Jul 2003 13:17:02 -0000	1.8
  +++ CopletData.java	2 Sep 2003 08:34:18 -0000	1.9
  @@ -71,8 +71,6 @@
   
       protected String title;
   
  -    protected Boolean maxpageable;
  -    
       protected CopletBaseData copletBaseData;
   
       protected Map attributes = new HashMap();
  @@ -89,34 +87,6 @@
       }
   
       /**
  -      * Returns the maxpageable as boolean. If it has not been set "true" is returned.
  -      * @return boolean
  -      */
  -    public boolean isMaxpageable() {
  -    	if (this.maxpageable == null) {
  -			return true;
  -    	} else {
  -			return this.maxpageable.booleanValue();
  -    	}
  -    }
  -
  -	/**
  -	  * Returns the maxpageable as Boolean.
  -	  * @return boolean
  -	  */
  -	public Boolean getMaxpageable() {
  -		return this.maxpageable;
  -	}
  -
  -    /**
  -     * Sets the maxpageable.
  -     * @param maxpageable The maxpageable to set
  -     */
  -    public void setMaxpageable(boolean maxpageable) {
  -        this.maxpageable = new Boolean(maxpageable);
  -    }
  -
  -    /**
        * Returns the title.
        * @return String
        */
  @@ -173,13 +143,10 @@
   		
   		this.deltaApplied = true;
   		
  -		Boolean maxpageable = data.maxpageable;
  -		if (maxpageable != null)
  -			this.maxpageable = maxpageable;
  -		
   		String title = data.getTitle();
  -		if (title != null)
  -			this.setTitle(title);
  +		if (title != null) {
  +            this.setTitle(title);
  +		}
   			
   		CopletBaseData copletBaseData = data.getCopletBaseData();
   		if (copletBaseData != null)	{
  
  
  
  1.7       +2 -2      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/CopletBaseData.java
  
  Index: CopletBaseData.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/CopletBaseData.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CopletBaseData.java	10 Jul 2003 13:17:02 -0000	1.6
  +++ CopletBaseData.java	2 Sep 2003 08:34:18 -0000	1.7
  @@ -67,7 +67,7 @@
   
   	private String id;
   
  -	private String copletAdapterName = null;
  +	private String copletAdapterName;
   
   	public CopletBaseData() {
   	}
  
  
  
  1.2       +0 -4      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml
  
  Index: copletdata.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- copletdata.xml	29 Jul 2003 06:52:15 -0000	1.1
  +++ copletdata.xml	2 Sep 2003 08:34:18 -0000	1.2
  @@ -31,10 +31,6 @@
   			<bind-xml name="title"/>
   		</field>
   
  -		<field name="maxpageable" type="java.lang.Boolean">
  -			<bind-xml name="maxpageable" />
  -		</field>
  -
   		<field name="attributes" type="org.exolab.castor.mapping.MapItem" collection="map"
handler="org.apache.cocoon.portal.util.AttributesFieldHandler">
   			<bind-xml name="attribute"/>
   		</field>
  
  
  
  1.2       +6 -6      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java
  
  Index: CompositeLayoutImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CompositeLayoutImpl.java	26 May 2003 13:18:19 -0000	1.1
  +++ CompositeLayoutImpl.java	2 Sep 2003 08:34:20 -0000	1.2
  @@ -83,7 +83,7 @@
   	 * @param item, item to add
   	 */
   	public final void addItem(int index, Item item) {
  -		items.add(index, item);
  +		this.items.add(index, item);
           item.setParent(this);
   	}
   
  @@ -92,7 +92,7 @@
   	 * @param item, item to add
   	 */
   	public final void addItem(Item item) {
  -		items.add(item);
  +		this.items.add(item);
   		item.setParent(this);
   	}
   
  @@ -101,7 +101,7 @@
   	 * @return Item
   	 */
   	public final Item getItem(int index) {
  -		return (Item) items.get(index);
  +		return (Item) this.items.get(index);
   	}
   
   	/**
  @@ -109,7 +109,7 @@
   	 * @return items
   	 */
   	public final List getItems() {
  -		return items;
  +		return this.items;
   	}
   
   	/**
  @@ -117,7 +117,7 @@
   	 * @return size
   	 */
   	public final int getSize() {
  -		return items.size();
  +		return this.items.size();
   	}
       
       public final void removeItem(Item item) {
  
  
  
  1.8       +4 -4      cocoon-2.1/src/blocks/portal/samples/profiles/layout/portal.xml
  
  Index: portal.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/samples/profiles/layout/portal.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- portal.xml	6 Jun 2003 11:35:46 -0000	1.7
  +++ portal.xml	2 Sep 2003 08:34:20 -0000	1.8
  @@ -4,9 +4,9 @@
           <composite-layout name="column">
               <item>
                   <parameter name="width" value="350" />
  -                <composite-layout static="true" name="row">
  +                <composite-layout name="row">
                       <item>
  -		                <coplet-layout static="true" name="coplet">
  +		                <coplet-layout name="coplet">
   		                    <parameter name="title" value="Newsweek"/>
   		                    <coplet-instance-data>Newsweek-1</coplet-instance-data>
   		                </coplet-layout>
  @@ -20,7 +20,7 @@
                   </composite-layout>
               </item>
               <item>
  -                <composite-layout static="false" name="row">
  +                <composite-layout name="row">
                       <item>
   		                <coplet-layout name="coplet">
   		                    <parameter name="title" value="BBC News"/>
  @@ -61,7 +61,7 @@
                   </composite-layout>
               </item>
               <item>
  -                <composite-layout static="false" name="row">
  +                <composite-layout name="row">
                       <item>
   		                <coplet-layout name="coplet">
   		                    <parameter name="title" value="Chicago Sunday Times" />
  
  
  

Mime
View raw message