JBoss Portal SVN: r11572 - branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-24 06:37:59 -0400 (Thu, 24 Jul 2008)
New Revision: 11572
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
Log:
Don't let the admin delete a default page
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2008-07-24 10:18:06 UTC (rev 11571)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2008-07-24 10:37:59 UTC (rev 11572)
@@ -110,12 +110,15 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.DISPLAY_NAMES}
- </h:commandLink> |<h:commandLink action="confirm" styleClass="actionDelete"
+ </h:commandLink>
+ <h:panelGroup
+ rendered="#{not object.default}"> | <h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.COMMON_DELETE}
</h:commandLink>
- <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
+ </h:panelGroup>
+ <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
action="#{portalobjectmgr.makeObjectDefault}">
<f:param name="id" value="#{object.id}"/>
#{bundle.MAKE_DEFAULT}
17 years, 9 months
JBoss Portal SVN: r11571 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/controller/portlet and 6 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-07-24 06:18:06 -0400 (Thu, 24 Jul 2008)
New Revision: 11571
Removed:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationConfigurator.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationManager.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.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/test/core/model/portal/coordination/CoordinationServiceTestCase.java
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:
Another Coordination refactoring - hopefully the very last one for now....
- Remove CoordinationStrategy, add implicit-mode and update configs and logic
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationConfigurator.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationConfigurator.java 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationConfigurator.java 2008-07-24 10:18:06 UTC (rev 11571)
@@ -58,21 +58,36 @@
void removeEventWiring(EventWiringInfo eventWiringInfo) throws IllegalCoordinationException;
/**
- * Sets implicit wiring strategy for a given page
+ * Set event wiring implicit mode for a given page container. This will be inherited recursively
+ * by all children page containers
*
* @param pageContainer
- * @param strategy
+ * @param mode
* @throws IllegalCoordinationException
*/
- void setEventWiringStrategy(PageContainer pageContainer, CoordinationStrategy strategy) throws IllegalCoordinationException;
+ void setEventWiringImplicitMode(PageContainer pageContainer, boolean mode) throws IllegalCoordinationException;
+
+
/**
- * @param page
- * @return implicit wiring strategy for a given page. Can return null if no strategy is set
+ * Checks if implicit event wiring is enabled for a given page container. May return null if no implicit mode is not
+ * set for this portal object
+ *
+ * @param pageContainer
+ * @return
*/
- CoordinationStrategy getEventWiringStrategy(PageContainer page) throws IllegalCoordinationException;
+ Boolean isEventWiringImplicitModeEnabled(PageContainer pageContainer);
/**
+ * Removes event wiring implicit mode entry for a given page container
+ *
+ * @param pageContainer
+ * @throws IllegalCoordinationException
+ */
+ void removeEventWiringImplicitMode(PageContainer pageContainer) throws IllegalCoordinationException;
+
+
+ /**
* @param page
* @param eventQName
* @return all wirings defined for a given qname
@@ -116,21 +131,35 @@
/**
- * Set implicit strategy for a given page container
+ * Set parameter binding implicit mode for a given page container. This will be inherited recursively by
+ * all children page containers
*
* @param pageContainer
- * @param coordinationStrategy
+ * @param mode
* @throws IllegalCoordinationException
*/
- void setParameterBindingStrategy(PageContainer pageContainer, CoordinationStrategy coordinationStrategy) throws IllegalCoordinationException;
+ void setParameterBindingImplicitMode(PageContainer pageContainer, boolean mode) throws IllegalCoordinationException;
+
/**
+ * Removes parameter binding implicit mode entry for a given page container
+ *
* @param pageContainer
- * @return implicit strategy for a given page container. Can return null if no strategy is defined
+ * @throws IllegalCoordinationException
*/
- CoordinationStrategy getParameterBindingStrategy(PageContainer pageContainer) throws IllegalCoordinationException;
+ void removeParameterBindingImplicitMode(PageContainer pageContainer) throws IllegalCoordinationException;
+ /**
+ * Checks if implicit binding is enabled for a given page container. May return null if implicit mode is not set for
+ * this portal object
+ *
+ * @param pageContainer
+ * @return
+ */
+ Boolean isParameterBindingImplicitModeEnabled(PageContainer pageContainer);
+
+
/**
* Set alias binding for a given page. If alias with given name already exists it will be overwritten
*
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationManager.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationManager.java 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationManager.java 2008-07-24 10:18:06 UTC (rev 11571)
@@ -24,6 +24,7 @@
import org.jboss.portal.core.model.portal.PageContainer;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
import org.jboss.portal.portlet.controller.event.PortletWindowEvent;
@@ -51,24 +52,24 @@
/**
- * Resolves implicit wiring strategy. If there is no strategy defined for this page container method will browse
- * parent object to resolve inherited recursive strategies. If no strategy is set this method will return default one
+ * Resolves wiring implicit mode. If there is no strategy defined for this page container method will browse
+ * parent object to resolve inherited modes. If no mode is set this method will return default one
*
* @param page
* @return
*/
- CoordinationStrategy resolveEventWiringStrategy(PageContainer page);
+ Boolean resolveEventWiringImplicitModeEnabled(PageContainer page);
/**
- * Resolves implicit strategy. If there is no strategy defined for this page container method will browse
- * parent object to resolve inherited recursive strategies. If no strategy is set this method will return default one
+ * Resolves binding implicit mode. If there is no mode defined for this page container method will browse
+ * parent object to resolve inherited modes. If no mode is set this method will return default one
*
* @param pageContainer the page container
- * @return the coordination strategy
+ * @return
*/
- CoordinationStrategy resolveBindingStrategy(PageContainer pageContainer);
+ Boolean resolveParameterBindingImplicitModeEnabled(PageContainer pageContainer);
- /**
+ /**
* Returns the list of bindings for a given window and a given name. The collection is an aggregation
* of window bindings and alias bindings.
*
Deleted: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java 2008-07-24 10:18:06 UTC (rev 11571)
@@ -1,86 +0,0 @@
-/*
-* 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.controller.coordination;
-
-/**
- * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version : 0.1 $
- */
-public enum CoordinationStrategy
-{
-
- // Explicit wiring takes precedence and if none exist for a given event it will be processed with implicit wiring
- FALLBACK,
-
- // Only implicit wiring enabled
- IMPLICIT,
-
- // Implicit wiring disabled
- EXPLICIT,
-
- // All children nodes in the tree will inherit FALLBACK strategy
- RECURSIVE_FALLBACK,
-
- // All children nodes in the tree will inherit IMPLICIT strategy
- RECURSIVE_IMPLICIT,
-
- // All children nodes in the tree will inherit EXPLICIT strategy
- RECURSIVE_EXPLICIT;
-
- public static CoordinationStrategy decodeStrategy(String value)
- {
- if (value == null)
- {
- return null;
- }
- else if (value.equals(EXPLICIT.name()))
- {
- return CoordinationStrategy.EXPLICIT;
- }
- else if (value.equals(IMPLICIT.name()))
- {
- return CoordinationStrategy.IMPLICIT;
- }
- else if (value.equals(FALLBACK.name()))
- {
- return CoordinationStrategy.FALLBACK;
- }
- else if (value.equals(RECURSIVE_EXPLICIT.name()))
- {
- return CoordinationStrategy.RECURSIVE_EXPLICIT;
- }
- else if (value.equals(RECURSIVE_IMPLICIT.name()))
- {
- return CoordinationStrategy.RECURSIVE_IMPLICIT;
- }
- else if (value.equals(RECURSIVE_FALLBACK.name()))
- {
- return CoordinationStrategy.RECURSIVE_FALLBACK;
- }
-
- // Strategy unknown
- return null;
- }
-
-}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-07-24 10:18:06 UTC (rev 11571)
@@ -34,7 +34,6 @@
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.controller.coordination.CoordinationManager;
-import org.jboss.portal.core.controller.coordination.CoordinationStrategy;
import javax.xml.namespace.QName;
import javax.xml.XMLConstants;
@@ -75,7 +74,7 @@
private Map<String, HashMap<QName, String[]>> windowPublicNavigationalStateUpdate;
/** . */
- private final CoordinationStrategy coordinationStrategy;
+ private final boolean implicitMode;
public ControllerPageNavigationalState(
NavigationalStateContext navigationalStateContext,
@@ -88,7 +87,7 @@
this.updates = null;
this.pageUpdates = null;
this.windowPublicNavigationalStateUpdate = null;
- this.coordinationStrategy = getCoordinationManager().resolveBindingStrategy(controllerContext.getPage());
+ this.implicitMode = getCoordinationManager().resolveParameterBindingImplicitModeEnabled(controllerContext.getPage());
}
@@ -102,7 +101,7 @@
this.updates = that.updates != null ? new HashMap<String, org.jboss.portal.core.model.portal.navstate.WindowNavigationalState>(that.updates) : null;
this.pageUpdates = that.pageUpdates != null ? new HashMap<QName, String[]>(that.pageUpdates) : null;
this.windowPublicNavigationalStateUpdate = that.windowPublicNavigationalStateUpdate != null ? new HashMap<String, HashMap<QName, String[]>>(that.windowPublicNavigationalStateUpdate) : null;
- this.coordinationStrategy = getCoordinationManager().resolveBindingStrategy(controllerContext.getPage());
+ this.implicitMode = getCoordinationManager().resolveParameterBindingImplicitModeEnabled(controllerContext.getPage());
}
/**
@@ -283,19 +282,10 @@
throw new IllegalStateException();
}
- CoordinationStrategy strategy = getCoordinationManager().resolveBindingStrategy(getWindow(windowName).getPage());
-
//
if (windowPublicNavigationalStateUpdate == null)
{
- if (strategy.equals(CoordinationStrategy.EXPLICIT))
- {
- initiateWindowPublicNavigationalStateUpdate(windowName);
- }
- else
- {
- windowPublicNavigationalStateUpdate = new HashMap<String, HashMap<QName, String[]>>();
- }
+ initiateWindowPublicNavigationalStateUpdate(windowName);
}
if (windowPublicNavigationalStateUpdate.get(windowName) == null)
@@ -351,10 +341,8 @@
CoordinationManager manager = getCoordinationManager();
- CoordinationStrategy strategy = manager.resolveBindingStrategy(getWindow(windowName).getPage());
-
// For explicit initiate windowPublicNavigationStateUpdate with previous state
- if (strategy.equals(CoordinationStrategy.EXPLICIT) && windowPublicNavigationalStateUpdate == null)
+ if (windowPublicNavigationalStateUpdate == null)
{
initiateWindowPublicNavigationalStateUpdate(windowName);
}
@@ -369,9 +357,8 @@
Collection<String> bindings = manager.getBindingNames(getWindow(windowName), parameterInfo.getName());
// Don't store the URI as a page scoped public render parameter but window scoped
- // Also for explicit strategy and parameter with no bindings
- if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(parameterInfo.getName())
- || (strategy.equals(CoordinationStrategy.EXPLICIT) && bindings.size() == 0))
+ // Also for explicit and parameter with no bindings
+ if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(parameterInfo.getName()) || (!implicitMode && bindings.size() == 0))
{
String[] parameterValue = getWindowPublicNavigationalState(windowName, parameterInfo.getName());
@@ -403,20 +390,12 @@
String parameterId = parameterInfo.getId();
//
- if (coordinationStrategy == CoordinationStrategy.EXPLICIT ||
- (coordinationStrategy == CoordinationStrategy.FALLBACK && explicitParameterValue != null))
+ if (explicitParameterValue != null)
{
// We clone the value here so we keep the internal state not potentially changed
- if (explicitParameterValue != null)
- {
- publicNavigationalState.put(parameterId, explicitParameterValue.clone());
- }
- else
- {
- //If it is EXPLICIT strategy check if this is not window publishing the param
- }
+ publicNavigationalState.put(parameterId, explicitParameterValue.clone());
}
- else if (parameterValue != null)
+ else if (implicitMode && parameterValue != null)
{
// We clone the value here so we keep the internal state not potentially changed
publicNavigationalState.put(parameterId, parameterValue.clone());
@@ -488,15 +467,12 @@
String[] value = entry.getValue();
//
- CoordinationStrategy strategy = manager.resolveBindingStrategy(window.getPage());
-
- //
Collection<String> bindings = manager.getBindingNames(window, name);
// Don't store the URI as a page scoped public render parameter but window scoped
- // Also for explicit strategy and parameter with no bindings
+ // Also for explicit and parameter with no bindings
if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(name)
- || (strategy.equals(CoordinationStrategy.EXPLICIT) && bindings.size() == 0))
+ || (!implicitMode && bindings.size() == 0))
{
if (value.length > 0)
{
@@ -509,7 +485,7 @@
}
else
{
- if (coordinationStrategy != CoordinationStrategy.EXPLICIT)
+ if (implicitMode)
{
if (value.length > 0)
{
@@ -648,9 +624,7 @@
{
Page page = getWindow(windowName).getPage();
- CoordinationStrategy strategy = getCoordinationManager().resolveBindingStrategy(getWindow(windowName).getPage());
-
-
+
windowPublicNavigationalStateUpdate = new HashMap<String, HashMap<QName, String[]>>();
// Initial state for all windows on this page
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 10:18:06 UTC (rev 11571)
@@ -25,7 +25,6 @@
import org.jboss.portal.core.controller.coordination.CoordinationManager;
import org.jboss.portal.core.controller.coordination.IllegalCoordinationException;
import org.jboss.portal.core.controller.coordination.EventWiringInfo;
-import org.jboss.portal.core.controller.coordination.CoordinationStrategy;
import org.jboss.portal.core.controller.coordination.CoordinationConfigurator;
import org.jboss.portal.core.controller.coordination.EventConverter;
import org.jboss.portal.core.controller.coordination.WindowBindingInfo;
@@ -84,25 +83,13 @@
public static final String PREFIX_PARAMETER_ALIAS_NAME = PREFIX_PARAMETER_ALIAS + ".name";
- public static final String PREFIX_EVENT_IMPLICIT_STRATEGY = PREFIX_EVENT + ".coordination_strategy";
+ public static final String PREFIX_EVENT_IMPLICIT_MODE = PREFIX_EVENT + ".implicit_mode";
- public static final String PREFIX_PARAMETER_IMPLICIT_STRATEGY = PREFIX_PARAMETER + ".coordination_strategy";
+ public static final String PREFIX_PARAMETER_IMPLICIT_MODE = PREFIX_PARAMETER + ".implicit_mode";
- public static final String STRATEGY_FALLBACK = CoordinationStrategy.FALLBACK.name();
+ public static final Boolean DEFAULT_IMPLICIT_MODE = true;
- public static final String STRATEGY_EXCLUSIVE = CoordinationStrategy.IMPLICIT.name();
- public static final String STRATEGY_DISABLED = CoordinationStrategy.EXPLICIT.name();
-
- public static final String STRATEGY_RECURSIVE_DISABLED = CoordinationStrategy.RECURSIVE_EXPLICIT.name();
-
- public static final String STRATEGY_RECURSIVE_EXCLUSIVE = CoordinationStrategy.RECURSIVE_IMPLICIT.name();
-
- public static final String STRATEGY_RECURSIVE_FALLBACK = CoordinationStrategy.RECURSIVE_FALLBACK.name();
-
- public static final CoordinationStrategy DEFAULT_STRATEGY = CoordinationStrategy.FALLBACK;
-
-
protected EventConverter eventConverter = new SimpleEventConverter();
protected PortalObjectContainer portalObjectContainer;
@@ -135,27 +122,20 @@
Page page = context.getWindow(event.getWindowId()).getPage();
- CoordinationStrategy strategy = resolveEventWiringStrategy(page);
+ boolean implicitMode = resolveEventWiringImplicitModeEnabled(page);
Map<Window, PortletWindowEvent> windows = new HashMap<Window, PortletWindowEvent>();
- // Only implicit wirings
-
- if (strategy.equals(CoordinationStrategy.IMPLICIT))
- {
- windows = getEventWindowsImplicit(page, event, context);
- }
-
// Only explicit wirings
- else if(strategy.equals(CoordinationStrategy.EXPLICIT))
+ if(!implicitMode)
{
windows = getEventWindowsExplicit(page, event, context);
}
// If no explicit wirings for this event fallback to implicit
- else if(strategy.equals(CoordinationStrategy.FALLBACK))
+ else
{
windows = getEventWindowsExplicit(page, event, context);
@@ -359,7 +339,7 @@
}
}
- public void setEventWiringStrategy(PageContainer pageContainer, CoordinationStrategy strategy) throws IllegalCoordinationException
+ public void setEventWiringImplicitMode(PageContainer pageContainer, boolean mode) throws IllegalCoordinationException
{
if (pageContainer == null)
{
@@ -367,30 +347,37 @@
}
- setStrategy(pageContainer, strategy, PREFIX_EVENT_IMPLICIT_STRATEGY);
+ setImplicitMode(pageContainer, mode, PREFIX_EVENT_IMPLICIT_MODE);
+ }
+ public void removeEventWiringImplicitMode(PageContainer pageContainer) throws IllegalCoordinationException
+ {
+ if (pageContainer == null)
+ {
+ throw new IllegalArgumentException("pageContainer is null");
+ }
+
+ setImplicitMode(pageContainer, null, PREFIX_EVENT_IMPLICIT_MODE);
}
- public CoordinationStrategy getEventWiringStrategy(PageContainer page) throws IllegalCoordinationException
+ public Boolean isEventWiringImplicitModeEnabled(PageContainer pageContainer)
{
- if (page == null)
+ if (pageContainer == null)
{
throw new IllegalArgumentException("page is null");
}
- return decodeStrategy(page, PREFIX_EVENT_IMPLICIT_STRATEGY);
-
+ return decodeImplicitMode(pageContainer, PREFIX_EVENT_IMPLICIT_MODE);
}
- public CoordinationStrategy resolveEventWiringStrategy(PageContainer page)
+ public Boolean resolveEventWiringImplicitModeEnabled(PageContainer page)
{
-
if (page == null)
{
throw new IllegalArgumentException("page is null");
}
- return resolveStrategy(page, PREFIX_EVENT_IMPLICIT_STRATEGY);
+ return resolveImplicitMode(page, PREFIX_EVENT_IMPLICIT_MODE);
}
public Collection<EventWiringInfo> getEventWirings(Page page, QName eventQName)
@@ -584,31 +571,29 @@
}
}
- public void setParameterBindingStrategy(PageContainer pageContainer, CoordinationStrategy strategy) throws IllegalCoordinationException
+ public Boolean isParameterBindingImplicitModeEnabled(PageContainer pageContainer)
{
if (pageContainer == null)
{
- throw new IllegalArgumentException("pageContainer is null");
+ throw new IllegalArgumentException("page is null");
}
//
- setStrategy(pageContainer, strategy, PREFIX_PARAMETER_IMPLICIT_STRATEGY);
+ return decodeImplicitMode(pageContainer, PREFIX_PARAMETER_IMPLICIT_MODE);
}
- public CoordinationStrategy getParameterBindingStrategy(PageContainer pageContainer) throws IllegalCoordinationException
+ public void setParameterBindingImplicitMode(PageContainer pageContainer, boolean mode) throws IllegalCoordinationException
{
-
if (pageContainer == null)
{
- throw new IllegalArgumentException("page is null");
+ throw new IllegalArgumentException("pageContainer is null");
}
//
- return decodeStrategy(pageContainer, PREFIX_PARAMETER_IMPLICIT_STRATEGY);
-
+ setImplicitMode(pageContainer, mode, PREFIX_PARAMETER_IMPLICIT_MODE);
}
- public CoordinationStrategy resolveBindingStrategy(PageContainer pageContainer)
+ public Boolean resolveParameterBindingImplicitModeEnabled(PageContainer pageContainer)
{
if (pageContainer == null)
{
@@ -616,10 +601,19 @@
}
//
- return resolveStrategy(pageContainer, PREFIX_PARAMETER_IMPLICIT_STRATEGY);
+ return resolveImplicitMode(pageContainer, PREFIX_PARAMETER_IMPLICIT_MODE);
}
+ public void removeParameterBindingImplicitMode(PageContainer pageContainer) throws IllegalCoordinationException
+ {
+ if (pageContainer == null)
+ {
+ throw new IllegalArgumentException("pageContainer is null");
+ }
+ setImplicitMode(pageContainer, null, PREFIX_PARAMETER_IMPLICIT_MODE);
+ }
+
public void setAliasBinding(Page page, String aliasName, Set<QName> qnames) throws IllegalCoordinationException
{
if (page == null)
@@ -843,110 +837,75 @@
// HELPER METHODS
- private void setStrategy(PageContainer pageContainer, CoordinationStrategy strategy, String prefix)
+ private void setImplicitMode(PageContainer pageContainer, Boolean mode, String prefix)
{
- if (strategy == null)
+ if (mode == null)
{
pageContainer.setDeclaredProperty(prefix, null);
}
- else if (strategy.equals(CoordinationStrategy.EXPLICIT))
+ else
{
- pageContainer.setDeclaredProperty(prefix, STRATEGY_DISABLED);
+ pageContainer.setDeclaredProperty(prefix, mode.toString());
}
- else if (strategy.equals(CoordinationStrategy.IMPLICIT))
- {
- pageContainer.setDeclaredProperty(prefix, STRATEGY_EXCLUSIVE);
- }
- else if (strategy.equals(CoordinationStrategy.FALLBACK))
- {
- pageContainer.setDeclaredProperty(prefix,STRATEGY_FALLBACK);
- }
- else if (strategy.equals(CoordinationStrategy.RECURSIVE_EXPLICIT))
- {
- pageContainer.setDeclaredProperty(prefix,STRATEGY_RECURSIVE_DISABLED);
- }
- else if (strategy.equals(CoordinationStrategy.RECURSIVE_IMPLICIT))
- {
- pageContainer.setDeclaredProperty(prefix,STRATEGY_RECURSIVE_EXCLUSIVE);
- }
- else if (strategy.equals(CoordinationStrategy.RECURSIVE_FALLBACK))
- {
- pageContainer.setDeclaredProperty(prefix,STRATEGY_RECURSIVE_FALLBACK);
- }
+
}
- private CoordinationStrategy decodeStrategy(PageContainer pageContainer, String prefix)
+ private Boolean decodeImplicitMode(PageContainer pageContainer, String prefix)
{
String value = pageContainer.getDeclaredProperty(prefix);
- return CoordinationStrategy.decodeStrategy(value);
+ return value != null ? Boolean.valueOf(value) : null;
}
- private CoordinationStrategy resolveStrategy(PageContainer pageContainer, String prefix)
+ private Boolean resolveImplicitMode(PageContainer pageContainer, String prefix)
{
String value = pageContainer.getDeclaredProperty(prefix);
- CoordinationStrategy strategy = null;
+ Boolean mode = null;
- // Try to obtain recursive strategy from parents
+ // Try to obtain recursive implicit mode from parents
if (value == null)
{
- strategy = resolveRecursiveStrategy(pageContainer, prefix);
+ mode = resolveRecursiveImplicitMode(pageContainer, prefix);
}
else
{
- strategy = CoordinationStrategy.decodeStrategy(value);
+ mode = Boolean.valueOf(value);
}
- if (strategy != null)
+ if (mode != null)
{
- if (strategy.equals(CoordinationStrategy.RECURSIVE_EXPLICIT))
- {
- return CoordinationStrategy.EXPLICIT;
- }
- else if (strategy.equals(CoordinationStrategy.RECURSIVE_IMPLICIT))
- {
- return CoordinationStrategy.IMPLICIT;
- }
- else if (strategy.equals(CoordinationStrategy.RECURSIVE_FALLBACK))
- {
- return CoordinationStrategy.FALLBACK;
- }
-
- return strategy;
+ return mode;
}
else
{
- return DEFAULT_STRATEGY;
+ return DEFAULT_IMPLICIT_MODE;
}
}
- // Search for the RECURSIVE_ type of strategy
- private CoordinationStrategy resolveRecursiveStrategy(PortalObject po, String prefix)
+ // Search for the mode in upper object hierarchy
+ private Boolean resolveRecursiveImplicitMode(PortalObject po, String prefix)
{
String value = po.getDeclaredProperty(prefix);
- CoordinationStrategy strategy = null;
+ Boolean mode = null;
if (value != null)
{
- strategy = CoordinationStrategy.decodeStrategy(value);
+ mode = Boolean.valueOf(value);
}
- if (strategy != null &&
- (strategy.equals(CoordinationStrategy.RECURSIVE_EXPLICIT) ||
- strategy.equals(CoordinationStrategy.RECURSIVE_IMPLICIT) ||
- strategy.equals(CoordinationStrategy.RECURSIVE_FALLBACK)))
+ if (mode != null)
{
- return strategy;
+ return mode;
}
else if (!(po instanceof Portal))
{
- return resolveRecursiveStrategy(po.getParent(), prefix);
+ return resolveRecursiveImplicitMode(po.getParent(), prefix);
}
return null;
@@ -954,22 +913,7 @@
private QName decodeQName(String fullString)
{
- if (fullString.startsWith("{"))
- {
- String[] parts = fullString.split("}");
-
- if (parts.length == 2)
- {
- return new QName(parts[0].substring(1), parts[1]);
- }
- }
- else
- {
- return new QName(fullString);
- }
-
- return null;
-
+ return QName.valueOf(fullString);
}
Modified: 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 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationMetaData.java 2008-07-24 10:18:06 UTC (rev 11571)
@@ -22,7 +22,6 @@
package org.jboss.portal.core.model.portal.metadata.coordination;
-import org.jboss.portal.core.controller.coordination.CoordinationStrategy;
import org.jboss.portal.core.controller.coordination.IllegalCoordinationException;
import org.jboss.portal.core.model.portal.metadata.BuildContext;
import org.jboss.portal.core.model.portal.PortalObject;
@@ -48,9 +47,9 @@
public class CoordinationMetaData
{
- private CoordinationStrategy eventStrategy;
+ private String implicitModeEvent;
- private CoordinationStrategy parameterStrategy;
+ private String implicitModeParameter;
List<CoordinationWindowBindingMetaData> windowBindings = new LinkedList<CoordinationWindowBindingMetaData>();
@@ -63,33 +62,40 @@
CoordinationMetaData coordinationMetaData = new CoordinationMetaData();
- Element eventStrategy = XMLTools.getUniqueChild(coordinationElt, "event-strategy", false);
+ Element wiringsElement = XMLTools.getUniqueChild(coordinationElt, "wirings", false);
- if (eventStrategy != null)
+ if (wiringsElement != null)
{
- coordinationMetaData.setEventStrategy(CoordinationStrategy.decodeStrategy(XMLTools.asString(eventStrategy)));
- }
+ // Implicit mode
+ Element wiringImplicitModeElt = XMLTools.getUniqueChild(wiringsElement, "implicit-mode", false);
- Element parameterStrategy = XMLTools.getUniqueChild(coordinationElt, "parameter-strategy", false);
+ if (wiringImplicitModeElt != null)
+ {
+ coordinationMetaData.setImplicitModeEvent(XMLTools.asString(wiringImplicitModeElt));
+ }
- if (parameterStrategy != null)
- {
- coordinationMetaData.setParameterStrategy(CoordinationStrategy.decodeStrategy(XMLTools.asString(parameterStrategy)));
- }
+ // The rest
- Element wiringsElement = XMLTools.getUniqueChild(coordinationElt, "wirings", false);
-
- if (wiringsElement != null)
- {
coordinationMetaData.setWirings(buildWiringsMetaData(wiringsElement));
}
+
+
Element bindingsElement = XMLTools.getUniqueChild(coordinationElt, "bindings", false);
if (bindingsElement != null)
{
+ // Implicit mode
+
+ Element parameterImplicitModeElt = XMLTools.getUniqueChild(bindingsElement, "implicit-mode", false);
+
+ if (parameterImplicitModeElt != null)
+ {
+ coordinationMetaData.setImplicitModeParameter(XMLTools.asString(parameterImplicitModeElt));
+ }
+
// Param bindings
Iterator paramBindingsIter = XMLTools.getChildrenIterator(bindingsElement, "parameter-binding");
@@ -131,14 +137,14 @@
public void configure(BuildContext buildContext, PortalObject object) throws IllegalCoordinationException
{
- if (getEventStrategy() != null)
+ if (getImplicitModeEvent() != null)
{
- buildContext.getCoordinationConfigurator().setEventWiringStrategy((PageContainer)object, getEventStrategy());
+ buildContext.getCoordinationConfigurator().setEventWiringImplicitMode((PageContainer)object, Boolean.valueOf(getImplicitModeEvent()));
}
- if (getParameterStrategy() != null)
+ if (getImplicitModeParameter() != null)
{
- buildContext.getCoordinationConfigurator().setParameterBindingStrategy((PageContainer)object, getParameterStrategy());
+ buildContext.getCoordinationConfigurator().setParameterBindingImplicitMode((PageContainer)object, Boolean.valueOf(getImplicitModeParameter()));
}
if (object instanceof Page)
@@ -199,26 +205,27 @@
}
}
- public CoordinationStrategy getEventStrategy()
+ public String getImplicitModeEvent()
{
- return eventStrategy;
+ return implicitModeEvent;
}
- public void setEventStrategy(CoordinationStrategy eventStrategy)
+ public void setImplicitModeEvent(String implicitModeEvent)
{
- this.eventStrategy = eventStrategy;
+ this.implicitModeEvent = implicitModeEvent;
}
- public CoordinationStrategy getParameterStrategy()
+ public String getImplicitModeParameter()
{
- return parameterStrategy;
+ return implicitModeParameter;
}
- public void setParameterStrategy(CoordinationStrategy parameterStrategy)
+ public void setImplicitModeParameter(String implicitModeParameter)
{
- this.parameterStrategy = parameterStrategy;
+ this.implicitModeParameter = implicitModeParameter;
}
+
public List<CoordinationEventWiringMetaData> getWirings()
{
return wirings;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-24 10:18:06 UTC (rev 11571)
@@ -22,13 +22,13 @@
package org.jboss.portal.test.core.model.portal.coordination;
+import static java.lang.Boolean.*;
import org.jboss.portal.test.core.model.portal.AbstractPortalObjectContainerTestCase;
import org.jboss.portal.common.junit.TransactionAssert;
import org.jboss.portal.core.model.portal.Context;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.core.controller.coordination.CoordinationStrategy;
import org.jboss.portal.core.controller.coordination.EventWiringInfo;
import org.jboss.portal.core.controller.coordination.WindowBindingInfo;
import org.jboss.portal.core.controller.coordination.AliasBindingInfo;
@@ -54,6 +54,7 @@
public class CoordinationServiceTestCase extends AbstractPortalObjectContainerTestCase
{
+
static
{
Appender appender = new ConsoleAppender(new SimpleLayout());
@@ -103,65 +104,94 @@
TransactionAssert.commitTransaction();
}
- public void testImplicitStrategy() throws Exception
+ public void testImplicitMode() throws Exception
{
TransactionAssert.beginTransaction();
Portal portal_1 = container.getContext("").getPortal("Portal_1");
Page page_1 = portal_1.getPage("Page_1");
+ Page page_1_1 = page_1.getPage("Page_1");
- assertNull(cos.getEventWiringStrategy(page_1));
- assertNull(cos.getParameterBindingStrategy(page_1));
- cos.setEventWiringStrategy(page_1, CoordinationStrategy.IMPLICIT);
+ assertNull(cos.isEventWiringImplicitModeEnabled(portal_1));
+ assertNull(cos.isEventWiringImplicitModeEnabled(page_1));
+ assertNull(cos.isEventWiringImplicitModeEnabled(page_1_1));
- assertEquals(CoordinationStrategy.IMPLICIT, cos.getEventWiringStrategy(page_1));
- assertNull(cos.getParameterBindingStrategy(page_1));
+ assertNull(cos.isParameterBindingImplicitModeEnabled(portal_1));
+ assertNull(cos.isParameterBindingImplicitModeEnabled(page_1));
+ assertNull(cos.isParameterBindingImplicitModeEnabled(page_1_1));
- cos.setParameterBindingStrategy(page_1, CoordinationStrategy.EXPLICIT);
+ // Check hardcoded default
- assertEquals(CoordinationStrategy.IMPLICIT, cos.getEventWiringStrategy(page_1));
- assertEquals(CoordinationStrategy.EXPLICIT, cos.getParameterBindingStrategy(page_1));
+ assertEquals(CoordinationService.DEFAULT_IMPLICIT_MODE, cos.resolveEventWiringImplicitModeEnabled(portal_1));
+ assertEquals(CoordinationService.DEFAULT_IMPLICIT_MODE, cos.resolveEventWiringImplicitModeEnabled(page_1));
+ assertEquals(CoordinationService.DEFAULT_IMPLICIT_MODE, cos.resolveEventWiringImplicitModeEnabled(page_1_1));
- cos.setEventWiringStrategy(page_1, null);
- cos.setParameterBindingStrategy(page_1, null);
- cos.setEventWiringStrategy(portal_1, CoordinationStrategy.RECURSIVE_IMPLICIT);
- cos.setParameterBindingStrategy(portal_1, CoordinationStrategy.RECURSIVE_FALLBACK);
+ assertEquals(CoordinationService.DEFAULT_IMPLICIT_MODE, cos.resolveParameterBindingImplicitModeEnabled(portal_1));
+ assertEquals(CoordinationService.DEFAULT_IMPLICIT_MODE, cos.resolveParameterBindingImplicitModeEnabled(page_1));
+ assertEquals(CoordinationService.DEFAULT_IMPLICIT_MODE, cos.resolveParameterBindingImplicitModeEnabled(page_1_1));
- assertEquals(null, cos.getEventWiringStrategy(page_1));
- assertEquals(null, cos.getParameterBindingStrategy(page_1));
- assertEquals(CoordinationStrategy.RECURSIVE_IMPLICIT, cos.getEventWiringStrategy(portal_1));
- assertEquals(CoordinationStrategy.RECURSIVE_FALLBACK, cos.getParameterBindingStrategy(portal_1));
+ // Check set / remove
- // Resolve
+ cos.setEventWiringImplicitMode(page_1, false);
- assertEquals(CoordinationStrategy.IMPLICIT, cos.resolveEventWiringStrategy(page_1));
- assertEquals(CoordinationStrategy.IMPLICIT, cos.resolveEventWiringStrategy(portal_1));
- assertEquals(CoordinationStrategy.FALLBACK, cos.resolveBindingStrategy(page_1));
- assertEquals(CoordinationStrategy.FALLBACK, cos.resolveBindingStrategy(portal_1));
+ assertEquals(FALSE, cos.isEventWiringImplicitModeEnabled(page_1));
- // Inheritance and overriding value in the middle of the tree
+ cos.setEventWiringImplicitMode(page_1, true);
- Page page_1_1 = page_1.getPage("Page_1");
+ assertEquals(TRUE, cos.isEventWiringImplicitModeEnabled(page_1));
- cos.setEventWiringStrategy(portal_1, CoordinationStrategy.RECURSIVE_IMPLICIT);
- cos.setEventWiringStrategy(page_1, CoordinationStrategy.EXPLICIT);
- cos.setEventWiringStrategy(page_1_1, null);
+ cos.removeEventWiringImplicitMode(page_1);
- cos.setParameterBindingStrategy(portal_1, CoordinationStrategy.RECURSIVE_FALLBACK);
- cos.setParameterBindingStrategy(page_1, CoordinationStrategy.IMPLICIT);
- cos.setParameterBindingStrategy(page_1_1, null);
+ assertNull(cos.isEventWiringImplicitModeEnabled(page_1));
- assertEquals(CoordinationStrategy.IMPLICIT, cos.resolveEventWiringStrategy(page_1_1));
- assertEquals(CoordinationStrategy.EXPLICIT, cos.resolveEventWiringStrategy(page_1));
- assertEquals(CoordinationStrategy.IMPLICIT, cos.resolveEventWiringStrategy(portal_1));
+ //
- assertEquals(CoordinationStrategy.FALLBACK, cos.resolveBindingStrategy(page_1_1));
- assertEquals(CoordinationStrategy.IMPLICIT, cos.resolveBindingStrategy(page_1));
- assertEquals(CoordinationStrategy.FALLBACK, cos.resolveBindingStrategy(portal_1));
+ cos.setParameterBindingImplicitMode(page_1, false);
+ assertEquals(FALSE, cos.isParameterBindingImplicitModeEnabled(page_1));
+ cos.setParameterBindingImplicitMode(page_1, true);
+
+ assertEquals(TRUE, cos.isParameterBindingImplicitModeEnabled(page_1));
+
+ cos.removeParameterBindingImplicitMode(page_1);
+
+ assertNull(cos.isParameterBindingImplicitModeEnabled(page_1));
+
+ // Check inheritance and resolve
+
+ cos.setEventWiringImplicitMode(portal_1, false);
+ cos.setEventWiringImplicitMode(page_1, true);
+
+ assertEquals(FALSE, cos.resolveEventWiringImplicitModeEnabled(portal_1));
+ assertEquals(TRUE, cos.resolveEventWiringImplicitModeEnabled(page_1));
+ assertEquals(TRUE, cos.resolveEventWiringImplicitModeEnabled(page_1_1));
+
+ cos.setEventWiringImplicitMode(portal_1, true);
+ cos.setEventWiringImplicitMode(page_1, false);
+
+ assertEquals(TRUE, cos.resolveEventWiringImplicitModeEnabled(portal_1));
+ assertEquals(FALSE, cos.resolveEventWiringImplicitModeEnabled(page_1));
+ assertEquals(FALSE, cos.resolveEventWiringImplicitModeEnabled(page_1_1));
+
+ //
+
+ cos.setParameterBindingImplicitMode(portal_1, false);
+ cos.setParameterBindingImplicitMode(page_1, true);
+
+ assertEquals(FALSE, cos.resolveParameterBindingImplicitModeEnabled(portal_1));
+ assertEquals(TRUE, cos.resolveParameterBindingImplicitModeEnabled(page_1));
+ assertEquals(TRUE, cos.resolveParameterBindingImplicitModeEnabled(page_1_1));
+
+ cos.setParameterBindingImplicitMode(portal_1, true);
+ cos.setParameterBindingImplicitMode(page_1, false);
+
+ assertEquals(TRUE, cos.resolveParameterBindingImplicitModeEnabled(portal_1));
+ assertEquals(FALSE, cos.resolveParameterBindingImplicitModeEnabled(page_1));
+ assertEquals(FALSE, cos.resolveParameterBindingImplicitModeEnabled(page_1_1));
+
TransactionAssert.commitTransaction();
}
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-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/data/default-object.xml 2008-07-24 10:18:06 UTC (rev 11571)
@@ -135,8 +135,12 @@
</policy-permission>
</security-constraint>
<coordination>
- <implicit-event-strategy>FALLBACK</implicit-event-strategy>
- <implicit-parameter-strategy>FALLBACK</implicit-parameter-strategy>
+ <wirings>
+ <implicit-mode>TRUE</implicit-mode>
+ </wirings>
+ <bindings>
+ <implicit-mode>TRUE</implicit-mode>
+ </bindings>
</coordination>
<page>
<page-name>default</page-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-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd 2008-07-24 10:18:06 UTC (rev 11571)
@@ -332,41 +332,23 @@
<!--
Configuration of explicit event and shared render parameter coordination
-->
-<!ELEMENT coordination (event-strategy?, parameter-strategy?, wirings?, bindings?)>
+<!ELEMENT coordination (wirings?, bindings?)>
-<!--
-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
+<!--Implicit mode. Allowed values are:
+- TRUE
+- FALSE
-->
-<!ELEMENT event-strategy (#PCDATA)>
+<!ELEMENT implicit-mode (#PCDATA)>
<!--
-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
-IMPLICIT - Only implicit wiring enabled
-EXPLICIT, - Implicit wiring disabled
-RECURSIVE_FALLBACK - All children nodes in the tree will inherit FALLBACK strategy
-RECURSIVE_IMPLICIT - All children nodes in the tree will inherit IMPLICIT strategy
-RECURSIVE_EXPLICIT - All children nodes in the tree will inherit EXPLICIT strategy
--->
-<!ELEMENT parameter-strategy (#PCDATA)>
-
-<!--
Event wirings. Can be defined only for a page
-->
-<!ELEMENT wirings (event-wiring*)>
+<!ELEMENT wirings (implicit-mode?, event-wiring*)>
<!--
Shared render parameter bindings. Can be defined only for a page
-->
-<!ELEMENT bindings (parameter-binding*, alias-binding*)>
+<!ELEMENT bindings (implicit-mode?, parameter-binding*, alias-binding*)>
<!--
This element defines explicit event wiring
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-24 05:57:23 UTC (rev 11570)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-24 10:18:06 UTC (rev 11571)
@@ -78,8 +78,8 @@
<coordination>
- <event-strategy>EXPLICIT</event-strategy>
<wirings>
+ <implicit-mode>FALSE</implicit-mode>
<event-wiring>
<name>wiringA</name>
<sources>
@@ -167,8 +167,8 @@
<coordination>
- <event-strategy>FALLBACK</event-strategy>
<wirings>
+ <implicit-mode>TRUE</implicit-mode>
<event-wiring>
<name>wiringA</name>
<sources>
@@ -237,46 +237,8 @@
<coordination>
- <event-strategy>IMPLICIT</event-strategy>
<wirings>
- <event-wiring>
- <name>wiringA</name>
- <sources>
- <window-coordination>
- <window-name>ShoppingCatalogPortletWindow1</window-name>
- <qname>{urn:jboss:portal:samples:event}CartEvent</qname>
- </window-coordination>
- </sources>
- <destinations>
- <window-coordination>
- <window-name>ShoppingCartPortletWindow2</window-name>
- <qname>{urn:jboss:portal:samples:event}CartEvent</qname>
- </window-coordination>
- <window-coordination>
- <window-name>ShoppingCartPortletWindow3</window-name>
- <qname>{urn:jboss:portal:samples:event}CartEvent</qname>
- </window-coordination>
- </destinations>
- </event-wiring>
- <event-wiring>
- <name>wiringB</name>
- <sources>
- <window-coordination>
- <window-name>ShoppingCatalogPortletWindow2</window-name>
- <qname>{urn:jboss:portal:samples:event}CartEvent</qname>
- </window-coordination>
- </sources>
- <destinations>
- <window-coordination>
- <window-name>ShoppingCartPortletWindow1</window-name>
- <qname>{urn:jboss:portal:samples:event}CartEvent</qname>
- </window-coordination>
- <window-coordination>
- <window-name>ShoppingCartPortletWindow4</window-name>
- <qname>{urn:jboss:portal:samples:event}CartEvent</qname>
- </window-coordination>
- </destinations>
- </event-wiring>
+ <implicit-mode>TRUE</implicit-mode>
</wirings>
</coordination>
@@ -324,8 +286,8 @@
</window>
<coordination>
- <parameter-strategy>EXPLICIT</parameter-strategy>
<bindings>
+ <implicit-mode>FALSE</implicit-mode>
<!-- Same foo qname among 3 windows -->
<parameter-binding>
@@ -411,8 +373,8 @@
</window>
<coordination>
- <parameter-strategy>EXPLICIT</parameter-strategy>
<bindings>
+ <implicit-mode>FALSE</implicit-mode>
<alias-binding>
<name>binding1</name>
@@ -476,8 +438,9 @@
</window>
<coordination>
- <parameter-strategy>EXPLICIT</parameter-strategy>
+
<bindings>
+ <implicit-mode>FALSE</implicit-mode>
<parameter-binding>
<name>binding1</name>
@@ -541,7 +504,9 @@
</window>
<coordination>
- <parameter-strategy>IMPLICIT</parameter-strategy>
+ <bindings>
+ <implicit-mode>TRUE</implicit-mode>
+ </bindings>
</coordination>
</page>
</page>
17 years, 9 months
JBoss Portal SVN: r11570 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-24 01:57:23 -0400 (Thu, 24 Jul 2008)
New Revision: 11570
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/WindowBindingInfo.java
Log:
add myself as author on those files
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java 2008-07-24 05:55:48 UTC (rev 11569)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java 2008-07-24 05:57:23 UTC (rev 11570)
@@ -27,6 +27,7 @@
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version : 0.1 $
*/
public interface AliasBindingInfo extends ParameterBindingInfo
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java 2008-07-24 05:55:48 UTC (rev 11569)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/CoordinationStrategy.java 2008-07-24 05:57:23 UTC (rev 11570)
@@ -24,8 +24,9 @@
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
-* @version : 0.1 $
-*/
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version : 0.1 $
+ */
public enum CoordinationStrategy
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java 2008-07-24 05:55:48 UTC (rev 11569)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java 2008-07-24 05:57:23 UTC (rev 11570)
@@ -29,6 +29,7 @@
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version : 0.1 $
*/
public interface ParameterBindingInfo
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/WindowBindingInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/WindowBindingInfo.java 2008-07-24 05:55:48 UTC (rev 11569)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/WindowBindingInfo.java 2008-07-24 05:57:23 UTC (rev 11570)
@@ -29,6 +29,7 @@
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version : 0.1 $
*/
public interface WindowBindingInfo extends ParameterBindingInfo
17 years, 9 months
JBoss Portal SVN: r11569 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal: core/impl/coordination and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-24 01:55:48 -0400 (Thu, 24 Jul 2008)
New Revision: 11569
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
Log:
better naming: a qname is the type of a name and it should not affect the semantic of its named usage as a "name"
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java 2008-07-24 05:54:23 UTC (rev 11568)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java 2008-07-24 05:55:48 UTC (rev 11569)
@@ -31,5 +31,5 @@
*/
public interface AliasBindingInfo extends ParameterBindingInfo
{
- Set<QName> getQNames();
+ Set<QName> getNames();
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 05:54:23 UTC (rev 11568)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 05:55:48 UTC (rev 11569)
@@ -189,7 +189,7 @@
{
for (AliasBindingInfo info : getAliasBindings(window.getPage()))
{
- if (info.getQNames().contains(name))
+ if (info.getNames().contains(name))
{
names.add(info.getName());
}
@@ -1073,7 +1073,7 @@
return name;
}
- public Set<QName> getQNames()
+ public Set<QName> getNames()
{
return immutableNames;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-24 05:54:23 UTC (rev 11568)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-24 05:55:48 UTC (rev 11569)
@@ -30,7 +30,6 @@
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.controller.coordination.CoordinationStrategy;
import org.jboss.portal.core.controller.coordination.EventWiringInfo;
-import org.jboss.portal.core.controller.coordination.ParameterBindingInfo;
import org.jboss.portal.core.controller.coordination.WindowBindingInfo;
import org.jboss.portal.core.controller.coordination.AliasBindingInfo;
import org.jboss.portal.core.model.content.ContentType;
@@ -326,10 +325,10 @@
AliasBindingInfo info = bindings1.iterator().next();
assertTrue(info.getName().equals("alias1"));
- assertTrue(info.getQNames().size() == 3);
- assertTrue(info.getQNames().contains(qname1));
- assertTrue(info.getQNames().contains(qname2));
- assertTrue(info.getQNames().contains(qname3));
+ assertTrue(info.getNames().size() == 3);
+ assertTrue(info.getNames().contains(qname1));
+ assertTrue(info.getNames().contains(qname2));
+ assertTrue(info.getNames().contains(qname3));
cos.removeAliasBinding(info);
assertTrue(cos.getAliasBindings(page1).size() == 0);
@@ -359,16 +358,16 @@
assertNotNull(info3);
assertTrue(info2.getName().equals("alias2"));
- assertTrue(info2.getQNames().size() == 3);
- assertTrue(info2.getQNames().contains(qname4));
- assertTrue(info2.getQNames().contains(qname5));
- assertTrue(info2.getQNames().contains(qname6));
+ assertTrue(info2.getNames().size() == 3);
+ assertTrue(info2.getNames().contains(qname4));
+ assertTrue(info2.getNames().contains(qname5));
+ assertTrue(info2.getNames().contains(qname6));
assertTrue(info3.getName().equals("alias3"));
- assertTrue(info3.getQNames().size() == 3);
- assertTrue(info3.getQNames().contains(qname7));
- assertTrue(info3.getQNames().contains(qname8));
- assertTrue(info3.getQNames().contains(qname9));
+ assertTrue(info3.getNames().size() == 3);
+ assertTrue(info3.getNames().contains(qname7));
+ assertTrue(info3.getNames().contains(qname8));
+ assertTrue(info3.getNames().contains(qname9));
17 years, 9 months
JBoss Portal SVN: r11568 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-24 01:54:23 -0400 (Thu, 24 Jul 2008)
New Revision: 11568
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
Log:
optimize unnecessary object creation
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 05:51:21 UTC (rev 11567)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 05:54:23 UTC (rev 11568)
@@ -707,10 +707,10 @@
for (String string : qnames)
{
QName qname = QName.valueOf(string);
- info.getQNames().add(qname);
+ info.names.add(qname);
}
}
- aliases.add(info.getImmutableInfo());
+ aliases.add(info);
}
}
@@ -1048,22 +1048,24 @@
private class AliasInfoPOJO implements AliasBindingInfo
{
+ /** . */
private final String name;
+
+ /** . */
private final Page page;
- private final Set<QName> qnames;
- private AliasInfoPOJO(String name, Page page, Set<QName> qnames)
- {
- this.name = name;
- this.page = page;
- this.qnames = qnames;
- }
+ /** . */
+ private final Set<QName> names;
+ /** . */
+ private final Set<QName> immutableNames;
+
private AliasInfoPOJO(String name, Page page)
{
this.name = name;
this.page = page;
- this.qnames = new HashSet<QName>();
+ this.names = new HashSet<QName>();
+ this.immutableNames = Collections.unmodifiableSet(names);
}
public String getName()
@@ -1073,14 +1075,7 @@
public Set<QName> getQNames()
{
- return qnames;
+ return immutableNames;
}
-
- AliasBindingInfo getImmutableInfo()
- {
- return new AliasInfoPOJO(name, page, Collections.unmodifiableSet(qnames));
- }
-
}
-
}
17 years, 9 months
JBoss Portal SVN: r11567 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal: core/impl/coordination and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-24 01:51:21 -0400 (Thu, 24 Jul 2008)
New Revision: 11567
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
Log:
getPage() must not be exposed on the AliasBindingInfo interface, it's an implementation detail of the POJO
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java 2008-07-23 20:32:41 UTC (rev 11566)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/AliasBindingInfo.java 2008-07-24 05:51:21 UTC (rev 11567)
@@ -22,8 +22,6 @@
package org.jboss.portal.core.controller.coordination;
-import org.jboss.portal.core.model.portal.Page;
-
import javax.xml.namespace.QName;
import java.util.Set;
@@ -33,7 +31,5 @@
*/
public interface AliasBindingInfo extends ParameterBindingInfo
{
- Page getPage();
-
- Set<QName> getQNames();
+ Set<QName> getQNames();
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-23 20:32:41 UTC (rev 11566)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 05:51:21 UTC (rev 11567)
@@ -673,10 +673,13 @@
}
//
+ AliasInfoPOJO alias = (AliasInfoPOJO)aliasInfo;
+
+ //
String propName = PREFIX_PARAMETER_ALIAS_NAME + "." + aliasInfo.getName();
- if (aliasInfo.getPage().getProperties().keySet().contains(propName))
+ if (alias.page.getProperties().keySet().contains(propName))
{
- aliasInfo.getPage().setDeclaredProperty(propName,null);
+ alias.page.setDeclaredProperty(propName,null);
}
}
@@ -1068,11 +1071,6 @@
return name;
}
- public Page getPage()
- {
- return page;
- }
-
public Set<QName> getQNames()
{
return qnames;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-23 20:32:41 UTC (rev 11566)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-24 05:51:21 UTC (rev 11567)
@@ -326,7 +326,6 @@
AliasBindingInfo info = bindings1.iterator().next();
assertTrue(info.getName().equals("alias1"));
- assertTrue(info.getPage().getId().equals(page1.getId()));
assertTrue(info.getQNames().size() == 3);
assertTrue(info.getQNames().contains(qname1));
assertTrue(info.getQNames().contains(qname2));
@@ -360,14 +359,12 @@
assertNotNull(info3);
assertTrue(info2.getName().equals("alias2"));
- assertTrue(info2.getPage().getId().equals(page2.getId()));
assertTrue(info2.getQNames().size() == 3);
assertTrue(info2.getQNames().contains(qname4));
assertTrue(info2.getQNames().contains(qname5));
assertTrue(info2.getQNames().contains(qname6));
assertTrue(info3.getName().equals("alias3"));
- assertTrue(info3.getPage().getId().equals(page2.getId()));
assertTrue(info3.getQNames().size() == 3);
assertTrue(info3.getQNames().contains(qname7));
assertTrue(info3.getQNames().contains(qname8));
17 years, 9 months
JBoss Portal SVN: r11566 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core: impl/coordination and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-23 16:32:41 -0400 (Wed, 23 Jul 2008)
New Revision: 11566
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
Log:
fix precedence of window over alias bindings
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-07-23 20:17:48 UTC (rev 11565)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-07-23 20:32:41 UTC (rev 11566)
@@ -488,12 +488,11 @@
String[] value = entry.getValue();
//
- CoordinationStrategy strategy = manager.resolveBindingStrategy(getWindow(windowName).getPage());
+ CoordinationStrategy strategy = manager.resolveBindingStrategy(window.getPage());
//
- Collection<String> bindings = manager.getBindingNames(getWindow(windowName), name);
+ Collection<String> bindings = manager.getBindingNames(window, name);
-
// Don't store the URI as a page scoped public render parameter but window scoped
// Also for explicit strategy and parameter with no bindings
if (CoreConstants.JBOSS_PORTAL_CONTENT_URI.equals(name)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-23 20:17:48 UTC (rev 11565)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-23 20:32:41 UTC (rev 11566)
@@ -184,12 +184,15 @@
}
}
- //
- for (AliasBindingInfo info : getAliasBindings(window.getPage()))
+ // If we have nothing let's try aliases
+ if (names.isEmpty())
{
- if (info.getQNames().contains(name))
+ for (AliasBindingInfo info : getAliasBindings(window.getPage()))
{
- names.add(info.getName());
+ if (info.getQNames().contains(name))
+ {
+ names.add(info.getName());
+ }
}
}
17 years, 9 months
JBoss Portal SVN: r11565 - branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-23 16:17:48 -0400 (Wed, 23 Jul 2008)
New Revision: 11565
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
Log:
new use case sample
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-23 20:05:04 UTC (rev 11564)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-23 20:17:48 UTC (rev 11565)
@@ -434,75 +434,71 @@
</coordination>
</page>
- <!--
<page>
- <page-name>Parameters FALLBACK</page-name>
+
+ <!--
+ | In this sample we demonstrate
+ | - alias and window binding based coordination
+ | - unbound portlet parameters are private
+ | - absense of implicit coordination
+ -->
+
+ <page-name>Window+alias+!implicit coordination</page-name>
<window>
- <window-name>PublicParametersPortletWindowA1</window-name>
+ <window-name>PublicParametersPortletWindow1</window-name>
<instance-ref>CoordinationPublicParametersPortletInstance1</instance-ref>
<region>left</region>
<height>0</height>
</window>
<window>
- <window-name>PublicParametersPortletWindowA2</window-name>
+ <window-name>PublicParametersPortletWindow2</window-name>
<instance-ref>CoordinationPublicParametersPortletInstance1</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>PublicParametersPortletWindow3</window-name>
+ <instance-ref>CoordinationPublicParametersPortletInstance2</instance-ref>
<region>left</region>
<height>1</height>
</window>
-
<window>
- <window-name>PublicParametersPortletWindowB1</window-name>
+ <window-name>PublicParametersPortletWindow4</window-name>
<instance-ref>CoordinationPublicParametersPortletInstance2</instance-ref>
<region>center</region>
- <height>0</height>
+ <height>1</height>
</window>
<window>
- <window-name>PublicParametersPortletWindowB2</window-name>
- <instance-ref>CoordinationPublicParametersPortletInstance2</instance-ref>
+ <window-name>PageParameterPortletWindow</window-name>
+ <instance-ref>PageParameterPortletInstance</instance-ref>
<region>center</region>
- <height>1</height>
+ <height>2</height>
</window>
<coordination>
- <parameter-strategy>FALLBACK</parameter-strategy>
+ <parameter-strategy>EXPLICIT</parameter-strategy>
<bindings>
+
<parameter-binding>
<name>binding1</name>
<window-coordination>
- <window-name>PublicParametersPortletWindowA1</window-name>
- <qname>foo1</qname>
+ <window-name>PublicParametersPortletWindow1</window-name>
+ <qname>foo</qname>
</window-coordination>
<window-coordination>
- <window-name>PublicParametersPortletWindowB2</window-name>
- <qname>foo2</qname>
- </window-coordination>
- </parameter-binding>
- <parameter-binding>
- <name>binding2</name>
- <window-coordination>
- <window-name>PublicParametersPortletWindowA1</window-name>
+ <window-name>PublicParametersPortletWindow2</window-name>
<qname>bar1</qname>
</window-coordination>
- <window-coordination>
- <window-name>PublicParametersPortletWindowB2</window-name>
- <qname>bar2</qname>
- </window-coordination>
</parameter-binding>
- <parameter-binding>
- <name>binding3</name>
- <window-coordination>
- <window-name>PublicParametersPortletWindowA1</window-name>
- <qname>juu1</qname>
- </window-coordination>
- <window-coordination>
- <window-name>PublicParametersPortletWindowB2</window-name>
- <qname>juu2</qname>
- </window-coordination>
- </parameter-binding>
+
+ <alias-binding>
+ <name>binding2</name>
+ <qname>foo</qname>
+ </alias-binding>
+
</bindings>
</coordination>
</page>
--->
<page>
@@ -551,6 +547,4 @@
</page>
</deployment>
-
-
</deployments>
17 years, 9 months
JBoss Portal SVN: r11564 - branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-23 16:05:04 -0400 (Wed, 23 Jul 2008)
New Revision: 11564
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
Log:
update samples
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-23 19:49:35 UTC (rev 11563)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-23 20:05:04 UTC (rev 11564)
@@ -285,12 +285,13 @@
<page>
<!--
- | In this sample we show that
- | - no implicit coordination occur if we do not declare it
- | - different namespace can be bound
+ | In this sample we demonstrate
+ | - window binding based coordination
+ | - unbound portlet parameters are private
+ | - absense of implicit coordination
-->
- <page-name>Parameters EXPLICIT</page-name>
+ <page-name>Window+!implicit coordination</page-name>
<window>
<window-name>PublicParametersPortletWindow1</window-name>
<instance-ref>CoordinationPublicParametersPortletInstance1</instance-ref>
@@ -371,12 +372,13 @@
<page>
<!--
- | In this sample we show that
- | -
- | -
+ | In this sample we demonstrate
+ | - alias binding based coordination
+ | - unbound portlet parameters are private
+ | - absense of implicit coordination
-->
- <page-name>Explicit aliased parameters</page-name>
+ <page-name>Alias+!implicit coordination</page-name>
<window>
<window-name>PublicParametersPortletWindow1</window-name>
<instance-ref>CoordinationPublicParametersPortletInstance1</instance-ref>
@@ -425,8 +427,6 @@
<alias-binding>
<name>binding3</name>
<qname>bar1</qname>
- <qname>bar2</qname>
- <qname>{urn:jboss:portal:samples:daa1}daa1</qname>
<qname>{urn:jboss:portal:samples:daa2}daa2</qname>
</alias-binding>
@@ -512,7 +512,7 @@
| - no other kind of coordination occurs
-->
- <page-name>Parameters IMPLICIT</page-name>
+ <page-name>Implicit coordination</page-name>
<window>
<window-name>PublicParametersPortletWindow1</window-name>
<instance-ref>CoordinationPublicParametersPortletInstance1</instance-ref>
17 years, 9 months
JBoss Portal SVN: r11563 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-23 15:49:35 -0400 (Wed, 23 Jul 2008)
New Revision: 11563
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
Log:
implement alias binding runtime update
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-07-23 19:49:11 UTC (rev 11562)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-07-23 19:49:35 UTC (rev 11563)
@@ -32,9 +32,7 @@
import org.jboss.portal.core.navstate.NavigationalStateContext;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.Page;
-import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
-import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
import org.jboss.portal.core.controller.coordination.CoordinationManager;
import org.jboss.portal.core.controller.coordination.CoordinationStrategy;
17 years, 9 months