1 16 package org.apache.cocoon.portal.event.impl; 17 18 import org.apache.cocoon.portal.aspect.Aspectalizable; 19 import org.apache.cocoon.portal.event.ActionEvent; 20 import org.apache.cocoon.portal.event.ComparableEvent; 21 import org.apache.cocoon.portal.event.RequestEvent; 22 23 30 public class ChangeAspectDataEvent 31 extends AbstractActionEvent 32 implements ActionEvent, RequestEvent, ComparableEvent { 33 34 protected String aspectName; 35 36 protected Object data; 37 38 protected String requestParameterName; 39 40 41 public ChangeAspectDataEvent(Aspectalizable target, String aspectName, Object data) { 42 super(target); 43 this.aspectName = aspectName; 44 this.data = data; 45 } 46 47 50 public String getAspectName() { 51 return this.aspectName; 52 } 53 54 57 public Object getData() { 58 return this.data; 59 } 60 61 64 public Object getTarget() { 65 return this.target; 66 } 67 68 69 public Aspectalizable getAspectalizable() { 70 return (Aspectalizable)this.target; 71 } 72 73 76 public String getRequestParameterName() { 77 return this.requestParameterName; 78 } 79 80 public void setRequestParameterName(String value) { 81 this.requestParameterName = value; 82 } 83 84 87 public boolean equalsEvent(ComparableEvent event) { 88 if ( event instanceof ChangeAspectDataEvent ) { 89 ChangeAspectDataEvent other = (ChangeAspectDataEvent)event; 90 return (this.getTarget().equals(other.getTarget()) 91 && this.getAspectName().equals(other.getAspectName())); 92 } 93 94 return false; 95 } 96 97 } 98 | Popular Tags |