oracle.adf.view.rich.resource

## Class PageResource

- java.lang.Object
- - oracle.adf.view.rich.resource.PageResource

- All Implemented Interfaces:
    Serializable

      @Exported
      public final class PageResource
      extends Object
      implements Serializable

  Definition for a CSS or JavaScript resource that should be added to the page. Specifies a URI for a css or js file.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PageResource.ResourceLoadStrategy`
    `static class` | `PageResource.ResourceLocation` Enumeration representing the type of resources that may be added to the HEAD element of the document.
    `static class` | `PageResource.ResourceType` Enumeration representing the type of resources that may be added to the HEAD element of the document.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PageResource(PageResource.ResourceType type, PageResource.ResourceLocation location, String value)` Constructor
    `PageResource(PageResource.ResourceType type, PageResource.ResourceLocation location, String value, PageResource.ResourceLoadStrategy loadStrategy)` Constructor
    `PageResource(PageResource.ResourceType type, String uri)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `PageResource.ResourceLoadStrategy` | `getLoadStrategy()` Get how the resource should be loaded
    `PageResource.ResourceLocation` | `getLocation()` Get the resource location
    `PageResource.ResourceType` | `getType()` Get the resource type
    `String` | `getURI()` Deprecated. use `getValue()` instead
    `String` | `getValue()` The URI or the content depending on the location
    `int` | `hashCode()`
    `boolean` | `isEncoded()` Get the encoded state
    `void` | `setEncoded(boolean encoded)` Get the resource type

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PageResource

          public PageResource(PageResource.ResourceType type,
                              String uri)

      Constructor
      Parameters:
        `type` - The type of resource this is (CSS or JavaScript)
        `uri` - The URI to the resource

    - #### PageResource

          public PageResource(PageResource.ResourceType type,
                              PageResource.ResourceLocation location,
                              String value)

      Constructor
      Parameters:
        `type` - The type of resource this is (CSS, JavaScript or JavaScript feature name(s))
        `location` - The location of the resource, required
        `value` - The URI or the in-line content, required

    - #### PageResource

          public PageResource(PageResource.ResourceType type,
                              PageResource.ResourceLocation location,
                              String value,
                              PageResource.ResourceLoadStrategy loadStrategy)

      Constructor
      Parameters:
        `type` - The type of resource this is (CSS, JavaScript or JavaScript feature name(s))
        `location` - The location of the resource, required
        `value` - The URI or the in-line content, required
        `loadStrategy` - the loading strategy.

  - ### Method Detail

    - #### getLocation

          public PageResource.ResourceLocation getLocation()

      Get the resource location
      Returns:
        the location of the resource

    - #### getType

          public PageResource.ResourceType getType()

      Get the resource type
      Returns:
        the location of the resource

    - #### isEncoded

          public boolean isEncoded()

      Get the encoded state
      Returns:
        the location of the resource

    - #### setEncoded

          public void setEncoded(boolean encoded)

      Get the resource type
      Parameters:
        `encoded` - encoded

    - #### getURI

          @Deprecated
          public String getURI()

      Deprecated. use `getValue()` instead
      Get the resource URI
      Returns:
        the source URI

    - #### getValue

          public String getValue()

      The URI or the content depending on the location
      Returns:
        then URI location.
      See Also:
        `getLocation()`

    - #### getLoadStrategy

          public PageResource.ResourceLoadStrategy getLoadStrategy()

      Get how the resource should be loaded
      Returns:
        the resource loading strategy.

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.