|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.util.uri.BaseURI
public abstract class BaseURI
This is the base class for all dynamic URIs in the Turbine System. All of the classes used for generating URIs are derived from this.
Field Summary |
---|
Fields inherited from interface org.apache.turbine.util.uri.URIConstants |
---|
CGI_ACTION_PARAM, CGI_SCREEN_PARAM, CGI_TEMPLATE_PARAM, EVENT_PREFIX, FTP_PORT, HTTP, HTTP_PORT, HTTPS, HTTPS_PORT, PATH_INFO, QUERY_DATA, URI_SCHEME_SEPARATOR |
Constructor Summary | |
---|---|
BaseURI()
Empty C'tor. |
|
BaseURI(RunData runData)
Constructor with a RunData object |
|
BaseURI(RunData runData,
boolean redirect)
Constructor, set explicit redirection |
|
BaseURI(ServerData serverData)
Constructor with a ServerData object |
|
BaseURI(ServerData serverData,
boolean redirect)
Constructor, set explicit redirection |
Method Summary | |
---|---|
protected java.lang.String |
encodeResponse(java.lang.String uri)
Encodes a Response Uri according to the Servlet Container. |
protected void |
getContextAndScript(java.lang.StringBuffer sb)
Append the Context Path and Script Name to the passed String Buffer. |
java.lang.String |
getContextPath()
Gets the context path. |
java.lang.String |
getReference()
Returns the current reference anchor. |
protected javax.servlet.http.HttpServletResponse |
getResponse()
Returns the Response Object from the Servlet Container. |
protected void |
getSchemeAndPort(java.lang.StringBuffer sb)
Appends Scheme, Server and optionally the port to the supplied String Buffer. |
java.lang.String |
getScriptName()
Gets the script name (/servlets/Turbine). |
java.lang.String |
getServerName()
Gets the server name. |
int |
getServerPort()
Gets the server port. |
java.lang.String |
getServerScheme()
Returns the current Server Scheme |
boolean |
hasReference()
Does this URI contain an anchor? (#ref) |
boolean |
isRedirect()
Returns the current value of the Redirect flag |
void |
setContextPath(java.lang.String contextPath)
Sets the context path. |
void |
setRedirect(boolean redirect)
Set the redirect Flag |
void |
setReference(java.lang.String reference)
Sets a reference anchor (#ref). |
protected void |
setResponse(javax.servlet.http.HttpServletResponse response)
Set a Response Object to use when creating the response string. |
void |
setScriptName(java.lang.String scriptName)
Sets the script name (/servlets/Turbine). |
void |
setSecure()
Method to specify that a URI should use SSL. |
void |
setSecure(int port)
Method to specify that a URI should use SSL. |
void |
setServerName(java.lang.String serverName)
Sets the server name. |
void |
setServerPort(int serverPort)
Sets the server port. |
void |
setServerScheme(java.lang.String serverScheme)
Sets the scheme (HTTP or HTTPS). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseURI()
public BaseURI(RunData runData)
runData
- A RunData objectpublic BaseURI(RunData runData, boolean redirect)
runData
- A RunData objectredirect
- True if redirection allowed.public BaseURI(ServerData serverData)
serverData
- A ServerData objectpublic BaseURI(ServerData serverData, boolean redirect)
serverData
- A ServerData objectredirect
- True if redirection allowed.Method Detail |
---|
public void setRedirect(boolean redirect)
redirect
- The new value of the redirect flag.public boolean isRedirect()
public java.lang.String getScriptName()
getScriptName
in interface URI
public void setScriptName(java.lang.String scriptName)
scriptName
- A String with the script name.public java.lang.String getContextPath()
getContextPath
in interface URI
public void setContextPath(java.lang.String contextPath)
contextPath
- A String with the context pathpublic java.lang.String getServerName()
getServerName
in interface URI
public void setServerName(java.lang.String serverName)
serverName
- A String with the server name.public int getServerPort()
getServerPort
in interface URI
public void setServerPort(int serverPort)
serverPort
- An int with the port.public void setSecure()
public void setSecure(int port)
port
- An int with the port number.public void setServerScheme(java.lang.String serverScheme)
serverScheme
- A String with the scheme.public java.lang.String getServerScheme()
getServerScheme
in interface URI
public void setReference(java.lang.String reference)
reference
- A String containing the reference.public java.lang.String getReference()
getReference
in interface URI
public boolean hasReference()
protected void setResponse(javax.servlet.http.HttpServletResponse response)
protected javax.servlet.http.HttpServletResponse getResponse()
protected void getContextAndScript(java.lang.StringBuffer sb)
This is a convenience method to be used in the Link output routines of derived classes to easily append the correct path.
sb
- The StringBuffer to store context path and script name.protected void getSchemeAndPort(java.lang.StringBuffer sb)
This is a convenience method to be used in the Link output routines of derived classes to easily append the correct server scheme.
sb
- The StringBuffer to store the scheme and port information.protected java.lang.String encodeResponse(java.lang.String uri)
uri
- The Uri to encode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |