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.portlet
Class UrlCompressionContext

    java.lang.Object
      com.bea.portlet.UrlCompressionContext

    public final class UrlCompressionContext

extends Object

Allows URL compression to be disabled for a limited scope.

### Preferred Usage

To use `UrlCompressionContext` to disable URL compression for a limited scope, surround the code for which URL compression should be disabled with this code:

        try {
           UrlCompressionContext.push(request).setUrlCompressionDisabled(true);

              // ... code to execute with URL compression disabled

        }
        finally {
           UrlCompressionContext.pop(request);
        }

Method Summary
`static boolean` | `isUrlCompressionDisabled(javax.servlet.ServletRequest request)` Determine if URL compression is disabled for the given request.
`static void` | `pop(javax.servlet.ServletRequest request)` Pop the most recent `UrlCompressionContext` from the given `ServletRequest`.
`static UrlCompressionContext` | `push(javax.servlet.ServletRequest request)` Push a new `UrlCompressionContext` into the given request.
`UrlCompressionContext` | `setUrlCompressionDisabled(boolean urlCompressionDisabled)` Change if URL compression is disabled.
`UrlCompressionContext` | `unsetUrlCompressionDisabled()` Change if URL compression is disabled.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### push

    public static UrlCompressionContext push(javax.servlet.ServletRequest request)

  Push a new `UrlCompressionContext` into the given request.

  Parameters
    `request` - the request
  Returns
    the `UrlCompressionContext`

### pop

    public static void pop(javax.servlet.ServletRequest request)

  Pop the most recent `UrlCompressionContext` from the given `ServletRequest`.

  If the most recent `UrlCompressionContext` is not of the specified type, then an `IllegalStateException` is thrown.

  Parameters
    `request` - the `ServletRequest`

### isUrlCompressionDisabled

    public static boolean isUrlCompressionDisabled(javax.servlet.ServletRequest request)

  Determine if URL compression is disabled for the given request.

  Returns
    `true` if URL compression is disabled

### setUrlCompressionDisabled

    public UrlCompressionContext setUrlCompressionDisabled(boolean urlCompressionDisabled)

  Change if URL compression is disabled.

  Parameters
    `urlCompressionDisabled` - indicates if URL compression is disabled
  Returns
    `this`

### unsetUrlCompressionDisabled

    public UrlCompressionContext unsetUrlCompressionDisabled()

  Change if URL compression is disabled.

  Returns
    `this`

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.