Package com.iplanet.am.util
Class AMClientDetector
- java.lang.Object
-
- com.iplanet.am.util.AMClientDetector
-
public class AMClientDetector extends 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
-
-
Constructor Summary
Constructors Constructor Description AMClientDetector()Constructs aAMClientDetectorinstance.AMClientDetector(ClientDetectionInterface cd)Application provide custom detection class.AMClientDetector(String className)Applications can provide client detector implementation class
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClientType(jakarta.servlet.http.HttpServletRequest request)Returns the client type by executing client detector class provided in Client Detection Service.static ClientTypesManagergetClientTypesManagerInstance()Returns theClientTypesManagerInstance.booleanisDetectionEnabled()Returnstrueif the client detection is enabled.static booleanisServicePassed()Returns true if the client detection service is present or false if the client detection service is not present and the client attributes could not be retrieved.
-
-
-
Constructor Detail
-
AMClientDetector
public AMClientDetector()
Constructs aAMClientDetectorinstance.
-
AMClientDetector
public AMClientDetector(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:
cd- class that implementsClientDetectionInterface.
-
-
Method Detail
-
getClientType
public String getClientType(jakarta.servlet.http.HttpServletRequest request)
Returns the client type by executing client detector class provided in Client Detection Service.- Parameters:
request- HTTP Servlet Request.- 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
cdmservice. If it throws any exception by executing this class, this method will just return null .
-
isDetectionEnabled
public boolean isDetectionEnabled()
Returnstrueif the client detection is enabled.- Returns:
trueif the client detection is enabled.
-
getClientTypesManagerInstance
public static ClientTypesManager getClientTypesManagerInstance()
Returns theClientTypesManagerInstance.- Returns:
- the
ClientTypesManagerInstance.
-
isServicePassed
public static boolean isServicePassed()
Returns true if the client detection service is present or false if the client detection service is not present and the client attributes could not be retrieved.- Returns:
- false if no Service is present. The default value is true.
-
-