Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2.http
Class DefaultProviderLoader

java.lang.Object
  extended by oracle.portal.provider.v2.ProviderLoader
      extended by oracle.portal.provider.v2.http.DefaultProviderLoader
All Implemented Interfaces:
Validateable, oracle.webdb.provider.v2.utils.soap.Initializable

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 ProviderDefinitions 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 NameDescription
definitionContext root-relative path to XML provider definition file, e.g. "providers/sample/provider.xml"
debugLevelSetting this to "2" will cause DefaultProviderLoader to dump parsed XML provider definitions to the servlet log file
showTestPageShould 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(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(java.util.Map parameters)
          throws ProviderException
Initializes this DefaultProviderLoader.

Specified by:
init in interface oracle.webdb.provider.v2.utils.soap.Initializable
Parameters:
parameters - a Map containing String parameters that will affect the ProviderContext that will be shared by all ProviderInstances 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 ProviderInstances 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
Throws:
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.

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.