|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ClientClassifier
Classes implementing this interface look at information in the supplied HttpServletRequest 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.
The mapping of requests to "classification" strings is defined in WEB-INF/client-classifications.xml. There, you can define strings or string patterns to map request user-agent strings to classifications. Once that's done, you can use this interface to get the classification string for a given request. Use ClientClassifierFactory to get an instance of this interface. See the section "Creating Portals for Multiple Device Types" in the Portal Development Guide for more information.
| Field Summary | |
|---|---|
static String |
UNCLASSIFIED
|
| Method Summary | |
|---|---|
String |
getClassificationConfigurationFilePath(javax.servlet.http.HttpServletRequest req)
Returns the path to the client classification configuration file used for the specified ServletRequest, if possible. |
String |
getClientClassification(javax.servlet.http.HttpServletRequest req)
Derives the client classification label based on information passed with the request. |
boolean |
isClassificationMatched(javax.servlet.http.HttpServletRequest request,
String classificationName)
Checks if the specified classification matches the current request data. |
boolean |
isDefault(javax.servlet.http.HttpServletRequest req)
Determines if the "default" classification label applies for the supplied request. |
boolean |
isRecognized(javax.servlet.http.HttpServletRequest req)
Determines if the client classification has been explicitly recognized. |
| Field Detail |
|---|
static final String UNCLASSIFIED
| Method Detail |
|---|
String getClientClassification(javax.servlet.http.HttpServletRequest req)
req - The request object.
boolean isDefault(javax.servlet.http.HttpServletRequest req)
req - The request object.
true if the request resolves as defaultisRecognized(HttpServletRequest req)boolean isRecognized(javax.servlet.http.HttpServletRequest req)
true for isRecognized and the other, not
explicitly resolved, would return false for
isRecognzed
req - The request object.
true if the request's client classification
was resolved to a category (even "default")
explicitly.isDefault(HttpServletRequest req)
boolean isClassificationMatched(javax.servlet.http.HttpServletRequest request,
String classificationName)
getClientClassification(javax.servlet.http.HttpServletRequest)) due to their
potentially higher priority patterns.
request - The request object.classificationName - The name of the classification to explicitly test.
true if the named classification
matches the current request.String getClassificationConfigurationFilePath(javax.servlet.http.HttpServletRequest req)
req - The request object.
|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||