|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nu.staldal.lsp.servlet.LSPServletContext
public class LSPServletContext
Context for LSP extension libraries executed in Servlet environment.
Constructor Summary | |
---|---|
LSPServletContext(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
LSPManager lspManager)
Create an LSPServletContext. |
Method Summary | |
---|---|
java.lang.String |
encodeURL(java.lang.String url)
Encode an URL for Servlet session tracking. |
LSPManager |
getLSPManager()
Get the LSPManager . |
javax.servlet.ServletContext |
getServletContext()
Get the ServletContext . |
javax.servlet.http.HttpServletRequest |
getServletRequest()
Get the HttpServletRequest . |
javax.servlet.http.HttpServletResponse |
getServletResponse()
Get the HttpServletResponse . |
boolean |
isUserInRole(java.lang.String role)
Check if user is in role. |
java.lang.String |
lang(java.lang.String key)
Get a localized resource for the user's locale. |
java.lang.String |
lang(java.lang.String pageName,
java.lang.String key)
Get a localized resource for the user's locale. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LSPServletContext(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, LSPManager lspManager)
servletContext
- ServletContextservletRequest
- HttpServletRequestservletResponse
- HttpServletResponselspManager
- LSPManagerMethod Detail |
---|
public javax.servlet.ServletContext getServletContext()
ServletContext
.
ServletContext
public javax.servlet.http.HttpServletRequest getServletRequest()
HttpServletRequest
.
HttpServletRequest
public javax.servlet.http.HttpServletResponse getServletResponse()
HttpServletResponse
.
HttpServletResponse
public LSPManager getLSPManager()
LSPManager
.
LSPManager
public java.lang.String lang(java.lang.String pageName, java.lang.String key) throws java.lang.Exception
This method is used by the LSP ExtLib lang
element and function.
pageName
- LSP page name,
or null
for global resources onlykey
- the key
java.lang.Exception
- if the LocaleBundleFactory
throws any exceptionpublic java.lang.String lang(java.lang.String key) throws java.lang.Exception
Same as lang(null,key)
.
key
- the key
java.lang.Exception
- if the LocaleBundleFactory
throws any exceptionpublic java.lang.String encodeURL(java.lang.String url)
url
- the URL to encode
HttpServletResponse.encodeURL(java.lang.String)
public boolean isUserInRole(java.lang.String role)
role
- the role to check
true
if user is in the given roleHttpServletRequest.isUserInRole(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |