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

## oracle.portal.provider.v2.http
Class DefaultProviderLoader

    java.lang.Object
      |
      +--oracle.portal.provider.v2.ProviderLoader
            |
            +--oracle.portal.provider.v2.http.DefaultProviderLoader

All Implemented Interfaces:
  oracle.webdb.provider.v2.utils.soap.Initializable, Validateable

public class DefaultProviderLoader
extends ProviderLoader
implements oracle.webdb.provider.v2.utils.soap.Initializable, Validateable

`DefaultProviderLoader` is the default implementation of a `ProviderLoader`, the entity responsible for loading and maintaining the integrity of a cached `ProviderDefinition`, and returning `ProviderInstance` objects associated with this definition.

`DefaultProviderLoader` makes use of the extensible `DefaultNodeHandler` mechanism to allow `ProviderDefinition`s to be loaded from XML files.

`DefaultProviderLoader` accepts a `Map` of String parameters in its `init` method. The table below summarizes the recognized parameters and their descriptions.

Parameter Name | Description
--- | ---
`definition` | Context root-relative path to XML provider definition file, e.g. `"providers/sample/provider.xml"`
`debugLevel` | Setting this to `"2"` will cause `DefaultProviderLoader` to dump parsed XML provider definitions to the servlet log file
`showTestPage` | Should the "test page" be displayed if the provider is accessed through its URL in a browser? Value should be either `"true"` or `"false"`.

Constructor Summary
`DefaultProviderLoader()`

Method Summary
`ProviderContext` | `getProviderContext()` Gets the context object that describes the deployment environment of the provider type handled by this `ProviderLoader`.
`ProviderInstance` | `getProviderInstance(java.lang.String providerId, boolean refresh)` Returns a `ProviderInstance` object with the specified providerId, optionally permitting reload of the cached `ProviderDefinition`.
`void` | `init(oracle.webdb.provider.v2.utils.soap.SOAPContext soapContext, java.util.Map parameters)` Initializes this `DefaultProviderLoader`.
`void` | `validate(java.lang.String context, ValidationError errors)` Validates the internal state of this `DefaultProviderLoader` before initiating validation calls on the tree of meta-data objects.

Methods inherited from class oracle.portal.provider.v2.ProviderLoader
`getProviderInstance`

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

Constructor Detail

### DefaultProviderLoader

    public DefaultProviderLoader()

Method Detail

### init

    public void init(oracle.webdb.provider.v2.utils.soap.SOAPContext soapContext,
                     java.util.Map parameters)
              throws ProviderException

  Initializes this `DefaultProviderLoader`.

  Specified by:
    `init` in interface `oracle.webdb.provider.v2.utils.soap.Initializable`
  Parameters:
    `soapContext` - object containing 'environmental' objects from SOAP container.
    `parameters` - a `Map` containing String parameters that will affect the `ProviderContext` that will be shared by all `ProviderInstance`s created by this `DefaultProviderLoader`. See class description for more details.
  Throws:
    `ProviderException` - if an error occurs whilst trying to initialize.

### getProviderContext

    public ProviderContext getProviderContext()

  Gets the context object that describes the deployment environment of the provider type handled by this `ProviderLoader`.

  Specified by:
    `getProviderContext` in class `ProviderLoader`
  Returns:
    context object describing the deployment environment of the provider.

### getProviderInstance

    public ProviderInstance getProviderInstance(java.lang.String providerId,
                                                boolean refresh)
                                         throws ProviderException

  Returns a `ProviderInstance` object with the specified providerId, optionally permitting reload of the cached `ProviderDefinition`.

  The first time this method is called, a new `ProviderDefinition` is loaded from its XML file and cached internally. This same cached `ProviderDefinition` is associated with all `ProviderInstance`s returned by this method, unless it is called again when the `refresh` flag is `true`. If this is the case and the XML file has been updated, the method will replace the cached `ProviderDefinition` with a new version.

  Specified by:
    `getProviderInstance` in class `ProviderLoader`
  Parameters:
    `providerId` - the providerId of the `ProviderInstance` that is being requested.
    `refresh` - flag indicating whether the `ProviderDefinition` should be reloaded or not. A value of `true` will cause a refresh.
  Returns:
    the `ProviderInstance` object with the specified providerId
    `ProviderException`

### validate

    public void validate(java.lang.String context,
                         ValidationError errors)

  Validates the internal state of this `DefaultProviderLoader` before initiating validation calls on the tree of meta-data objects.

  Specified by:
    `validate` in interface `Validateable`
  Parameters:
    `context` - the calling context.
    `errors` - current errors.

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

Copyright (c) 2002,2003 Oracle Corporation. All Rights Reserved.