JBoss Portal SVN: r7036 - trunk/core/src/main/org/jboss/portal/core/model/portal/command/render.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 18:47:04 -0400 (Mon, 23 Apr 2007)
New Revision: 7036
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
Log:
removed unused code
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2007-04-23 22:32:52 UTC (rev 7035)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2007-04-23 22:47:04 UTC (rev 7036)
@@ -39,7 +39,6 @@
import org.jboss.portal.identity.UserProfileModule;
import org.jboss.portal.security.PortalSecurityException;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManager;
-import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.theme.LayoutService;
import org.jboss.portal.core.theme.PageRendition;
import org.jboss.portal.core.theme.WindowRendition;
@@ -53,7 +52,6 @@
import org.jboss.portal.theme.page.WindowResult;
import org.jboss.portal.theme.page.WindowContext;
-import javax.servlet.http.HttpServletRequest;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.ArrayList;
@@ -154,8 +152,6 @@
*/
public ControllerResponse execute() throws ControllerException, InvocationException
{
- ServerInvocation sinv = context.getServerInvocation();
- HttpServletRequest request = sinv.getServerContext().getClientRequest();
try
{
//
19 years
JBoss Portal SVN: r7035 - in trunk: core/src/main/org/jboss/portal/core/controller/classic and 4 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 18:32:52 -0400 (Mon, 23 Apr 2007)
New Revision: 7035
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java
Log:
added ControllerContext in the signature of the doMapping(...) of URLFactory
Modified: trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -155,7 +155,7 @@
*/
public String renderURL(ControllerCommand cmd, URLContext urlContext, URLFormat urlFormat)
{
- ServerURL serverURL = controller.getURLFactory().doMapping(serverInvocation, cmd);
+ ServerURL serverURL = controller.getURLFactory().doMapping(this, serverInvocation, cmd);
//
if (serverURL == null)
Modified: trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/controller/classic/ThrowableResponseHandler.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -62,7 +62,7 @@
else
{
urlContext = URLContext.newInstance(urlContext.isSecure(), true);
- ServerURL serverURL = controllerContext.getController().getURLFactory().doMapping(controllerContext.getServerInvocation(), command);
+ ServerURL serverURL = controllerContext.getController().getURLFactory().doMapping(controllerContext, controllerContext.getServerInvocation(), command);
String url = controllerContext.getServerInvocation().getResponse().renderURL(serverURL, urlContext, null);
return new HTTPResponse.SendRedirect(url);
}
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingURLFactoryService.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerURL;
@@ -51,7 +52,7 @@
this.nextFactory = nextFactory;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation invocation, ControllerCommand cmd)
{
if (cmd == null)
{
@@ -64,7 +65,7 @@
for (int i = 0;i < delegates.size();i++)
{
URLFactory delegate = (URLFactory)delegates.get(i);
- ServerURL url = delegate.doMapping(invocation, cmd);
+ ServerURL url = delegate.doMapping(controllerContext, invocation, cmd);
if (url != null)
{
return url;
@@ -75,7 +76,7 @@
//
if (nextFactory != null)
{
- return nextFactory.doMapping(invocation, cmd);
+ return nextFactory.doMapping(controllerContext, invocation, cmd);
}
//
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleURLFactory.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.AbstractServerURL;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerURL;
@@ -60,7 +61,7 @@
this.classNames = classNames;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation invocation, ControllerCommand cmd)
{
if (cmd == null)
{
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/URLFactory.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerURL;
@@ -35,9 +36,12 @@
/**
* Create an url for the command.
*
+ * @param controllerContext
* @param invocation the invocation
- * @param cmd the command to encode
- * @return the server url or null if this mapper cannot peform this operation
+ * @param cmd the command to encode @return the server url or null if this mapper cannot peform this operation
*/
- ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd);
+ ServerURL doMapping(
+ ControllerContext controllerContext,
+ ServerInvocation invocation,
+ ControllerCommand cmd);
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceURLFactory.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -24,6 +24,7 @@
import org.jboss.portal.core.controller.command.mapper.URLFactoryDelegate;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
import org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceActionCommand;
import org.jboss.portal.core.model.instance.command.PortletInstanceCommand;
@@ -65,7 +66,7 @@
this.instanceId = instanceId;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation invocation, ControllerCommand cmd)
{
if (cmd == null)
{
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectURLFactory.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -26,6 +26,7 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowActionCommand;
import org.jboss.portal.core.model.portal.command.action.InvokeWindowCommand;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
@@ -64,7 +65,7 @@
this.path = path;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation invocation, ControllerCommand cmd)
{
if (cmd == null)
{
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java 2007-04-23 22:29:26 UTC (rev 7034)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectURLFactory.java 2007-04-23 22:32:52 UTC (rev 7035)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.cms;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.command.mapper.URLFactoryDelegate;
import org.jboss.portal.core.cms.command.StreamContentCommand;
import org.jboss.portal.server.AbstractServerURL;
@@ -49,7 +50,7 @@
this.path = path;
}
- public ServerURL doMapping(ServerInvocation invocation, ControllerCommand cmd)
+ public ServerURL doMapping(ControllerContext controllerContext, ServerInvocation invocation, ControllerCommand cmd)
{
if (cmd == null)
{
19 years
JBoss Portal SVN: r7034 - trunk/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 18:29:26 -0400 (Mon, 23 Apr 2007)
New Revision: 7034
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AuthorizationBean.java
Removed:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
Log:
consistent behavior when clicking update/cancel from security editor go to portal object page (the udpate was going to the parent of the portal object)
Deleted: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java 2007-04-23 22:18:57 UTC (rev 7033)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java 2007-04-23 22:29:26 UTC (rev 7034)
@@ -1,210 +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.admin.ui;
-
-import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.faces.el.dynamic.AbstractDynamicBean;
-import org.jboss.portal.faces.el.PropertyValue;
-import org.jboss.portal.security.RoleSecurityBinding;
-import org.jboss.portal.security.SecurityConstants;
-import org.jboss.portal.security.spi.provider.DomainConfigurator;
-import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
-import org.jboss.portal.identity.RoleModule;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.IdentityException;
-
-import javax.faces.model.SelectItem;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.Collections;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 6252 $
- */
-public abstract class AbstractAuthorizationBean
-{
-
- public AbstractDynamicBean getForRole()
- {
- return new AbstractDynamicBean()
- {
- public Class getType(Object propertyName)
- {
- return String[].class;
- }
-
- public PropertyValue getValue(Object propertyName)
- {
- String[] actions = getActionsForRole((String)propertyName);
- return actions != null ? new PropertyValue(actions) : null;
- }
-
- public boolean setValue(Object propertyName, Object value)
- {
- return setActionsForRole((String)propertyName, (String[])value);
- }
- };
- }
-
- public boolean setActionsForRole(String roleName, String[] actions)
- {
- String uri = getURI();
- if (uri != null)
- {
- Set constraints = getDomainConfigurator().getSecurityBindings(uri);
- Map newConstraints = new HashMap();
- if (constraints != null)
- {
- for (Iterator i = constraints.iterator(); i.hasNext();)
- {
- RoleSecurityBinding binding = (RoleSecurityBinding)i.next();
- newConstraints.put(binding.getRoleName(), binding);
- }
- }
- Set blah = Tools.toSet(actions);
- newConstraints.put(roleName, new RoleSecurityBinding(blah, roleName));
- try
- {
- getDomainConfigurator().setSecurityBindings(uri, new HashSet(newConstraints.values()));
- }
- catch (SecurityConfigurationException e)
- {
- e.printStackTrace();
- }
- return true;
- }
- else
- {
- return false;
- }
- }
-
- public String[] getActionsForRole(String roleName)
- {
- String uri = getURI();
- if (uri != null)
- {
- Set constraints = getDomainConfigurator().getSecurityBindings(uri);
- if (constraints != null)
- {
- Set actions = new HashSet();
- for (Iterator i = constraints.iterator(); i.hasNext();)
- {
- RoleSecurityBinding binding = (RoleSecurityBinding)i.next();
- if (binding.getRoleName().equals(roleName))
- {
- actions.addAll(binding.getActions());
- }
- }
- return (String[])actions.toArray(new String[actions.size()]);
- }
- else
- {
- return new String[0];
- }
- }
- else
- {
- return null;
- }
- }
-
- public String[] getRoles()
- {
- SortedSet roleNames = new TreeSet();
-
- // Get role names from URI
- String uri = getURI();
- if (uri != null)
- {
- Set constraints = getDomainConfigurator().getSecurityBindings(uri);
- if (constraints != null)
- {
- for (Iterator i = constraints.iterator(); i.hasNext();)
- {
- RoleSecurityBinding binding = (RoleSecurityBinding)i.next();
- roleNames.add(binding.getRoleName());
- }
- }
- }
-
- // Get other roles from role module
- try
- {
- roleNames.add(SecurityConstants.UNCHECKED_ROLE_NAME);
- for (Iterator i = getRoleModule().findRoles().iterator(); i.hasNext();)
- {
- Role role = (Role)i.next();
- roleNames.add(role.getName());
- }
- }
- catch (IdentityException e)
- {
- e.printStackTrace();
- }
-
- //
- return (String[])roleNames.toArray(new String[roleNames.size()]);
- }
-
- public Map getRoleDisplayNameMap()
- {
- try
- {
- Map map = new HashMap();
- for (Iterator i = getRoleModule().findRoles().iterator();i.hasNext();)
- {
- Role role = (Role)i.next();
- String displayName = role.getDisplayName();
- if (displayName != null)
- {
- String name = role.getName();
- map.put(name, displayName);
- }
- }
- return map;
- }
- catch (IdentityException e)
- {
- return Collections.EMPTY_MAP;
- }
- }
-
- public abstract String submit();
-
- public abstract String cancel();
-
- public abstract RoleModule getRoleModule();
-
- public abstract DomainConfigurator getDomainConfigurator();
-
- public abstract SelectItem[] getAvailableActions();
-
- protected abstract String getURI();
-}
Copied: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AuthorizationBean.java (from rev 7033, trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java)
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AuthorizationBean.java (rev 0)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AuthorizationBean.java 2007-04-23 22:29:26 UTC (rev 7034)
@@ -0,0 +1,210 @@
+/******************************************************************************
+ * 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.admin.ui;
+
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.faces.el.dynamic.AbstractDynamicBean;
+import org.jboss.portal.faces.el.PropertyValue;
+import org.jboss.portal.security.RoleSecurityBinding;
+import org.jboss.portal.security.SecurityConstants;
+import org.jboss.portal.security.spi.provider.DomainConfigurator;
+import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.IdentityException;
+
+import javax.faces.model.SelectItem;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6252 $
+ */
+public abstract class AuthorizationBean
+{
+
+ public AbstractDynamicBean getForRole()
+ {
+ return new AbstractDynamicBean()
+ {
+ public Class getType(Object propertyName)
+ {
+ return String[].class;
+ }
+
+ public PropertyValue getValue(Object propertyName)
+ {
+ String[] actions = getActionsForRole((String)propertyName);
+ return actions != null ? new PropertyValue(actions) : null;
+ }
+
+ public boolean setValue(Object propertyName, Object value)
+ {
+ return setActionsForRole((String)propertyName, (String[])value);
+ }
+ };
+ }
+
+ public boolean setActionsForRole(String roleName, String[] actions)
+ {
+ String uri = getURI();
+ if (uri != null)
+ {
+ Set constraints = getDomainConfigurator().getSecurityBindings(uri);
+ Map newConstraints = new HashMap();
+ if (constraints != null)
+ {
+ for (Iterator i = constraints.iterator(); i.hasNext();)
+ {
+ RoleSecurityBinding binding = (RoleSecurityBinding)i.next();
+ newConstraints.put(binding.getRoleName(), binding);
+ }
+ }
+ Set blah = Tools.toSet(actions);
+ newConstraints.put(roleName, new RoleSecurityBinding(blah, roleName));
+ try
+ {
+ getDomainConfigurator().setSecurityBindings(uri, new HashSet(newConstraints.values()));
+ }
+ catch (SecurityConfigurationException e)
+ {
+ e.printStackTrace();
+ }
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ public String[] getActionsForRole(String roleName)
+ {
+ String uri = getURI();
+ if (uri != null)
+ {
+ Set constraints = getDomainConfigurator().getSecurityBindings(uri);
+ if (constraints != null)
+ {
+ Set actions = new HashSet();
+ for (Iterator i = constraints.iterator(); i.hasNext();)
+ {
+ RoleSecurityBinding binding = (RoleSecurityBinding)i.next();
+ if (binding.getRoleName().equals(roleName))
+ {
+ actions.addAll(binding.getActions());
+ }
+ }
+ return (String[])actions.toArray(new String[actions.size()]);
+ }
+ else
+ {
+ return new String[0];
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public String[] getRoles()
+ {
+ SortedSet roleNames = new TreeSet();
+
+ // Get role names from URI
+ String uri = getURI();
+ if (uri != null)
+ {
+ Set constraints = getDomainConfigurator().getSecurityBindings(uri);
+ if (constraints != null)
+ {
+ for (Iterator i = constraints.iterator(); i.hasNext();)
+ {
+ RoleSecurityBinding binding = (RoleSecurityBinding)i.next();
+ roleNames.add(binding.getRoleName());
+ }
+ }
+ }
+
+ // Get other roles from role module
+ try
+ {
+ roleNames.add(SecurityConstants.UNCHECKED_ROLE_NAME);
+ for (Iterator i = getRoleModule().findRoles().iterator(); i.hasNext();)
+ {
+ Role role = (Role)i.next();
+ roleNames.add(role.getName());
+ }
+ }
+ catch (IdentityException e)
+ {
+ e.printStackTrace();
+ }
+
+ //
+ return (String[])roleNames.toArray(new String[roleNames.size()]);
+ }
+
+ public Map getRoleDisplayNameMap()
+ {
+ try
+ {
+ Map map = new HashMap();
+ for (Iterator i = getRoleModule().findRoles().iterator();i.hasNext();)
+ {
+ Role role = (Role)i.next();
+ String displayName = role.getDisplayName();
+ if (displayName != null)
+ {
+ String name = role.getName();
+ map.put(name, displayName);
+ }
+ }
+ return map;
+ }
+ catch (IdentityException e)
+ {
+ return Collections.EMPTY_MAP;
+ }
+ }
+
+ public abstract String submit();
+
+ public abstract String cancel();
+
+ public abstract RoleModule getRoleModule();
+
+ public abstract DomainConfigurator getDomainConfigurator();
+
+ public abstract SelectItem[] getAvailableActions();
+
+ protected abstract String getURI();
+}
Property changes on: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AuthorizationBean.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-04-23 22:18:57 UTC (rev 7033)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-04-23 22:29:26 UTC (rev 7034)
@@ -96,7 +96,7 @@
private List instances;
/** . */
- private AbstractAuthorizationBean auth = new AuthorizationBean();
+ private AuthorizationBean auth = new InstanceAuthorizationBean();
// Services accessors
@@ -221,7 +221,7 @@
return selectedPrefs;
}
- public AbstractAuthorizationBean getAuth()
+ public AuthorizationBean getAuth()
{
return auth;
}
@@ -366,7 +366,7 @@
}
};
- public class AuthorizationBean extends AbstractAuthorizationBean
+ public class InstanceAuthorizationBean extends AuthorizationBean
{
public DomainConfigurator getDomainConfigurator()
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-04-23 22:18:57 UTC (rev 7033)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-04-23 22:29:26 UTC (rev 7034)
@@ -111,7 +111,7 @@
// Runtime state
/** . */
- private final AbstractAuthorizationBean auth = new PortalObjectAuthorizationBean();
+ private final AuthorizationBean auth = new PortalObjectAuthorizationBean();
/** . */
private SelectItem[] instanceItems;
@@ -291,7 +291,7 @@
return portletDefinitionInvoker;
}
- public AbstractAuthorizationBean getAuth()
+ public AuthorizationBean getAuth()
{
return auth;
}
@@ -556,7 +556,7 @@
getDomainConfigurator().setSecurityBindings(page.getId().toString(PortalObjectId.CANONICAL_FORMAT), constraints);
}
- public class PortalObjectAuthorizationBean extends AbstractAuthorizationBean
+ public class PortalObjectAuthorizationBean extends AuthorizationBean
{
public DomainConfigurator getDomainConfigurator()
@@ -595,10 +595,6 @@
FacesContext.getCurrentInstance().addMessage("status", message);
//
- PortalObject po = getSelectedObject();
- selectObject(po.getParent());
-
- //
return "objects";
}
19 years
JBoss Portal SVN: r7033 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsf and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 18:18:57 -0400 (Mon, 23 Apr 2007)
New Revision: 7033
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageSecurity.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalSecurity.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
Log:
security update/cancel was not working properly : fixes that
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/AbstractAuthorizationBean.java 2007-04-23 22:18:57 UTC (rev 7033)
@@ -196,8 +196,10 @@
}
}
- public abstract String execute();
+ public abstract String submit();
+ public abstract String cancel();
+
public abstract RoleModule getRoleModule();
public abstract DomainConfigurator getDomainConfigurator();
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-04-23 22:18:57 UTC (rev 7033)
@@ -387,7 +387,7 @@
}
}
- public String execute()
+ public String submit()
{
String stringMessage = "Security has been correctly updated";
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, stringMessage, stringMessage);
@@ -397,6 +397,13 @@
return null;
}
+ public String cancel()
+ {
+ selectedId = null;
+ selectedPlugin = null;
+ return null;
+ }
+
public RoleModule getRoleModule()
{
return roleModule;
@@ -404,10 +411,7 @@
public SelectItem[] getAvailableActions()
{
- return new SelectItem[]{
- new SelectItem("view", "View"),
- new SelectItem("personalize", "Personalize"),
- };
+ return new SelectItem[]{ new SelectItem("view", "View") };
}
}
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-04-23 22:18:57 UTC (rev 7033)
@@ -44,9 +44,7 @@
import org.jboss.portal.security.SecurityConstants;
import org.jboss.portal.security.spi.provider.DomainConfigurator;
import org.jboss.portal.theme.LayoutService;
-import org.jboss.portal.theme.ThemeConstants;
import org.jboss.portal.theme.ThemeService;
-import org.jboss.portal.theme.impl.render.dynamic.DynaRenderOptions;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
@@ -590,7 +588,7 @@
};
}
- public String execute()
+ public String submit()
{
String stringMessage = "Security has been correctly updated on the page";
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, stringMessage, stringMessage);
@@ -604,6 +602,11 @@
return "objects";
}
+ public String cancel()
+ {
+ return "objects";
+ }
+
public RoleModule getRoleModule()
{
return roleModule;
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java 2007-04-23 22:18:57 UTC (rev 7033)
@@ -99,9 +99,6 @@
// Runtime state
/** . */
- private AbstractAuthorizationBean auth = new AuthorizationBean();
-
- /** . */
private PreferencesBean selectedPreferences;
/** . */
@@ -299,11 +296,6 @@
return authorizationDomainRegistry.getDomain("portlet").getConfigurator();
}
- public AbstractAuthorizationBean getAuth()
- {
- return auth;
- }
-
public Portlet getSelectedPortlet()
{
if (selectedPortlet == null && selectedPortletId != null)
@@ -392,43 +384,4 @@
return p1.getContext().getId().compareToIgnoreCase(p2.getContext().getId());
}
};
-
- public class AuthorizationBean extends AbstractAuthorizationBean
- {
-
- protected String getURI()
- {
- Portlet portlet = getSelectedPortlet();
- if (portlet != null)
- {
- return portlet.getContext().getId();
- }
- else
- {
- return null;
- }
- }
-
- public String execute()
- {
- return null;
- }
-
- public RoleModule getRoleModule()
- {
- return roleModule;
- }
-
- public DomainConfigurator getDomainConfigurator()
- {
- return PortletManagerBean.this.getDomainConfigurator();
- }
-
- public SelectItem[] getAvailableActions()
- {
- return new SelectItem[]{
- new SelectItem("view")
- };
- }
- }
}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml 2007-04-23 22:18:57 UTC (rev 7033)
@@ -29,7 +29,8 @@
</tbody>
</table>
<div style="text-align:center;padding: 1em 0 1em 0">
- <ui:insert name="form_submit"/>
+ <h:commandLink id="update" value="Update" action="#{auth.submit}" styleClass="portlet-form-button"/>
+ <h:commandLink id="cancel" value="Cancel" action="#{auth.cancel}" styleClass="portlet-form-button" immediate="true"/>
</div>
</h:form>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageSecurity.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageSecurity.xhtml 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageSecurity.xhtml 2007-04-23 22:18:57 UTC (rev 7033)
@@ -8,12 +8,6 @@
<h3>Please set the page permissions</h3>
<ui:decorate template="/WEB-INF/jsf/common/editSecurity.xhtml">
<ui:param name="auth" value="#{portalobjectmgr.auth}"/>
- <ui:define name="form_submit">
- <h:commandButton value="Update" action="#{auth.execute}" styleClass="portlet-form-button"/>
- <h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}" styleClass="portlet-form-button" immediate="true">
- <f:param name="id" value="#{node.id}"/>
- </h:commandButton>
- </ui:define>
</ui:decorate>
</ui:define>
</ui:composition>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalSecurity.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalSecurity.xhtml 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalSecurity.xhtml 2007-04-23 22:18:57 UTC (rev 7033)
@@ -2,19 +2,12 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:c="http://java.sun.com/jstl/core">
+ xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="/WEB-INF/jsf/objectTemplate.xhtml">
<ui:define name="content">
<h3>Please set the portal permissions</h3>
<ui:decorate template="/WEB-INF/jsf/common/editSecurity.xhtml">
<ui:param name="auth" value="#{portalobjectmgr.auth}"/>
- <ui:define name="form_submit">
- <h:commandButton value="Update" action="#{auth.execute}" styleClass="portlet-form-button"/>
- <h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}" styleClass="portlet-form-button" immediate="true">
- <f:param name="id" value="#{node.id}"/>
- </h:commandButton>
- </ui:define>
</ui:decorate>
</ui:define>
</ui:composition>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-04-23 20:21:56 UTC (rev 7032)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-04-23 22:18:57 UTC (rev 7033)
@@ -104,10 +104,6 @@
<ui:decorate template="/WEB-INF/jsf/common/editSecurity.xhtml">
<ui:param name="auth" value="#{instancemgr.auth}"/>
- <ui:define name="form_submit">
- <h:commandButton value="Update" action="#{auth.execute}" styleClass="portlet-form-button"/>
- <h:commandButton value="Cancel" action="instances" styleClass="portlet-form-button" immediate="true"/>
- </ui:define>
</ui:decorate>
</c:if>
19 years
JBoss Portal SVN: r7032 - in trunk: core/src/main/org/jboss/portal/core/deployment and 5 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 16:21:56 -0400 (Mon, 23 Apr 2007)
New Revision: 7032
Modified:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java
trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java
trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml
trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd
Log:
renamed "asynchronous" to "partial-refresh" in jboss-portlet.xml as it describes better the feature, asynchronous is not precise enough
Modified: trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2007-04-23 20:21:56 UTC (rev 7032)
@@ -44,6 +44,8 @@
public class AjaxInterceptor extends PortletInterceptor
{
+ public static final String PARTIAL_REFRESH = "partialRefresh";
+
protected Object invoke(PortletInvocation invocation) throws Exception, InvocationException
{
PortletInvocationResponse response = (PortletInvocationResponse)invocation.invokeNext();
@@ -58,7 +60,7 @@
AjaxMetaData ajax = portletMD.getAjax();
if (ajax != null)
{
- invocation.setAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE, "asynchronous", ajax.getAsynchronous());
+ invocation.setAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE, PARTIAL_REFRESH, ajax.getPartialRefresh());
}
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java 2007-04-23 20:21:56 UTC (rev 7032)
@@ -171,10 +171,10 @@
}
else if (object instanceof AjaxMetaData)
{
- if ("asynchronous".equals(localName))
+ if ("partial-refresh".equals(localName))
{
AjaxMetaData ajax = (AjaxMetaData)object;
- ajax.setAsynchronous(Boolean.valueOf(value));
+ ajax.setPartialRefresh(Boolean.valueOf(value));
}
}
else
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2007-04-23 20:21:56 UTC (rev 7032)
@@ -42,6 +42,7 @@
import org.jboss.portal.core.controller.portlet.PortletInvocationFactory;
import org.jboss.portal.core.ns.NavigationalStateKey;
import org.jboss.portal.core.theme.WindowRendition;
+import org.jboss.portal.core.aspects.portlet.AjaxInterceptor;
import org.jboss.portal.server.config.ServerConfig;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portal.server.request.URLContext;
@@ -283,10 +284,10 @@
}
// Update window props after render if needed
- Boolean asynchronous = (Boolean)invocation.getAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE, "asynchronous");
- if (asynchronous != null && Boolean.FALSE.equals(asynchronous))
+ Boolean partialRefresh = (Boolean)invocation.getAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE, AjaxInterceptor.PARTIAL_REFRESH);
+ if (partialRefresh != null && Boolean.FALSE.equals(partialRefresh))
{
- DynaRenderOptions options = DynaRenderOptions.getOptions(null, asynchronous);
+ DynaRenderOptions options = DynaRenderOptions.getOptions(null, partialRefresh);
options.setOptions(windowProps);
}
Modified: trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java 2007-04-23 20:21:56 UTC (rev 7032)
@@ -30,15 +30,15 @@
{
/** . */
- private Boolean asynchronous;
+ private Boolean partialRefresh;
- public Boolean getAsynchronous()
+ public Boolean getPartialRefresh()
{
- return asynchronous;
+ return partialRefresh;
}
- public void setAsynchronous(Boolean asynchronous)
+ public void setPartialRefresh(Boolean partialRefresh)
{
- this.asynchronous = asynchronous;
+ this.partialRefresh = partialRefresh;
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java 2007-04-23 20:21:56 UTC (rev 7032)
@@ -70,10 +70,10 @@
}
else
{
- // If no asynchronous value provided use the one provided by the default
- if (ajax.getAsynchronous() == null)
+ // If no partialRefresh value provided use the one provided by the default
+ if (ajax.getPartialRefresh() == null)
{
- ajax.setAsynchronous(portletExt.getAjax().getAsynchronous());
+ ajax.setPartialRefresh(portletExt.getAjax().getPartialRefresh());
}
}
}
Modified: trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml 2007-04-23 20:21:56 UTC (rev 7032)
@@ -21,21 +21,19 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
<portlet-app>
<portlet>
<portlet-name>DefaultPortlet</portlet-name>
<remotable>false</remotable>
<ajax>
- <asynchronous>true</asynchronous>
+ <partial-refresh>true</partial-refresh>
</ajax>
<transaction>
<trans-attribute>NotSupported</trans-attribute>
</transaction>
- <security-constraint>
- <policy-permission>
- <unchecked/>
- <action-name>view</action-name>
- </policy-permission>
- </security-constraint>
</portlet>
</portlet-app>
Modified: trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd
===================================================================
--- trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd 2007-04-23 20:21:56 UTC (rev 7032)
@@ -78,16 +78,16 @@
<!ELEMENT remotable (#PCDATA)>
<!--
-The ajax tag allows to configure the ajax capabilities of the portlet. If the portlet is tagged as asynchronous
-then the portal may use partial page refreshing and render only that portlet. If the portlet asynchronous value
+The ajax tag allows to configure the ajax capabilities of the portlet. If the portlet is tagged as partial-refresh
+then the portal may use partial page refreshing and render only that portlet. If the portlet partial-refresh value
is false, then the portal will perform a full page refresh when the portlet is refreshed.
-->
-<!ELEMENT ajax (asynchronous)>
+<!ELEMENT ajax (partial-refresh)>
<!--
-The authorized values for the asynchronous element are true or false.
+The authorized values for the partial-refresh element are true or false.
-->
-<!ELEMENT asynchronous (#PCDATA)>
+<!ELEMENT partial-refresh (#PCDATA)>
<!--
This element configure the portlet session of the portlet.
Modified: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml 2007-04-23 19:29:11 UTC (rev 7031)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml 2007-04-23 20:21:56 UTC (rev 7032)
@@ -80,13 +80,13 @@
<portlet>
<portlet-name>URLPortlet</portlet-name>
<ajax>
- <asynchronous>false</asynchronous>
+ <partial-refresh>false</partial-refresh>
</ajax>
</portlet>
<portlet>
<portlet-name>AsyncURLPortlet</portlet-name>
<ajax>
- <asynchronous>true</asynchronous>
+ <partial-refresh>false</partial-refresh>
</ajax>
</portlet>
<portlet>
19 years
JBoss Portal SVN: r7031 - trunk/core/src/main/org/jboss/portal/core/ns.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 15:29:11 -0400 (Mon, 23 Apr 2007)
New Revision: 7031
Modified:
trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java
Log:
make CachedUserImpl and NSKey serializable for clustering
Modified: trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java 2007-04-23 19:27:57 UTC (rev 7030)
+++ trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java 2007-04-23 19:29:11 UTC (rev 7031)
@@ -40,6 +40,13 @@
/** The id. */
private final Object id;
+ /**
+ * Construct a new navigational state key.
+ *
+ * @param type the type of state
+ * @param id the id
+ * @throws IllegalArgumentException if any argument is null or the id argument does not implement either Serializable or Externalizable
+ */
public NavigationalStateKey(Class type, Object id)
{
if (type == null)
19 years
JBoss Portal SVN: r7030 - in trunk/core/src/main/org/jboss/portal/core: ns and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 15:27:57 -0400 (Mon, 23 Apr 2007)
New Revision: 7030
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java
trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java
Log:
make CachedUserImpl and NSKey serializable for clustering
Modified: trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java 2007-04-23 14:59:51 UTC (rev 7029)
+++ trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java 2007-04-23 19:27:57 UTC (rev 7030)
@@ -25,6 +25,7 @@
import org.jboss.portal.identity.User;
import java.util.Map;
+import java.io.Serializable;
/**
* Simple POJO to cache user data.
@@ -32,7 +33,7 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @version $Revision: 0.1 $
*/
-public class CachedUserImpl implements User
+public class CachedUserImpl implements User, Serializable
{
/** . */
Modified: trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java 2007-04-23 14:59:51 UTC (rev 7029)
+++ trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java 2007-04-23 19:27:57 UTC (rev 7030)
@@ -22,13 +22,16 @@
******************************************************************************/
package org.jboss.portal.core.ns;
+import java.io.Serializable;
+import java.io.Externalizable;
+
/**
* A key for navigational state.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public final class NavigationalStateKey
+public final class NavigationalStateKey implements Serializable
{
/** The type. */
@@ -47,6 +50,10 @@
{
throw new IllegalArgumentException("No id provided");
}
+ if (id instanceof Serializable == false && id instanceof Externalizable == false)
+ {
+ throw new IllegalArgumentException("Id should implement Serializable or Externalizable");
+ }
this.type = type;
this.id = id;
}
19 years
JBoss Portal SVN: r7029 - in trunk/core-admin/src: main/org/jboss/portal/core/admin/ui/actions and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 10:59:51 -0400 (Mon, 23 Apr 2007)
New Revision: 7029
Removed:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesFilter.java
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
Log:
- portal object property editor updates were not persisted in backend implying a reset of properties set at runtime on next reboot
- update the property editor layout to be more usable and use correct CSS class names
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-04-23 14:59:51 UTC (rev 7029)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui;
-import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.core.admin.ui.actions.AddPageAction;
import org.jboss.portal.core.admin.ui.common.PageManagerBean;
import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker;
@@ -61,7 +60,6 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -474,7 +472,11 @@
{
selectedId = new PortalObjectId();
}
+
+ //
selectedObject = portalObjectContainer.getObject(selectedId);
+
+ //
if (selectedObject.getType() == PortalObject.TYPE_PAGE)
{
if (pageManager == null)
@@ -485,6 +487,9 @@
}
//
+ selectedProperties = new PropertiesBean(this, true);
+
+ //
Collection pages = getSelectedObject().getChildren(PortalObject.PAGE_MASK);
ArrayList list = new ArrayList(pages.size() + 1);
for (Iterator iterator = pages.iterator(); iterator.hasNext();)
@@ -497,21 +502,6 @@
portalPageItems = (SelectItem[])list.toArray(new SelectItem[list.size()]);
//
- if (selectedProperties == null)
- {
- PortalObject object = getSelectedObject();
- PropertiesBean properties = new PropertiesBean(true);
- for (Iterator i = object.getDeclaredProperties().entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry)i.next();
- PropertyInfo info = new PropertyInfo(object, (String)entry.getKey(), false);
- info.setDisplayName(new LocalizedString((String)entry.getKey(), Locale.ENGLISH));
- properties.addEntry(info, (String)entry.getValue());
- }
- selectedProperties = PropertiesFilter.filter(object, properties);
- }
-
- //
PortalObject o = getSelectedObject();
ArrayList path = new ArrayList();
while (o != null)
@@ -534,17 +524,6 @@
instanceItems = (SelectItem[])tmp.toArray(new SelectItem[tmp.size()]);
}
- public SelectItem[] getProperties()
- {
- List items = new ArrayList();
- // items.add(new SelectItem(DynaRenderOptions.DND_ENABLED, "DnD enabled"));
- items.add(new SelectItem(DynaRenderOptions.PARTIAL_REFRESH_ENABLED, "Partial Refresh Enabled"));
- items.add(new SelectItem(ThemeConstants.PORTAL_PROP_ORDER, "Order"));
- items.add(new SelectItem(PortalObject.PORTAL_PROP_DEFAULT_OBJECT_NAME, "Default child name"));
- items.add(new SelectItem("other", "Other"));
- return (SelectItem[])items.toArray(new SelectItem[items.size()]);
- }
-
public void processEvent(ActionEvent event)
{
if (event instanceof PortletActionEvent)
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PreferencesBean.java 2007-04-23 14:59:51 UTC (rev 7029)
@@ -111,7 +111,7 @@
{
if (pref.container != null)
{
- throw new IllegalArgumentException("Already contained somewhere");
+ throw new IllegalStateException("Already contained somewhere");
}
pref.container = this;
entries.add(pref);
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-04-23 14:59:51 UTC (rev 7029)
@@ -22,9 +22,18 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.theme.ThemeConstants;
+import org.jboss.portal.theme.impl.render.dynamic.DynaRenderOptions;
+
+import javax.faces.model.SelectItem;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Locale;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -43,9 +52,74 @@
/** . */
private boolean mutable;
- public PropertiesBean(boolean mutable)
+ /** . */
+ final PortalObjectManagerBean pomgr;
+
+ public PropertiesBean(PortalObjectManagerBean pomgr, boolean mutable)
{
- this.entries = new ArrayList();
+ // Get the selected object
+ PortalObject selectedObject = pomgr.getSelectedObject();
+
+ // Look at declared properties
+ List entries = new ArrayList();
+ for (Iterator i = selectedObject.getDeclaredProperties().entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String value = (String)entry.getValue();
+ String name = (String)entry.getKey();
+
+ //
+ String type = "java.lang.String";
+ LocalizedString displayName = new LocalizedString(name, Locale.ENGLISH);
+
+ //
+ if (name.equals(ThemeConstants.PORTAL_PROP_LAYOUT))
+ {
+ continue;
+ }
+ else if (name.equals(ThemeConstants.PORTAL_PROP_THEME))
+ {
+ continue;
+ }
+ else if (name.equals(ThemeConstants.PORTAL_PROP_RENDERSET))
+ {
+ continue;
+ }
+ else if (name.equals(ThemeConstants.PORTAL_PROP_ORDER))
+ {
+ displayName = new LocalizedString("Order", Locale.ENGLISH);
+ }
+ else if (name.equals(PortalObject.PORTAL_PROP_DEFAULT_OBJECT_NAME))
+ {
+ displayName = new LocalizedString("Default child name", Locale.ENGLISH);
+ }
+ else if (name.equals(DynaRenderOptions.PARTIAL_REFRESH_ENABLED))
+ {
+ displayName = new LocalizedString("Partial Refresh Enabled", Locale.ENGLISH);
+ type = "java.lang.Boolean";
+ }
+
+ //
+
+ if (!mutable)
+ {
+ throw new IllegalStateException("Cannot add non mutable entry to a mutable preferences bean");
+ }
+
+ //
+ PropertyInfo info = new PropertyInfo(name, displayName, type, false);
+
+ //
+ PropertyBean propertyBean = new PropertyBean(this, info, value);
+
+ //
+ entries.add(propertyBean);
+ }
+ Collections.sort(entries);
+
+ //
+ this.pomgr = pomgr;
+ this.entries = entries;
this.selectedIndex = -1;
this.mutable = mutable;
}
@@ -83,36 +157,24 @@
return (PreferenceBean)entries.get(selectedIndex);
}
- public void addEntry(PropertyInfo info, String value)
+ public List getEntries()
{
- if (!mutable)
- {
- throw new IllegalStateException("Cannot add non mutable entry to a mutable preferences bean");
- }
-
- //
- addEntry(new PropertyBean(info, value));
+ return entries;
}
- private void addEntry(PropertyBean pref)
+ public int getSize()
{
- if (pref.container != null)
- {
- throw new IllegalArgumentException("Already contained somewhere");
- }
- pref.container = this;
- entries.add(pref);
- Collections.sort(entries);
+ return entries.size();
}
- public List getEntries()
+ public SelectItem[] getPropertyItems()
{
- return entries;
+ List items = new ArrayList();
+ // items.add(new SelectItem(DynaRenderOptions.DND_ENABLED, "DnD enabled"));
+ items.add(new SelectItem(DynaRenderOptions.PARTIAL_REFRESH_ENABLED, "Partial Refresh Enabled"));
+ items.add(new SelectItem(ThemeConstants.PORTAL_PROP_ORDER, "Order"));
+ items.add(new SelectItem(PortalObject.PORTAL_PROP_DEFAULT_OBJECT_NAME, "Default child name"));
+ return (SelectItem[])items.toArray(new SelectItem[items.size()]);
}
- public int getSize()
- {
- return entries.size();
- }
-
}
Deleted: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesFilter.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesFilter.java 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesFilter.java 2007-04-23 14:59:51 UTC (rev 7029)
@@ -1,60 +0,0 @@
-package org.jboss.portal.core.admin.ui;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-
-import org.jboss.portal.common.i18n.LocalizedString;
-import org.jboss.portal.core.model.portal.PortalObject;
-import org.jboss.portal.theme.ThemeConstants;
-import org.jboss.portal.theme.impl.render.dynamic.DynaRenderOptions;
-
-public class PropertiesFilter
-{
-
- public static PropertiesBean filter(PortalObject portalObject, PropertiesBean properties)
- {
- Iterator it = properties.getEntries().iterator();
- List toRemove = new ArrayList();
-
- while (it.hasNext())
- {
- PropertyBean propertyBean = (PropertyBean)it.next();
- if (propertyBean.getName().equals(ThemeConstants.PORTAL_PROP_LAYOUT))
- {
- toRemove.add(propertyBean);
- }
- else if (propertyBean.getName().equals(ThemeConstants.PORTAL_PROP_THEME))
- {
- toRemove.add(propertyBean);
- }
- else if (propertyBean.getName().equals(ThemeConstants.PORTAL_PROP_RENDERSET))
- {
- toRemove.add(propertyBean);
- }
- else if (propertyBean.getName().equals(ThemeConstants.PORTAL_PROP_ORDER))
- {
- propertyBean.setDisplayName(new LocalizedString("Order", Locale.ENGLISH));
- }
- else if (propertyBean.getName().equals(PortalObject.PORTAL_PROP_DEFAULT_OBJECT_NAME))
- {
- propertyBean.setDisplayName(new LocalizedString("Default child name", Locale.ENGLISH));
- }
- else if (propertyBean.getName().equals(DynaRenderOptions.PARTIAL_REFRESH_ENABLED))
- {
- propertyBean.setDisplayName(new LocalizedString("Partial Refresh Enabled", Locale.ENGLISH));
- propertyBean.setType("java.lang.Boolean");
- }
- }
-
- it = toRemove.iterator();
- while (it.hasNext())
- {
- properties.getEntries().remove(it.next());
- }
-
- return properties;
- }
-
-}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2007-04-23 14:59:51 UTC (rev 7029)
@@ -33,25 +33,22 @@
public class PropertyBean implements Comparable
{
-
/** . */
private String value;
- PropertiesBean container;
+ /** . */
+ private final PropertiesBean container;
- private PropertyInfo info;
+ /** . */
+ private final PropertyInfo info;
- public PropertyBean(PropertyInfo info, String value)
+ public PropertyBean(PropertiesBean container, PropertyInfo info, String value)
{
+ this.container = container;
this.info = info;
this.value = value;
}
- private PortalObject getPortalObject()
- {
- return info.getPortalObject();
- }
-
public String getName()
{
return info.getName();
@@ -67,16 +64,11 @@
return info.getDisplayName();
}
- public void setDisplayName(LocalizedString displayName)
- {
- info.setDisplayName(displayName);
- }
-
public Object getValue()
{
if (info.getType().equals("java.lang.Boolean"))
{
- return new Boolean(value);
+ return Boolean.valueOf(value);
}
else
{
@@ -87,7 +79,12 @@
public void setValue(Object value)
{
this.value = value.toString();
- getPortalObject().setDeclaredProperty(getName(), value.toString());
+
+ // Need to use the container as it will contain the refreshed object
+ PortalObject portalObject = container.pomgr.getSelectedObject();
+
+ //
+ portalObject.setDeclaredProperty(getName(), value.toString());
}
public int compareTo(Object o)
@@ -100,10 +97,4 @@
{
return info.getType();
}
-
- public void setType(String type)
- {
- info.setType(type);
- }
-
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java 2007-04-23 14:59:51 UTC (rev 7029)
@@ -23,7 +23,6 @@
package org.jboss.portal.core.admin.ui;
import org.jboss.portal.common.i18n.LocalizedString;
-import org.jboss.portal.core.model.portal.PortalObject;
/**
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
@@ -31,25 +30,25 @@
*/
public class PropertyInfo
{
+
/** . */
private String name;
/** . */
private boolean readOnly;
+ /** . */
private String type;
/** . */
private LocalizedString displayName;
-
- private PortalObject portalObject;
- public PropertyInfo(PortalObject portalObject, String name, boolean readOnly)
+ public PropertyInfo(String name, LocalizedString displayName, String type, boolean readOnly)
{
this.name = name;
this.readOnly = readOnly;
- this.portalObject = portalObject;
- this.type = "java.lang.String";
+ this.displayName = displayName;
+ this.type = type;
}
public LocalizedString getDisplayName()
@@ -57,44 +56,18 @@
return displayName;
}
- public void setDisplayName(LocalizedString displayName)
- {
- this.displayName = displayName;
- }
-
public String getName()
{
return name;
}
- public void setName(String name)
- {
- this.name = name;
- }
-
public boolean isReadOnly()
{
return readOnly;
}
- public void setReadOnly(boolean readOnly)
- {
- this.readOnly = readOnly;
- }
-
- public PortalObject getPortalObject()
- {
- return portalObject;
- }
-
public String getType()
{
return type;
}
-
- public void setType(String type)
- {
- this.type = type;
- }
-
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java 2007-04-23 14:59:51 UTC (rev 7029)
@@ -38,25 +38,24 @@
*/
public class PropertyAction
{
+
/** . */
private PortalObjectManagerBean pomgr;
+ /** . */
private String selectedProperty;
+ /** . */
private String propertyValue;
+ /** . */
private String otherPropertyName;
+ /** . */
private static final String ERROR_EMPTY_NAME = "Property name cannot be blank!";
public PortalObjectManagerBean getPortalObjectManager()
{
- //don't know why but this isn't injected properly in faces-config.xml
- if (pomgr == null)
- {
- FacesContext ctx = FacesContext.getCurrentInstance();
- pomgr = (PortalObjectManagerBean)ctx.getApplication().createValueBinding("#{portalobjectmgr}").getValue(ctx);
- }
return pomgr;
}
@@ -96,8 +95,6 @@
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, PropertyAction.ERROR_EMPTY_NAME, PropertyAction.ERROR_EMPTY_NAME);
throw new ValidatorException(message);
}
-
-
}
public void selectProperty()
@@ -113,23 +110,23 @@
public void updateProperty()
{
- String propertyName = selectedProperty.trim();
- if (getSelectedProperty() != null)
+ String propertyName = otherPropertyName.trim();
+
+ //
+ if (propertyName.length() == 0 && selectedProperty != null)
{
- if (selectedProperty.equals("other"))
- {
- propertyName = otherPropertyName.trim();
- }
+ propertyName = selectedProperty.trim();
+ }
- if (! propertyName.equals(""))
+ //
+ if (propertyName.length() > 0)
+ {
+ String value = getPropertyValue();
+ if (value == null)
{
- String value = getPropertyValue();
- if (value == null)
- {
- value = "";
- }
- getPortalObjectManager().getSelectedObject().setDeclaredProperty(propertyName, value);
+ value = "";
}
+ getPortalObjectManager().getSelectedObject().setDeclaredProperty(propertyName, value);
}
}
@@ -142,5 +139,4 @@
{
this.otherPropertyName = otherPropertyName;
}
-
}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-04-23 14:59:51 UTC (rev 7029)
@@ -202,10 +202,11 @@
<value>#{sessionScope.instancemgr}</value>
</managed-property>
</managed-bean>
+
<managed-bean>
<managed-bean-name>propertyAction</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.actions.PropertyAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
+ <managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>portalObjectManager</property-name>
<value>#{sessionScope.portalobjectmgr}</value>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-04-23 12:58:04 UTC (rev 7028)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-04-23 14:59:51 UTC (rev 7029)
@@ -27,10 +27,10 @@
<td>
<c:choose>
<c:when test="#{prop.type=='java.lang.Boolean'}">
- <h:selectBooleanCheckbox value="#{prop.value}" />
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" value="#{prop.value}" />
</c:when>
<c:otherwise>
- <h:inputText value="#{prop.value}" />
+ <h:inputText styleClass="portlet-form-input-field" value="#{prop.value}" />
</c:otherwise>
</c:choose>
</td>
@@ -47,25 +47,41 @@
<h:commandButton value="Update" styleClass="portlet-form-button"/>
</h:form>
+ <!-- Separation -->
+ <hr/>
+
+ <h3>Add a new property</h3>
+
+ <p>You can either create a predefined property or create one with the name of your choice</p>
+
<h:form>
- <table width="100%">
- <thead class="portlet-section-header" style="text-align:left;">
- <tr>
- <th>Property name</th>
- </tr>
- </thead>
- <tbody>
- <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
- <td>
- <h:selectOneMenu value="#{propertyAction.selectedProperty}">
- <f:selectItems value="#{portalobjectmgr.properties}"/>
- </h:selectOneMenu>
- <h:outputText value="Other:"/> <h:inputText value="#{propertyAction.otherPropertyName}" />
- </td>
- </tr>
- </tbody>
- </table>
- <h:commandButton value="Add property" styleClass="portlet-form-button" action="#{propertyAction.updateProperty}"/>
+ <fieldset style="border: 1px solid;">
+ <table>
+ <tbody>
+ <tr>
+ <td class="portlet-form-field-label">
+ <h:outputLabel for="predefinedProperty">Select a predefined property: </h:outputLabel>
+ </td>
+ <td>
+ <h:selectOneMenu id="predefinedProperty" styleClass="portlet-form-button" value="#{propertyAction.selectedProperty}">
+ <f:selectItems value="#{properties.propertyItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-form-field-label">
+ <h:outputLabel for="property">Or enter a property name: </h:outputLabel>
+ </td>
+ <td>
+ <h:inputText id="property" styleClass="portlet-form-input-field" value="#{propertyAction.otherPropertyName}" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </fieldset>
+ <div style="text-align:center;padding: 1em 0 1em 0">
+ <h:commandButton value="Add property" styleClass="portlet-form-button" action="#{propertyAction.updateProperty}"/>
+ </div>
</h:form>
</div>
19 years
JBoss Portal SVN: r7028 - in trunk: bridge and 20 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-04-23 08:58:04 -0400 (Mon, 23 Apr 2007)
New Revision: 7028
Modified:
trunk/api/build.xml
trunk/bridge/build.xml
trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java
trunk/core-admin/build.xml
trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
trunk/jems/build.xml
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
trunk/registration/build.xml
trunk/search/build.xml
trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java
trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java
trunk/test/build.xml
trunk/tools/etc/buildfragments/buildmagic.ent
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java
Log:
- fix for JBPORTAL-1315 : Portlets "forget" that they are in EDIT mode
- added modules-package-tests so it is possible to package tests all modules with the build/build.xml file
- remove the nav state scope from the server module
- pass the ControllerContext as part of the doMapping(...) in CommandFactories so they can retrieve the nav state scope correctly
- updated fix that Thomas did for the prb with the maximized/normal window issue
Modified: trunk/api/build.xml
===================================================================
--- trunk/api/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/api/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -181,4 +181,6 @@
<target name="most" depends="_default:most"/>
<target name="help" depends="_default:help"/>
+ <target name="package-tests"></target>
+
</project>
Modified: trunk/bridge/build.xml
===================================================================
--- trunk/bridge/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/bridge/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -188,4 +188,7 @@
<!-- ================================================================== -->
<!-- Test. -->
<!-- ================================================================== -->
+
+ <target name="package-tests"/>
+
</project>
Modified: trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -63,7 +63,7 @@
{
throw new IllegalArgumentException();
}
- resolvers.put(resolverScope, new AttributeResolverRegistration(resolver));
+ resolvers.put(resolverScope, new AttributeResolverRegistration(resolver));
}
public AttributeResolver getAttributeResolver(Scope attrScope) throws IllegalArgumentException
Modified: trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -195,8 +195,11 @@
public final void handle(ServerInvocation invocation) throws ServerException
{
+ // Create controller context
+ ControllerContext controllerContext = new ControllerContext(invocation, this);
+
// Invoke the chain that creates the initial command
- ControllerCommand cmd = commandFactory.doMapping(invocation, invocation.getServerContext().getPortalHost(), invocation.getServerContext().getPortalContextPath(), invocation.getServerContext().getPortalRequestPath());
+ ControllerCommand cmd = commandFactory.doMapping(controllerContext, invocation, invocation.getServerContext().getPortalHost(), invocation.getServerContext().getPortalContextPath(), invocation.getServerContext().getPortalRequestPath());
//
if (cmd == null)
@@ -205,9 +208,6 @@
throw new ServerException("No command was produced by the command factory");
}
- // Create controller context
- ControllerContext controllerContext = new ControllerContext(invocation, this);
-
// Handle the command created
processCommand(controllerContext, cmd);
}
Modified: trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -24,6 +24,7 @@
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.command.action.MoveWindowCommand;
import org.jboss.portal.server.ServerInvocation;
@@ -36,7 +37,7 @@
*/
public class AjaxCommandFactory extends AbstractCommandFactory
{
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
HttpServletRequest req = invocation.getServerContext().getClientRequest();
String action = req.getParameter("action");
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.server.ServerInvocation;
@@ -34,7 +35,7 @@
{
public abstract ControllerCommand doMapping(
- ServerInvocation invocation,
+ ControllerContext controllerContext, ServerInvocation invocation,
String host, String contextPath,
String requestPath);
}
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -37,13 +38,14 @@
/**
* Create a command.
*
- * @param invocation the invocation
+ * @param controllerContext the controller context
+ * @param invocation the server invocation
* @param host the host
* @param contextPath the context path
- * @param requestPath the request path
- * @return the command or null if no command is recognized
+ * @param requestPath the request path @return the command or null if no command is recognized
*/
ControllerCommand doMapping(
+ ControllerContext controllerContext,
ServerInvocation invocation,
String host,
String contextPath,
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -81,8 +82,8 @@
delegatingFactory.unregister(path);
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
- return delegateFactory.doMapping(invocation, host, contextPath, requestPath);
+ return delegateFactory.doMapping(controllerContext, invocation, host, contextPath, requestPath);
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.servlet.PathMapping;
import org.jboss.portal.server.servlet.PathMappingResult;
@@ -122,7 +123,7 @@
}
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
//
if (requestPath.length() == 0)
@@ -138,13 +139,13 @@
{
CommandFactory delegate = (CommandFactory)target;
String remainingPath = result.getRemainingPath();
- cmd = delegate.doMapping(invocation, host, contextPath + result.getMatchedPath(), remainingPath);
+ cmd = delegate.doMapping(controllerContext, invocation, host, contextPath + result.getMatchedPath(), remainingPath);
}
//
if (cmd == null && nextFactory != null)
{
- cmd = nextFactory.doMapping(invocation, host, contextPath, requestPath);
+ cmd = nextFactory.doMapping(controllerContext, invocation, host, contextPath, requestPath);
}
return cmd;
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -66,7 +67,7 @@
commandClass = null;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
try
{
Modified: trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.model.instance;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceActionCommand;
import org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
@@ -49,7 +50,7 @@
this.instanceId = instanceId;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
PortletRequestDecoder decoder = new PortletRequestDecoder();
decoder.decode(invocation.getServerContext().getQueryParameterMap(), invocation.getServerContext().getBodyParameterMap());
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.model.portal;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.command.view.ViewDashboardCommand;
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.server.ServerInvocation;
@@ -33,7 +34,7 @@
*/
public class DashboardCommandFactory extends AbstractCommandFactory
{
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
return new ViewDashboardCommand();
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.model.portal;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.core.controller.command.mapper.CommandFactory;
@@ -63,9 +64,9 @@
this.nextFactory = nextFactory;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
- ControllerCommand cmd = nextFactory.doMapping(invocation, host, contextPath, requestPath);
+ ControllerCommand cmd = nextFactory.doMapping(controllerContext, invocation, host, contextPath, requestPath);
if (cmd == null)
{
Portal portal = (Portal)container.getObject(defaultPortalPath);
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -26,6 +26,7 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowActionCommand;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.model.portal.command.action.ImportPageToDashboardCommand;
@@ -85,7 +86,7 @@
this.container = container;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
if (requestPath == null)
{
@@ -120,21 +121,20 @@
// Get the window navigational state
NavigationalStateKey nsKey = new NavigationalStateKey(WindowNavigationalState.class, window.getId());
- WindowNavigationalState windowNavState = (WindowNavigationalState)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, nsKey);
+ WindowNavigationalState windowNavState = (WindowNavigationalState)controllerContext.getAttribute(ControllerCommand.NAVIGATIONAL_STATE_SCOPE, nsKey);
if (windowNavState == null)
{
windowNavState = new WindowNavigationalState();
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, nsKey, windowNavState);
+ controllerContext.setAttribute(ControllerCommand.NAVIGATIONAL_STATE_SCOPE, nsKey, windowNavState);
}
//
WindowState windowState = decoder.getWindowState();
-/*
if (windowState == null)
{
windowState = windowNavState.getWindowState();
}
-*/
+
//
Mode mode = decoder.getMode();
if (mode == null)
Modified: trunk/core-admin/build.xml
===================================================================
--- trunk/core-admin/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core-admin/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -272,5 +272,7 @@
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-admin.sar"/>
</target>
+
+ <target name="package-tests"/>
</project>
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -24,6 +24,7 @@
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.cms.command.StreamContentCommand;
@@ -124,7 +125,7 @@
return file;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext, ServerInvocation invocation, String host, String contextPath, String requestPath)
{
try
{
Modified: trunk/jems/build.xml
===================================================================
--- trunk/jems/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/jems/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -207,4 +207,7 @@
<!-- ================================================================== -->
<!-- Deployment -->
<!-- ================================================================== -->
+
+ <target name="package-tests"/>
+
</project>
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -40,12 +40,10 @@
protected Object invoke(PortletInvocation invocation) throws Exception, InvocationException
{
- /*
if (invocation.getPortletContext().getWindowState() == null)
{
throw new InvocationException("No window state has been provided");
}
- */
// Compute the supported window states
Set windowStates = getWindowStates(invocation);
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -52,8 +52,20 @@
*/
PortletInfo getInfo();
+ /**
+ * todo : remove that and have rather a way to expose runtime information meta data � la PortletInfo.
+ *
+ * Return specific JBoss Portlet buildtime meta data.
+ *
+ * @return the JBoss specific buildtime meta data
+ */
JBossPortletMetaData getJBossMetaData();
+ /**
+ * Return the content types understood by the container.
+ *
+ * @return the content types
+ */
ContentTypes getContentTypes();
/**
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -133,7 +133,13 @@
public PortletInfo getInfo()
{
- return info;
+ if (started)
+ {
+ return info;
+ }
+
+ //
+ throw new IllegalStateException("Portlet " + metaData.getName() + " is not started");
}
public String getId()
Modified: trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
===================================================================
--- trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -28,6 +28,7 @@
import org.jboss.portal.test.framework.portlet.PortletTestParameters;
import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.invocation.EmptyAttributeResolver;
+import org.jboss.portal.common.invocation.Scope;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.common.util.URLTools;
@@ -95,6 +96,9 @@
{
/** . */
+ private static final Scope NAVIGATIONAL_STATE_SCOPE = ServerInvocation.SESSION_SCOPE;
+
+ /** . */
protected boolean redirectAfterAction;
/** . */
@@ -141,7 +145,7 @@
if (decoder.getType() == PortletRequestDecoder.ACTION_TYPE)
{
// Get the navigational state if it exist
- PortletParametersStateString navigationalState = (PortletParametersStateString)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId());
+ PortletParametersStateString navigationalState = (PortletParametersStateString)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId());
//
ActionContextImpl actionContext = new ActionContextImpl(
@@ -194,7 +198,7 @@
}
else
{
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId(), renderResult.getNavigationalState());
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId(), renderResult.getNavigationalState());
}
}
if (response instanceof HTTPRedirectionResponse)
@@ -228,7 +232,7 @@
else
{
//
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId(), decoder.getNavigationalState());
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId(), decoder.getNavigationalState());
//
Mode mode = decoder.getMode();
@@ -236,7 +240,7 @@
{
mode = Mode.VIEW;
}
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_mode", mode);
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_mode", mode);
//
WindowState windowState = decoder.getWindowState();
@@ -244,7 +248,7 @@
{
windowState = WindowState.NORMAL;
}
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_windowstate", windowState);
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_windowstate", windowState);
}
}
@@ -258,17 +262,17 @@
Portlet portlet = (Portlet)i.next();
// Get the navigational state
- StateString ns = (StateString)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId());
+ StateString ns = (StateString)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext().getId());
// Get the mode
- Mode mode = (Mode)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_mode");
+ Mode mode = (Mode)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_mode");
if (mode == null)
{
mode = Mode.VIEW;
}
// Get the window state
- WindowState windowState = (WindowState)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_windowstate");
+ WindowState windowState = (WindowState)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() + "_windowstate");
if (windowState == null)
{
windowState = WindowState.NORMAL;
Modified: trunk/registration/build.xml
===================================================================
--- trunk/registration/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/registration/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -229,4 +229,7 @@
<target name="tests" depends="clean-test">
<antcall target="registration-test"/>
</target>
+
+ <target name="package-tests"/>
+
</project>
Modified: trunk/search/build.xml
===================================================================
--- trunk/search/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/search/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -192,4 +192,6 @@
</execute-tests>
</target>
+ <target name="package-tests"/>
+
</project>
Modified: trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -42,9 +42,6 @@
/** . */
public static final Scope REQUEST_SCOPE = Scope.REQUEST_SCOPE;
- /** . */
- public static final Scope NAVIGATIONAL_STATE_SCOPE = new Scope("navigationalstate");
-
/** The request. */
private ServerRequest req;
Modified: trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -143,7 +143,6 @@
addResolver(ServerInvocation.REQUEST_SCOPE, new RequestAttributeResolver(req));
addResolver(ServerInvocation.SESSION_SCOPE, new SessionAttributeResolver(req, PortalConstants.PORTAL_SESSION_MAP_KEY));
addResolver(ServerInvocation.PRINCIPAL_SCOPE, new PrincipalAttributeResolver(req));
- addResolver(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, new SessionAttributeResolver(req, PortalConstants.NAVIGATIONAL_STATE_MAP_KEY));
}
public HttpServletRequest getClientRequest()
Modified: trunk/test/build.xml
===================================================================
--- trunk/test/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/test/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -346,4 +346,7 @@
</target>
+ <target name="package-tests">
+ </target>
+
</project>
Modified: trunk/tools/etc/buildfragments/buildmagic.ent
===================================================================
--- trunk/tools/etc/buildfragments/buildmagic.ent 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/tools/etc/buildfragments/buildmagic.ent 2007-04-23 12:58:04 UTC (rev 7028)
@@ -293,6 +293,20 @@
</execmodules>
</target>
+<!-- Invoke the 'main' on all configured modules -->
+<target name="_buildmagic:modules:package-tests" depends="_buildmagic:init">
+ <execmodules target="package-tests"
+ modules="${modules}"
+ root="${project.root}/@MODULE@"
+ exportproperties="${executemodules.exportproperties}">
+ <header message="${executemodules.header}"/>
+ <footer message="${executemodules.footer}"/>
+ <before target="_module-@MODULE@-@TARGET@-prepare"/>
+ <after target="_module-@MODULE@-@TARGET@"/>
+ <property name="init.have-parent" value="true"/>
+ </execmodules>
+</target>
+
<!-- Invoke the 'release' on all configured modules -->
<target name="_buildmagic:modules:release" depends="_buildmagic:init">
<execmodules target="release"
@@ -1107,4 +1121,4 @@
name="undeploy"
classname="org.jboss.portal.common.ant.Undeploy"
classpathref="portal.task.classpath"/>
-</target>
\ No newline at end of file
+</target>
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java 2007-04-23 12:58:04 UTC (rev 7028)
@@ -72,7 +72,7 @@
{
if (info == null)
{
- throw new IllegalStateException("No PortletInfo was set for WSRPPortler '" + portletContext.getId() + "'");
+ throw new IllegalStateException("No PortletInfo was set for WSRPPortlet '" + portletContext.getId() + "'");
}
return info;
}
19 years
JBoss Portal SVN: r7027 - tags/JBoss_Portal_2_6_0_CR1/wsrp.
by portal-commits@lists.jboss.org
Author: prabhat.jha(a)jboss.com
Date: 2007-04-23 00:30:32 -0400 (Mon, 23 Apr 2007)
New Revision: 7027
Modified:
tags/JBoss_Portal_2_6_0_CR1/wsrp/build.xml
Log:
fixed call to clean-test target
Modified: tags/JBoss_Portal_2_6_0_CR1/wsrp/build.xml
===================================================================
--- tags/JBoss_Portal_2_6_0_CR1/wsrp/build.xml 2007-04-23 03:54:53 UTC (rev 7026)
+++ tags/JBoss_Portal_2_6_0_CR1/wsrp/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
@@ -322,7 +322,7 @@
<!-- ================================================================== -->
<!-- Clean up all build output -->
- <target name="clean" depends="_default:clean, clean-test">
+ <target name="clean" depends="_default:clean">
<!-- Add module specific elements here. -->
</target>
@@ -631,7 +631,7 @@
<antcall target="reports"/>
</target>
- <target name="tests" depends="clean-test">
+ <target name="tests">
<antcall target="producer-test"/>
<antcall target="consumer-test"/>
<antcall target="deployment-test"/>
19 years