|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mssm.crover.scentral.URLRepositoryImpl
Implements URLRepository
URLRepository| Constructor Summary | |
URLRepositoryImpl()
|
|
| Method Summary | |
void |
defineVariable(java.lang.String name,
java.lang.String replacement)
Defines a new variable with the given value. |
java.lang.String |
getBase()
Returns the base URL of the web server. |
java.lang.String |
getRedirectURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response)
Returns URL as a string, otherwise the same as getURL() function. |
java.lang.String |
getRedirectURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response,
java.lang.String parameters)
Returns URL as a string, otherwise the same as getURL() function. |
java.net.URL |
getURL(java.lang.String name)
Deprecated. |
java.net.URL |
getURL(java.lang.String name,
javax.servlet.http.HttpServletResponse response,
java.lang.String parameters)
Returns the URL associated with the name. |
java.lang.String |
getURLString(java.lang.String name)
Deprecated. |
java.lang.String |
getURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response)
Returns URL as a string, otherwise the same as getURL() function No paramters are provided. |
java.lang.String |
getURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response,
java.lang.String parameters)
Behaves the same as getURL, only returns string instead of a URL. |
void |
loadRepository(java.io.File file)
Read the url-repository information from this file. |
void |
loadRepository(java.io.Reader reader)
Obtain the url-repository information from this Reader. |
void |
loadRepository(java.lang.String str)
Read the url-repository information from this file specified as a filename. |
void |
registerURL(java.lang.String name,
java.lang.String page)
|
protected void |
removeVariable(java.lang.StringBuffer sb,
int start,
int count)
|
protected void |
replaceVariable(java.lang.StringBuffer sb_url,
java.lang.String name,
java.lang.String replacement)
Expand all the variables found in sb_url. |
java.lang.String |
toString()
Lists each association on one line, in the style of the text repository file, but with the URL expanded. |
protected java.net.URL |
translateURL(java.lang.String raw_url)
Returns the URL as translated from the raw_url. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public URLRepositoryImpl()
| Method Detail |
public java.net.URL getURL(java.lang.String name)
Log
public java.net.URL getURL(java.lang.String name,
javax.servlet.http.HttpServletResponse response,
java.lang.String parameters)
URLRepository
getURL in interface URLRepositoryresponse - The response that possibly needs to encode the URLparameters - URL parameters for a GET method, must include
the question mark '?' as the first character.public java.lang.String getURLString(java.lang.String name)
getURL(java.lang.String)public java.lang.String getBase()
getBase in interface URLRepository
public java.lang.String getRedirectURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response,
java.lang.String parameters)
URLRepository
getRedirectURLString in interface URLRepositoryresponse - The response that possibly needs to encode the URLparameters - URL parameters for a GET method, must include
the question mark '?' as the first character.HttpServletResponse.getRedirectURL()
public java.lang.String getRedirectURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response)
URLRepository
getRedirectURLString in interface URLRepositoryresponse - The response that possibly needs to encode the URLHttpServletResponse.getRedirectURL()
public java.lang.String getURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response,
java.lang.String parameters)
getURLString in interface URLRepositoryresponse - The response that possibly needs to encode the URLparameters - URL parameters for a GET method, must include
the question mark '?' as the first character.getURL(java.lang.String)
public java.lang.String getURLString(java.lang.String name,
javax.servlet.http.HttpServletResponse response)
URLRepository
getURLString in interface URLRepositoryresponse - The response that possibly needs to encode the URLURLRepository.getURL(java.lang.String, javax.servlet.http.HttpServletResponse, java.lang.String)
public void registerURL(java.lang.String name,
java.lang.String page)
registerURL in interface URLRepositorypublic void loadRepository(java.io.Reader reader)
URLRepository
loadRepository in interface URLRepositorypublic void loadRepository(java.io.File file)
URLRepository
loadRepository in interface URLRepositorypublic void loadRepository(java.lang.String str)
URLRepository
loadRepository in interface URLRepository
public void defineVariable(java.lang.String name,
java.lang.String replacement)
URLRepository
defineVariable in interface URLRepositoryprotected java.net.URL translateURL(java.lang.String raw_url)
protected void replaceVariable(java.lang.StringBuffer sb_url,
java.lang.String name,
java.lang.String replacement)
public java.lang.String toString()
toString in interface URLRepositorytoString in class java.lang.Object
protected void removeVariable(java.lang.StringBuffer sb,
int start,
int count)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||