com.plumtree.portaluiinfrastructure.helpers
Class PathwaysHelperService

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.helpers.PathwaysHelperService
All Implemented Interfaces:
IPathwaysHelper

public class PathwaysHelperService
extends java.lang.Object
implements IPathwaysHelper

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


Field Summary
static java.lang.String PATHWAYS_API_WEBSERVICE_UUID
          This is used to lookup the Pathways API web service instance for making calls to Pathways.
protected static int TIMEOUT
          The timeout for caching the Web Service data, in seconds.
 
Method Summary
 int GetAPIWebServiceID(IPTSession _session)
           
static IPathwaysHelper GetInstance()
           
 boolean GetLegacySearchMode()
          This is for advanced search, since it will fall back to legacy search if a search request is not valid for a pathways search even though it's enabled and without error
protected  int GetTimeout()
           
 boolean IsErrorState()
           
 boolean IsPathwaysInstalled(IPTSession _session)
           
protected  void LoadPathwaysAPIWebService(IPTSession _session)
          Load the Pathways API Web Service, if installed.
 void SetLegacySearchMode(boolean value)
           
static void SetTestInstance(IPathwaysHelper testHelper)
          Unit tests should use this method to overwrite/teardown existing helper singleton.
 void StartErrorState()
          When a Pathways search server issue occurs, this sets timeout value for when to use Pathways again
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATHWAYS_API_WEBSERVICE_UUID

public static final java.lang.String PATHWAYS_API_WEBSERVICE_UUID
This is used to lookup the Pathways API web service instance for making calls to Pathways.

See Also:
Constant Field Values

TIMEOUT

protected static final int TIMEOUT
The timeout for caching the Web Service data, in seconds.

See Also:
Constant Field Values
Method Detail

GetInstance

public static IPathwaysHelper GetInstance()
Returns:
The singleton PT config helper.

SetTestInstance

public static void SetTestInstance(IPathwaysHelper 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.


LoadPathwaysAPIWebService

protected void LoadPathwaysAPIWebService(IPTSession _session)
Load the Pathways API Web Service, if installed. This handles cache timeouts and lazy initialization.


GetTimeout

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

IsPathwaysInstalled

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

GetAPIWebServiceID

public int GetAPIWebServiceID(IPTSession _session)
Specified by:
GetAPIWebServiceID in interface IPathwaysHelper
Parameters:
_session - the current user session.
Returns:
the ID of the Pathways API web service. -1 if it is not installed.

StartErrorState

public void StartErrorState()
When a Pathways search server issue occurs, this sets timeout value for when to use Pathways again

Specified by:
StartErrorState in interface IPathwaysHelper

IsErrorState

public boolean IsErrorState()
Specified by:
IsErrorState in interface IPathwaysHelper
Returns:
whether or not Pathways timeout has expired. Returns true if the time out still occurs and false if the timeout expired and we can try Pathways again.

SetLegacySearchMode

public void SetLegacySearchMode(boolean value)
Specified by:
SetLegacySearchMode in interface IPathwaysHelper
Parameters:
value - the boolean value representing if the search is in fall back to legacy mode

GetLegacySearchMode

public boolean GetLegacySearchMode()
This is for advanced search, since it will fall back to legacy search if a search request is not valid for a pathways search even though it's enabled and without error

Specified by:
GetLegacySearchMode in interface IPathwaysHelper
Returns:
the boolean value if the search is currently defaulting to legacy mode



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