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

oracle.portal.provider.v2
Class DefaultProviderDefinition

java.lang.Object
  extended by oracle.portal.provider.v2.ProviderDefinition
      extended by oracle.portal.provider.v2.DefaultProviderDefinition
All Implemented Interfaces:
Validateable, InitializableXMLObject

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 setCipherManager(java.lang.Object cipherManager)
          Sets the the CipherManager which will be employed to encrypt exported data and decrypt imported data.
 void setDefaultLocale(java.lang.String defaultLocale)
          Sets the default Locale for this ProviderDefinition.
 void setLocalePersonalizationLevel(java.lang.String value)
          Sets the locale personalization level which will be used for portlets whose defintion does not include a portlet specific setting.
 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, getCipherManager, getContainerRenderer, getDefaultLocale, getHasSession, getLocalePersonalizationLevel, getOidManager, getPassAllUrlParams, getPortletDefinition, getPortletDefinitions, getPreferenceStore, getPreferenceStore, getProviderBuilder, getProviderContext, getProviderInstanceClass, getRewriteUrls, getUseOldStyleHeaders, init, setCacheLevel, setCipherManager, setContainerRenderer, setDefaultLocale, setHasSession, setLocalePersonalizationLevel, 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.
Throws:
java.lang.ClassNotFoundException

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.

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. This controls the set of parameters sent to the provider in a render request and hence the "cache key" under which the returned markup is stored. This overrides the User/Session information entered for the provider on registration. The possible settings are:

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
Throws:
ProviderException

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:
value - value "true" if URL rewriting is to be performed. Otherwise "false".
See Also:
ProviderDefinition.setRewriteUrls(boolean), PortletDefinition.setRewriteUrls(boolean)

setLocalePersonalizationLevel

public void setLocalePersonalizationLevel(java.lang.String value)
                                   throws ProviderException
Sets the locale personalization level which will be used for portlets whose defintion does not include a portlet specific setting. For more detail on the locale personalization level, see PortletDefinition.setLocalePersonalizationLevel(int).

Parameters:
value - the required locale personalization level. See, DefaultPortletDefinition.setLocalePersonalizationLevel(String)
Throws:
ProviderException

setDefaultLocale

public void setDefaultLocale(java.lang.String defaultLocale)
Sets the default Locale for this ProviderDefinition. The Locale is specified using the standard ISO two-letter language and country codes, e.g. en.US. See ProviderDefinition.setDefaultLocale(Locale).

Parameters:
defaultLocale - a String specifying a Locale

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:
ps - a preference store object. Should be a PreferenceStore or subclass.
Throws:
ProviderException - if the given object is not a PreferenceStore

setCipherManager

public void setCipherManager(java.lang.Object cipherManager)
                      throws ProviderException
Sets the the CipherManager which will be employed to encrypt exported data and decrypt imported data. A null value indicates that exported data will not be encrypted. The ProviderDefinition level cipher manager serves as the default for all contained portlets.

Parameters:
cipherManager - an object of type CipherManager which will be employed to encrypt exported data and decrypt imported data.
Throws:
ProviderException

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.

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.