Author: chris.laprun(a)jboss.com
Date: 2011-09-15 14:10:12 -0400 (Thu, 15 Sep 2011)
New Revision: 7442
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java
Log:
- GTNWSRP-240: can only access the portlet's info if it is started?\226?\128?\166
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java 2011-09-15
16:15:09 UTC (rev 7441)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java 2011-09-15
18:10:12 UTC (rev 7442)
@@ -170,30 +170,30 @@
if (managedObject instanceof ManagedPortletContainer)
{
ManagedPortletContainer portletContainer =
(ManagedPortletContainer)managedObject;
- final PortletInfo info = portletContainer.getInfo();
+ String applicationId =
portletContainer.getManagedPortletApplication().getId();
+ String containerId = portletContainer.getId();
- // only process portlet if it's remotable
- if (isRemotable(info.getRuntimeOptionsInfo()))
+ org.gatein.pc.api.PortletContext pc =
org.gatein.pc.api.PortletContext.createPortletContext(applicationId, containerId);
+
+ if (managedObjectEvent instanceof ManagedObjectLifeCycleEvent)
{
- String applicationId =
portletContainer.getManagedPortletApplication().getId();
- String containerId = portletContainer.getId();
-
- org.gatein.pc.api.PortletContext pc =
org.gatein.pc.api.PortletContext.createPortletContext(applicationId, containerId);
-
- if (managedObjectEvent instanceof ManagedObjectLifeCycleEvent)
+ ManagedObjectLifeCycleEvent lifeCycleEvent =
(ManagedObjectLifeCycleEvent)managedObjectEvent;
+ LifeCycleStatus status = lifeCycleEvent.getStatus();
+ if (LifeCycleStatus.STARTED.equals(status))
{
- ManagedObjectLifeCycleEvent lifeCycleEvent =
(ManagedObjectLifeCycleEvent)managedObjectEvent;
- LifeCycleStatus status = lifeCycleEvent.getStatus();
- if (LifeCycleStatus.STARTED.equals(status))
+ final PortletInfo info = portletContainer.getInfo();
+ // only add the portlet if it's remotable
+ if (isRemotable(info.getRuntimeOptionsInfo()))
{
serviceDescription.addPortletDescription(pc, info);
}
- else
- {
- serviceDescription.removePortletDescription(pc);
- }
}
+ else
+ {
+ serviceDescription.removePortletDescription(pc);
+ }
}
+
}
}
}
Show replies by date