|
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 | ||||||||
java.lang.Object | +--oracle.portal.provider.v2.ProviderInstance
A ProviderInstance is the entity that carries out the
responsibilities of a single 'instance' of a provider registered on a
single Portal. Generally, a ProviderInstance is driven by meta
data information in a ProviderDefinition that may be shared with
other ProviderInstances registered on different portals.
| Field Summary | |
static java.lang.String |
PROVIDER_USER
The constant that is used as the key for retrieving the ProviderUser from the ProviderSession. |
| Constructor Summary | |
ProviderInstance()
|
|
| Method Summary | |
void |
deregister()
Deregister this provider instance. |
OidManager |
getOidManager()
Gets the OID Manager that provides access to the OID repository. |
PortletDefinition |
getPortletDefinition(long portletId,
ProviderUser user)
Returns the PortletDefinition with the given ID. |
PortletDefinition[] |
getPortletDefinitions(int start,
int count,
boolean byUser,
ProviderUser user)
Returns array of PortletDefinition objects for the portlets
managed by this Provider. |
PortletInstance |
getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user)
Deprecated. Use getPortletInstance(long, String, ProviderUser,
PerfMonitor) instead. |
PortletInstance |
getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user,
java.util.Locale defaultLocale)
Deprecated. Use getPortletInstance(long, String, ProviderUser,
Locale, PerfMonitor) instead. |
PortletInstance |
getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user,
java.util.Locale defaultLocale,
PerfMonitor monitor)
Constructs a PortletInstance object based on the specified
information. |
PortletInstance |
getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user,
PerfMonitor monitor)
Constructs a PortletInstance object based on the specified
information. |
PreferenceStore |
getPreferenceStore()
Gets the default PreferenceStore that should be used by the
ProviderInstance and all its child objects for which a
preference store has not been chosen explicitly. |
ProviderContext |
getProviderContext()
Gets the context object that describes the deployment environment of the provider. |
java.lang.String |
getProviderId()
Returns the provider's ID. |
ProviderSubscription |
getSubscription()
Returns the subscription information for this portal. |
boolean |
getUseOldStyleHeaders()
Deprecated. use ProviderDefinition.getContainerRenderer() to
determine the default container renderer that should be used to render
portlet containers for this provider |
void |
init(java.lang.String providerId,
ProviderDefinition definition)
Initializes the provider instance after construction. |
java.lang.Object[] |
initSession(ProviderUser user,
ExternalPrincipal externalApp)
Called to initiate a session with a particular user. |
boolean |
isDefinitionEqual(ProviderDefinition pd)
Compare the internal ProviderDefinition with that
specified. |
ProviderRegistrationInfo |
register(java.lang.String subscriptionId,
java.lang.String portalVersion)
Register this newly created provider instance. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String PROVIDER_USER
ProviderUser from the ProviderSession. This is provided as an
alternative way to reference the current user.| Constructor Detail |
public ProviderInstance()
| Method Detail |
public void init(java.lang.String providerId,
ProviderDefinition definition)
throws ProviderException
providerId - the provider's ID, assigned by Portal.definition - provider definition object holding meta data for this
provider.public java.lang.String getProviderId()
public ProviderContext getProviderContext()
ProviderContext.public boolean getUseOldStyleHeaders()
ProviderDefinition.getContainerRenderer() to
determine the default container renderer that should be used to render
portlet containers for this provider
PortletRendererUtil will 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.PortletRendererUtil.true
- render portal 3.0.6 style headers and footers. false -
render new style headers and footers.public ProviderSubscription getSubscription()
For example, when a ProviderInstance is registered in a
Portal, the subscription key is entered by the portal administrator and
passed to the ProviderInstance in the
register method.
Any persistent mapping that is required between the subscription key
and any other provider specific information (eg an account number) must
be established and maintained by extending
ProviderInstance.
null if this
ProviderInstance doesn't use / support subscription.
public ProviderRegistrationInfo register(java.lang.String subscriptionId,
java.lang.String portalVersion)
throws ProviderException,
java.io.IOException,
AccessControlException
init(java.lang.String, oracle.portal.provider.v2.ProviderDefinition).
In response to this method call, the ProviderInstance
enumerates its PortletDefinitions and calls PortletDefinition.register(oracle.portal.provider.v2.ProviderInstance) on each of them. This gives the
PortletDefinition the opportunity to do some one time
initialization for this ProviderInstance.
subscriberId - Provider defined key customer supplies when the
provider is registered in the portal. It is expected the Provider will
use this key information to help provision this instance.portalVersion - the version number of the portal you are being
registered with.
public void deregister()
throws ProviderException
In response to this method call, the ProviderInstance
enumerates its PortletDefinitions and calls PortletDefinition.deregister(oracle.portal.provider.v2.ProviderInstance) on each of them. This gives the
PortletDefinition the opportunity to destroy or remove any
persistent information relating to this ProviderInstance. This
includes personalizations, subscription information and preferences.
public java.lang.Object[] initSession(ProviderUser user,
ExternalPrincipal externalApp)
throws ProviderException,
AuthenticationException
A session is established via the ProviderUser user
object. I.e. the user object contains the methods for creating and
retrieving a session. For providers running in a servlet environment,
further HTTP-specific information can be accessed by casting the user
object to a ServletProviderUser. In particular,
this allows access to any existing Cookies already established between
the user and provider, via the ServletProviderUser.getCookies()
method.
user - Current portal user.externalApp - External Application information (if it exists).javax.servlet.http.Cookie. Alternatively,
null can be returned if this provider doesn't use cookies or
relies on the (user) session to maintain its state.ProviderException - if a generic provider error occurs.AuthenticationException - should be thrown if you have an
external application that requires additional authentication and that
authentication fails for some reason.
public PortletDefinition[] getPortletDefinitions(int start,
int count,
boolean byUser,
ProviderUser user)
throws ProviderException
PortletDefinition objects for the portlets
managed by this Provider. The range of definitions being requested is
controlled by start and count. This method
should return only count PortletDefinitions
starting at start. If there are fewer then
count definitions then a shorter array should be
returned.
The PortletDefinitions returned by this method are
constrained to those the user is authorized to access if
byUser is true.
start - The ordinal of the first portlet definition that should be
returned.count - The maximum number of portlet definitions that should be
returned.byUser - If true, indicates the returned list is constrained to
those portlet definitions the user is authorized to access.user - The current user on whose behalf the request is being made.
public PortletDefinition getPortletDefinition(long portletId,
ProviderUser user)
throws ProviderException
PortletDefinition with the given ID. The
PortletDefinition should only be returned if the user is
authorized to access it.portletId - portlet Id.user - Current user.PortletDefinition associated with the given
Id, or null if the user isn't authorized to access the
portlet.ProviderException - if no PortletDefinition with
the given id exists
public PortletInstance getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user)
throws ProviderException,
PortletException
getPortletInstance(long, String, ProviderUser,
PerfMonitor) instead.
PortletInstance object based on the specified
information. PortletInstance implements the behaviour of a
specific instance of a portlet on a portal page.
This method uses the default locale specified on the
PortletDefinition as the instance's default locale. Use
getPortletInstance(long, String, ProviderUser, Locale) if the
calling Portal has passed a default locale.
portletId - id of the portletportletInstanceName - instance name of the portlet on the portal
pageuser - the user who is accessing the portletPortletInstance object based on the
parameters passed
public PortletInstance getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user,
java.util.Locale defaultLocale)
throws ProviderException,
PortletException
getPortletInstance(long, String, ProviderUser,
Locale, PerfMonitor) instead.
PortletInstance object based on the specified
information. PortletInstance implements the behaviour of a
specific instance of a portlet on a portal page.portletId - id of the portletportletInstanceName - instance name of the portlet on the portal
pageuser - the user who is accessing the portletdefaultLocale - the instance's default locale, or null
if the PortletDefinition's default locale is to be used.PortletInstance object based on the
parameters passed
public PortletInstance getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user,
PerfMonitor monitor)
throws ProviderException,
PortletException
PortletInstance object based on the specified
information. PortletInstance implements the behaviour of a
specific instance of a portlet on a portal page.portletId - id of the portletportletInstanceName - instance name of the portlet on the portal
pageuser - the user who is accessing the portlettracker - the tracking object used to check the request execution
time against the warning timeout specified in the provider properties.PortletInstance object based on the
parameters passed
public PortletInstance getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user,
java.util.Locale defaultLocale,
PerfMonitor monitor)
throws ProviderException,
PortletException
PortletInstance object based on the specified
information. PortletInstance implements the behaviour of a
specific instance of a portlet on a portal page.portletId - id of the portletportletInstanceName - instance name of the portlet on the portal
pageuser - the user who is accessing the portletdefaultLocale - the instance's default locale, or null
if the PortletDefinition's default locale is to be used.monitor - the tracking object used to check the request execution
time against the warning timeout specified in the provider properties.PortletInstance object based on the
parameters passed
public PreferenceStore getPreferenceStore()
throws PreferenceStoreException
PreferenceStore that should be used by the
ProviderInstance and all its child objects for which a
preference store has not been chosen explicitly.ProviderInstancePreferenceStoreException - if the ProviderInstance
does not have a default preference store.public boolean isDefinitionEqual(ProviderDefinition pd)
ProviderDefinition with that
specified.
The ProviderLoader needs to be able to compare the internal
definition of a ProviderInstance with it's own definition
to determine if that instance needs to be replaced by a newer one.
pd - ProviderDefinition to compare to internal
definitiontrue if the ProviderDefinitions are
the same, otherwise false.
public OidManager getOidManager()
throws ProviderException
|
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 | ||||||||