com.plumtree.portalpages.browsing.sso.ensemble
Class EnsembleHandlerControl

java.lang.Object
  extended by com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerControl
All Implemented Interfaces:
IControl, ILoginControl, IManagedObject, IMVCObject

public class EnsembleHandlerControl
extends java.lang.Object
implements IControl, ILoginControl

Controls process the events generated by Ensemble for SSO purposes. Controls should encapsulate the business logic of Ensemble SSO. When Ensemble sends a request to the WCI verifies if there is a current session and Internal SSO is turned on then this Control creates redirect url with login_token as query string and sends HTTP redirect. e.g: req: http://:/portal/server.pt?space=EnsembleSSO&redirect_url= or req: http://:/portal/server.pt?space=EnsembleSSO&redirect_url=&login_token= resp: 302 ?login_token= Query String Parameter Names: redirect_url - is the Ensemble url to which WCI redirects after successful response. login_token - is the login token that either Ensemble sends in request url to WCI or WCI sends in redirect url after processing to Ensemble.

Author:
Ravi Tunuguntla

Field Summary
static java.lang.String EN_URL_SSO_SUFIX
           
static java.lang.String ES_POST_REDIRECT_URL
           
static boolean FEATURE_DISABLED
          This boolean is used to disable custom SSO solution between Ensemble and WCI
static java.lang.String LOGIN_VALUE
           
static java.lang.String LOGOUT_REDIRECT_URL
          This string is used to specify to which url the user has to be redirected after logout
static java.lang.String LOGOUT_RESP_ERR
           
static java.lang.String LOGOUT_RESP_PARAM
           
static java.lang.String LOGOUT_RESP_SUCCESS
           
static java.lang.String LOGOUT_VALUE
           
protected  AActivitySpace m_asOwner
           
static java.lang.String NO_TOKEN_FOUND
           
static java.lang.String SSO_ACTION
           
static java.lang.String SSO_STATUS
           
static java.lang.String SSO_STATUS_ERR
           
static java.lang.String SSO_STATUS_FOUND
           
static java.lang.String SSO_STATUS_NO
           
static java.lang.String SSO_STATUS_SUCCESS
           
static java.lang.String STR_MVC_CLASS_NAME
           
static java.lang.String WCI_TOKEN
           
 
Constructor Summary
EnsembleHandlerControl()
           
 
Method Summary
 Redirect CheckActionSecurityAndExecute(XPHashtable arguments)
          Execute the control business logic and optionally return a Redirect object pointing to another AActivitySpace.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 boolean DoGetSession()
          This method is called by the Interpreter to determine whether or not to subsequently call GetSession and perform login/logout code.
 java.lang.String GetName()
          Return the name of the MVC object.
 java.lang.Object GetSession()
          This method is called by the Interpreter after calling Execute on the LoginControl.
 void Init(IModel model, AActivitySpace space)
          Initialize the control with the model it should use and it's parent AActivitySpace.
 void RaiseError(java.lang.String strError)
          Helper method that throws an UI Error
 void SetRedirectForUseAfterLogin(Redirect r)
          This method sets a redirect on the login control for use after a successful login.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values

EN_URL_SSO_SUFIX

public static final java.lang.String EN_URL_SSO_SUFIX
See Also:
Constant Field Values

ES_POST_REDIRECT_URL

public static final java.lang.String ES_POST_REDIRECT_URL
See Also:
Constant Field Values

WCI_TOKEN

public static final java.lang.String WCI_TOKEN
See Also:
Constant Field Values

NO_TOKEN_FOUND

public static final java.lang.String NO_TOKEN_FOUND
See Also:
Constant Field Values

SSO_ACTION

public static final java.lang.String SSO_ACTION
See Also:
Constant Field Values

LOGOUT_VALUE

public static final java.lang.String LOGOUT_VALUE
See Also:
Constant Field Values

LOGIN_VALUE

public static final java.lang.String LOGIN_VALUE
See Also:
Constant Field Values

SSO_STATUS

public static final java.lang.String SSO_STATUS
See Also:
Constant Field Values

SSO_STATUS_SUCCESS

public static final java.lang.String SSO_STATUS_SUCCESS
See Also:
Constant Field Values

SSO_STATUS_ERR

public static final java.lang.String SSO_STATUS_ERR
See Also:
Constant Field Values

