1 21 package com.jaspersoft.jasperserver.api.engine.scheduling; 22 23 import org.springframework.beans.factory.FactoryBean; 24 25 import net.sf.jasperreports.engine.JRPrintHyperlink; 26 27 import com.jaspersoft.jasperserver.api.engine.jasperreports.util.BaseReportExecutionHyperlinkProducerFactory; 28 29 33 public class ReportExecutionHyperlinkProducerFactory extends BaseReportExecutionHyperlinkProducerFactory implements FactoryBean { 34 35 private String serverURLPrefix; 36 37 public Object getObject() { 38 return new HyperlinkProducer(); 39 } 40 41 public Class getObjectType() { 42 return HyperlinkProducer.class; 43 } 44 45 public boolean isSingleton() { 46 return true; 47 } 48 49 50 public class HyperlinkProducer extends BaseHyperlinkProducer { 51 protected void appendHyperlinkStart(JRPrintHyperlink hyperlink, StringBuffer sb) { 52 sb.append(getServerURLPrefix()); 53 } 54 55 protected void appendAdditionalParameters(JRPrintHyperlink hyperlink, StringBuffer sb) { 56 } 58 } 59 60 public String getServerURLPrefix() { 61 return serverURLPrefix; 62 } 63 64 public void setServerURLPrefix(String serverURLPrefix) { 65 this.serverURLPrefix = serverURLPrefix; 66 } 67 68 } 69 | Popular Tags |