Package org.gatein.pc.federation
Interface FederatingPortletInvoker
-
- All Superinterfaces:
org.gatein.pc.api.PortletInvoker
- All Known Implementing Classes:
FederatingPortletInvokerService
public interface FederatingPortletInvoker extends org.gatein.pc.api.PortletInvokerA portlet invoker that federates other invokers.- Since:
- 2.4
- Version:
- $Revision: 5687 $
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FederatedPortletInvokergetFederatedInvoker(String federatedId)Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to thePortletInvokerResolverspecified usingsetPortletInvokerResolver(PortletInvokerResolver)if it's not initially resolved or returnsnullif 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).Set<org.gatein.pc.api.Portlet>getLocalPortlets()Return only the portlets from local federated invokers.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 bygetFederatedInvokerIds().booleanisResolved(String federatedId)Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.FederatedPortletInvokerregisterInvoker(String federatedId, org.gatein.pc.api.PortletInvoker registeredInvoker)Registers an invoker.voidsetPortletInvokerResolver(PortletInvokerResolver portletResolver)Specifies which NullInvokerHandler to use to attempt retrieval of a federated invoker when default resolution mechanism cannot find an associated invoker.voidunregisterInvoker(String federatedId)Unregisters the invoker associated with the specified identifier.
-
-
-
Method Detail
-
registerInvoker
FederatedPortletInvoker registerInvoker(String federatedId, org.gatein.pc.api.PortletInvoker registeredInvoker) throws IllegalArgumentException
Registers an invoker.- Parameters:
federatedId- the invoker id to registerregisteredInvoker- the invoker to register- Throws:
IllegalArgumentException- if the invoker is null or already registered
-
getFederatedInvoker
FederatedPortletInvoker getFederatedInvoker(String federatedId) throws IllegalArgumentException
Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to thePortletInvokerResolverspecified usingsetPortletInvokerResolver(PortletInvokerResolver)if it's not initially resolved or returnsnullif a FederatedPortletInvoker is not found after going through the specified NullInvokerHandler resolution mechanism.- Parameters:
federatedId- the id- Returns:
- the invoker
- Throws:
IllegalArgumentException- if the id is null
-
getFederatedInvokerIds
Collection<String> getFederatedInvokerIds()
Returns the known portlet invoker identifiers, including resolvable ones (though they might not have been already resolved).- Returns:
- a collection of all the resolvable portlet invoker identifiers
-
getResolvedInvokerIds
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 bygetFederatedInvokerIds().- Returns:
- a collection of the currently resolved portlet invoker identifiers
-
isResolved
boolean isResolved(String federatedId) throws IllegalArgumentException
Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.- Parameters:
federatedId- the identifier of the FederatedPortletInvoker to test for resolution status- Returns:
trueif the specified invoker is already resolved,falseotherwise- Throws:
IllegalArgumentException- if the specified invoker identifier is not among the known resolvable identifiers as returned bygetFederatedInvokerIds()
-
unregisterInvoker
void unregisterInvoker(String federatedId)
Unregisters the invoker associated with the specified identifier.- Parameters:
federatedId- the identifier of the invoker to unregister- Throws:
IllegalArgumentException- if the identifier is null or no invoker is registered with this identifier- Since:
- 2.6
-
getLocalPortlets
Set<org.gatein.pc.api.Portlet> getLocalPortlets() throws org.gatein.pc.api.PortletInvokerException
Return only the portlets from local federated invokers.- Returns:
- a Set containing only the portlets from local federated invokers.
- Throws:
org.gatein.pc.api.PortletInvokerException
-
getRemotePortlets
Set<org.gatein.pc.api.Portlet> getRemotePortlets() throws org.gatein.pc.api.PortletInvokerException
Return only the portlets from remote federated invokers.- Returns:
- a Set containing only the portlets from remote federated invokers.
- Throws:
org.gatein.pc.api.PortletInvokerException
-
setPortletInvokerResolver
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.- Parameters:
portletResolver-
-
-