Author: bdaw
Date: 2008-07-08 08:01:24 -0400 (Tue, 08 Jul 2008)
New Revision: 11348
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationEventWiringMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationParameterBindingMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowMetaData.java
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeployment.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeploymentFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/coordination/CoordinationService.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/coordination/ImplicitStrategy.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/BuildContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PageMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/data/default-object.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd
Log:
Syncing explicit coordination stuff. For now no configuration test cases and not plugged
in ControllerPageNavigationalState.
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -36,9 +36,12 @@
import org.jboss.portal.core.model.CustomizationManager;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
+import org.jboss.portal.core.model.portal.coordination.CoordinationConfigurator;
+import org.jboss.portal.core.model.portal.coordination.CoordinationManager;
import org.jboss.portal.core.model.portal.content.ContentRendererRegistry;
import org.jboss.portal.core.model.portal.control.page.PageControlPolicy;
import org.jboss.portal.core.impl.model.content.InternalContentProviderRegistry;
+import org.jboss.portal.core.impl.model.portal.coordination.CoordinationService;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
import org.jboss.portal.server.RequestController;
@@ -52,6 +55,7 @@
/**
* @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
public class Controller extends AbstractJBossService implements RequestController
@@ -93,6 +97,13 @@
/** . */
protected InternalContentProviderRegistry contentProviderRegistry;
+ /** . */
+ protected CoordinationConfigurator coordinationConfigurator;
+
+ /** . */
+ protected CoordinationManager coordinationManager;
+
+
public InternalContentProviderRegistry getContentProviderRegistry()
{
return contentProviderRegistry;
@@ -213,6 +224,26 @@
this.pageControlPolicy = pageControlPolicy;
}
+ public CoordinationConfigurator getCoordinationConfigurator()
+ {
+ return coordinationConfigurator;
+ }
+
+ public void setCoordinationConfigurator(CoordinationConfigurator
coordinationConfigurator)
+ {
+ this.coordinationConfigurator = coordinationConfigurator;
+ }
+
+ public CoordinationManager getCoordinationManager()
+ {
+ return coordinationManager;
+ }
+
+ public void setCoordinationManager(CoordinationManager coordinationManager)
+ {
+ this.coordinationManager = coordinationManager;
+ }
+
public final void handle(ServerInvocation invocation) throws ServerException
{
// Create controller context
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -59,6 +59,7 @@
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision: 630 $
*/
public class ControllerPortletControllerContext implements PortletControllerContext
@@ -236,4 +237,9 @@
//
return instance.invoke(actionInvocation);
}
+
+ public ControllerContext getControllerContext()
+ {
+ return controllerContext;
+ }
}
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -23,12 +23,16 @@
package org.jboss.portal.core.controller.portlet;
import java.util.LinkedList;
+import java.util.Map;
import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.event.EventPhaseContext;
import org.jboss.portal.portlet.controller.event.PortletWindowEvent;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.core.impl.model.portal.coordination.CoordinationService;
+import org.jboss.portal.core.model.portal.coordination.CoordinationManager;
+import org.jboss.portal.core.model.portal.Window;
import org.apache.log4j.Logger;
/**
@@ -60,18 +64,16 @@
{
try
{
- for (String windowName : portletControllerContext.getWindowNames())
+ CoordinationManager coordinationManager =
+
portletControllerContext.getControllerContext().getController().getCoordinationManager();
+
+ Map<Window, PortletWindowEvent> windows =
coordinationManager.getEventWindows(producedEvent, portletControllerContext);
+
+ for (PortletWindowEvent event : windows.values())
{
- PortletInfo info = portletControllerContext.getPortletInfo(windowName);
+ context.queueEvent(event);
+ }
- //
- if
(info.getEventing().getConsumedEvents().containsKey(producedEvent.getName()))
- {
- PortletWindowEvent distributedEvent = new
PortletWindowEvent(producedEvent.getName(), producedEvent.getPayload(), windowName);
- context.queueEvent(distributedEvent);
- }
- }
-
// Portal events unused at the moment
if (PORTAL_NAMESPACE.equals(producedEvent.getName().getNamespaceURI()))
{
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeployment.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeployment.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeployment.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -34,6 +34,7 @@
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
+import org.jboss.portal.core.model.portal.coordination.CoordinationConfigurator;
import org.jboss.portal.core.model.portal.metadata.BuildContext;
import org.jboss.portal.core.model.portal.metadata.PortalObjectMetaData;
import org.jboss.portal.server.deployment.PortalWebApp;
@@ -52,6 +53,7 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
public class ObjectDeployment extends Deployment
@@ -206,6 +208,11 @@
{
return pwa;
}
+
+ public CoordinationConfigurator getCoordinationConfigurator()
+ {
+ return factory.getCoordinationConfigurator();
+ }
};
// Create all objects
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeploymentFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeploymentFactory.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/deployment/jboss/ObjectDeploymentFactory.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -26,6 +26,7 @@
import org.jboss.portal.common.transaction.TransactionManagerProvider;
import org.jboss.portal.core.model.content.spi.ContentProviderRegistry;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
+import org.jboss.portal.core.model.portal.coordination.CoordinationConfigurator;
import org.jboss.portal.server.deployment.PortalWebApp;
import org.jboss.portal.server.deployment.jboss.AbstractDeploymentFactory;
import org.jboss.portal.server.deployment.jboss.Deployment;
@@ -39,6 +40,7 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
public class ObjectDeploymentFactory extends AbstractDeploymentFactory
@@ -58,6 +60,9 @@
/** . */
protected EntityResolver portalObjectEntityResolver;
+ /** . */
+ protected CoordinationConfigurator coordinationConfigurator;
+
public boolean acceptFile(URL url)
{
String urlAsFile = url.getFile();
@@ -107,4 +112,14 @@
{
this.contentProviderRegistry = contentProviderRegistry;
}
+
+ public CoordinationConfigurator getCoordinationConfigurator()
+ {
+ return coordinationConfigurator;
+ }
+
+ public void setCoordinationConfigurator(CoordinationConfigurator
coordinationConfigurator)
+ {
+ this.coordinationConfigurator = coordinationConfigurator;
+ }
}
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/coordination/CoordinationService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/coordination/CoordinationService.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/portal/coordination/CoordinationService.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -101,13 +101,13 @@
protected EventConverter eventConverter = new SimpleEventConverter();
- protected PortalObjectContainer container;
+ protected PortalObjectContainer portalObjectContainer;
protected void startService() throws Exception
{
super.startService();
- if (container == null)
+ if (portalObjectContainer == null)
{
throw new IllegalStateException("Cannot instantiate CoordinationManager: no
PortalObjectContainer present");
}
@@ -763,14 +763,14 @@
// SETTERS & GETTERS
- public PortalObjectContainer getContainer()
+ public PortalObjectContainer getPortalObjectContainer()
{
- return container;
+ return portalObjectContainer;
}
- public void setContainer(PortalObjectContainer container)
+ public void setPortalObjectContainer(PortalObjectContainer portalObjectContainer)
{
- this.container = container;
+ this.portalObjectContainer = portalObjectContainer;
}
public EventConverter getEventConverter()
@@ -821,43 +821,10 @@
{
String value = pageContainer.getDeclaredProperty(prefix);
- return decodeStrategy(value);
+ return ImplicitStrategy.decodeStrategy(value);
}
- private ImplicitStrategy decodeStrategy(String value)
- {
- if (value == null)
- {
- return null;
- }
- else if (value.equals(STRATEGY_DISABLED))
- {
- return ImplicitStrategy.DISABLED;
- }
- else if (value.equals(STRATEGY_EXCLUSIVE))
- {
- return ImplicitStrategy.EXCLUSIVE;
- }
- else if (value.equals(STRATEGY_FALLBACK))
- {
- return ImplicitStrategy.FALLBACK;
- }
- else if (value.equals(STRATEGY_RECURSIVE_DISABLED))
- {
- return ImplicitStrategy.RECURSIVE_DISABLED;
- }
- else if (value.equals(STRATEGY_RECURSIVE_EXCLUSIVE))
- {
- return ImplicitStrategy.RECURSIVE_EXCLUSIVE;
- }
- else if (value.equals(STRATEGY_RECURSIVE_FALLBACK))
- {
- return ImplicitStrategy.RECURSIVE_FALLBACK;
- }
- // Strategy unknown
- return null;
- }
private ImplicitStrategy resolveStrategy(PageContainer pageContainer, String prefix)
{
@@ -874,7 +841,7 @@
}
else
{
- strategy = decodeStrategy(value);
+ strategy = ImplicitStrategy.decodeStrategy(value);
}
if (strategy != null)
@@ -909,7 +876,7 @@
if (value != null)
{
- strategy = decodeStrategy(value);
+ strategy = ImplicitStrategy.decodeStrategy(value);
}
if (strategy != null &&
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/coordination/ImplicitStrategy.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/coordination/ImplicitStrategy.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/coordination/ImplicitStrategy.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -47,4 +47,39 @@
// All children nodes in the tree will inherit DISABLED strategy
RECURSIVE_DISABLED;
+ public static ImplicitStrategy decodeStrategy(String value)
+ {
+ if (value == null)
+ {
+ return null;
+ }
+ else if (value.equals(DISABLED.name()))
+ {
+ return ImplicitStrategy.DISABLED;
+ }
+ else if (value.equals(EXCLUSIVE.name()))
+ {
+ return ImplicitStrategy.EXCLUSIVE;
+ }
+ else if (value.equals(FALLBACK.name()))
+ {
+ return ImplicitStrategy.FALLBACK;
+ }
+ else if (value.equals(RECURSIVE_DISABLED.name()))
+ {
+ return ImplicitStrategy.RECURSIVE_DISABLED;
+ }
+ else if (value.equals(RECURSIVE_EXCLUSIVE.name()))
+ {
+ return ImplicitStrategy.RECURSIVE_EXCLUSIVE;
+ }
+ else if (value.equals(RECURSIVE_FALLBACK.name()))
+ {
+ return ImplicitStrategy.RECURSIVE_FALLBACK;
+ }
+
+ // Strategy unknown
+ return null;
+ }
+
}
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/BuildContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/BuildContext.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/BuildContext.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -25,12 +25,14 @@
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.handler.ContentHandler;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
+import org.jboss.portal.core.model.portal.coordination.CoordinationConfigurator;
import org.jboss.portal.server.deployment.PortalWebApp;
/**
* Defines the callbacks for creating a portal object.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
public interface BuildContext
@@ -40,4 +42,6 @@
ContentHandler getContentHandler(ContentType contentType);
PortalWebApp getPortalWebApp();
+
+ CoordinationConfigurator getCoordinationConfigurator();
}
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PageMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PageMetaData.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PageMetaData.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -28,6 +28,7 @@
import org.jboss.portal.core.model.content.spi.ContentProviderRegistry;
import org.jboss.portal.core.model.portal.PageContainer;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.model.portal.metadata.coordination.CoordinationMetaData;
import org.w3c.dom.Element;
import java.util.ArrayList;
@@ -38,12 +39,16 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @author <a href="mailto:theute@jboss.org">Thoams Heute</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
public class PageMetaData extends PortalObjectMetaData
{
private static final Logger logger = Logger.getLogger(PageMetaData.class);
+
+ private CoordinationMetaData coordinationMetaData;
+
public PageMetaData()
{
}
@@ -102,10 +107,26 @@
}
}
+ Element coordinationElt = XMLTools.getUniqueChild(pageElt,
"coordination", false);
+ if (coordinationElt != null)
+ {
+
pageMD.setCoordinationMetaData(CoordinationMetaData.buildMetaData(coordinationElt));
+ }
+
//
return pageMD;
}
+ private void setCoordinationMetaData(CoordinationMetaData coordinationMetaData)
+ {
+ this.coordinationMetaData = coordinationMetaData;
+ }
+
+ public CoordinationMetaData getCoordinationMetaData()
+ {
+ return coordinationMetaData;
+ }
+
private static boolean checkConstraints(PageMetaData pageMD)
{
// Check that no more than 1 window has been defined as maximized
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalMetaData.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalMetaData.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -29,6 +29,7 @@
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalContainer;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.model.portal.metadata.coordination.CoordinationMetaData;
import org.jboss.portal.portlet.impl.metadata.portlet.PortletModeMetaData;
import org.jboss.portal.portlet.impl.metadata.portlet.SupportsMetaData;
import org.jboss.portal.portlet.impl.metadata.portlet.WindowStateMetaData;
@@ -39,12 +40,14 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
public class PortalMetaData extends PortalObjectMetaData
{
private SupportsMetaData supportsMetaData;
+ private CoordinationMetaData coordinationMetaData;
public PortalMetaData()
{
@@ -172,10 +175,26 @@
portalMD.getChildren().put(pageMD.getName(), pageMD);
}
+ Element coordinationElt = XMLTools.getUniqueChild(portalElt,
"coordination", false);
+ if (coordinationElt != null)
+ {
+
portalMD.setCoordinationMetaData(CoordinationMetaData.buildMetaData(coordinationElt));
+ }
+
//
return portalMD;
}
+ private void setCoordinationMetaData(CoordinationMetaData coordinationMetaData)
+ {
+ this.coordinationMetaData = coordinationMetaData;
+ }
+
+ public CoordinationMetaData getCoordinationMetaData()
+ {
+ return coordinationMetaData;
+ }
+
public static void buildSupportedModes(PortalMetaData portalMD, Element
supportedModesElt)
{
List modeElts = XMLTools.getChildren(supportedModesElt, "mode");
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/PortalObjectMetaData.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -42,6 +42,8 @@
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.PortalObjectPermission;
+import org.jboss.portal.core.model.portal.Portal;
+import org.jboss.portal.core.model.portal.metadata.coordination.CoordinationMetaData;
import org.jboss.portal.security.RoleSecurityBinding;
import org.jboss.portal.security.SecurityConstants;
import org.jboss.portal.security.metadata.SecurityConstraintsMetaData;
@@ -51,6 +53,7 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
public abstract class PortalObjectMetaData
@@ -156,6 +159,22 @@
portalObjectMD.create(buildContext, object);
}
+ // Coordination - must be applied after children (windows) were created
+ CoordinationMetaData coordinationMD = null;
+ if (this instanceof PortalMetaData)
+ {
+ coordinationMD = ((PortalMetaData)this).getCoordinationMetaData();
+ }
+ else if (this instanceof PageMetaData)
+ {
+ coordinationMD = ((PageMetaData)this).getCoordinationMetaData();
+ }
+
+ if (coordinationMD != null)
+ {
+ coordinationMD.configure(buildContext, object);
+ }
+
//
return object;
}
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationEventWiringMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationEventWiringMetaData.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationEventWiringMetaData.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -0,0 +1,123 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.jboss.portal.core.model.portal.metadata.coordination;
+
+import org.w3c.dom.Element;
+import org.jboss.portal.common.xml.XMLTools;
+
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+
+public class CoordinationEventWiringMetaData
+{
+
+ private String name;
+
+ private List<CoordinationWindowMetaData> sources = new
LinkedList<CoordinationWindowMetaData>();
+
+ private List<CoordinationWindowMetaData> destinations = new
LinkedList<CoordinationWindowMetaData>();
+
+ public CoordinationEventWiringMetaData(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public List<CoordinationWindowMetaData> getSources()
+ {
+ return sources;
+ }
+
+ public void setSources(List<CoordinationWindowMetaData> sources)
+ {
+ this.sources = sources;
+ }
+
+ public void addSource(CoordinationWindowMetaData window)
+ {
+ this.sources.add(window);
+ }
+
+ public List<CoordinationWindowMetaData> getDestinations()
+ {
+ return destinations;
+ }
+
+ public void setDestinations(List<CoordinationWindowMetaData> destinations)
+ {
+ this.destinations = destinations;
+ }
+
+ public void addDestination(CoordinationWindowMetaData window)
+ {
+ this.destinations.add(window);
+ }
+
+ public static CoordinationEventWiringMetaData buildMetaData(Element wiringElement)
+ {
+ Element nameElt = XMLTools.getUniqueChild(wiringElement, "name", true);
+
+ CoordinationEventWiringMetaData wiringMD = new
CoordinationEventWiringMetaData(XMLTools.asString(nameElt));
+
+ Element sourcesElt = XMLTools.getUniqueChild(wiringElement, "sources",
true);
+
+ Iterator windowIter = XMLTools.getChildrenIterator(sourcesElt,
"window-coordination");
+
+ while (windowIter.hasNext())
+ {
+ Element element = (Element)windowIter.next();
+
+ wiringMD.addSource(CoordinationWindowMetaData.buildMetaData(element));
+ }
+
+ Element destinationsElt = XMLTools.getUniqueChild(wiringElement,
"destinations", true);
+
+ windowIter = XMLTools.getChildrenIterator(destinationsElt,
"window-coordination");
+
+ while (windowIter.hasNext())
+ {
+ Element element = (Element)windowIter.next();
+
+ wiringMD.addDestination(CoordinationWindowMetaData.buildMetaData(element));
+ }
+
+ return wiringMD;
+
+
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationMetaData.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationMetaData.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -0,0 +1,261 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.jboss.portal.core.model.portal.metadata.coordination;
+
+import org.jboss.portal.core.model.portal.coordination.ImplicitStrategy;
+import org.jboss.portal.core.model.portal.coordination.IllegalCoordinationException;
+import org.jboss.portal.core.model.portal.metadata.BuildContext;
+import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.model.portal.PageContainer;
+import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.impl.model.portal.coordination.CoordinationService;
+import org.jboss.portal.common.xml.XMLTools;
+import org.w3c.dom.Element;
+
+import javax.xml.namespace.QName;
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class CoordinationMetaData
+{
+
+ private ImplicitStrategy eventStrategy;
+
+ private ImplicitStrategy parameterStrategy;
+
+ List<CoordinationParameterBindingMetaData> parameterBindings = new
LinkedList<CoordinationParameterBindingMetaData>();
+
+ List<CoordinationEventWiringMetaData> wirings = new
LinkedList<CoordinationEventWiringMetaData>();
+
+ List<String> parameterAliases = new LinkedList<String>();
+
+ public static CoordinationMetaData buildMetaData(Element coordinationElt)
+ {
+
+ CoordinationMetaData coordinationMetaData = new CoordinationMetaData();
+
+ Element eventStrategy = XMLTools.getUniqueChild(coordinationElt,
"implicit-event-strategy", false);
+
+ if (eventStrategy != null)
+ {
+
coordinationMetaData.setEventStrategy(ImplicitStrategy.decodeStrategy(XMLTools.asString(eventStrategy)));
+ }
+
+
+ Element parameterStrategy = XMLTools.getUniqueChild(coordinationElt,
"implicit-parameter-strategy", false);
+
+ if (parameterStrategy != null)
+ {
+
coordinationMetaData.setParameterStrategy(ImplicitStrategy.decodeStrategy(XMLTools.asString(parameterStrategy)));
+ }
+
+ Element wiringsElement = XMLTools.getUniqueChild(coordinationElt,
"wirings", false);
+
+ if (wiringsElement != null)
+ {
+ coordinationMetaData.setWirings(buildWiringsMetaData(wiringsElement));
+ }
+
+ Element bindingsElement = XMLTools.getUniqueChild(coordinationElt,
"bindings", false);
+
+ if (bindingsElement != null)
+ {
+ // Aliases
+ Iterator aliasesIter = XMLTools.getChildrenIterator(bindingsElement,
"parameter-alias");
+
+ while (aliasesIter.hasNext())
+ {
+ Element alias = (Element)aliasesIter.next();
+
+ coordinationMetaData.addAlias(XMLTools.asString(alias));
+ }
+
+ // Param bindings
+
+ Iterator paramBindingsIter = XMLTools.getChildrenIterator(bindingsElement,
"parameter-binding");
+ while (paramBindingsIter.hasNext())
+ {
+ Element bindingElement = (Element)paramBindingsIter.next();
+
coordinationMetaData.addParameterBinding(CoordinationParameterBindingMetaData.buildMetaData(bindingElement));
+ }
+
+ }
+
+
+ return coordinationMetaData;
+ }
+
+ private static List<CoordinationEventWiringMetaData>
buildWiringsMetaData(Element wiringsElement)
+ {
+ List<CoordinationEventWiringMetaData> w = new
LinkedList<CoordinationEventWiringMetaData>();
+
+ Iterator wiringsIter = XMLTools.getChildrenIterator(wiringsElement,
"event-wiring");
+
+ while (wiringsIter.hasNext())
+ {
+ Element element = (Element)wiringsIter.next();
+
+ w.add(CoordinationEventWiringMetaData.buildMetaData(element));
+ }
+
+ return w;
+ }
+
+ public void configure(BuildContext buildContext, PortalObject object) throws
IllegalCoordinationException
+ {
+ if (getEventStrategy() != null)
+ {
+
buildContext.getCoordinationConfigurator().setImplicitEventWiringStrategy((PageContainer)object,
getEventStrategy());
+ }
+
+ if (getParameterStrategy() != null)
+ {
+
buildContext.getCoordinationConfigurator().setImplicitParameterBindingStrategy((PageContainer)object,
getEventStrategy());
+ }
+
+ if (object instanceof Page)
+ {
+ Page page = (Page)object;
+
+ for (String parameterAlias : parameterAliases)
+ {
+ buildContext.getCoordinationConfigurator().setParameterAlias(page,
parameterAlias);
+ }
+
+ for (CoordinationParameterBindingMetaData parameterBinding : parameterBindings)
+ {
+ Map<Window, QName> bindings = new HashMap<Window, QName>();
+
+ populateWindows(bindings, parameterBinding.getWindows(), page);
+
+
buildContext.getCoordinationConfigurator().setParameterBinding(parameterBinding.getName(),
bindings);
+ }
+
+ for (CoordinationEventWiringMetaData wiring : wirings)
+ {
+ Map<Window, QName> sources = new HashMap<Window,QName>();
+ Map<Window, QName> destinations = new HashMap<Window,QName>();
+
+ populateWindows(sources, wiring.getSources(), page);
+ populateWindows(destinations, wiring.getDestinations(), page);
+
+ buildContext.getCoordinationConfigurator().setEventWiring(sources,
destinations, wiring.getName());
+
+ }
+
+ }
+
+ }
+
+ private static void populateWindows(Map<Window, QName> map,
List<CoordinationWindowMetaData> windows, Page page) throws
IllegalCoordinationException
+ {
+ for (CoordinationWindowMetaData windowMD : windows)
+ {
+ QName name = QName.valueOf(windowMD.getQname());
+ Window window = page.getWindow(windowMD.getWindowName());
+
+ if (window == null)
+ {
+ throw new IllegalCoordinationException("Cannot obtain window:
\"" + windowMD.getWindowName() + "\" on page: "
+ + page.getName());
+ }
+
+ map.put(window, name);
+ }
+ }
+
+ public ImplicitStrategy getEventStrategy()
+ {
+ return eventStrategy;
+ }
+
+ public void setEventStrategy(ImplicitStrategy eventStrategy)
+ {
+ this.eventStrategy = eventStrategy;
+ }
+
+ public ImplicitStrategy getParameterStrategy()
+ {
+ return parameterStrategy;
+ }
+
+ public void setParameterStrategy(ImplicitStrategy parameterStrategy)
+ {
+ this.parameterStrategy = parameterStrategy;
+ }
+
+ public List<CoordinationEventWiringMetaData> getWirings()
+ {
+ return wirings;
+ }
+
+ public void setWirings(List<CoordinationEventWiringMetaData> wirings)
+ {
+ this.wirings = wirings;
+ }
+
+ public void addWirings(CoordinationEventWiringMetaData wiring)
+ {
+ this.wirings.add(wiring);
+ }
+
+ public List<CoordinationParameterBindingMetaData> getParameterBindings()
+ {
+ return parameterBindings;
+ }
+
+ public void setParameterBindings(List<CoordinationParameterBindingMetaData>
parameterBindings)
+ {
+ this.parameterBindings = parameterBindings;
+ }
+
+ public void addParameterBinding(CoordinationParameterBindingMetaData binding)
+ {
+ this.parameterBindings.add(binding);
+ }
+
+ public List<String> getParameterAliases()
+ {
+ return parameterAliases;
+ }
+
+ public void setParameterAliases(List<String> parameterAliases)
+ {
+ this.parameterAliases = parameterAliases;
+ }
+
+ public void addAlias(String alias)
+ {
+ this.parameterAliases.add(alias);
+ }
+
+
+}
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationParameterBindingMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationParameterBindingMetaData.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationParameterBindingMetaData.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -0,0 +1,88 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.jboss.portal.core.model.portal.metadata.coordination;
+
+import org.w3c.dom.Element;
+import org.jboss.portal.common.xml.XMLTools;
+
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class CoordinationParameterBindingMetaData
+{
+ private String name;
+
+ List<CoordinationWindowMetaData> windows = new
LinkedList<CoordinationWindowMetaData>();
+
+ public CoordinationParameterBindingMetaData(String name)
+ {
+ this.name = name;
+ }
+
+ public List<CoordinationWindowMetaData> getWindows()
+ {
+ return windows;
+ }
+
+ public void setWindows(List<CoordinationWindowMetaData> windows)
+ {
+ this.windows = windows;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void addWindow(CoordinationWindowMetaData window)
+ {
+ windows.add(window);
+ }
+
+ public static CoordinationParameterBindingMetaData buildMetaData(Element
bindingElement)
+ {
+ Element nameElt = XMLTools.getUniqueChild(bindingElement, "name", true);
+ CoordinationParameterBindingMetaData paramMetaData = new
CoordinationParameterBindingMetaData(XMLTools.asString(nameElt));
+
+ Iterator windowIter = XMLTools.getChildrenIterator(bindingElement,
"window-coordination");
+
+ while (windowIter.hasNext())
+ {
+ Element element = (Element)windowIter.next();
+
+ paramMetaData.addWindow(CoordinationWindowMetaData.buildMetaData(element));
+ }
+
+ return paramMetaData;
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowMetaData.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowMetaData.java 2008-07-08
12:01:24 UTC (rev 11348)
@@ -0,0 +1,74 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.jboss.portal.core.model.portal.metadata.coordination;
+
+
+import org.jboss.portal.common.xml.XMLTools;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class CoordinationWindowMetaData
+{
+
+ private String windowName;
+
+ private String qname;
+
+ public CoordinationWindowMetaData(String windowName, String qname)
+ {
+ this.windowName = windowName;
+ this.qname = qname;
+ }
+
+ public String getWindowName()
+ {
+ return windowName;
+ }
+
+ public void setWindowName(String windowName)
+ {
+ this.windowName = windowName;
+ }
+
+ public String getQname()
+ {
+ return qname;
+ }
+
+ public void setQname(String qname)
+ {
+ this.qname = qname;
+ }
+
+ public static CoordinationWindowMetaData buildMetaData(Element element)
+ {
+ Element name = XMLTools.getUniqueChild(element, "window-name", true);
+ Element qname = XMLTools.getUniqueChild(element, "qname", true);
+
+ return new CoordinationWindowMetaData(XMLTools.asString(name),
XMLTools.asString(qname));
+ }
+}
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-07-08
12:01:24 UTC (rev 11348)
@@ -680,6 +680,17 @@
<attribute name="CacheNaturalId">true</attribute>
</mbean>
+ <!-- Coordination service -->
+
+ <mbean
code="org.jboss.portal.core.impl.model.portal.coordination.CoordinationService"
+ name="portal:service=CoordinationService" xmbean-dd=""
+
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PortalObjectContainer"
proxy-type="attribute">
+ portal:container=PortalObject
+ </depends>
+ </mbean>
+
<!-- Customization manager -->
<mbean
code="org.jboss.portal.core.impl.model.CustomizationManagerService"
name="portal:service=CustomizationManager"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
@@ -1010,6 +1021,13 @@
<depends optional-attribute-name="ContentProviderRegistry"
proxy-type="attribute">
portal:service=ContentProviderRegistry
</depends>
+ <depends optional-attribute-name="CoordinationManager"
proxy-type="attribute">
+ portal:service=CoordinationService
+ </depends>
+ <depends optional-attribute-name="CoordinationConfigurator"
proxy-type="attribute">
+ portal:service=CoordinationService
+ </depends>
+
</mbean>
<!-- The controller factory -->
@@ -1066,6 +1084,9 @@
</depends>
<depends optional-attribute-name="PortalObjectEntityResolver"
proxy-type="attribute">portal:service=EntityResolver
</depends>
+ <depends optional-attribute-name="CoordinationConfigurator"
proxy-type="attribute">
+ portal:service=CoordinationService
+ </depends>
<attribute
name="SetupLocation">conf/data/default-object.xml</attribute>
<!-- Set to false in clustered mode, otherwise set to true -->
<attribute
name="RegistrationControlledByService">@portal.single(a)</attribute>
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/data/default-object.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/data/default-object.xml 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/data/default-object.xml 2008-07-08
12:01:24 UTC (rev 11348)
@@ -134,6 +134,10 @@
<unchecked/>
</policy-permission>
</security-constraint>
+ <coordination>
+ <implicit-event-strategy>FALLBACK</implicit-event-strategy>
+
<implicit-parameter-strategy>FALLBACK</implicit-parameter-strategy>
+ </coordination>
<page>
<page-name>default</page-name>
<display-name xml:lang="en">Home</display-name>
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd 2008-07-08
11:51:16 UTC (rev 11347)
+++
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd 2008-07-08
12:01:24 UTC (rev 11348)
@@ -110,7 +110,7 @@
-->
<!ELEMENT portal (portal-name,supported-modes,supported-window-states?,properties?,
listener?,security-constraint?,page*,
- (display-name* | (resource-bundle, supported-locale+)))>
+ (display-name* | (resource-bundle, supported-locale+)),
coordination?)>
<!--
The portal name value.
@@ -161,7 +161,7 @@
pages are the subpages of this page.
-->
<!ELEMENT page (page-name,properties?,listener?,security-constraint?,(page|window)*,
- (display-name* | (resource-bundle, supported-locale+)))>
+ (display-name* | (resource-bundle, supported-locale+)), coordination?)>
<!ELEMENT display-name (#PCDATA)>
<!ATTLIST display-name
@@ -328,3 +328,80 @@
* view - Users can view the page.
-->
<!ELEMENT role-name (#PCDATA)>
+
+<!--
+Configuration of explicit event and shared render parameter coordination
+-->
+<!ELEMENT coordination (implicit-event-strategy?, implicit-parameter-strategy?,
wirings?, bindings?)>
+
+<!--
+Implicit event distribution strategy. Allowed values are:
+
+FALLBACK - Explicit wiring takes precedence and if none exist for a given event it will
be processed with implicit wiring
+EXCLUSIVE - Only implicit wiring enabled
+DISABLED, - Implicit wiring disabled
+RECURSIVE_FALLBACK - All children nodes in the tree will inherit FALLBACK strategy
+RECURSIVE_EXCLUSIVE - All children nodes in the tree will inherit EXCLUSIVE strategy
+RECURSIVE_DISABLED - All children nodes in the tree will inherit DISABLED strategy
+-->
+<!ELEMENT implicit-event-strategy (#PCDATA)>
+
+<!--
+Implicit parameter binding strategy. Allowed values are:
+
+FALLBACK - Explicit wiring takes precedence and if none exist for a given render
parameter it will be processed with implicit wiring
+EXCLUSIVE - Only implicit wiring enabled
+DISABLED, - Implicit wiring disabled
+RECURSIVE_FALLBACK - All children nodes in the tree will inherit FALLBACK strategy
+RECURSIVE_EXCLUSIVE - All children nodes in the tree will inherit EXCLUSIVE strategy
+RECURSIVE_DISABLED - All children nodes in the tree will inherit DISABLED strategy
+-->
+<!ELEMENT implicit-parameter-strategy (#PCDATA)>
+
+<!--
+Event wirings. Can be defined only for a page
+-->
+<!ELEMENT wirings (event-wiring*)>
+
+<!--
+Shared render parameter bindings. Can be defined only for a page
+-->
+<!ELEMENT bindings (parameter-alias*, parameter-binding*)>
+
+<!--
+This element defines explicit event wiring
+-->
+<!ELEMENT event-wiring (name, sources, destinations)>
+
+<!--
+List all windows that produce source events
+-->
+<!ELEMENT sources (window-coordination+)>
+
+<!--
+List all windows that consume destination events
+-->
+<!ELEMENT destinations (window-coordination+)>
+
+<!--
+Defines parameter. All parameters with a local part equal to given name will share
request value
+-->
+<!ELEMENT parameter-alias (#PCDATA)>
+
+<!--
+Shared parameter binding definition
+-->
+<!ELEMENT parameter-binding (name, window-coordination+)>
+
+<!--
+This element defines window for coordination. It can be either source or destination
window for event distribution or
+participate in parameter binding
+-->
+<!ELEMENT window-coordination (window-name, qname)>
+
+<!--
+QName identifying event or shared render parameter
+-->
+<!ELEMENT qname (#PCDATA)>
+
+