cziegeler 2003/05/08 06:38:11
Modified: src/blocks/portal/java/org/apache/cocoon/portal/event/aspect/impl FrameEventAspect.java src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl TabMaxPageAspect.java MaxPageAspect.java FrameAspect.java TabContentAspect.java src/blocks/portal/java/org/apache/cocoon/portal/event/subscriber/impl DefaultLayoutEventSubscriber.java Added: src/blocks/portal/java/org/apache/cocoon/portal/layout/aspect TabLayoutStatus.java StaticLayoutStatus.java FrameStatus.java CompositeLayoutStatus.java MaximizableLayoutStatus.java src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl MaximizableAspect.java src/blocks/portal/java/org/apache/cocoon/portal/event/impl MaximizeEvent.java Removed: src/blocks/portal/java/org/apache/cocoon/portal/layout/impl TabLayoutStatus.java FrameStatus.java CompositeLayoutStatus.java Log: Minor refactoring Revision Changes Path 1.1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/aspect/TabLayoutStatus.java Index: TabLayoutStatus.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.portal.layout.aspect; import org.apache.cocoon.portal.aspect.AspectStatus; /** * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * @author <a href="mailto:[EMAIL PROTECTED]">Volker Schmitt</a> * * @version CVS $Id: TabLayoutStatus.java,v 1.1 2003/05/08 13:38:10 cziegeler Exp $ */ public class TabLayoutStatus implements AspectStatus { protected int selectedItem; public TabLayoutStatus() { } /** * Returns the selectedTab. * @return int */ public int getSelectedItem() { return selectedItem; } /** * Sets the selectedTab. * @param selectedTab The selectedTab to set */ public void setSelectedItem(int selectedTab) { this.selectedItem = selectedTab; } } 1.1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/aspect/StaticLayoutStatus.java Index: StaticLayoutStatus.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.portal.layout.aspect; import org.apache.cocoon.portal.aspect.AspectStatus; /** * Is this layout static? * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * * @version CVS $Id: StaticLayoutStatus.java,v 1.1 2003/05/08 13:38:10 cziegeler Exp $ */ public class StaticLayoutStatus implements AspectStatus { protected boolean _static; public StaticLayoutStatus() { } /** * @return */ public boolean isStatic() { return _static; } /** * @param b */ public void setStatic(boolean b) { _static = b; } } 1.1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/aspect/FrameStatus.java Index: FrameStatus.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.portal.layout.aspect; import org.apache.cocoon.portal.aspect.AspectStatus; /** * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * @author <a href="mailto:[EMAIL PROTECTED]">Volker Schmitt</a> * * @version CVS $Id: FrameStatus.java,v 1.1 2003/05/08 13:38:10 cziegeler Exp $ */ public class FrameStatus implements AspectStatus { protected String link; public FrameStatus() { } public String getLink() { return this.link; } public void setLink(String link) { this.link = link; } } 1.1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/aspect/CompositeLayoutStatus.java Index: CompositeLayoutStatus.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.portal.layout.aspect; import org.apache.cocoon.portal.aspect.AspectStatus; import org.apache.cocoon.portal.layout.Layout; /** * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * @author <a href="mailto:[EMAIL PROTECTED]">Volker Schmitt</a> * * @version CVS $Id: CompositeLayoutStatus.java,v 1.1 2003/05/08 13:38:10 cziegeler Exp $ */ public class CompositeLayoutStatus implements AspectStatus { protected Layout maxpageLayout; /** * @return Layout */ public Layout getMaxpageLayout() { return this.maxpageLayout; } /** * Sets the maxpageLayout. * @param maxpageLayout The maxpageLayout to set */ public void setMaxpageLayout(Layout maxpageLayout) { this.maxpageLayout = maxpageLayout; } } 1.1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/aspect/MaximizableLayoutStatus.java Index: MaximizableLayoutStatus.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.portal.layout.aspect; import org.apache.cocoon.portal.aspect.AspectStatus; /** * Is this layout maximizable? * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * * @version CVS $Id: MaximizableLayoutStatus.java,v 1.1 2003/05/08 13:38:10 cziegeler Exp $ */ public class MaximizableLayoutStatus implements AspectStatus { protected boolean maximizable; public MaximizableLayoutStatus() { } /** * @return */ public boolean isMaximizable() { return maximizable; } /** * @param b */ public void setMaximizable(boolean b) { maximizable = b; } } 1.2 +2 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/aspect/impl/FrameEventAspect.java Index: FrameEventAspect.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/aspect/impl/FrameEventAspect.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FrameEventAspect.java 7 May 2003 06:22:27 -0000 1.1 +++ FrameEventAspect.java 8 May 2003 13:38:10 -0000 1.2 @@ -68,7 +68,7 @@ import org.apache.cocoon.portal.event.aspect.EventAspect; import org.apache.cocoon.portal.event.aspect.EventAspectContext; import org.apache.cocoon.portal.event.impl.*; -import org.apache.cocoon.portal.layout.impl.FrameStatus; +import org.apache.cocoon.portal.layout.aspect.FrameStatus; import org.apache.cocoon.portal.profile.ProfileManager; /** 1.2 +2 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabMaxPageAspect.java Index: TabMaxPageAspect.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabMaxPageAspect.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TabMaxPageAspect.java 7 May 2003 06:22:22 -0000 1.1 +++ TabMaxPageAspect.java 8 May 2003 13:38:11 -0000 1.2 @@ -52,8 +52,8 @@ import org.apache.cocoon.portal.layout.Item; import org.apache.cocoon.portal.layout.Layout; +import org.apache.cocoon.portal.layout.aspect.TabLayoutStatus; import org.apache.cocoon.portal.layout.impl.CompositeLayout; -import org.apache.cocoon.portal.layout.impl.TabLayoutStatus; import org.apache.cocoon.portal.profile.ProfileManager; /** 1.2 +2 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/MaxPageAspect.java Index: MaxPageAspect.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/MaxPageAspect.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MaxPageAspect.java 7 May 2003 06:22:22 -0000 1.1 +++ MaxPageAspect.java 8 May 2003 13:38:11 -0000 1.2 @@ -55,8 +55,8 @@ import org.apache.cocoon.portal.PortalService; import org.apache.cocoon.portal.layout.Item; import org.apache.cocoon.portal.layout.Layout; +import org.apache.cocoon.portal.layout.aspect.CompositeLayoutStatus; import org.apache.cocoon.portal.layout.impl.CompositeLayout; -import org.apache.cocoon.portal.layout.impl.CompositeLayoutStatus; import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext; import org.apache.cocoon.portal.profile.ProfileManager; import org.xml.sax.ContentHandler; 1.3 +2 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/FrameAspect.java Index: FrameAspect.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/FrameAspect.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FrameAspect.java 7 May 2003 20:24:02 -0000 1.2 +++ FrameAspect.java 8 May 2003 13:38:11 -0000 1.3 @@ -52,8 +52,8 @@ import org.apache.cocoon.portal.PortalService; import org.apache.cocoon.portal.layout.Layout; +import org.apache.cocoon.portal.layout.aspect.FrameStatus; import org.apache.cocoon.portal.layout.impl.FrameLayout; -import org.apache.cocoon.portal.layout.impl.FrameStatus; import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext; import org.apache.cocoon.portal.profile.ProfileManager; import org.xml.sax.ContentHandler; 1.2 +2 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java Index: TabContentAspect.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TabContentAspect.java 7 May 2003 06:22:22 -0000 1.1 +++ TabContentAspect.java 8 May 2003 13:38:11 -0000 1.2 @@ -58,9 +58,9 @@ import org.apache.cocoon.portal.event.impl.LayoutEventImpl; import org.apache.cocoon.portal.layout.Layout; import org.apache.cocoon.portal.layout.NamedItem; +import org.apache.cocoon.portal.layout.aspect.TabLayoutStatus; import org.apache.cocoon.portal.layout.impl.Parameter; import org.apache.cocoon.portal.layout.impl.TabLayout; -import org.apache.cocoon.portal.layout.impl.TabLayoutStatus; import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext; import org.apache.cocoon.portal.profile.ProfileManager; import org.apache.cocoon.xml.AttributesImpl; 1.1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/MaximizableAspect.java Index: MaximizableAspect.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.portal.layout.renderer.aspect.impl; import org.apache.avalon.framework.activity.Initializable; import org.apache.cocoon.portal.PortalService; import org.apache.cocoon.portal.event.Event; import org.apache.cocoon.portal.event.EventManager; import org.apache.cocoon.portal.event.Filter; import org.apache.cocoon.portal.event.Subscriber; import org.apache.cocoon.portal.event.impl.MaximizeEvent; import org.apache.cocoon.portal.layout.Layout; import org.apache.cocoon.portal.layout.aspect.MaximizableLayoutStatus; import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext; import org.apache.cocoon.portal.profile.ProfileManager; import org.apache.cocoon.xml.XMLUtils; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; /** * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * @author <a href="mailto:[EMAIL PROTECTED]">Volker Schmitt</a> * * @version CVS $Id: MaximizableAspect.java,v 1.1 2003/05/08 13:38:11 cziegeler Exp $ */ public class MaximizableAspect extends AbstractAspect implements Subscriber, Initializable { /* (non-Javadoc) * @see org.apache.cocoon.portal.layout.renderer.RendererAspect#toSAX(org.apache.cocoon.portal.layout.renderer.RendererAspectContext, org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler) */ public void toSAX(RendererAspectContext context, Layout layout, PortalService service, ContentHandler handler) throws SAXException { MaximizableLayoutStatus maximizable = (MaximizableLayoutStatus) this.getStatus(MaximizableLayoutStatus.class, ProfileManager.SESSION_STATUS, layout.getId()); if ( maximizable != null ) { MaximizeEvent event = new MaximizeEvent(layout); XMLUtils.createElement(handler, "maxpage-uri", service.getLinkService().getLinkURI(event)); } context.invokeNext(layout, service, handler); } /* (non-Javadoc) * @see org.apache.cocoon.portal.event.Subscriber#getEventType() */ public Class getEventType() { return MaximizeEvent.class; } /* (non-Javadoc) * @see org.apache.cocoon.portal.event.Subscriber#getFilter() */ public Filter getFilter() { return null; } /* (non-Javadoc) * @see org.apache.cocoon.portal.event.Subscriber#inform(org.apache.cocoon.portal.event.Event) */ public void inform(final Event e) { final MaximizeEvent event = (MaximizeEvent)e; } /* (non-Javadoc) * @see org.apache.avalon.framework.activity.Initializable#initialize() */ public void initialize() throws Exception { EventManager eventManager = null; try { eventManager = (EventManager)this.manager.lookup( EventManager.ROLE); eventManager.getRegister().subscribe( this ); } finally { this.manager.release(eventManager); } } } 1.2 +2 -2 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/subscriber/impl/DefaultLayoutEventSubscriber.java Index: DefaultLayoutEventSubscriber.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/subscriber/impl/DefaultLayoutEventSubscriber.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DefaultLayoutEventSubscriber.java 7 May 2003 06:22:29 -0000 1.1 +++ DefaultLayoutEventSubscriber.java 8 May 2003 13:38:11 -0000 1.2 @@ -58,8 +58,8 @@ import org.apache.cocoon.portal.event.Subscriber; import org.apache.cocoon.portal.event.impl.LayoutRemoveEvent; import org.apache.cocoon.portal.layout.Layout; +import org.apache.cocoon.portal.layout.aspect.TabLayoutStatus; import org.apache.cocoon.portal.layout.impl.TabLayout; -import org.apache.cocoon.portal.layout.impl.TabLayoutStatus; import org.apache.cocoon.portal.profile.ProfileManager; /** 1.1 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/MaximizeEvent.java Index: MaximizeEvent.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.portal.event.impl; import org.apache.cocoon.portal.event.Event; import org.apache.cocoon.portal.layout.Layout; /** * This event indicates to maximize a layout * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * * @version CVS $Id: MaximizeEvent.java,v 1.1 2003/05/08 13:38:11 cziegeler Exp $ */ public final class MaximizeEvent implements Event { private Layout layout; public MaximizeEvent(Layout target) { this.layout = target; } public Layout getLayout() { return this.layout; } }