Overview | Package | Class | Tree | Deprecated | Index | Help
| The PDK Java API is part of the Portal Developer Kit on Portal Studio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v2
Class DefaultProviderDefinition

    java.lang.Object
      |
      +--oracle.portal.provider.v2.ProviderDefinition
            |
            +--oracle.portal.provider.v2.DefaultProviderDefinition

All Implemented Interfaces:
  InitializableXMLObject, Validateable

public class DefaultProviderDefinition
extends ProviderDefinition
implements InitializableXMLObject

`DefaultProviderDefinition` extends the base `ProviderDefinition` meta data class with a set of accessors compatible with the `DefaultProviderLoader` mechanism that loads provider definitions from XML files. This is the class most commonly used in the PDK-Java samples to define a provider.

Constructor Summary
`DefaultProviderDefinition()`

Method Summary
`void` | `addContainerRenderer(java.lang.Object renderer)` Sets the default portlet container renderer.
`void` | `addPortlet(java.lang.Object portlet)` Associates with the provider a `PortletDefinition` object containing the meta data for one of the portlets it owns.
`void` | `addPreferenceStore(java.lang.Object ps)` Adds to the set of `PreferenceStore` objects that may be used by the provider for persistent storage.
`void` | `postInitialize()` Should be called once initialization of this `DefaultProviderDefinition` is complete, to complete initialization and perform any necessary validation.
`void` | `preInitialize(java.lang.Object parent)` Should be called immediately after construction of a `DefaultProviderDefinition` to associate it with its parent `ProviderContext` object describing its deployment environment.
`void` | `setCacheLevel(java.lang.String cacheLevel)` Sets the caching level used for portlet render requests for portlets belonging to this provider.
`void` | `setPassAllUrlParams(java.lang.String value)` Controls whether Portal will pass the requested page's URL parameters to the provider's portlets by default.
`void` | `setProviderBuilder(java.lang.Object providerBuilder)` Each provider can specifiy the builder attached to edit this provider.
`void` | `setProviderInstanceClass(java.lang.String className)` Defines the `ProviderInstance` subclass that implements the provider's behaviour.
`void` | `setRewriteUrls(java.lang.String value)` Controls whether or not URL rewriting will be performed on the results of portlet render requests for portlets belonging to this provider.
`void` | `setSession(java.lang.String session)` Controls whether the `ProviderInstance` starts a (servlet) session in its `ProviderInstance.initSession(oracle.portal.provider.v2.ProviderUser, oracle.portal.provider.v2.externalApp.ExternalPrincipal)` method.
`void` | `setUseOldStyleHeaders(java.lang.String useOldStyleHeaders)` Deprecated. use `addContainerRenderer(java.lang.Object)` with `ContainerRenderer306` to get equivalent behavior. Alternatively, create your own container renderer by extending `PortletContainerRenderer`

Methods inherited from class oracle.portal.provider.v2.ProviderDefinition
`addPortletDefinition, addPreferenceStore, getCacheLevel, getContainerRenderer, getHasSession, getOidManager, getPassAllUrlParams, getPortletDefinition, getPortletDefinitions, getPreferenceStore, getPreferenceStore, getProviderBuilder, getProviderContext, getProviderInstanceClass, getRewriteUrls, getUseOldStyleHeaders, init, setCacheLevel, setContainerRenderer, setHasSession, setPassAllUrlParams, setPrefStoreName, setProviderBuilder, setProviderInstanceClass, setRewriteUrls, setUseOldStyleHeaders, validate`

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

Constructor Detail

### DefaultProviderDefinition

    public DefaultProviderDefinition()

Method Detail

### setProviderInstanceClass

    public void setProviderInstanceClass(java.lang.String className)
                                  throws java.lang.ClassNotFoundException

  Defines the `ProviderInstance` subclass that implements the provider's behaviour.
  Parameters:
    `className` - the fully qualified name of the `ProviderInstance` class or subclass that implements the provider's behaviour.

### setSession

    public void setSession(java.lang.String session)

  Controls whether the `ProviderInstance` starts a (servlet) session in its `ProviderInstance.initSession(oracle.portal.provider.v2.ProviderUser, oracle.portal.provider.v2.externalApp.ExternalPrincipal)` method.
  Parameters:
    `session` - String representation of boolean value. Should be `"true"` if this provider is to start a session in `initSession`, or `"false"` otherwise.

### setUseOldStyleHeaders

    public void setUseOldStyleHeaders(java.lang.String useOldStyleHeaders)

  Deprecated. use `addContainerRenderer(java.lang.Object)` with `ContainerRenderer306` to get equivalent behavior. Alternatively, create your own container renderer by extending `PortletContainerRenderer`

  Specifies whether or not `PortletRendererUtil` should render headers and footers for this provider's portlets in the style used by a 3.0.6 portal or earlier, rather than the style used by a post-3.0.6 portal.
  Parameters:
    `useOldStyleHeaders` - String representation of boolean (`"true"` or `"false"`) indicating which style of form headers and footers should be rendered by `PortletRendererUtil`.
  See Also:
    `ProviderDefinition.setUseOldStyleHeaders(boolean)`

