com.plumtree.portaluiinfrastructure.helpers
Class EnsembleHelperService

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.helpers.EnsembleHelperService
All Implemented Interfaces:
IEnsembleHelper

public class EnsembleHelperService
extends java.lang.Object
implements IEnsembleHelper

This class handles common functionality related to Ensemble integrations. NOTE: This class is threadsafe.


Field Summary
static java.lang.String ENSEMBLE_REMOTE_SERVER_UUID
          This is used to lookup the Ensemble remote server instance for pagelet web services.
protected static int TIMEOUT
          The timeout for caching the Remote Server data, in seconds.
 
Method Summary
static IEnsembleHelper getInstance()
           
 int GetRemoteServerID(IPTSession _session)
           
protected  int GetTimeout()
           
 boolean IsEnsembleInstalled(IPTSession _session)
           
protected  void LoadEnsembleRemoteServer(IPTSession _session)
          Load the Ensemble Remote Server, if installed.
static void setTestInstance(IEnsembleHelper testHelper)
          Unit tests should use this method to overwrite/teardown existing helper singleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENSEMBLE_REMOTE_SERVER_UUID

public static final java.lang.String ENSEMBLE_REMOTE_SERVER_UUID
This is used to lookup the Ensemble remote server instance for pagelet web services.

See Also:
Constant Field Values

TIMEOUT

protected static final int TIMEOUT
The timeout for caching the Remote Server data, in seconds.

See Also:
Constant Field Values
Method Detail

getInstance

public static IEnsembleHelper getInstance()
Returns:
The singleton PT config helper.

setTestInstance

public static void setTestInstance(IEnsembleHelper testHelper)
Unit tests should use this method to overwrite/teardown existing helper singleton. DO NOT USE for production code. NOTE: When finished with a unit test, this should be set back to null so as not to interfere with other tests.


LoadEnsembleRemoteServer

protected void LoadEnsembleRemoteServer(IPTSession _session)
Load the Ensemble Remote Server, if installed. This handles cache timeouts and lazy initialization.


GetTimeout

protected int GetTimeout()
Returns:
the timeout value from the config file.

IsEnsembleInstalled

public boolean IsEnsembleInstalled(IPTSession _session)
Specified by:
IsEnsembleInstalled in interface IEnsembleHelper
Parameters:
_session - the current user session.
Returns:
whether or not Ensemble is installed.

GetRemoteServerID

public int GetRemoteServerID(IPTSession _session)
Specified by:
GetRemoteServerID in interface IEnsembleHelper
Parameters:
_session - the current user session.
Returns:
the ID of the Ensemble Remote Server. -1 if it is not installed.



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