public class FederatingPortletInvokerService extends Object implements FederatingPortletInvoker
| Constructor and Description |
|---|
FederatingPortletInvokerService() |
| Modifier and Type | Method and Description |
|---|---|
org.gatein.pc.api.PortletContext |
createClone(org.gatein.pc.api.PortletStateType stateType,
org.gatein.pc.api.PortletContext compoundPortletContext) |
List<org.gatein.pc.api.state.DestroyCloneFailure> |
destroyClones(List<org.gatein.pc.api.PortletContext> portletContexts) |
org.gatein.pc.api.PortletContext |
exportPortlet(org.gatein.pc.api.PortletStateType stateType,
org.gatein.pc.api.PortletContext compoundPortletContext) |
FederatedPortletInvoker |
getFederatedInvoker(String federatedId)
Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to the
PortletInvokerResolver specified using FederatingPortletInvoker.setPortletInvokerResolver(PortletInvokerResolver) if it's not
initially
resolved or returns null if a FederatedPortletInvoker is not found after going through the specified
NullInvokerHandler resolution mechanism. |
Collection<String> |
getFederatedInvokerIds()
Returns the known portlet invoker identifiers, including resolvable ones (though they might not have been already
resolved).
|
protected FederatedPortletInvoker |
getFederatedPortletInvokerFor(org.gatein.pc.api.PortletContext compoundPortletContext)
Retrieves the portlet invoker associated with the specified compound portlet id or null if it is not found.
|
Set<org.gatein.pc.api.Portlet> |
getLocalPortlets()
Return only the portlets from local federated invokers.
|
org.gatein.pc.api.Portlet |
getPortlet(org.gatein.pc.api.PortletContext compoundPortletContext) |
Set<org.gatein.pc.api.Portlet> |
getPortlets() |
org.gatein.pc.api.state.PropertyMap |
getProperties(org.gatein.pc.api.PortletContext compoundPortletContext) |
org.gatein.pc.api.state.PropertyMap |
getProperties(org.gatein.pc.api.PortletContext compoundPortletContext,
Set<String> keys) |
Set<org.gatein.pc.api.Portlet> |
getRemotePortlets()
Return only the portlets from remote federated invokers.
|
Collection<String> |
getResolvedInvokerIds()
Returns only the portlet invoker identifiers of the currently resolved invokers, which might be different from
the
set potentially resolvable invokers as returned by
FederatingPortletInvoker.getFederatedInvokerIds(). |
org.gatein.pc.api.PortletStatus |
getStatus(org.gatein.pc.api.PortletContext portletContext) |
org.gatein.pc.api.PortletContext |
importPortlet(org.gatein.pc.api.PortletStateType stateType,
org.gatein.pc.api.PortletContext compoundPortletContext) |
org.gatein.pc.api.invocation.response.PortletInvocationResponse |
invoke(org.gatein.pc.api.invocation.PortletInvocation invocation) |
boolean |
isActive() |
boolean |
isResolved(String federatedId)
Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.
|
FederatedPortletInvoker |
registerInvoker(String federatedId,
org.gatein.pc.api.PortletInvoker federatedInvoker)
Registers an invoker.
|
void |
setPortletInvokerResolver(PortletInvokerResolver portletResolver)
Specifies which NullInvokerHandler to use to attempt retrieval of a federated invoker when default resolution
mechanism cannot find an associated invoker.
|
org.gatein.pc.api.PortletContext |
setProperties(org.gatein.pc.api.PortletContext compoundPortletContext,
org.gatein.pc.api.state.PropertyChange[] changes) |
void |
unregisterInvoker(String federatedId)
Unregisters the invoker associated with the specified identifier.
|
public FederatedPortletInvoker registerInvoker(String federatedId, org.gatein.pc.api.PortletInvoker federatedInvoker)
FederatingPortletInvokerregisterInvoker in interface FederatingPortletInvokerfederatedId - the invoker id to registerfederatedInvoker - the invoker to registerpublic void unregisterInvoker(String federatedId)
FederatingPortletInvokerunregisterInvoker in interface FederatingPortletInvokerfederatedId - the identifier of the invoker to unregisterpublic FederatedPortletInvoker getFederatedInvoker(String federatedId) throws IllegalArgumentException
FederatingPortletInvokerPortletInvokerResolver specified using FederatingPortletInvoker.setPortletInvokerResolver(PortletInvokerResolver) if it's not
initially
resolved or returns null if a FederatedPortletInvoker is not found after going through the specified
NullInvokerHandler resolution mechanism.getFederatedInvoker in interface FederatingPortletInvokerfederatedId - the idIllegalArgumentException - if the id is nullpublic Collection<String> getFederatedInvokerIds()
FederatingPortletInvokergetFederatedInvokerIds in interface FederatingPortletInvokerpublic Collection<String> getResolvedInvokerIds()
FederatingPortletInvokerFederatingPortletInvoker.getFederatedInvokerIds().getResolvedInvokerIds in interface FederatingPortletInvokerpublic boolean isResolved(String federatedId) throws IllegalArgumentException
FederatingPortletInvokerisResolved in interface FederatingPortletInvokerfederatedId - the identifier of the FederatedPortletInvoker to test for resolution statustrue if the specified invoker is already resolved, false otherwiseIllegalArgumentException - if the specified invoker identifier is not among the known resolvable
identifiers
as returned by FederatingPortletInvoker.getFederatedInvokerIds()public Set<org.gatein.pc.api.Portlet> getPortlets() throws org.gatein.pc.api.PortletInvokerException
getPortlets in interface org.gatein.pc.api.PortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic Set<org.gatein.pc.api.Portlet> getLocalPortlets() throws org.gatein.pc.api.PortletInvokerException
FederatingPortletInvokergetLocalPortlets in interface FederatingPortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic Set<org.gatein.pc.api.Portlet> getRemotePortlets() throws org.gatein.pc.api.PortletInvokerException
FederatingPortletInvokergetRemotePortlets in interface FederatingPortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic org.gatein.pc.api.Portlet getPortlet(org.gatein.pc.api.PortletContext compoundPortletContext)
throws IllegalArgumentException,
org.gatein.pc.api.PortletInvokerException
getPortlet in interface org.gatein.pc.api.PortletInvokerIllegalArgumentExceptionorg.gatein.pc.api.PortletInvokerExceptionpublic org.gatein.pc.api.PortletStatus getStatus(org.gatein.pc.api.PortletContext portletContext)
throws IllegalArgumentException,
org.gatein.pc.api.PortletInvokerException
getStatus in interface org.gatein.pc.api.PortletInvokerIllegalArgumentExceptionorg.gatein.pc.api.PortletInvokerExceptionpublic org.gatein.pc.api.invocation.response.PortletInvocationResponse invoke(org.gatein.pc.api.invocation.PortletInvocation invocation)
throws org.gatein.pc.api.PortletInvokerException
invoke in interface org.gatein.pc.api.PortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic org.gatein.pc.api.PortletContext createClone(org.gatein.pc.api.PortletStateType stateType,
org.gatein.pc.api.PortletContext compoundPortletContext)
throws org.gatein.pc.api.PortletInvokerException
createClone in interface org.gatein.pc.api.PortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic List<org.gatein.pc.api.state.DestroyCloneFailure> destroyClones(List<org.gatein.pc.api.PortletContext> portletContexts) throws IllegalArgumentException, org.gatein.pc.api.PortletInvokerException, UnsupportedOperationException
destroyClones in interface org.gatein.pc.api.PortletInvokerIllegalArgumentExceptionorg.gatein.pc.api.PortletInvokerExceptionUnsupportedOperationExceptionpublic org.gatein.pc.api.state.PropertyMap getProperties(org.gatein.pc.api.PortletContext compoundPortletContext,
Set<String> keys)
throws org.gatein.pc.api.PortletInvokerException
getProperties in interface org.gatein.pc.api.PortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic org.gatein.pc.api.state.PropertyMap getProperties(org.gatein.pc.api.PortletContext compoundPortletContext)
throws org.gatein.pc.api.PortletInvokerException
getProperties in interface org.gatein.pc.api.PortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic org.gatein.pc.api.PortletContext setProperties(org.gatein.pc.api.PortletContext compoundPortletContext,
org.gatein.pc.api.state.PropertyChange[] changes)
throws IllegalArgumentException,
org.gatein.pc.api.PortletInvokerException,
UnsupportedOperationException
setProperties in interface org.gatein.pc.api.PortletInvokerIllegalArgumentExceptionorg.gatein.pc.api.PortletInvokerExceptionUnsupportedOperationExceptionpublic org.gatein.pc.api.PortletContext exportPortlet(org.gatein.pc.api.PortletStateType stateType,
org.gatein.pc.api.PortletContext compoundPortletContext)
throws org.gatein.pc.api.PortletInvokerException
exportPortlet in interface org.gatein.pc.api.PortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic org.gatein.pc.api.PortletContext importPortlet(org.gatein.pc.api.PortletStateType stateType,
org.gatein.pc.api.PortletContext compoundPortletContext)
throws org.gatein.pc.api.PortletInvokerException
importPortlet in interface org.gatein.pc.api.PortletInvokerorg.gatein.pc.api.PortletInvokerExceptionpublic boolean isActive()
isActive in interface org.gatein.pc.api.PortletInvokerpublic void setPortletInvokerResolver(PortletInvokerResolver portletResolver)
FederatingPortletInvokersetPortletInvokerResolver in interface FederatingPortletInvokerprotected FederatedPortletInvoker getFederatedPortletInvokerFor(org.gatein.pc.api.PortletContext compoundPortletContext) throws IllegalArgumentException, org.gatein.pc.api.NoSuchPortletException
compoundPortletContext - the portlet context for which the invoker is to be retrievedIllegalArgumentException - if the compound portlet id is not well formed or nullorg.gatein.pc.api.NoSuchPortletException - if not such portlet existCopyright © 2003-2017 GateIn. All Rights Reserved.