|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.portal.jems.as.system.AbstractJBossService org.jboss.portal.wsrp.consumer.WSRPConsumerImpl
Field Summary | |
private ActionHandler |
actionHandler
|
private java.util.Map |
cachedPortletMap
The cached portlets. |
private java.lang.Integer |
expirationCacheSeconds
The cache expiration duration (in seconds) for cached values |
private long |
expirationTimeMillis
. |
private static java.lang.String |
MARKUP
|
private static java.lang.String |
PORTLET_MANAGEMENT
|
private java.util.Map |
portletGroups
Portlet groups. |
private java.lang.String |
producerId
The identifier of the associated producer |
private static java.lang.String |
REGISTRATION
|
private RegistrationContext |
registrationContext
The registration with the current producer. |
private RegistrationData |
registrationData
The registration data used to register this consumer with the associated producer |
private RenderHandler |
renderHandler
|
private static java.lang.String |
SERVICE_DESCRIPTION
|
private GetServiceDescription |
serviceDescriptionRequest
The service description sent to producer. |
private ServiceFactory |
serviceFactory
The service factory. |
private SessionHandler |
sessionHandler
|
private java.util.Set |
supportedUserScopes
The set of supported user scopes |
private GetServiceDescription |
unregisteredServiceDescriptionRequest
The service description request sent to producer before registration happens. |
private static java.util.Set |
WSRP_DEFAULT_USER_SCOPE
The default user scopes as per the specification (6.1.4) |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
|
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
WSRPConsumerImpl()
|
Method Summary | |
PortletContext |
createClone(PortletContext portletContext)
Clone a portlet. |
java.util.List |
destroyClones(java.util.List portletIds)
Destroy a cloned portlet. |
private java.util.Map |
extractOfferedPortlets(ServiceDescription sd)
Extracts a map of offered Portlet objects from ServiceDescription |
java.lang.Integer |
getExpirationCacheSeconds()
Retrieves the cache expiration duration (in seconds) for cached values. |
(package private) static javax.servlet.http.HttpServletRequest |
getHttpRequest(PortletInvocation invocation)
|
(package private) static javax.servlet.http.HttpSession |
getHttpSession(PortletInvocation invocation)
|
WSRP_v1_Markup_PortType |
getMarkupService()
|
Portlet |
getPortlet(PortletContext portletContext)
Get information about a specific portlet. |
private Portlet |
getPortlet(java.lang.String portletId)
|
java.util.Map |
getPortletGroupMap()
|
(package private) static java.lang.String |
getPortletHandle(PortletInvocation invocation)
|
(package private) WSRPPortletInfo |
getPortletInfo(PortletInvocation invocation)
|
WSRP_v1_PortletManagement_PortType |
getPortletManagementService()
|
private java.util.Map |
getPortletMap()
|
java.util.Set |
getPortlets()
Return the set of portlet exposed. |
java.lang.String |
getProducerId()
Retrieves the identifier for the producer this consumer is associated with. |
ProducerSessionInformation |
getProducerSessionInformationFrom(javax.servlet.http.HttpSession session)
Retrieves the session information for the producer associated with this consumer. |
ProducerSessionInformation |
getProducerSessionInformationFrom(PortletInvocation invocation)
Retrieves the session information for the producer associated with this consumer. |
PropertyMap |
getProperties(PortletContext portletContext)
Return all the properties of the specified portlet. |
PropertyMap |
getProperties(PortletContext portletContext,
java.util.Set keys)
Return a subset of the properties of the specified portlet. |
(package private) RegistrationContext |
getRegistrationContext()
|
RegistrationData |
getRegistrationData()
Retrieves the registration data used to register this consumer with the associated producer |
WSRP_v1_Registration_PortType |
getRegistrationService()
|
private java.lang.Object |
getService(java.lang.String description,
java.lang.Class clazz)
|
ServiceDescription |
getServiceDescriptionAndRegisterIfNeeded()
|
private GetServiceDescription |
getServiceDescriptionRequest()
|
WSRP_v1_ServiceDescription_PortType |
getServiceDescriptionService()
|
ServiceFactory |
getServiceFactory()
Retrieves the ServiceFactory this Consumer will use to access the associated Producer's services. |
SessionHandler |
getSessionHandler()
|
java.util.Set |
getSupportedUserScopes()
|
private GetServiceDescription |
getUnregisteredServiceDescriptionRequest()
Retrieves the service description request this consumer uses when not registered. |
(package private) org.jboss.portal.wsrp.core.UserContext |
getUserContextFrom(PortletInvocation invocation,
RuntimeContext runtimeContext)
|
private java.lang.String |
getUserContextKeyFor(UserContext userContext)
|
(package private) WSRPPortlet |
getWSRPPortlet(java.lang.String portletId)
|
(package private) void |
handleInvalidRegistrationFault()
|
private GetServiceDescription |
initUnregisteredServiceDescriptionRequest()
Initializes the service description request this consumer uses when not registered. |
PortletInvocationResponse |
invoke(PortletInvocation invocation)
Invoke an operation on a specific portlet. |
void |
setExpirationCacheSeconds(java.lang.Integer expirationCacheSeconds)
Sets the cache expiration duration (in seconds) for cached values. |
void |
setProducerId(java.lang.String id)
Sets the identifier for the producer this consumer is associated with. |
PortletContext |
setProperties(PortletContext portletContext,
PropertyChange[] changes)
Set the properties on the specified portlet. |
void |
setRegistrationData(RegistrationData registrationData)
Sets the registration data used to register this consumer with the associated producer |
private void |
setServiceDescriptionRequest(GetServiceDescription request)
|
void |
setServiceFactory(ServiceFactory serviceFactory)
Sets the ServiceFactory this Consumer will use to access the associated Producer's services. |
(package private) void |
setTemplatesIfNeeded(PortletInvocation invocation,
RuntimeContext runtimeContext)
|
protected void |
startService()
|
boolean |
supportsUserScope(java.lang.String userScope)
Determines whether the specified user scope (for markup caching) is supported. |
private void |
updateCachesIfNeeded()
|
private boolean |
useCache()
|
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService |
create, destroy, getState, getStateString, start, stop |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, stopService |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Field Detail |
private static final java.lang.String SERVICE_DESCRIPTION
private static final java.lang.String MARKUP
private static final java.lang.String PORTLET_MANAGEMENT
private static final java.lang.String REGISTRATION
private ActionHandler actionHandler
private RenderHandler renderHandler
private SessionHandler sessionHandler
private final GetServiceDescription unregisteredServiceDescriptionRequest
private GetServiceDescription serviceDescriptionRequest
private RegistrationContext registrationContext
private ServiceFactory serviceFactory
private java.util.Map cachedPortletMap
private java.util.Map portletGroups
private java.lang.Integer expirationCacheSeconds
private long expirationTimeMillis
private java.lang.String producerId
private RegistrationData registrationData
private static final java.util.Set WSRP_DEFAULT_USER_SCOPE
private java.util.Set supportedUserScopes
Constructor Detail |
public WSRPConsumerImpl()
Method Detail |
public java.util.Set getPortlets() throws InvokerUnavailableException
PortletInvoker
getPortlets
in interface PortletInvoker
InvokerUnavailableException
public Portlet getPortlet(PortletContext portletContext) throws java.lang.IllegalArgumentException, PortletInvokerException
PortletInvoker
getPortlet
in interface PortletInvoker
portletContext
- the portlet context in the scope of this invoker
PortletInfo
for the specified portlet
java.lang.IllegalArgumentException
- if the portlet context is null
PortletInvokerException
private Portlet getPortlet(java.lang.String portletId) throws PortletInvokerException
PortletInvokerException
public PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException
PortletInvoker
invoke
in interface PortletInvoker
invocation
- the portlet invocation
PortletInvokerException
public PortletContext createClone(PortletContext portletContext) throws java.lang.IllegalArgumentException, PortletInvokerException, java.lang.UnsupportedOperationException
PortletInvoker
createClone
in interface PortletInvoker
java.lang.UnsupportedOperationException
- if the invoker does not support this operation
java.lang.IllegalArgumentException
- if the portletId is null
PortletInvokerException
public java.util.List destroyClones(java.util.List portletIds) throws java.lang.IllegalArgumentException, PortletInvokerException, java.lang.UnsupportedOperationException
PortletInvoker
destroyClones
in interface PortletInvoker
portletIds
- a list of portlet contexts to destroy
java.lang.IllegalArgumentException
- if the portletId is null
java.lang.UnsupportedOperationException
- if the invoker does not support this operation
PortletInvokerException
public PropertyMap getProperties(PortletContext portletContext, java.util.Set keys) throws java.lang.IllegalArgumentException, PortletInvokerException, java.lang.UnsupportedOperationException
PortletInvoker
getProperties
in interface PortletInvoker
portletContext
- the portlet contextkeys
- the set of keys to retrieve
java.lang.UnsupportedOperationException
- if the invoker does not support this operation
java.lang.IllegalArgumentException
- if the portletId or the keys arguments are null
PortletInvokerException
public PropertyMap getProperties(PortletContext portletContext) throws java.lang.IllegalArgumentException, PortletInvokerException, java.lang.UnsupportedOperationException
PortletInvoker
getProperties
in interface PortletInvoker
portletContext
- the portlet context
java.lang.UnsupportedOperationException
- if the invoker does not support this operation
java.lang.IllegalArgumentException
- if the portletId is null
PortletInvokerException
public PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes) throws java.lang.IllegalArgumentException, PortletInvokerException, java.lang.UnsupportedOperationException
PortletInvoker
setProperties
in interface PortletInvoker
portletContext
- the portlet contextchanges
- the changes
java.lang.UnsupportedOperationException
- if the invoker does not support this operation
java.lang.IllegalArgumentException
- if the portletId or the properties is null
PortletInvokerException
public void setProducerId(java.lang.String id)
WSRPConsumer
setProducerId
in interface WSRPConsumer
id
- the identifier of the associated producerpublic java.lang.String getProducerId()
WSRPConsumer
getProducerId
in interface WSRPConsumer
public SessionHandler getSessionHandler()
public java.util.Map getPortletGroupMap() throws ServiceDescriptionUnavailableException
static java.lang.String getPortletHandle(PortletInvocation invocation)
WSRPPortletInfo getPortletInfo(PortletInvocation invocation)
WSRPPortlet getWSRPPortlet(java.lang.String portletId) throws PortletInvokerException
PortletInvokerException
private java.util.Map getPortletMap() throws ServiceDescriptionUnavailableException
private java.util.Map extractOfferedPortlets(ServiceDescription sd)
sd
-
private boolean useCache()
private void updateCachesIfNeeded() throws ServiceDescriptionUnavailableException
public java.lang.Integer getExpirationCacheSeconds()
WSRPConsumer
getExpirationCacheSeconds
in interface WSRPConsumer
public void setExpirationCacheSeconds(java.lang.Integer expirationCacheSeconds)
WSRPConsumer
setExpirationCacheSeconds
in interface WSRPConsumer
expirationCacheSeconds
- the cache expiration duration (in seconds)public java.util.Set getSupportedUserScopes()
public boolean supportsUserScope(java.lang.String userScope)
userScope
- the user scope which support is to be determined
true
if the given user scope is supported, false
otherwisevoid handleInvalidRegistrationFault() throws ServiceDescriptionUnavailableException
RegistrationContext getRegistrationContext()
public void setRegistrationData(RegistrationData registrationData)
WSRPConsumer
setRegistrationData
in interface WSRPConsumer
registrationData
- the registration data used to register this consumer with the associated producerpublic RegistrationData getRegistrationData()
WSRPConsumer
getRegistrationData
in interface WSRPConsumer
public ProducerSessionInformation getProducerSessionInformationFrom(PortletInvocation invocation)
WSRPConsumer
getProducerSessionInformationFrom
in interface WSRPConsumer
invocation
- a portlet invocation from which the session information should be extracted.
ProducerSessionInformation
public ProducerSessionInformation getProducerSessionInformationFrom(javax.servlet.http.HttpSession session)
WSRPConsumer
getProducerSessionInformationFrom
in interface WSRPConsumer
session
- the session from the information should be extracted.
ProducerSessionInformation
protected void startService() throws java.lang.Exception
java.lang.Exception
public ServiceFactory getServiceFactory()
WSRPConsumer
getServiceFactory
in interface WSRPConsumer
public void setServiceFactory(ServiceFactory serviceFactory)
WSRPConsumer
setServiceFactory
in interface WSRPConsumer
serviceFactory
- the ServiceFactory this Consumer will use to access the associated Producer's services.public WSRP_v1_ServiceDescription_PortType getServiceDescriptionService() throws InvokerUnavailableException
InvokerUnavailableException
public WSRP_v1_Markup_PortType getMarkupService() throws InvokerUnavailableException
InvokerUnavailableException
public WSRP_v1_PortletManagement_PortType getPortletManagementService() throws InvokerUnavailableException
InvokerUnavailableException
public WSRP_v1_Registration_PortType getRegistrationService() throws InvokerUnavailableException
InvokerUnavailableException
private java.lang.Object getService(java.lang.String description, java.lang.Class clazz) throws InvokerUnavailableException
InvokerUnavailableException
public ServiceDescription getServiceDescriptionAndRegisterIfNeeded() throws ServiceDescriptionUnavailableException
private void setServiceDescriptionRequest(GetServiceDescription request)
private GetServiceDescription getServiceDescriptionRequest()
private GetServiceDescription getUnregisteredServiceDescriptionRequest()
private GetServiceDescription initUnregisteredServiceDescriptionRequest()
private java.lang.String getUserContextKeyFor(UserContext userContext)
org.jboss.portal.wsrp.core.UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext)
void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext)
static javax.servlet.http.HttpServletRequest getHttpRequest(PortletInvocation invocation)
static javax.servlet.http.HttpSession getHttpSession(PortletInvocation invocation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |