|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.portal.provider.v2.ProviderInstance
public class 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. |
byte[] |
exportData(boolean exportUsers,
java.lang.String[] userNames,
TransportLogger logger)
Exports provider level data from this ProviderInstance. |
CipherManager |
getCipherManager()
Gets the the CipherManager
which will be employed to encrypt exported data. |
java.lang.String |
getContextPath()
Returns a string which uniquely indentifies this ProviderInstance
. |
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 |
getPortletDefinition(long portletId,
ProviderUser user,
boolean securityCheck)
Returns the PortletDefinition with the given ID. |
PortletDefinition[] |
getPortletDefinitions(boolean byUser,
ProviderUser user)
Returns an array of PortletDefinition objects for all of the
portlets managed by this Provider. |
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,
java.util.Locale defaultLocale,
PerfMonitor monitor,
boolean securityCheck)
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 |
importData(byte[] data,
TransportLogger logger)
Imports provider level data into this ProviderInstance, for
example by updating an associated persistant store. |
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.
ProviderExceptionpublic 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.
subscriptionId - 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.
ProviderException
java.io.IOException
AccessControlException
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.
ProviderException
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.
ProviderException
public PortletDefinition[] getPortletDefinitions(boolean byUser,
ProviderUser user)
throws ProviderException
PortletDefinition objects for all of the
portlets managed by this Provider.
The PortletDefinitions returned by this method are
constrained to those the user is authorized to access if
byUser is true.
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.
ProviderException
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 PortletDefinition getPortletDefinition(long portletId,
ProviderUser user,
boolean securityCheck)
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.securityCheck - controls whether or not an access check is
performed.
PortletDefinition associated with the given
Id. If the securityCheck parameter is true,
and the user isn't authorized to access the portlet, null
will be returned.
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 portlet
PortletInstance object based on the
parameters passed
ProviderException
PortletException
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
ProviderException
PortletException
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 portletmonitor - 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
ProviderException
PortletException
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
ProviderException
PortletException
public PortletInstance getPortletInstance(long portletId,
java.lang.String portletInstanceName,
ProviderUser user,
java.util.Locale defaultLocale,
PerfMonitor monitor,
boolean securityCheck)
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.securityCheck - controls whether or not the
PortletSecurityManager is
queried for the user's access rights.
PortletInstance object based on the
parameters passed
ProviderException
PortletException
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.
ProviderInstance
PreferenceStoreException - 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
definition
true if the ProviderDefinitions are
the same, otherwise false.
public OidManager getOidManager()
throws ProviderException
ProviderExceptionpublic CipherManager getCipherManager()
CipherManager
which will be employed to encrypt exported 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.
CipherManager
which will be employed to encrypt exported data.
public byte[] exportData(boolean exportUsers,
java.lang.String[] userNames,
TransportLogger logger)
throws ProviderException
ProviderInstance. If
includeUsers is true, user specific data will
be included for the set of users specified in userNames.
Log messages may be included in the exported data set using the supplied
TransportLogger.
exportUsers - speficies if the export data should contain user
specifc data.userNames - the set of users whose data should be exported. If
null, data for all users will be included. If
includeUsers is false, this parameter will be ignored.logger - a TransportLogger which may be used
for logging messages to be included with the exported data.
byte[] encapsulating all export worthy data, or
null if there exists no data to export.
ProviderException - if any non-recoverable error occurred while
exporting the data.
public void importData(byte[] data,
TransportLogger logger)
throws ProviderException
ProviderInstance, for
example by updating an associated persistant store. Messages may be
logged to the import initiator using the supplied TransportLogger
data - the data to import.logger - a TransportLogger which can be used to
log messages to the import initiator.
ProviderException - if any non-recoverable error occurred while
importing the data.public java.lang.String getContextPath()
ProviderInstance
. Equivalent to getProviderId().
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||