© 2004 BEA Systems, Inc.

com.bea.netuix.client.classifier
Interface ClientClassifier


public interface ClientClassifier

Classes implementing this interface look at information in the supplied HttpServeltRequest object and use that to categorize or "classify" the request originator's client into a predefined category. This is useful for customizing content delivery and look-and-feel for different browsers and / or devices.


Field Summary
static String UNCLASSIFIED
           
 
Method Summary
 String getClassificationConfigurationFilePath(HttpServletRequest req)
          Returns the path to the client classification configuration file used for the specified ServletRequest, if possible.
 String getClientClassification(HttpServletRequest req)
          Derives the client classification label based on information passed with the request.
 boolean isDefault(HttpServletRequest req)
          Determines if the "defualt" classification label applies for the supplied request.
 boolean isRecognized(HttpServletRequest req)
          Determines if the client classification has been explicitly recognized.
 

Field Detail

UNCLASSIFIED

public static final String UNCLASSIFIED
See Also:
Constant Field Values
Method Detail

getClassificationConfigurationFilePath

public String getClassificationConfigurationFilePath(HttpServletRequest req)
Returns the path to the client classification configuration file used for the specified ServletRequest, if possible. In many cases, such as deployments through a .war archive, the path to the file cannot be determined, and null will be returned.

Parameters:
req - The request object.
Returns:
The path to the client classification configuration file, if possible to determine; null otherwise.

getClientClassification

public String getClientClassification(HttpServletRequest req)
Derives the client classification label based on information passed with the request. Different implementations may derive this label in different ways.

Parameters:
req - The request object.
Returns:
The classification label.

isDefault

public boolean isDefault(HttpServletRequest req)
Determines if the "defualt" classification label applies for the supplied request. Default is the default classification label, which can mean that the request was not resolvable to an existing label, or that it in fact does resolve to an existing label called 'default'. Default is normally treated by the system as a typical PC-based browser.

Parameters:
req - The request object.
Returns:
true if the request resolves as default
See Also:
isRecognized(HttpServletRequest req)

isRecognized

public boolean isRecognized(HttpServletRequest req)
Determines if the client classification has been explicitly recognized. This is not the same as asking if the classification is not default. We don't know a priori if the classification was explicitly set to "default" or defaulted to it because no defined classification category could be determined. Thus, it is possible that two different request objects would return classifications of "default", but one which was explicitly resolved to the default category would return true for isRecognized and the other, not explicitly resolved, would return false for isRecognzed

Parameters:
req - The request object.
Returns:
true if the request's client classification was resolved to a category (even "default") explicitly.
See Also:
isDefault(HttpServletRequest req)

© 2004 BEA Systems, Inc.

Copyright © 2004 BEA Systems, Inc. All Rights Reserved