Author: julien(a)jboss.com
Date: 2007-06-11 11:30:01 -0400 (Mon, 11 Jun 2007)
New Revision: 7400
Removed:
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/DefaultWindowControlPolicy.java
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlContext.java
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlPolicy.java
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml
trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
trunk/core/src/main/org/jboss/portal/core/model/portal/control/ControlConstants.java
trunk/core/src/main/org/jboss/portal/core/model/portal/control/portal/DefaultPortalControlPolicy.java
trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
Log:
better naming of control policies
Modified: trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-06-11
15:12:39 UTC (rev 7399)
+++ trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -33,8 +33,7 @@
import org.jboss.portal.core.controller.handler.ResponseHandler;
import org.jboss.portal.core.controller.handler.AjaxResponse;
import org.jboss.portal.core.controller.handler.ResponseHandlerException;
-import org.jboss.portal.core.model.portal.control.portal.PortalControlPolicy;
-import org.jboss.portal.core.model.portal.control.window.WindowControlPolicy;
+import org.jboss.portal.core.model.portal.control.page.PageControlPolicy;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.content.ContentRendererRegistry;
import org.jboss.portal.core.model.instance.InstanceContainer;
@@ -92,11 +91,8 @@
protected ServletContainerContext servletContainerContext;
/** . */
- protected PortalControlPolicy portalControlPolicy;
+ protected PageControlPolicy pageControlPolicy;
- /** . */
- protected WindowControlPolicy windowControlPolicy;
-
public ContentRendererRegistry getContentRendererRegistry()
{
return contentRendererRegistry;
@@ -202,26 +198,16 @@
return servletContainerContext;
}
- public WindowControlPolicy getWindowControlPolicy()
+ public PageControlPolicy getPageControlPolicy()
{
- return windowControlPolicy;
+ return pageControlPolicy;
}
- public void setWindowControlPolicy(WindowControlPolicy windowControlPolicy)
+ public void setPageControlPolicy(PageControlPolicy pageControlPolicy)
{
- this.windowControlPolicy = windowControlPolicy;
+ this.pageControlPolicy = pageControlPolicy;
}
- public PortalControlPolicy getPortalControlPolicy()
- {
- return portalControlPolicy;
- }
-
- public void setPortalControlPolicy(PortalControlPolicy portalControlPolicy)
- {
- this.portalControlPolicy = portalControlPolicy;
- }
-
public final void handle(ServerInvocation invocation) throws ServerException
{
// Create controller context
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -30,7 +30,7 @@
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.control.window.WindowControlContext;
+import org.jboss.portal.core.model.portal.control.page.PageControlContext;
import org.jboss.portal.core.model.portal.command.WindowCommand;
import org.jboss.portal.core.model.portal.content.ContentRenderer;
import org.jboss.portal.core.model.portal.content.ContentRendererRegistry;
@@ -90,8 +90,8 @@
// Apply policy behavior here
if (rendition != null)
{
- WindowControlContext wcc = new WindowControlContext(context, targetId,
rendition);
- context.getController().getWindowControlPolicy().doControl(wcc);
+ PageControlContext wcc = new PageControlContext(context, targetId,
rendition);
+ context.getController().getPageControlPolicy().doControl(wcc);
}
}
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/control/ControlConstants.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/control/ControlConstants.java 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/control/ControlConstants.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -34,40 +34,40 @@
}
/** . */
- public static final String AGGREGATION_ACCESS_DENIED_CONTROL_KEY =
"control.aggregation.access_denied";
+ public static final String PAGE_ACCESS_DENIED_CONTROL_KEY =
"control.page.access_denied";
/** . */
- public static final String AGGREGATION_UNAVAILABLE_CONTROL_KEY =
"control.aggregation.unavailable";
+ public static final String PAGE_UNAVAILABLE_CONTROL_KEY =
"control.page.unavailable";
/** . */
- public static final String AGGREGATION_ERROR_CONTROL_KEY =
"control.aggregation.error";
+ public static final String PAGE_ERROR_CONTROL_KEY = "control.page.error";
/** . */
- public static final String AGGREGATION_INTERNAL_ERROR_CONTROL_KEY =
"control.aggregation.internal_error";
+ public static final String PAGE_INTERNAL_ERROR_CONTROL_KEY =
"control.page.internal_error";
/** . */
- public static final String AGGREGATION_NOT_FOUND_CONTROL_KEY =
"control.aggregation.not_found";
+ public static final String PAGE_NOT_FOUND_CONTROL_KEY =
"control.page.not_found";
/** . */
- public static final String AGGREGATION_RESOURCE_URI_CONTROL_KEY =
"control.aggregation.resource_uri";
+ public static final String PAGE_RESOURCE_URI_CONTROL_KEY =
"control.page.resource_uri";
/** . */
- public static final String GLOBAL_ACCESS_DENIED_CONTROL_KEY =
"control.access_denied";
+ public static final String PORTAL_ACCESS_DENIED_CONTROL_KEY =
"control.portal.access_denied";
/** . */
- public static final String GLOBAL_UNAVAILABLE_CONTROL_KEY =
"control.unavailable";
+ public static final String PORTAL_UNAVAILABLE_CONTROL_KEY =
"control.portal.unavailable";
/** . */
- public static final String GLOBAL_ERROR_CONTROL_KEY = "control.error";
+ public static final String PORTAL_ERROR_CONTROL_KEY =
"control.portal.error";
/** . */
- public static final String GLOBAL_INTERNAL_ERROR_CONTROL_KEY =
"control.internal_error";
+ public static final String PORTAL_INTERNAL_ERROR_CONTROL_KEY =
"control.portal.internal_error";
/** . */
- public static final String GLOBAL_NOT_FOUND_CONTROL_KEY =
"control.not_found";
+ public static final String PORTAL_NOT_FOUND_CONTROL_KEY =
"control.portal.not_found";
/** . */
- public static final String GLOBAL_RESOURCE_URI_CONTROL_KEY =
"control.resource_uri";
+ public static final String PORTAL_RESOURCE_URI_CONTROL_KEY =
"control.portal.resource_uri";
/** . */
public static final String HIDE_CONTROL_VALUE = "hide";
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/control/portal/DefaultPortalControlPolicy.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/control/portal/DefaultPortalControlPolicy.java 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/control/portal/DefaultPortalControlPolicy.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -62,11 +62,11 @@
static
{
- errorTypeMapping.put(ControlConstants.GLOBAL_ACCESS_DENIED_CONTROL_KEY,
ControlConstants.ACCESS_DENIED_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.GLOBAL_ERROR_CONTROL_KEY,
ControlConstants.ERROR_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.GLOBAL_INTERNAL_ERROR_CONTROL_KEY,
ControlConstants.INTERNAL_ERROR_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.GLOBAL_UNAVAILABLE_CONTROL_KEY,
ControlConstants.UNAVAILABLE_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.GLOBAL_NOT_FOUND_CONTROL_KEY,
ControlConstants.NOT_FOUND_ERROR_TYPE);
+ errorTypeMapping.put(ControlConstants.PORTAL_ACCESS_DENIED_CONTROL_KEY,
ControlConstants.ACCESS_DENIED_ERROR_TYPE);
+ errorTypeMapping.put(ControlConstants.PORTAL_ERROR_CONTROL_KEY,
ControlConstants.ERROR_ERROR_TYPE);
+ errorTypeMapping.put(ControlConstants.PORTAL_INTERNAL_ERROR_CONTROL_KEY,
ControlConstants.INTERNAL_ERROR_ERROR_TYPE);
+ errorTypeMapping.put(ControlConstants.PORTAL_UNAVAILABLE_CONTROL_KEY,
ControlConstants.UNAVAILABLE_ERROR_TYPE);
+ errorTypeMapping.put(ControlConstants.PORTAL_NOT_FOUND_CONTROL_KEY,
ControlConstants.NOT_FOUND_ERROR_TYPE);
}
/** . */
@@ -107,12 +107,12 @@
//
if (ser.getStatus() == SecurityErrorResponse.NOT_AUTHORIZED)
{
- policyKey = ControlConstants.GLOBAL_ACCESS_DENIED_CONTROL_KEY;
+ policyKey = ControlConstants.PORTAL_ACCESS_DENIED_CONTROL_KEY;
}
}
else
{
- policyKey = error.isInternal() ?
ControlConstants.GLOBAL_INTERNAL_ERROR_CONTROL_KEY :
ControlConstants.GLOBAL_ERROR_CONTROL_KEY;
+ policyKey = error.isInternal() ?
ControlConstants.PORTAL_INTERNAL_ERROR_CONTROL_KEY :
ControlConstants.PORTAL_ERROR_CONTROL_KEY;
}
}
else if (response instanceof UnavailableResourceResponse)
@@ -120,7 +120,7 @@
UnavailableResourceResponse unavailable =
(UnavailableResourceResponse)response;
//
- policyKey = unavailable.isLocated() ?
ControlConstants.GLOBAL_UNAVAILABLE_CONTROL_KEY :
ControlConstants.GLOBAL_NOT_FOUND_CONTROL_KEY;
+ policyKey = unavailable.isLocated() ?
ControlConstants.PORTAL_UNAVAILABLE_CONTROL_KEY :
ControlConstants.PORTAL_NOT_FOUND_CONTROL_KEY;
}
//
@@ -142,7 +142,7 @@
{
if (ControlConstants.JSP_CONTROL_VALUE.equals(policyValue))
{
- String resourceURI =
object.getProperty(ControlConstants.AGGREGATION_RESOURCE_URI_CONTROL_KEY);
+ String resourceURI =
object.getProperty(ControlConstants.PAGE_RESOURCE_URI_CONTROL_KEY);
if (resourceURI != null)
{
ControllerContext controllerCtx =
controlContext.getControllerContext();
Deleted:
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/DefaultWindowControlPolicy.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/DefaultWindowControlPolicy.java 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/DefaultWindowControlPolicy.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -1,188 +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.model.portal.control.window;
-
-import org.jboss.logging.Logger;
-import org.jboss.portal.server.config.ServerConfig;
-import org.jboss.portal.core.controller.ControllerResponse;
-import org.jboss.portal.core.controller.ControllerContext;
-import org.jboss.portal.core.controller.ControllerRequestDispatcher;
-import org.jboss.portal.core.controller.command.response.ErrorResponse;
-import org.jboss.portal.core.controller.command.response.SecurityErrorResponse;
-import org.jboss.portal.core.controller.command.response.UnavailableResourceResponse;
-import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
-import org.jboss.portal.core.model.portal.content.WindowRendition;
-import org.jboss.portal.core.model.portal.control.ControlConstants;
-import org.jboss.portal.core.model.portal.PortalObjectContainer;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class DefaultWindowControlPolicy implements WindowControlPolicy
-{
-
- /** . */
- private static final Logger log = Logger.getLogger(DefaultWindowControlPolicy.class);
-
- /** . */
- private static final Map errorTypeMapping = new HashMap();
-
- static
- {
- errorTypeMapping.put(ControlConstants.AGGREGATION_ACCESS_DENIED_CONTROL_KEY,
ControlConstants.ACCESS_DENIED_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.AGGREGATION_ERROR_CONTROL_KEY,
ControlConstants.ERROR_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.AGGREGATION_INTERNAL_ERROR_CONTROL_KEY,
ControlConstants.INTERNAL_ERROR_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.AGGREGATION_UNAVAILABLE_CONTROL_KEY,
ControlConstants.UNAVAILABLE_ERROR_TYPE);
- errorTypeMapping.put(ControlConstants.AGGREGATION_NOT_FOUND_CONTROL_KEY,
ControlConstants.NOT_FOUND_ERROR_TYPE);
- }
-
- /** . */
- private ServerConfig serverConfig;
-
- /** . */
- private PortalObjectContainer portalObjectContainer;
-
- public ServerConfig getServerConfig()
- {
- return serverConfig;
- }
-
- public void setServerConfig(ServerConfig serverConfig)
- {
- this.serverConfig = serverConfig;
- }
-
- public PortalObjectContainer getPortalObjectContainer()
- {
- return portalObjectContainer;
- }
-
- public void setPortalObjectContainer(PortalObjectContainer portalObjectContainer)
- {
- this.portalObjectContainer = portalObjectContainer;
- }
-
- public void doControl(WindowControlContext controlContext)
- {
- WindowRendition rendition = controlContext.getRendition();
-
- //
- ControllerResponse response = rendition.getControllerResponse();
-
- //
- String policyKey = null;
- Throwable cause = null;
- String message = null;
-
- //
- if (response instanceof ErrorResponse)
- {
- ErrorResponse error = (ErrorResponse)response;
- cause = error.getCause();
- message = error.getMessage();
-
- //
- if (response instanceof SecurityErrorResponse)
- {
- SecurityErrorResponse ser = (SecurityErrorResponse)response;
-
- //
- if (ser.getStatus() == SecurityErrorResponse.NOT_AUTHORIZED)
- {
- policyKey = ControlConstants.AGGREGATION_ACCESS_DENIED_CONTROL_KEY;
- }
- }
- else
- {
- policyKey = error.isInternal() ?
ControlConstants.AGGREGATION_INTERNAL_ERROR_CONTROL_KEY :
ControlConstants.AGGREGATION_ERROR_CONTROL_KEY;
- }
- }
- else if (response instanceof UnavailableResourceResponse)
- {
- UnavailableResourceResponse unavailable =
(UnavailableResourceResponse)response;
-
- //
- if (log.isTraceEnabled())
- {
- log.trace("Window not found " + unavailable.getRef());
- }
-
- policyKey = unavailable.isLocated() ?
ControlConstants.AGGREGATION_UNAVAILABLE_CONTROL_KEY :
ControlConstants.AGGREGATION_NOT_FOUND_CONTROL_KEY;
- }
-
- //
- if (cause != null)
- {
- log.error("Rendering portlet window " + "" + " produced
an error", cause);
- }
-
- //
- if (policyKey != null)
- {
- Map properties = controlContext.getRendition().getProperties();
-
- //
- String policyValue = (String)properties.get(policyKey);
-
- //
- if (policyValue != null)
- {
- if (ControlConstants.HIDE_CONTROL_VALUE.equals(policyValue))
- {
- rendition.setControllerResponse(null);
- }
- else if (ControlConstants.JSP_CONTROL_VALUE.equals(policyValue))
- {
- String resourceURI =
(String)properties.get(ControlConstants.GLOBAL_RESOURCE_URI_CONTROL_KEY);
- if (resourceURI != null)
- {
- ControllerContext controllerCtx =
controlContext.getControllerContext();
- ControllerRequestDispatcher rd =
controllerCtx.getRequestDispatcher("/portal-core", resourceURI);
- if (rd != null)
- {
- String errorType = (String)errorTypeMapping.get(policyKey);
- rd.setAttribute(ControlConstants.ERROR_TYPE_ATTRIBUTE, errorType);
- rd.setAttribute(ControlConstants.CAUSE_ATTRIBUTE, cause);
- rd.setAttribute(ControlConstants.MESSAGE_ATTRIBUTE, message);
-
- //
- rd.include();
-
- //
- String markup = rd.getMarkup();
- rendition.setSupportedWindowStates(Collections.EMPTY_LIST);
- rendition.setSupportedModes(Collections.EMPTY_LIST);
- rendition.setControllerResponse(new MarkupResponse("An error
occured", markup, null));
- }
- }
- }
- }
- }
- }
-
-}
Deleted:
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlContext.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlContext.java 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlContext.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -1,60 +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.model.portal.control.window;
-
-import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.control.ControlContext;
-import org.jboss.portal.core.model.portal.content.WindowRendition;
-import org.jboss.portal.core.controller.ControllerContext;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class WindowControlContext extends ControlContext
-{
-
- /** . */
- private final PortalObjectId windowId;
-
- /** . */
- private final WindowRendition rendition;
-
-
- public WindowControlContext(ControllerContext controllerContext, PortalObjectId
windowId, WindowRendition rendition)
- {
- super(controllerContext);
- this.windowId = windowId;
- this.rendition = rendition;
- }
-
- public PortalObjectId getWindowId()
- {
- return windowId;
- }
-
- public WindowRendition getRendition()
- {
- return rendition;
- }
-}
Deleted:
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlPolicy.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlPolicy.java 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/control/window/WindowControlPolicy.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -1,34 +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.model.portal.control.window;
-
-/**
- * Policy that controls the behavior of a portal window.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface WindowControlPolicy
-{
- void doControl(WindowControlContext controlContext);
-}
Modified: trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-06-11
15:12:39 UTC (rev 7399)
+++ trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-06-11
15:30:01 UTC (rev 7400)
@@ -1030,8 +1030,8 @@
<!-- -->
<mbean
-
code="org.jboss.portal.core.model.portal.control.window.DefaultWindowControlPolicy"
- name="portal:service=ControlPolicy,type=Window"
+
code="org.jboss.portal.core.model.portal.control.page.DefaultPageControlPolicy"
+ name="portal:service=ControlPolicy,type=Page"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -1088,13 +1088,8 @@
optional-attribute-name="ResponseHandler"
proxy-type="attribute">portal:service=ResponseHandler,type=Selector</depends>
<depends
- optional-attribute-name="WindowControlPolicy"
-
proxy-type="attribute">portal:service=ControlPolicy,type=Window</depends>
-<!--
- <depends
- optional-attribute-name="PortalControlPolicy"
-
proxy-type="attribute">portal:service=ControlPolicy,type=Window</depends>
--->
+ optional-attribute-name="PageControlPolicy"
+
proxy-type="attribute">portal:service=ControlPolicy,type=Page</depends>
</mbean>
<!-- The controller factory -->
Modified: trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-06-11
15:12:39 UTC (rev 7399)
+++ trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-06-11
15:30:01 UTC (rev 7400)
@@ -32,51 +32,51 @@
<context-name/>
<properties>
<property>
- <name>control.access_denied</name>
+ <name>control.portal.access_denied</name>
<value>hide</value>
</property>
<property>
- <name>control.unavailable</name>
+ <name>control.portal.unavailable</name>
<value>hide</value>
</property>
<property>
- <name>control.not_found</name>
+ <name>control.portal.not_found</name>
<value>hide</value>
</property>
<property>
- <name>control.internal_error</name>
+ <name>control.portal.internal_error</name>
<value>jsp</value>
</property>
<property>
- <name>control.error</name>
+ <name>control.portal.error</name>
<value>jsp</value>
</property>
<property>
- <name>control.resource_uri</name>
+ <name>control.portal.resource_uri</name>
<value>/WEB-INF/jsp/control/error.jsp</value>
</property>
<property>
- <name>control.aggregation.access_denied</name>
+ <name>control.page.access_denied</name>
<value>hide</value>
</property>
<property>
- <name>control.aggregation.unavailable</name>
+ <name>control.page.unavailable</name>
<value>hide</value>
</property>
<property>
- <name>control.aggregation.not_found</name>
+ <name>control.page.not_found</name>
<value>hide</value>
</property>
<property>
- <name>control.aggregation.internal_error</name>
+ <name>control.page.internal_error</name>
<value>jsp</value>
</property>
<property>
- <name>control.aggregation.error</name>
+ <name>control.page.error</name>
<value>jsp</value>
</property>
<property>
- <name>control.aggregation.resource_uri</name>
+ <name>control.page.resource_uri</name>
<value>/WEB-INF/jsp/control/aggregation_error.jsp</value>
</property>
</properties>
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-11
15:30:01 UTC (rev 7400)
@@ -61,11 +61,11 @@
//
- public static final PropertyInfo CONTROL_POLICY_ACCESS_DENIED = new
PropertyInfo(ControlConstants.AGGREGATION_ACCESS_DENIED_CONTROL_KEY, new
LocalizedString("On window access denied"), new LocalizedString("On window
access denied"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
- public static final PropertyInfo CONTROL_POLICY_UNAVAILABLE = new
PropertyInfo(ControlConstants.AGGREGATION_UNAVAILABLE_CONTROL_KEY, new
LocalizedString("On window unavailable"), new LocalizedString("On window
unavailable"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
- public static final PropertyInfo CONTROL_POLICY_ERROR = new
PropertyInfo(ControlConstants.AGGREGATION_ERROR_CONTROL_KEY, new LocalizedString("On
window error"), new LocalizedString("On window error"),
"java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
- public static final PropertyInfo CONTROL_POLICY_INTERNAL_ERROR = new
PropertyInfo(ControlConstants.AGGREGATION_INTERNAL_ERROR_CONTROL_KEY, new
LocalizedString("On window internal error"), new LocalizedString("On window
internal error"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
- public static final PropertyInfo CONTROL_POLICY_NOT_FOUND = new
PropertyInfo(ControlConstants.AGGREGATION_NOT_FOUND_CONTROL_KEY, new
LocalizedString("On window not found"), new LocalizedString("On window not
found"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_ACCESS_DENIED = new
PropertyInfo(ControlConstants.PAGE_ACCESS_DENIED_CONTROL_KEY, new LocalizedString("On
window access denied"), new LocalizedString("On window access denied"),
"java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_UNAVAILABLE = new
PropertyInfo(ControlConstants.PAGE_UNAVAILABLE_CONTROL_KEY, new LocalizedString("On
window unavailable"), new LocalizedString("On window unavailable"),
"java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_ERROR = new
PropertyInfo(ControlConstants.PAGE_ERROR_CONTROL_KEY, new LocalizedString("On window
error"), new LocalizedString("On window error"),
"java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_INTERNAL_ERROR = new
PropertyInfo(ControlConstants.PAGE_INTERNAL_ERROR_CONTROL_KEY, new
LocalizedString("On window internal error"), new LocalizedString("On window
internal error"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_NOT_FOUND = new
PropertyInfo(ControlConstants.PAGE_NOT_FOUND_CONTROL_KEY, new LocalizedString("On
window not found"), new LocalizedString("On window not found"),
"java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE,
PropertyInfo.PUBLIC_SCOPE);
/** . */
private static final Map CONTEXT_PROPERTIES = new HashMap();
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml 2007-06-11
15:12:39 UTC (rev 7399)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml 2007-06-11
15:30:01 UTC (rev 7400)
@@ -10,8 +10,26 @@
<ui:include src="common/editProperties.xhtml">
<ui:param name="properties"
value="#{portalobjectmgr.selectedProperties}"/>
- </ui:include>
-
+ </ui:include>
+
+ <hr/>
+ <h3>Configure error handling at portal level</h3>
+ <ul>
+ <li>Access denied:</li>
+ <li>Error:</li>
+ <li>Internal error:</li>
+ <li>Not found:</li>
+ <li>Unavailable:</li>
+ </ul>
+ <hr/>
+ <h3>Configure error handling at window level</h3>
+ <ul>
+ <li>Access denied:</li>
+ <li>Error:</li>
+ <li>Internal error:</li>
+ <li>Not found:</li>
+ <li>Unavailable:</li>
+ </ul>
</ui:define>
</ui:composition>