1 16 package org.apache.cocoon.caching.validity; 17 18 import org.apache.avalon.framework.parameters.ParameterException; 19 import org.apache.avalon.framework.parameters.Parameters; 20 21 24 public class NameValueEventFactory implements EventFactory { 25 26 29 public static final String EVENT_NAME_PARAM = "event-name"; 30 31 34 public static final String EVENT_VALUE_PARAM = "event-value"; 35 36 public Event createEvent(Parameters params) throws ParameterException { 37 final String name = params.getParameter(EVENT_NAME_PARAM); 38 final String value = params.getParameter(EVENT_VALUE_PARAM); 39 return new NameValueEvent(name,value); 40 } 41 } 42 | Popular Tags |