| 1 16 package org.outerj.daisy.publisher.serverimpl.requestmodel; 17 18 import org.outerj.daisy.repository.query.PredicateExpression; 19 import org.xml.sax.ContentHandler ; 20 21 public class IfRequest extends AbstractParentPublisherRequest implements Request { 22 private final PredicateExpression expression; 23 24 public IfRequest(PredicateExpression expression) { 25 this.expression = expression; 26 } 27 28 public void process(ContentHandler contentHandler, PublisherContext publisherContext) throws Exception { 29 if (expression.evaluate(publisherContext.getDocument(), publisherContext.getVersion())) { 30 super.process(contentHandler, publisherContext); 31 } 32 } 33 } 34 | Popular Tags |