com.iplanet.am.util
Class AMClientDetector

java.lang.Object
  |
  +--com.iplanet.am.util.AMClientDetector

public class AMClientDetector
extends java.lang.Object

This is an utility to get the client type. This utility executes Client Detection Class provided in Client Detection Module Service and gets the client type. Default client type will be returned if there is no Client Detection Implementation provided. This utility will instantiate the client detection default implementation specified in the client detection service schema. If the value is not specified then will default to the default client detector implementation.


Constructor Summary
AMClientDetector()
          AMClientDetector constructor
AMClientDetector(ClientDetectionInterface cd)
          Application provide custom detection class
AMClientDetector(java.lang.String className)
          Applications can provide client detector implementation class
 
Method Summary
 java.lang.String detectionEnabled()
          Return the client detection enabled/disabled
 java.lang.String getClientType(HttpServletRequest request)
          Gets the client type by executing client detector class provided in Client Detection Service
static ClientTypesManager getClientTypesManagerInstance()
          Return the ClientTypesManager Instance
static boolean isServicePassed()
          Returns true if the ClientDetection service is present or false if the ClientDetection service is not present and the client attributes could not be retrieved.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AMClientDetector

public AMClientDetector()
AMClientDetector constructor

AMClientDetector

public AMClientDetector(java.lang.String className)
Applications can provide client detector implementation class
Parameters:
className - the name of the implementation class

AMClientDetector

public AMClientDetector(ClientDetectionInterface cd)
Application provide custom detection class
Parameters:
class - that implements ClientDetectionInterface
Method Detail

getClientType

public java.lang.String getClientType(HttpServletRequest request)
Gets the client type by executing client detector class provided in Client Detection Service
Parameters:
request - HttpServletRequest
Returns:
clienttype Returns client type . Default client type will be returned if either the client detection is not enabled or the client detector class is not provided in cdm service. If it throws any exception by executing this class, this method will just return null

detectionEnabled

public java.lang.String detectionEnabled()
Return the client detection enabled/disabled
Returns:
specifies whether client detection was enabled/disabled

getClientTypesManagerInstance

public static ClientTypesManager getClientTypesManagerInstance()
Return the ClientTypesManager Instance

isServicePassed

public static boolean isServicePassed()
Returns true if the ClientDetection service is present or false if the ClientDetection service is not present and the client attributes could not be retrieved.

Returns:
false if no Service is present. The default value is true.