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
Class ProviderLoader

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

Direct Known Subclasses:
  DefaultProviderLoader

public abstract class ProviderLoader
extends java.lang.Object

In its simplest terms, a `ProviderLoader` can be thought of as a 'factory' for `ProviderInstance` objects: the objects that actually carry out the functionality of a single registered provider instance. However, given that a `ProviderInstance` is generally driven from meta-data in a `ProviderDefinition`, which should be shared by other `ProviderInstance`s of the same 'type', it is also the responsibility of a `ProviderLoader` to initialize and cache an up-to-date version of the `ProviderDefinition` and associate this with the instances it creates.

Generally, a `ProviderLoader` will initialize a `ProviderDefinition` from meta data held in a persistent store, e.g. XML file or database. To allow changes to the persisted data to be picked up while the provider is in operation, a `ProviderLoader` is allowed to replace its cached `ProviderDefinition` with a new version under certain circumstances. A flag is provided to suppress this behaviour, however, so that the ProviderInstance and the Portal it is registered on do not get 'out of sync' with respect to their picture of the provider.

Because this mechanism is kept external to the `ProviderDefinition` itself, it gives scope for the same provider to be backed by a different storage medium without having to change its implementation.

Constructor Summary
`ProviderLoader()`

Method Summary
`abstract 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)` Gets a `ProviderInstance` object with the specified providerId without permitting reload of the cached `ProviderDefinition`.
`abstract ProviderInstance` | `getProviderInstance(java.lang.String providerId, boolean refresh)` Gets a `ProviderInstance` object with the specified providerId, optionally permitting reload of the cached `ProviderDefinition`.

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

Constructor Detail

### ProviderLoader

    public ProviderLoader()

Method Detail

### getProviderInstance

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

  Gets a `ProviderInstance` object with the specified providerId without permitting reload of the cached `ProviderDefinition`.

  This is provided as a shorthand for calling `getProviderInstance(providerId, false)`.

  Parameters:
    `providerId` - the providerId of the `ProviderInstance` that is being requested
  Returns:
    the `ProviderInstance` object with the specified providerId
    `ProviderException`

### getProviderInstance

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

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

  The first time this method is called, a new `ProviderDefinition` should be loaded from its meta data and cached internally. This same cached `ProviderDefinition` must be associated with all `ProviderInstance`s returned by this method, unless it is called again when the `refresh` flag is `true`. In this case, the method is allowed to replace the cached `ProviderDefinition` with a new version, e.g. if its meta data has been changed.

  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`

### getProviderContext

    public abstract ProviderContext getProviderContext()

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

  Returns:
    context object describing the deployment environment of the provider.

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.