1 16 package org.apache.jetspeed.services.forward; 17 18 import org.apache.turbine.util.DynamicURI; 20 import org.apache.turbine.services.pull.ApplicationTool; 21 22 import org.apache.jetspeed.util.ServiceUtil; 24 import org.apache.jetspeed.services.rundata.JetspeedRunData; 25 26 33 public class ForwardTool implements ApplicationTool 34 { 35 38 private JetspeedRunData rundata = null; 39 40 ForwardService service = null; 41 42 48 public DynamicURI forward(String forwardName) 49 { 50 if (null == service) 51 { 52 service = (ForwardService)ServiceUtil.getServiceByName(ForwardService.SERVICE_NAME); 53 } 54 return service.forward(this.rundata, forwardName); 55 } 56 57 65 public DynamicURI forward(String portlet, String target) 66 { 67 if (null == service) 68 { 69 service = (ForwardService)ServiceUtil.getServiceByName(ForwardService.SERVICE_NAME); 70 } 71 return service.forward(this.rundata, portlet, target); 72 } 73 74 75 79 80 87 88 public void init(Object data) 89 { 90 if (data instanceof JetspeedRunData) 92 { 93 this.rundata = (JetspeedRunData) data; 94 } 95 else 96 { 97 this.rundata = null; 98 } 99 return; 100 } 101 104 public void refresh() 105 { 106 } 108 } | Popular Tags |