Author: thomas.heute(a)jboss.com
Date: 2009-12-10 09:22:03 -0500 (Thu, 10 Dec 2009)
New Revision: 13858
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java
branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
Log:
JBEPP-150: Let a user reset an alias-binding by not defining it in a URL
Defined by KeepPNState
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2009-12-10
13:53:03 UTC (rev 13857)
+++
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2009-12-10
14:22:03 UTC (rev 13858)
@@ -53,6 +53,8 @@
/** . */
private PortalObjectPathMapper mapper;
+ private boolean keepPNState = true;
+
public PortalObjectCommandFactory()
{
}
@@ -167,7 +169,7 @@
}
else
{
- cmd = new ViewPageCommand(id, queryParams);
+ cmd = new ViewPageCommand(id, queryParams, keepPNState);
}
}
}
@@ -175,4 +177,15 @@
//
return cmd;
}
+
+ public boolean isKeepPNState()
+ {
+ return keepPNState;
+ }
+
+ public void setKeepPNState(boolean keepPNState)
+ {
+ this.keepPNState = keepPNState;
+ }
+
}
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java 2009-12-10
13:53:03 UTC (rev 13857)
+++
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/portal/command/view/ViewPageCommand.java 2009-12-10
14:22:03 UTC (rev 13858)
@@ -56,6 +56,8 @@
/** . */
private Map<String, String[]> parameters;
+
+ private boolean keepPNState = true;
public ViewPageCommand(PortalObjectId pageId, Map<String, String[]> parameters)
{
@@ -71,6 +73,12 @@
this.parameters = parameters;
}
+ public ViewPageCommand(PortalObjectId pageId, Map<String, String[]> parameters,
boolean keepPNState)
+ {
+ this(pageId, parameters);
+ this.keepPNState = keepPNState;
+ }
+
public ViewPageCommand(PortalObjectId pageId)
{
this(pageId, EMPTY_PARAMETERS);
@@ -106,12 +114,15 @@
//
Map<QName, String[]> state = new HashMap<QName, String[]>();
- // Clone the previous state if needed
- if (previousPNS != null)
+ if (keepPNState)
{
- state.putAll(previousPNS.getParameters());
+ // Clone the previous state if needed
+ if (previousPNS != null)
+ {
+ state.putAll(previousPNS.getParameters());
+ }
}
-
+
//
for (Map.Entry<String, String[]> entry : parameters.entrySet())
{
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2009-12-10
13:53:03 UTC (rev 13857)
+++
branches/Enterprise_Portal_Platform_4_3/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2009-12-10
14:22:03 UTC (rev 13858)
@@ -840,6 +840,7 @@
<depends optional-attribute-name="Mapper"
proxy-type="attribute">
portal:service=PortalObjectPathMapper,type=Default
</depends>
+ <attribute name="KeepPNState">true</attribute>
</mbean>
<mbean
code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
Show replies by date