1 15 package org.apache.tapestry.link; 16 17 import org.apache.tapestry.IRequestCycle; 18 import org.apache.tapestry.engine.ILink; 19 20 30 31 public class AbsoluteLinkRenderer extends DefaultLinkRenderer 32 { 33 private String _scheme; 34 private String _serverName; 35 private int _port; 36 37 public int getPort() 38 { 39 return _port; 40 } 41 42 public String getScheme() 43 { 44 return _scheme; 45 } 46 47 public String getServerName() 48 { 49 return _serverName; 50 } 51 52 58 59 public void setPort(int port) 60 { 61 _port = port; 62 } 63 64 70 71 public void setScheme(String scheme) 72 { 73 _scheme = scheme; 74 } 75 76 82 83 public void setServerName(String serverName) 84 { 85 _serverName = serverName; 86 } 87 88 protected String constructURL(ILink link, String anchor, IRequestCycle cycle) 89 { 90 return link.getAbsoluteURL(_scheme, _serverName, _port, anchor, true); 91 } 92 93 } 94 | Popular Tags |