### addContainerRenderer

    public void addContainerRenderer(java.lang.Object renderer)
                              throws ProviderException

  Sets the default portlet container renderer.

  The container renderer is responsible for rendering the portlet container in each of the show modes the portlet supports.

  Each portlet can specify its own container renderer and you can specify a default at the provider level to be used by any portlet that does not explicitly specify it's own container renderer.

  Note: This method uses the "add" prefix instead of "set" to prevent ambiguous method errors during compilation. Calling the parent method using "super" could be used within this class to resolve the ambiguity, but if you are calling this method on an instance of DefaultProviderDefinition you cannot use that technique to resolve it.

  Parameters:
    `renderer` - the default portlet container renderer. Even though the type of the parameter is Object, the parameter must be an instance of `PortletContainerRenderer`
  Throws:
    `ProviderException` - if the given object is not a valid `PortletContainerRenderer`.

### setPassAllUrlParams

    public void setPassAllUrlParams(java.lang.String value)

  Controls whether Portal will pass the requested page's URL parameters to the provider's portlets by default.

  Parameters:
    `value` - String representation of a boolean value indicating whether Portal will pass the requested page's URL parameters to portlets by default.
    - If `"true"`, then each portlet whose definition doesn't explicitly override this setting will receive all the (non-system) parameters from the page URL.
    - If `"false"` (the default), then each portlet which declares input parameters and doesn't explicitly override this setting (with `PortletDefinition.setPassAllUrlParams(boolean)`) will only receive values for its declared input parameters and private parameters which have been generated using `PortletRendererUtil.portletParameter(oracle.portal.provider.v2.render.PortletRenderRequest, java.lang.String)`. The parameter values will be determined by the usage of the portlet on a particular page.

### setCacheLevel

    public void setCacheLevel(java.lang.String cacheLevel)
                       throws ProviderException

  Sets the caching level used for portlet render requests for portlets belonging to this provider.

  Parameters:
    `cacheLevel` - int indicates the caching level - should be one of PortletConstants.CACHE_LEVEL_SYSTEM_STR, PortletConstants.CACHE_LEVEL_USER_STR, or PortletConstants.CACHE_LEVEL_SESSION_STR. The cache level for a portlet render request is determined using the following order of precedence:
    - If specified, the portlet setting is used
    - If specified, the provider setting is used
    - If the provider is registered as "public" then the portlet will be called using the "public" user and cached at the system level
    - If the provider is registered as "user" and "portal session data" is requested then portlet will be cached at the session level
    - Otherwise, the portlet will be cached at user level

### setRewriteUrls

    public void setRewriteUrls(java.lang.String value)

  Controls whether or not URL rewriting will be performed on the results of portlet render requests for portlets belonging to this provider.

  Parameters:
    `rewriteUrls` - String "true" if URL rewriting is to be performed. Otherwise "false".
  See Also:
    `ProviderDefinition.setRewriteUrls(boolean)`, `PortletDefinition.setRewriteUrls(boolean)`

### addPortlet

    public void addPortlet(java.lang.Object portlet)
                    throws ProviderException

  Associates with the provider a `PortletDefinition` object containing the meta data for one of the portlets it owns. Note that each `PortletDefinition` added should have a unique id.
  Parameters:
    `portlet` - an object containing the portlet-level meta data for one of the provider's portlets. Should be a `PortletDefinition` or a subclass.
  Throws:
    `ProviderException` - if the given object is not a `PortletDefinition`

### addPreferenceStore

    public void addPreferenceStore(java.lang.Object ps)
                            throws ProviderException

  Adds to the set of `PreferenceStore` objects that may be used by the provider for persistent storage. Note that each `PreferenceStore` added should have a unique identifying name.
  Parameters:
    `pd` - a preference store object. Should be a `PreferenceStore` or subclass.
  Throws:
    `ProviderException` - if the given object is not a `PreferenceStore`

### preInitialize

    public void preInitialize(java.lang.Object parent)
                       throws NodeHandlerException

  Should be called immediately after construction of a `DefaultProviderDefinition` to associate it with its parent `ProviderContext` object describing its deployment environment. Generally, all providers running in the same environment (e.g. within the same adapter servlet) share the same `ProviderContext`.
  Specified by:
    `preInitialize` in interface `InitializableXMLObject`
  Parameters:
    `parent` - an object describing the deployment environment of the provider. Should be a `ProviderContext`.
  Throws:
    `NodeHandlerException` - if the given object is not a `ProviderContext`

### postInitialize

    public void postInitialize()
                        throws NodeHandlerException

  Should be called once initialization of this `DefaultProviderDefinition` is complete, to complete initialization and perform any necessary validation.
  Specified by:
    `postInitialize` in interface `InitializableXMLObject`
  Throws:
    `NodeHandlerException` - if validation is unsuccessful

### setProviderBuilder

    public void setProviderBuilder(java.lang.Object providerBuilder)
                            throws ProviderException

  Each provider can specifiy the builder attached to edit this provider. This method sets a ProviderBuilder with this providerdefintion.
  Parameters:
    `providerBuilder` - the ProviderBuilder attribute for this Provider
  Throws:
    `ProviderException` - if the given Object is not a valid `BuilderMetaData`.

Overview | Package | Class | Tree | Deprecated | Index | Help
| The PDK Java API is part of the Portal Developer Kit on Portal Studio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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