| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RememberMeCookieService
Portlet service for JSR compliant portlets to leverage the remember me cookie
functionality of WebSphere Portal.
The following sample shows how to perform the JNDI lookup to acquire a
service object:
com.ibm.portal.portlet.service.PortletServiceHome psh; javax.naming.Context ctx = new javax.naming.InitialContext(); try { psh = (PortletServiceHome) ctx.lookup(RememberMeCookieService.JNDI_NAME); } catch(javax.naming.NameNotFoundException ex) { // error handling } // obtain the service object and use the service RememberMeCookieService rememberMeCookieService = (RememberMeCookieService) psh.getPortletService(RememberMeCookieService.class); if (rememberMeCookieService.isRememberMeCookieEnabled()) { // ... }
Field Summary | |
---|---|
static java.lang.String | JNDI_NAME
|
Method Summary | |
---|---|
DisposableURL | getInvalidateCookieURL(RenderRequest renderReq,
RenderResponse renderResp)
Returns a URL that triggers the invalidation of the remember me cookie. |
java.lang.String | PortletRequest)">getUserID(PortletRequest portletReq)
Returns the user ID that is extracted from the remember me cookie. |
boolean | PortletRequest)">isCookieSet(PortletRequest portletReq)
Returns false if the remember me cookie does not exist in the
current request,
true if the remember me cookie exists in the current
request.
This method does not validate cookie content, instead it checks the sheer
existence in the passed request.
|
boolean | isRememberMeCookieEnabled()
Returns true if the remember me cookie functionality is
enabled and all components started successfully,
false if the remember me cookie functionality is not
available.
|
Field Detail |
---|
static final java.lang.String JNDI_NAME
Method Detail |
---|
boolean isRememberMeCookieEnabled()
true
if the remember me cookie functionality is
enabled and all components started successfully,false
if the remember me cookie functionality is not
available.
boolean isCookieSet(PortletRequest portletReq) throws SecurityException
false
if the remember me cookie does not exist in the
current request,true
if the remember me cookie exists in the current
request.
boolean
indicating whether a remember me cookie
is found in the current request.
java.lang.String getUserID(PortletRequest portletReq) throws SecurityException
null
if the cookie does not exist in the current
request.
DisposableURL getInvalidateCookieURL(RenderRequest renderReq, RenderResponse renderResp) throws SecurityException
null
in the case that it was not possible to
create the URL.
null.
- Throws:
- java.lang.UnsupportedOperationException - If the remember me cookie functionality is not available.
- SecurityException - If an unrecoverable problem occurs.
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |