Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.client.classifier
Interface ClientClassifier

    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.

This interface is intended to be implemented only by Oracle Weblogic Portal. Oracle Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of Oracle Weblogic Portal.

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

### UNCLASSIFIED

    static final String UNCLASSIFIED

See Also
  Constants Summary

Method Detail

### getClientClassification

    String getClientClassification(javax.servlet.http.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

    boolean isDefault(javax.servlet.http.HttpServletRequest req)

  Determines if the "default" 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

    boolean isRecognized(javax.servlet.http.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)`

### isClassificationMatched

    boolean isClassificationMatched(javax.servlet.http.HttpServletRequest request,
                                    String classificationName)

  Checks if the specified classification matches the current request data. This check does not consider any other classifications, so classification pattern priority is not applicable. In other words, the only named classification's patterns are checked against the request. This is useful if a classification should be tested for a match independently of other patterns, which have the opportunity to interfere with the specified classification's ability to match during a best match attempt (`getClientClassification(javax.servlet.http.HttpServletRequest)`) due to their potentially higher priority patterns.

  Parameters
    `request` - The request object.
    `classificationName` - The name of the classification to explicitly test.
  Returns
    `true` if the named classification matches the current request.

### getClassificationConfigurationFilePath

    String getClassificationConfigurationFilePath(javax.servlet.http.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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.