SSO_STATUS_FOUND

public static final java.lang.String SSO_STATUS_FOUND
See Also:
Constant Field Values

SSO_STATUS_NO

public static final java.lang.String SSO_STATUS_NO
See Also:
Constant Field Values

LOGOUT_RESP_PARAM

public static final java.lang.String LOGOUT_RESP_PARAM
See Also:
Constant Field Values

LOGOUT_RESP_SUCCESS

public static final java.lang.String LOGOUT_RESP_SUCCESS
See Also:
Constant Field Values

LOGOUT_RESP_ERR

public static final java.lang.String LOGOUT_RESP_ERR
See Also:
Constant Field Values

LOGOUT_REDIRECT_URL

public static final java.lang.String LOGOUT_REDIRECT_URL
This string is used to specify to which url the user has to be redirected after logout

See Also:
Constant Field Values

m_asOwner

protected AActivitySpace m_asOwner

FEATURE_DISABLED

public static final boolean FEATURE_DISABLED
This boolean is used to disable custom SSO solution between Ensemble and WCI

See Also:
Constant Field Values
Constructor Detail

EnsembleHandlerControl

public EnsembleHandlerControl()
Method Detail

CheckActionSecurityAndExecute

public Redirect CheckActionSecurityAndExecute(XPHashtable arguments)
Description copied from interface: IControl
Execute the control business logic and optionally return a Redirect object pointing to another AActivitySpace. Returning null means that the user should return to the parent AActivitySpace's current page. This method is designed to check that the user has access to perform the actions with the given parameters. If the user does not, a redirect object which has had Redirect.SetRedirectToLogin(true) called on it. If the user is the Guest, this will bounce to the login page and back to the Redirect after the user has logged on. If the user is already logged on, they will be redirected to an error page. In general, the error redirect that is returned should contain all of the query string parameters that made up the URL that originally led to the control. Checking whether or not a particular user ever has any access to the space, page, and control should be done in IPTActivitySpace.CheckBasicAccess().

Specified by:
CheckActionSecurityAndExecute in interface IControl
Returns:
Redirect where to redirect to after the control is finished executing. This will go to the login page or an error page if Redirect.SetRedirectToLogin(true) has been called.
See Also:
com.plumtree.portaluiinfrastructure.activityspace.IControl#Execute()

Create

public java.lang.Object Create()
Description copied from interface: IManagedObject
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

GetName

public java.lang.String GetName()
Description copied from interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.
See Also:
com.plumtree.portaluiinfrastructure.activityspace.IControl#GetName()

Init

public void Init(IModel model,
                 AActivitySpace space)
Description copied from interface: IControl
Initialize the control with the model it should use and it's parent AActivitySpace. This method needs to be called before any other methods. This method also clears all internal data so the control can be used again without fear of mixing data.

Specified by:
Init in interface IControl
See Also:
com.plumtree.portaluiinfrastructure.activityspace.IControl#Init(IModel, AActivitySpace)

RaiseError

public void RaiseError(java.lang.String strError)
Helper method that throws an UI Error

Parameters:
strError - Error string to be shown in UI.

DoGetSession

public boolean DoGetSession()
Description copied from interface: ILoginControl
This method is called by the Interpreter to determine whether or not to subsequently call GetSession and perform login/logout code. If this returns false, the session will remain unchanged.

Specified by:
DoGetSession in interface ILoginControl
Returns:
boolean true implies GetSession() will be called
See Also:
ILoginControl.DoGetSession()

GetSession

public java.lang.Object GetSession()
Description copied from interface: ILoginControl
This method is called by the Interpreter after calling Execute on the LoginControl. The User Session returned will be stored on the user's HTTPSession. If null is returned, the user's session will be removed from the HTTPSession for logout.

Specified by:
GetSession in interface ILoginControl
Returns:
Object null implies logoff session implies login as this session
See Also:
ILoginControl.GetSession()

SetRedirectForUseAfterLogin

public void SetRedirectForUseAfterLogin(Redirect r)
Description copied from interface: ILoginControl
This method sets a redirect on the login control for use after a successful login. This allows a user to be bounced from a page if they are not logged in, and then return to that page after they log in.

Specified by:
SetRedirectForUseAfterLogin in interface ILoginControl
See Also:
ILoginControl.SetRedirectForUseAfterLogin(Redirect)



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.