1 16 package org.apache.cocoon.portal.event.aspect.impl; 17 18 import org.apache.cocoon.portal.event.Event; 19 import org.apache.cocoon.portal.event.EventManager; 20 import org.apache.cocoon.portal.event.impl.ChangeAspectDataEvent; 21 import org.apache.cocoon.portal.layout.Layout; 22 import org.apache.cocoon.portal.layout.impl.FrameLayout; 23 24 32 public class FrameEventAspect extends AbstractContentEventAspect { 33 34 protected String getRequestParameterName() { 35 return "frame"; 37 } 38 39 protected int getRequiredValueCount() { 40 return 3; 41 } 42 43 46 protected void publish(EventManager publisher, 47 Layout layout, 48 String [] values) { 49 if (layout instanceof FrameLayout) { 50 final Event e = new ChangeAspectDataEvent(layout, "frame", values[2]); 51 publisher.send(e); 52 } else { 53 this.getLogger().warn( 54 "the configured layout: " 55 + layout.getName() 56 + " is not a FrameLayout."); 57 } 58 } 59 60 } 61 | Popular Tags |