JBoss Portal SVN: r7448 - in trunk/common/src/main/org/jboss/portal: common/net/file and 2 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2007-06-15 15:23:26 -0400 (Fri, 15 Jun 2007)
New Revision: 7448
Modified:
trunk/common/src/main/org/jboss/portal/common/jar/JarEntryInfo.java
trunk/common/src/main/org/jboss/portal/common/net/file/FileURLNavigationProvider.java
trunk/common/src/main/org/jboss/portal/common/net/jar/JarURLNavigationProvider.java
trunk/common/src/main/org/jboss/portal/test/common/net/URLNavigatorTestCase.java
Log:
- modify tests for URLNavigationTestCase.
- Re-add file name based filtering.
- Re-add option to allow visiting jar root.
Modified: trunk/common/src/main/org/jboss/portal/common/jar/JarEntryInfo.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/jar/JarEntryInfo.java 2007-06-15 19:22:59 UTC (rev 7447)
+++ trunk/common/src/main/org/jboss/portal/common/jar/JarEntryInfo.java 2007-06-15 19:23:26 UTC (rev 7448)
@@ -55,6 +55,10 @@
//
String entryName = entry.getName();
ArrayList atoms = new ArrayList();
+
+ //add the root element since this is not actually included in the jar as a entry
+ atoms.add("/");
+
int previous = -1;
while (true)
{
Modified: trunk/common/src/main/org/jboss/portal/common/net/file/FileURLNavigationProvider.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/net/file/FileURLNavigationProvider.java 2007-06-15 19:22:59 UTC (rev 7447)
+++ trunk/common/src/main/org/jboss/portal/common/net/file/FileURLNavigationProvider.java 2007-06-15 19:23:26 UTC (rev 7448)
@@ -29,6 +29,7 @@
import java.util.Arrays;
import java.net.URL;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.File;
@@ -53,48 +54,55 @@
private void visit(File file, URLVisitor visitor, URLFilter filter) throws IllegalArgumentException, IOException
{
- String name = file.getName();
- if (file.isDirectory())
+ if (!file.exists())
{
- if (trace)
+ throw new FileNotFoundException();
+ }
+ else
+ {
+ String name = file.getName();
+ if (file.isDirectory())
{
- log.debug("entering directory" + file.getAbsolutePath());
+ if (trace)
+ {
+ log.debug("entering directory" + file.getAbsolutePath());
+ }
+ URL url = file.toURL();
+ boolean visit = filter == null || filter.acceptDir(url);
+ if (visit)
+ {
+ visitor.startDir(url, name);
+ File[] childrenFiles = file.listFiles();
+ Arrays.sort(childrenFiles);
+ for (int i = 0; i < childrenFiles.length; i++)
+ {
+ File childFile = childrenFiles[i];
+ visit(childFile, visitor, filter);
+ }
+ visitor.endDir(file.toURL(), name);
+ if (trace)
+ {
+ log.debug("leaving directory" + file.getAbsolutePath());
+ }
+ }
}
- URL url = file.toURL();
- boolean visit = filter == null || filter.acceptDir(url);
- if (visit)
+ else
{
- visitor.startDir(url, name);
- File[] childrenFiles = file.listFiles();
- Arrays.sort(childrenFiles);
- for (int i = 0; i < childrenFiles.length; i++)
+ if (trace)
{
- File childFile = childrenFiles[i];
- visit(childFile, visitor, filter);
+ log.debug("visiting file " + file.getAbsolutePath());
}
- visitor.endDir(file.toURL(), name);
- if (trace)
+ URL url = file.toURL();
+ File file2 = new File(url.getFile());
+ if (file.equals(file2) && filter.acceptFile(url))
{
- log.debug("leaving directory" + file.getAbsolutePath());
+ visitor.file(url, name);
}
+ else if (trace)
+ {
+ log.debug("The file does not respect url format");
+ }
}
}
- else
- {
- if (trace)
- {
- log.debug("visiting file " + file.getAbsolutePath());
- }
- URL url = file.toURL();
- File file2 = new File(url.getFile());
- if (file.equals(file2))
- {
- visitor.file(url, name);
- }
- else if (trace)
- {
- log.debug("The file does not respect url format");
- }
- }
}
}
Modified: trunk/common/src/main/org/jboss/portal/common/net/jar/JarURLNavigationProvider.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/net/jar/JarURLNavigationProvider.java 2007-06-15 19:22:59 UTC (rev 7447)
+++ trunk/common/src/main/org/jboss/portal/common/net/jar/JarURLNavigationProvider.java 2007-06-15 19:23:26 UTC (rev 7448)
@@ -25,7 +25,6 @@
import org.jboss.portal.common.net.URLNavigationProvider;
import org.jboss.portal.common.net.URLVisitor;
import org.jboss.portal.common.net.URLFilter;
-import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.jar.JarEntryInfo;
import org.jboss.portal.common.jar.JarInfo;
@@ -66,11 +65,25 @@
URL jarURL = conn.getJarFileURL();
JarEntry rootEntry = conn.getJarEntry();
- //
- if (rootEntry == null)
+ // if the URL specifies a directory without a "/" at the end
+ // the entry will be found, except it won't actually exist.
+ // To get around this issue, we need to check if an entry exists
+ // with a "/" at the end.
+ if (rootEntry != null)
{
- throw new NotYetImplemented("The code for exact jar url has not been implemented");
+ JarEntry testDirEntry = conn.getJarFile().getJarEntry(rootEntry + "/");
+ if (testDirEntry != null)
+ {
+ rootEntry = testDirEntry;
+ }
}
+ else
+ {
+ // if rootEntry == null then the url points to the root of the jar. The problem
+ // is that the root of the jar doesn't actually exist in the jar.
+ // We need to create a fake jar entry to mimic this behavior
+ rootEntry = new JarEntry("/");
+ }
// Get the root entry
JarEntryInfo rootEntryInfo = new JarEntryInfo(rootEntry);
@@ -89,8 +102,15 @@
// Only consider descendant of the root or root itself
if (entryInfo.equals(rootEntryInfo) || entryInfo.isDescendantOf(rootEntryInfo))
{
+ List relPath;
// The relative path from the root
- List relPath = entryInfo.getNames().subList(rootEntryInfo.size() - 1, entryInfo.size());
+ if (rootEntryInfo.size() > 1){
+ relPath = entryInfo.getNames().subList(rootEntryInfo.size() - 1, entryInfo.size());
+ }
+ else
+ {
+ relPath = entryInfo.getNames();
+ }
// Enter intermediate dirs
while (stack.size() < relPath.size() - 1 && enabled)
@@ -145,7 +165,10 @@
String name = (String)relPath.get(relPath.size() - 1);
stack.push(name, false);
URL url = stack.getURL();
- visitor.file(url, name);
+ if (filter.acceptFile(url))
+ {
+ visitor.file(url, name);
+ }
stack.pop();
}
}
@@ -216,22 +239,38 @@
*/
URL getURL() throws MalformedURLException
{
- StringBuffer tmp = new StringBuffer(jarURL.toString()).append("!");
+ StringBuffer tmp = new StringBuffer(jarURL.toString()).append("!/");
for (int i = 0; i < root.size() - 1; i++)
{
String name = root.getName(i);
- tmp.append("/").append(name);
+ if (!tmp.toString().endsWith("/"))
+ {
+ tmp.append("/");
+ }
+ // we don't want to add an extra '/' if the actual jar root element
+ if (!name.equals("/"))
+ {
+ tmp.append(name);
+ }
}
for (int i = 0; i < entries.size(); i++)
{
Entry entry = (Entry)entries.get(i);
String name = entry.name;
- tmp.append("/").append(name);
+ if (!tmp.toString().endsWith("/"))
+ {
+ tmp.append("/");
+ }
+ if (!name.equals("/"))
+ {
+ tmp.append(name);
+ }
+
}
Entry entry = peek();
- if (entry.dir)
+ if (entry.dir && !entry.name.equals("/") && !(tmp.toString().endsWith("/")))
{
- tmp.append('/');
+ tmp.append('/');
}
return new URL("jar", "", tmp.toString());
}
Modified: trunk/common/src/main/org/jboss/portal/test/common/net/URLNavigatorTestCase.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/test/common/net/URLNavigatorTestCase.java 2007-06-15 19:22:59 UTC (rev 7447)
+++ trunk/common/src/main/org/jboss/portal/test/common/net/URLNavigatorTestCase.java 2007-06-15 19:23:26 UTC (rev 7448)
@@ -183,7 +183,6 @@
expectedURLs.add("/test-jar/");
expectedURLs.addAll(expectedURLsA1);
expectedURLs.addAll(expectedURLsA3txt);
- //expectedURLs.add("a3.txt");
expectedURLs.add("/test-jar/");
doTest (fileURL, expectedAtoms, expectedURLs, noFilter);
@@ -206,6 +205,7 @@
expectedAtoms.add("</META-INF>");
expectedAtoms.addAll(expectedAtomsA1);
expectedAtoms.addAll(expectedAtomsA3txt);
+ //TODO: should this really be //?
expectedAtoms.add("<//>");
ArrayList expectedURLs = new ArrayList();
@@ -381,12 +381,26 @@
{
//Note no / at the end
URL jarURL = getJarURL("/a1");
+ doTest (jarURL, expectedAtomsA1, expectedURLsA1, noFilter);
+ doTest (jarURL, new ArrayList(), new ArrayList(), fullFilter);
+ doTest (jarURL, removeFiles(expectedAtomsA1), removeFiles(expectedURLsA1), noFileFilter);
+ // since we pass it a directory, we can't enter the directory
+ doTest (jarURL, new ArrayList(), new ArrayList(),noDirFilter);
+ try
+ {
+ //Note extra / at front
+ jarURL = getJarURL("//a1");
doTest (jarURL, expectedAtomsA1, expectedURLsA1, noFilter);
doTest (jarURL, new ArrayList(), new ArrayList(), fullFilter);
doTest (jarURL, removeFiles(expectedAtomsA1), removeFiles(expectedURLsA1), noFileFilter);
// since we pass it a directory, we can't enter the directory
doTest (jarURL, new ArrayList(), new ArrayList(),noDirFilter);
+ }
+ catch (FileNotFoundException fnfe)
+ {
+ //expected result
+ }
try
{
@@ -514,6 +528,10 @@
{
fail("URL " + entryURL + " does not end with the suffix " + suffix + " at index " + i);
}
+ if (entryURL.getPath().endsWith ("//" + suffix.substring(1)))
+ {
+ fail("URL " + entryURL + " ends with /" + suffix + " at index " + i);
+ }
}
if (filter != null)
18 years, 11 months
JBoss Portal SVN: r7447 - in trunk/core-admin/src: main/org/jboss/portal/core/admin/ui/actions and 3 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-06-15 15:22:59 -0400 (Fri, 15 Jun 2007)
New Revision: 7447
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml
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/PropertiesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.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/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
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml
Log:
*partialy* working error handling configuration in property editor
Added: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java (rev 0)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java 2007-06-15 19:22:59 UTC (rev 7447)
@@ -0,0 +1,159 @@
+/*
+* 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.core.model.portal.control.ControlConstants;
+import org.jboss.portal.core.model.portal.PortalObject;
+
+import javax.faces.model.SelectItem;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 0.1 $
+ */
+public class ControlPropertiesBean
+{
+
+ private List portalSelectItems;
+
+ private List pageSelectItems;
+
+ /** . */
+ final PortalObjectManagerBean pomgr;
+
+ public ControlPropertiesBean(PortalObjectManagerBean pomgr)
+ {
+ this.pomgr = pomgr;
+
+ }
+
+ public List getPortalSelectItems()
+ {
+ if (portalSelectItems == null)
+ {
+ portalSelectItems = new ArrayList();
+ portalSelectItems.add(new SelectItem(ControlConstants.IGNORE_CONTROL_VALUE, "display the default error message."));
+ portalSelectItems.add(new SelectItem(ControlConstants.HIDE_CONTROL_VALUE, "remove the resource from page."));
+ }
+ return portalSelectItems;
+ }
+
+ public List getPageSelectItems()
+ {
+ if (pageSelectItems == null)
+ {
+ pageSelectItems = new ArrayList();
+ pageSelectItems.add(new SelectItem(ControlConstants.IGNORE_CONTROL_VALUE, "display the default error message."));
+ pageSelectItems.add(new SelectItem(ControlConstants.HIDE_CONTROL_VALUE, "remove the resource from page."));
+ pageSelectItems.add(new SelectItem(ControlConstants.JSP_CONTROL_VALUE, "redirect to the specified resource"));
+ }
+ return pageSelectItems;
+ }
+
+ private ControlPropertyBean grabProperty(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException("name cannot be null");
+ }
+
+ if (!PropertiesInfo.isControlProperty(name))
+ {
+ throw new IllegalStateException("trying to process non control property: " + name );
+ }
+
+ PortalObject object = pomgr.getSelectedObject();
+
+ object = pomgr.getPortalObjectContainer().getObject(object.getId());
+
+ PropertiesInfo info = new PropertiesInfo(object);
+
+
+ boolean inherited = !object.getDeclaredProperties().containsKey(name);
+ String value = object.getProperty(name);
+ return new ControlPropertyBean(this, info.getPropertyInfo(name), inherited, value);
+ }
+
+
+ public ControlPropertyBean getPageControlAccessDenied()
+ {
+ return grabProperty(ControlConstants.PAGE_ACCESS_DENIED_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPageControlUnavailable()
+ {
+ return grabProperty(ControlConstants.PAGE_UNAVAILABLE_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPageControlError()
+ {
+ return grabProperty(ControlConstants.PAGE_ERROR_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPageControlInternalError()
+ {
+ return grabProperty(ControlConstants.PAGE_INTERNAL_ERROR_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPageControlNotFound()
+ {
+ return grabProperty(ControlConstants.PAGE_NOT_FOUND_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPageControlResourceURI()
+ {
+ return grabProperty(ControlConstants.PAGE_RESOURCE_URI_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPortalControlAccessDenied()
+ {
+ return grabProperty(ControlConstants.PORTAL_ACCESS_DENIED_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPortalControlUnavailable()
+ {
+ return grabProperty(ControlConstants.PORTAL_UNAVAILABLE_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPortalControlError()
+ {
+ return grabProperty(ControlConstants.PORTAL_ERROR_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPortalControlInternalError()
+ {
+ return grabProperty(ControlConstants.PORTAL_INTERNAL_ERROR_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPortalControlNotFound()
+ {
+ return grabProperty(ControlConstants.PORTAL_NOT_FOUND_CONTROL_KEY);
+ }
+
+ public ControlPropertyBean getPortalControlResourceURI()
+ {
+ return grabProperty(ControlConstants.PORTAL_RESOURCE_URI_CONTROL_KEY);
+ }
+}
Added: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java (rev 0)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java 2007-06-15 19:22:59 UTC (rev 7447)
@@ -0,0 +1,135 @@
+/*
+* 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.core.model.portal.PortalObject;
+import org.jboss.portal.core.impl.model.portal.PortalObjectImpl;
+
+import javax.faces.event.ValueChangeEvent;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class ControlPropertyBean implements Comparable
+{
+
+ /** . */
+ private String value;
+
+ /** . */
+ private final ControlPropertiesBean container;
+
+ /** . */
+ private final PropertyInfo info;
+
+ /** . */
+ private final boolean inherited;
+
+ public ControlPropertyBean(ControlPropertiesBean container, PropertyInfo info, boolean inherited, String value)
+ {
+ this.container = container;
+ this.info = info;
+ this.inherited = inherited;
+ this.value = value;
+ }
+
+ public String getName()
+ {
+ return info.getName();
+ }
+
+ public boolean isReadOnly()
+ {
+ return info.getAccessMode() == PropertyInfo.READ_ONLY_ACCESS_MODE;
+ }
+
+ public String getDescription()
+ {
+ return info.getDescription().getDefaultString();
+ }
+
+ public String getDisplayName()
+ {
+ return info.getDisplayName().getDefaultString();
+ }
+
+ public boolean isInherited()
+ {
+ return inherited;
+ }
+
+ public void inherit(ValueChangeEvent event)
+ {
+
+ PortalObject portalObject = container.pomgr.getSelectedObject();
+ if (event.getNewValue().toString().equalsIgnoreCase("true"))
+ {
+ portalObject.setDeclaredProperty(getName(), null);
+ }
+ else
+ {
+ portalObject.setDeclaredProperty(getName(), value);
+ }
+ }
+
+ public Object getValue()
+ {
+ if (info.getType().equals("java.lang.Boolean"))
+ {
+ return Boolean.valueOf(value);
+ }
+ else
+ {
+ return value;
+ }
+ }
+
+ public void setValue(Object value)
+ {
+ this.value = 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)
+ {
+ ControlPropertyBean that = (ControlPropertyBean)o;
+ return info.getName().compareTo(that.getName());
+ }
+
+ public String getType()
+ {
+ return info.getType();
+ }
+
+ public boolean isControlProperty()
+ {
+ return PropertiesInfo.isControlProperty(info.getName());
+ }
+}
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-06-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-06-15 19:22:59 UTC (rev 7447)
@@ -133,6 +133,9 @@
private PropertiesBean selectedProperties;
/** . */
+ private ControlPropertiesBean controlProperties;
+
+ /** . */
private PortletInvoker portletDefinitionInvoker;
/** . */
@@ -467,6 +470,7 @@
selectedObjectPath = null;
selectedObject = null;
selectedProperties = null;
+ controlProperties = null;
//
if (selectedId == null)
@@ -491,6 +495,9 @@
selectedProperties = new PropertiesBean(this);
//
+ controlProperties = new ControlPropertiesBean(this);
+
+ //
Collection pages = getSelectedObject().getChildren(PortalObject.PAGE_MASK);
ArrayList list = new ArrayList(pages.size() + 1);
for (Iterator iterator = pages.iterator(); iterator.hasNext();)
@@ -650,4 +657,38 @@
// //in case it fails let's point to some nice page ;)
return "http://www.jboss.org";
}
+
+
+ /**
+ * Helper method to recognize object type in EL easily
+ * @return
+ */
+ public String getSelectedObjectType()
+ {
+ PortalObject object = getSelectedObject();
+ if (object != null)
+ {
+ switch(object.getType())
+ {
+ case PortalObject.TYPE_CONTEXT:
+ return "context";
+ case PortalObject.TYPE_PORTAL:
+ return "portal";
+ case PortalObject.TYPE_PAGE:
+ return "page";
+ case PortalObject.TYPE_WINDOW:
+ return "window";
+ }
+ }
+
+ //to make it safe
+ return "none";
+ }
+
+
+ public ControlPropertiesBean getControlProperties()
+ {
+ return controlProperties;
+ }
+
}
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-06-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-06-15 19:22:59 UTC (rev 7447)
@@ -34,6 +34,7 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @version $Revision: 1.1 $
*/
public class PropertiesBean
@@ -57,6 +58,9 @@
/** . */
private List items;
+
+
+
public PropertiesBean(PortalObjectManagerBean pomgr)
{
// Get the selected object
@@ -72,7 +76,10 @@
for (Iterator i = selectedObject.getProperties().keySet().iterator();i.hasNext();)
{
+
+
String propertyName = (String)i.next();
+
String propertyValue = selectedObject.getProperty(propertyName);
//
@@ -82,11 +89,11 @@
boolean inherited = !selectedObject.getDeclaredProperties().containsKey(propertyName);
// If null it is probably an inherited property that does not have meaning for that particular object
- if (propertyInfo != null)
+ // Filter, keep only public properties
+ if (propertyInfo != null && propertyInfo.getScope() == PropertyInfo.PUBLIC_SCOPE)
{
-
- // Filter, keep only public properties
- if (propertyInfo.getScope() == PropertyInfo.PUBLIC_SCOPE)
+ //don't add control properties - managed in separate view
+ if (!PropertiesInfo.isControlProperty(propertyName))
{
PropertyBean propertyBean = new PropertyBean(this, propertyInfo, inherited, propertyValue);
entryList.add(propertyBean);
@@ -95,6 +102,8 @@
}
}
+ //initiate control
+
//
this.info = info;
this.pomgr = pomgr;
@@ -156,7 +165,7 @@
PropertyInfo propertyInfo = info.getPropertyInfo(propertyName);
// Add only property user can change state
- if (propertyInfo.getScope() == PropertyInfo.PUBLIC_SCOPE && propertyInfo.getAccessMode() == PropertyInfo.READ_WRITE_ACCESS_MODE)
+ if (propertyInfo.getScope() == PropertyInfo.PUBLIC_SCOPE && propertyInfo.getAccessMode() == PropertyInfo.READ_WRITE_ACCESS_MODE && !PropertiesInfo.isControlProperty(propertyName))
{
items.add(new SelectItem(propertyInfo.getName(), propertyInfo.getDisplayName().getDefaultString(), propertyInfo.getDescription().getDefaultString()));
}
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-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-15 19:22:59 UTC (rev 7447)
@@ -108,11 +108,18 @@
PORTAL_PROPERTIES.put(THEME_RENDER_SET_ID.getName(), THEME_RENDER_SET_ID);
PORTAL_PROPERTIES.put(DEFAULT_CHILD_NAME.getName(), DEFAULT_CHILD_NAME);
PORTAL_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ACCESS_DENIED.getName(), CONTROL_POLICY_PORTAL_ACCESS_DENIED);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PORTAL_UNAVAILABLE);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ERROR.getName(), CONTROL_POLICY_PORTAL_ERROR);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_INTERNAL_ERROR.getName(), CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_NOT_FOUND.getName(), CONTROL_POLICY_PORTAL_NOT_FOUND);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_RESOURCE_URI.getName(), CONTROL_POLICY_PORTAL_RESOURCE_URI);
PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_RESOURCE_URI.getName(), CONTROL_POLICY_PAGE_RESOURCE_URI);
//
PAGE_PROPERTIES.put(THEME_LAYOUT_ID.getName(), THEME_LAYOUT_ID);
@@ -126,7 +133,7 @@
PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
-
+ PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_RESOURCE_URI.getName(), CONTROL_POLICY_PAGE_RESOURCE_URI);
//
WINDOW_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
WINDOW_PROPERTIES.put(THEME_RENDER_REGION_ID.getName(), THEME_RENDER_REGION_ID);
@@ -139,13 +146,15 @@
CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
+ CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_RESOURCE_URI.getName(), CONTROL_POLICY_PAGE_RESOURCE_URI);
//
CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ACCESS_DENIED.getName(), CONTROL_POLICY_PORTAL_ACCESS_DENIED);
CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ERROR.getName(), CONTROL_POLICY_PORTAL_ERROR);
CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_INTERNAL_ERROR.getName(), CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_NOT_FOUND.getName(), CONTROL_POLICY_PORTAL_NOT_FOUND);
- CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
+ CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PORTAL_UNAVAILABLE);
+ CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_RESOURCE_URI.getName(), CONTROL_POLICY_PORTAL_RESOURCE_URI);
//
CONTROL_PROPERTIES.putAll(CONTROL_PAGE_PROPERTIES);
@@ -156,6 +165,7 @@
ALL_PROPERTIES.putAll(PORTAL_PROPERTIES);
ALL_PROPERTIES.putAll(PAGE_PROPERTIES);
ALL_PROPERTIES.putAll(WINDOW_PROPERTIES);
+
}
/** . */
@@ -217,4 +227,9 @@
return CONTROL_PROPERTIES.containsKey(name);
}
+ public static PropertyInfo getControlPropertyInfo(String name)
+ {
+ return (PropertyInfo)CONTROL_PROPERTIES.get(name);
+ }
+
}
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-06-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2007-06-15 19:22:59 UTC (rev 7447)
@@ -28,6 +28,7 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @version $Revision: 1.1 $
*/
public class PropertyBean implements Comparable
@@ -121,4 +122,9 @@
{
return info.getType();
}
+
+ public boolean isControlProperty()
+ {
+ return PropertiesInfo.isControlProperty(info.getName());
+ }
}
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-06-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java 2007-06-15 19:22:59 UTC (rev 7447)
@@ -26,11 +26,13 @@
import org.jboss.portal.core.admin.ui.PortalObjectManagerBean;
import org.jboss.portal.core.impl.model.portal.PortalObjectImpl;
+import org.jboss.portal.core.model.portal.PortalObject;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.ValidatorException;
+import javax.faces.event.ValueChangeEvent;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw Dawidowicz</a>
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-06-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-15 19:22:59 UTC (rev 7447)
@@ -117,6 +117,7 @@
</managed-property>
</managed-bean>
+
<!-- The instance manager managed bean -->
<managed-bean>
<managed-bean-name>instancemgr</managed-bean-name>
@@ -280,6 +281,34 @@
<value>org.jboss.portal.core.model.portal.PortalObject</value>
</managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>ControlConstants</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.faces.el.ClassConstantPublisherBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>className</property-name>
+ <value>org.jboss.portal.core.model.portal.control.ControlConstants</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>PropertiesInfo</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.faces.el.ClassConstantPublisherBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>className</property-name>
+ <value>org.jboss.portal.core.admin.ui.PropertiesInfo</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>ControlPropertiesBean</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.faces.el.ClassConstantPublisherBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>className</property-name>
+ <value>org.jboss.portal.core.admin.ui.ControlPropertiesBean</value>
+ </managed-property>
+ </managed-bean>
+
<navigation-rule>
<navigation-case>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml 2007-06-15 19:22:59 UTC (rev 7447)
@@ -0,0 +1,213 @@
+<div
+ 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">
+
+
+ <f:subview id="errorHandlingView" rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL}">
+ <!-- Separation -->
+ <hr/>
+
+ <h3>Edit Portal Error Handling</h3>
+
+ <p>Configure how the system handles errors on portal level.</p>
+
+ <h:form>
+ <table width="100%">
+ <thead class="portlet-section-header" style="text-align:left;">
+ <tr>
+ <th>Case</th>
+ <th>Inheritance</th>
+ <th>Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlAccessDenied.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.portalControlAccessDenied.inherit}" value="#{properties.portalControlAccessDenied.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlAccessDenied.value}" disabled="#{properties.portalControlAccessDenied.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlUnavailable.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.portalControlUnavailable.inherit}" value="#{properties.portalControlUnavailable.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlUnavailable.value}" disabled="#{properties.portalControlUnavailable.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.portalControlError.inherit}" value="#{properties.portalControlError.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlError.value}" disabled="#{properties.portalControlError.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlInternalError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.portalControlInternalError.inherit}" value="#{properties.portalControlInternalError.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlInternalError.value}" disabled="#{properties.portalControlInternalError.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlNotFound.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.portalControlNotFound.inherit}" value="#{properties.portalControlNotFound.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.portalControlNotFound.value}" disabled="#{properties.portalControlNotFound.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.portalSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.portalControlResourceURI.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.portalControlResourceURI.inherit}" value="#{properties.portalControlResourceURI.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:inputText value="#{properties.portalControlResourceURI.value}" disabled="#{properties.portalControlResourceURI.inherited}"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h:commandButton value="Update" styleClass="portlet-form-button"/>
+ </h:form>
+ </f:subview>
+
+ <f:subview id="errorHandlingView" rendered="#{!(portalobjectmgr.selectedObject.type == PortalObject.TYPE_WINDOW)}">
+ <!-- Separation -->
+ <hr/>
+
+ <h3>Edit Page Error Handling</h3>
+
+ <p>Configure how the system handles errors on page level.</p>
+
+ <h:form>
+ <table width="100%">
+ <thead class="portlet-section-header" style="text-align:left;">
+ <tr>
+ <th>Case</th>
+ <th>Inheritance</th>
+ <th>Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlAccessDenied.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.pageControlAccessDenied.inherit}" value="#{properties.pageControlAccessDenied.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlAccessDenied.value}" disabled="#{properties.pageControlAccessDenied.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlUnavailable.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.pageControlUnavailable.inherit}" value="#{properties.pageControlUnavailable.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlUnavailable.value}" disabled="#{properties.pageControlUnavailable.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.pageControlError.inherit}" value="#{properties.pageControlError.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlError.value}" disabled="#{properties.pageControlError.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlInternalError.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.pageControlInternalError.inherit}" value="#{properties.pageControlInternalError.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlInternalError.value}" disabled="#{properties.pageControlInternalError.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlNotFound.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.pageControlNotFound.inherit}" value="#{properties.pageControlNotFound.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:selectOneMenu value="#{properties.pageControlNotFound.value}" disabled="#{properties.pageControlNotFound.inherited}" onchange="submit();">
+ <f:selectItems value="#{properties.pageSelectItems}"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr class="portlet-section-body">
+ <td>
+ <h:outputText value="#{properties.pageControlResourceURI.displayName}"/>
+ </td>
+ <td>
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" onchange="submit();" valueChangeListener="#{properties.pageControlResourceURI.inherit}" value="#{properties.pageControlResourceURI.inherited}"/>inherit action from parent
+ </td>
+ <td>
+ <h:inputText value="#{properties.pageControlResourceURI.value}" disabled="#{properties.pageControlResourceURI.inherited}"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h:commandButton value="Update" styleClass="portlet-form-button"/>
+ </h:form>
+ </f:subview>
+
+
+
+
+
+</div>
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-06-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-06-15 19:22:59 UTC (rev 7447)
@@ -5,44 +5,46 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core">
+ <h3>Edit properties</h3>
+
<h:form>
<table width="100%">
<thead class="portlet-section-header" style="text-align:left;">
<tr>
<th>Name</th>
<th>Description</th>
- <th>Value</th>
<th>Inherited</th>
+ <th>Value</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<c:forEach items="#{properties.entries}" var="prop" varStatus="status">
- <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
- <td>
- <h:outputText title="#{prop.name}" value="#{prop.displayName}"/>
- </td>
- <td>
- <h:outputText>#{prop.description}</h:outputText>
- </td>
- <td>#{prop.inherited ? 'Yes' : 'No'}</td>
- <td>
- <c:choose>
- <c:when test="#{prop.type=='java.lang.Boolean'}">
- <h:selectBooleanCheckbox styleClass="portlet-form-button" value="#{prop.value}" readonly="#{prop.readOnly}"/>
- </c:when>
- <c:otherwise>
- <h:inputText styleClass="portlet-form-input-field" value="#{prop.value}" readonly="#{prop.readOnly}"/>
- </c:otherwise>
- </c:choose>
- </td>
- <td>
- <h:commandLink action="#{propertyAction.removeProperty}" rendered="#{!prop.inherited}">
- <h:outputText value="Delete"/>
- <f:param name="name" value="#{prop.name}"/>
- </h:commandLink>
- </td>
- </tr>
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:outputText title="#{prop.name}" value="#{prop.displayName}"/>
+ </td>
+ <td>
+ <h:outputText>#{prop.description}</h:outputText>
+ </td>
+ <td>#{prop.inherited ? 'Yes' : 'No'}</td>
+ <td>
+ <c:choose>
+ <c:when test="#{prop.type=='java.lang.Boolean'}">
+ <h:selectBooleanCheckbox styleClass="portlet-form-button" value="#{prop.value}" readonly="#{prop.readOnly}"/>
+ </c:when>
+ <c:otherwise>
+ <h:inputText styleClass="portlet-form-input-field" value="#{prop.value}" readonly="#{prop.readOnly}"/>
+ </c:otherwise>
+ </c:choose>
+ </td>
+ <td>
+ <h:commandLink action="#{propertyAction.removeProperty}" rendered="#{!prop.inherited}">
+ <h:outputText value="Delete"/>
+ <f:param name="name" value="#{prop.name}"/>
+ </h:commandLink>
+ </td>
+ </tr>
</c:forEach>
</tbody>
</table>
@@ -83,11 +85,5 @@
<h:commandButton value="Add property" styleClass="portlet-form-button" action="#{propertyAction.updateProperty}"/>
</h:form>
- <!-- Separation -->
- <hr/>
- <h:form>
- <h:commandButton value="Cancel" styleClass="portlet-form-button" action="objects" immediate="true"/>
- </h:form>
-
</div>
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-15 17:38:50 UTC (rev 7446)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml 2007-06-15 19:22:59 UTC (rev 7447)
@@ -12,24 +12,17 @@
<ui:param name="properties" value="#{portalobjectmgr.selectedProperties}"/>
</ui:include>
+ <ui:include src="common/editErrorHandling.xhtml">
+ <ui:param name="properties" value="#{portalobjectmgr.controlProperties}"/>
+ </ui:include>
+
+ <!-- Separation -->
<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>
+
+ <h:form>
+ <h:commandButton value="Cancel" styleClass="portlet-form-button" action="objects" immediate="true"/>
+ </h:form>
+
</ui:define>
</ui:composition>
18 years, 11 months
JBoss Portal SVN: r7446 - trunk/server/src/main/org/jboss/portal/server/aspects/server.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-06-15 13:38:50 -0400 (Fri, 15 Jun 2007)
New Revision: 7446
Modified:
trunk/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java
Log:
minor fix for session invalidation - http://jira.jboss.com/jira/browse/JBPORTAL-1488
Modified: trunk/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java 2007-06-15 17:36:58 UTC (rev 7445)
+++ trunk/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java 2007-06-15 17:38:50 UTC (rev 7446)
@@ -138,8 +138,26 @@
}
}
- // Finally invalidate this session
- session.invalidate();
+ //Finally invalidate this session
+ try
+ {
+ session.invalidate();
+ }
+ catch(IllegalStateException stateException)
+ {
+ if(stateException.toString().indexOf("invalidate: Session already invalidated") != -1)
+ {
+ //This means Tomcat SSO is probably turned on and part of invalidating the other war context's
+ //session, this Portal's session has been invalidated as well
+
+ //No need to do anything
+ }
+ else
+ {
+ //This is a real issue, don't eat this
+ throw stateException;
+ }
+ }
}
}
18 years, 11 months
JBoss Portal SVN: r7445 - branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/aspects/server.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-06-15 13:36:58 -0400 (Fri, 15 Jun 2007)
New Revision: 7445
Modified:
branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java
Log:
minor fix for session invalidation - http://jira.jboss.com/jira/browse/JBPORTAL-1488
Modified: branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java 2007-06-15 15:44:35 UTC (rev 7444)
+++ branches/JBoss_Portal_Branch_2_4/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java 2007-06-15 17:36:58 UTC (rev 7445)
@@ -135,7 +135,25 @@
}
// Finally invalidate this session
- session.invalidate();
+ try
+ {
+ session.invalidate();
+ }
+ catch(IllegalStateException stateException)
+ {
+ if(stateException.toString().indexOf("invalidate: Session already invalidated") != -1)
+ {
+ //This means Tomcat SSO is probably turned on and part of invalidating the other war context's
+ //session, this Portal's session has been invalidated as well
+
+ //No need to do anything
+ }
+ else
+ {
+ //This is a real issue, don't eat this
+ throw stateException;
+ }
+ }
}
}
18 years, 11 months
JBoss Portal SVN: r7444 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-06-15 11:44:35 -0400 (Fri, 15 Jun 2007)
New Revision: 7444
Modified:
docs/trunk/referenceGuide/en/modules/wsrp.xml
Log:
- Fixed cross-ref.
Modified: docs/trunk/referenceGuide/en/modules/wsrp.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-06-15 15:06:58 UTC (rev 7443)
+++ docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-06-15 15:44:35 UTC (rev 7444)
@@ -262,7 +262,7 @@
this file in the deploy directory and start the server (with JBoss Portal and its WSRP service deployed).
</para></sect3>
- <sect3>
+ <sect3 id="consumer_gui">
<title>Using the configuration portlet</title>
<para>
As of Portal 2.6, a configuration portlet is provided to configure access to remote WSRP Producers
@@ -384,8 +384,8 @@
producer in the database will be used. If a producer identifier is found that wasn't already in the
database, that producer information will be processed and recorded in the database. Therefore, if you
wish to delete a producer configuration, you need to delete the associated information in the database
- (this can be accomplished using the configuration portlet as we shall see in
- consumer gui) <emphasis>AND</emphasis> remove the associated information in any
+ (this can be accomplished using the configuration portlet as we saw in <xref linkend="consumer_gui"/>)
+ <emphasis>AND</emphasis> remove the associated information in any
WSRP Producer descriptor (if such information exists) as the producer will be re-created the next time
the WSRP is launched if that information is not removed.
</note>
18 years, 11 months
JBoss Portal SVN: r7443 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-15 11:06:58 -0400 (Fri, 15 Jun 2007)
New Revision: 7443
Modified:
docs/trunk/referenceGuide/en/modules/navtabs.xml
docs/trunk/referenceGuide/en/modules/wsrp.xml
Log:
fix invalid linkend in wsrp chapter
Modified: docs/trunk/referenceGuide/en/modules/navtabs.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/navtabs.xml 2007-06-15 14:48:02 UTC (rev 7442)
+++ docs/trunk/referenceGuide/en/modules/navtabs.xml 2007-06-15 15:06:58 UTC (rev 7443)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<chapter id="navtabs">
<chapterinfo>
<author>
@@ -50,7 +51,7 @@
mapped as such in the
<emphasis>Resource_fr.properties</emphasis>
file, for French users:
- <programlisting><![CDATA[
+<programlisting><![CDATA[
PAGENAME_default=Accueil
PAGENAME_Admin=Admin
PAGENAME_Test=Test
Modified: docs/trunk/referenceGuide/en/modules/wsrp.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-06-15 14:48:02 UTC (rev 7442)
+++ docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-06-15 15:06:58 UTC (rev 7443)
@@ -182,7 +182,7 @@
<para>WSRP Consumers vary a lot as far as how they are configured. Most of them require that you either specify
the URL for the Producer's WSDL definition or the URLs for the individual endpoints. Please refer to your
Consumer's documentation for specific instructions. For instructions on how to do so in JBoss Portal, please
- refer to <xref linkend="#consumer_configuration"/>.
+ refer to <xref linkend="consumer_configuration"/>.
</para>
<para>
JBoss Portal's Producer is automatically set up when you deploy a portal instance with the WSRP service.
@@ -385,7 +385,7 @@
database, that producer information will be processed and recorded in the database. Therefore, if you
wish to delete a producer configuration, you need to delete the associated information in the database
(this can be accomplished using the configuration portlet as we shall see in
- <xref linkend="#consumer-gui"/>) <emphasis>AND</emphasis> remove the associated information in any
+ consumer gui) <emphasis>AND</emphasis> remove the associated information in any
WSRP Producer descriptor (if such information exists) as the producer will be re-created the next time
the WSRP is launched if that information is not removed.
</note>
18 years, 11 months
JBoss Portal SVN: r7442 - in trunk/core/src/resources/portal-core-war/WEB-INF/jsp: error and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-15 10:48:02 -0400 (Fri, 15 Jun 2007)
New Revision: 7442
Added:
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp
Removed:
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/control/
Log:
renamed conveniently the error page for control policy
Added: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp (rev 0)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/page.jsp 2007-06-15 14:48:02 UTC (rev 7442)
@@ -0,0 +1,3 @@
+Error type: <%= request.getAttribute("org.jboss.portal.control.ERROR_TYPE") %><br/>
+Cause: <%= request.getAttribute("org.jboss.portal.control.CAUSE") %><br/>
+Message: <%= request.getAttribute("org.jboss.portal.control.MESSAGE") %><br/>
Added: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp (rev 0)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/error/portal.jsp 2007-06-15 14:48:02 UTC (rev 7442)
@@ -0,0 +1,3 @@
+Error type: <%= request.getAttribute("org.jboss.portal.control.ERROR_TYPE") %><br/>
+Cause: <%= request.getAttribute("org.jboss.portal.control.CAUSE") %><br/>
+Message: <%= request.getAttribute("org.jboss.portal.control.MESSAGE") %><br/>
18 years, 11 months
JBoss Portal SVN: r7441 - trunk/core/src/resources/portal-core-sar/conf/data.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-15 10:44:53 -0400 (Fri, 15 Jun 2007)
New Revision: 7441
Modified:
trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
Log:
document the error handling policy
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-15 13:29:55 UTC (rev 7440)
+++ trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-06-15 14:44:53 UTC (rev 7441)
@@ -33,15 +33,15 @@
<properties>
<property>
<name>control.portal.access_denied</name>
- <value>hide</value>
+ <value>ignore</value>
</property>
<property>
<name>control.portal.unavailable</name>
- <value>hide</value>
+ <value>ignore</value>
</property>
<property>
<name>control.portal.not_found</name>
- <value>hide</value>
+ <value>ignore</value>
</property>
<property>
<name>control.portal.internal_error</name>
@@ -53,7 +53,7 @@
</property>
<property>
<name>control.portal.resource_uri</name>
- <value>/WEB-INF/jsp/control/error.jsp</value>
+ <value>/WEB-INF/jsp/error/portal.jsp</value>
</property>
<property>
<name>control.page.access_denied</name>
@@ -77,7 +77,7 @@
</property>
<property>
<name>control.page.resource_uri</name>
- <value>/WEB-INF/jsp/control/aggregation_error.jsp</value>
+ <value>/WEB-INF/jsp/error/page.jsp</value>
</property>
</properties>
</context>
18 years, 11 months
JBoss Portal SVN: r7440 - trunk/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-06-15 09:29:55 -0400 (Fri, 15 Jun 2007)
New Revision: 7440
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java
Log:
update property informations
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-15 13:07:00 UTC (rev 7439)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-15 13:29:55 UTC (rev 7440)
@@ -36,6 +36,7 @@
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat dot com>Boleslaw Dawidowicz</a>
* @version $Revision: 1.1 $
*/
public class PropertiesInfo
@@ -61,12 +62,21 @@
//
- 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);
+ public static final PropertyInfo CONTROL_POLICY_PAGE_ACCESS_DENIED = new PropertyInfo(ControlConstants.PAGE_ACCESS_DENIED_CONTROL_KEY, new LocalizedString("When access the the window is denied"), new LocalizedString("When access the the window is denied"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PAGE_UNAVAILABLE = new PropertyInfo(ControlConstants.PAGE_UNAVAILABLE_CONTROL_KEY, new LocalizedString("When the window is unavailable"), new LocalizedString("When the window is unavailable"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PAGE_ERROR = new PropertyInfo(ControlConstants.PAGE_ERROR_CONTROL_KEY, new LocalizedString("When there is an error on the window"), new LocalizedString("When there is an error on the window"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PAGE_INTERNAL_ERROR = new PropertyInfo(ControlConstants.PAGE_INTERNAL_ERROR_CONTROL_KEY, new LocalizedString("When there is an error within the window"), new LocalizedString("When there is an error within the window"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PAGE_NOT_FOUND = new PropertyInfo(ControlConstants.PAGE_NOT_FOUND_CONTROL_KEY, new LocalizedString("When the window is not found"), new LocalizedString("When the window is not found"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PAGE_RESOURCE_URI = new PropertyInfo(ControlConstants.PAGE_RESOURCE_URI_CONTROL_KEY, new LocalizedString("On error redirect to this resource"), new LocalizedString("On error redirect to this resource"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PORTAL_ACCESS_DENIED = new PropertyInfo(ControlConstants.PORTAL_ACCESS_DENIED_CONTROL_KEY, new LocalizedString("When access the the page is denied"), new LocalizedString("When access the the page is denied"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PORTAL_UNAVAILABLE = new PropertyInfo(ControlConstants.PORTAL_UNAVAILABLE_CONTROL_KEY, new LocalizedString("When the page is unavailable"), new LocalizedString("When the page is unavailable"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PORTAL_ERROR = new PropertyInfo(ControlConstants.PORTAL_ERROR_CONTROL_KEY, new LocalizedString("When there is an error on the page"), new LocalizedString("When there is an error on the page"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PORTAL_INTERNAL_ERROR = new PropertyInfo(ControlConstants.PORTAL_INTERNAL_ERROR_CONTROL_KEY, new LocalizedString("When there is an error within the page"), new LocalizedString("When there is an error within the page"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PORTAL_NOT_FOUND = new PropertyInfo(ControlConstants.PORTAL_NOT_FOUND_CONTROL_KEY, new LocalizedString("When the page is not found"), new LocalizedString("When the page is not found"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo CONTROL_POLICY_PORTAL_RESOURCE_URI = new PropertyInfo(ControlConstants.PORTAL_RESOURCE_URI_CONTROL_KEY, new LocalizedString("On error redirect to this resource"), new LocalizedString("On error redirect to this resource"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+
+
/** . */
private static final Map CONTEXT_PROPERTIES = new HashMap();
@@ -80,6 +90,15 @@
private static final Map WINDOW_PROPERTIES = new HashMap();
/** . */
+ private static final Map CONTROL_PROPERTIES = new HashMap();
+
+ /** . */
+ private static final Map CONTROL_PAGE_PROPERTIES = new HashMap();
+
+ /** . */
+ private static final Map CONTROL_PORTAL_PROPERTIES = new HashMap();
+
+ /** . */
private static final Map ALL_PROPERTIES = new HashMap();
static
@@ -89,11 +108,11 @@
PORTAL_PROPERTIES.put(THEME_RENDER_SET_ID.getName(), THEME_RENDER_SET_ID);
PORTAL_PROPERTIES.put(DEFAULT_CHILD_NAME.getName(), DEFAULT_CHILD_NAME);
PORTAL_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_ACCESS_DENIED.getName(), CONTROL_POLICY_ACCESS_DENIED);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_UNAVAILABLE.getName(), CONTROL_POLICY_UNAVAILABLE);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_ERROR.getName(), CONTROL_POLICY_ERROR);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_INTERNAL_ERROR.getName(), CONTROL_POLICY_INTERNAL_ERROR);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_NOT_FOUND.getName(), CONTROL_POLICY_NOT_FOUND);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
+ PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
//
PAGE_PROPERTIES.put(THEME_LAYOUT_ID.getName(), THEME_LAYOUT_ID);
@@ -102,11 +121,11 @@
PAGE_PROPERTIES.put(DEFAULT_CHILD_NAME.getName(), DEFAULT_CHILD_NAME);
PAGE_PROPERTIES.put(PAGE_ORDER.getName(), PAGE_ORDER);
PAGE_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
- PAGE_PROPERTIES.put(CONTROL_POLICY_ACCESS_DENIED.getName(), CONTROL_POLICY_ACCESS_DENIED);
- PAGE_PROPERTIES.put(CONTROL_POLICY_UNAVAILABLE.getName(), CONTROL_POLICY_UNAVAILABLE);
- PAGE_PROPERTIES.put(CONTROL_POLICY_ERROR.getName(), CONTROL_POLICY_ERROR);
- PAGE_PROPERTIES.put(CONTROL_POLICY_INTERNAL_ERROR.getName(), CONTROL_POLICY_INTERNAL_ERROR);
- PAGE_PROPERTIES.put(CONTROL_POLICY_NOT_FOUND.getName(), CONTROL_POLICY_NOT_FOUND);
+ PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
+ PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
+ PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
+ PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
+ PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
//
WINDOW_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
@@ -115,6 +134,24 @@
WINDOW_PROPERTIES.put(WINDOW_CONTENT_TYPE.getName(), WINDOW_CONTENT_TYPE);
//
+ CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
+ CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
+ CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
+ CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
+ CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
+
+ //
+ CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ACCESS_DENIED.getName(), CONTROL_POLICY_PORTAL_ACCESS_DENIED);
+ CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ERROR.getName(), CONTROL_POLICY_PORTAL_ERROR);
+ CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_INTERNAL_ERROR.getName(), CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
+ CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_NOT_FOUND.getName(), CONTROL_POLICY_PORTAL_NOT_FOUND);
+ CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
+
+ //
+ CONTROL_PROPERTIES.putAll(CONTROL_PAGE_PROPERTIES);
+ CONTROL_PROPERTIES.putAll(CONTROL_PORTAL_PROPERTIES);
+
+ //
ALL_PROPERTIES.putAll(CONTEXT_PROPERTIES);
ALL_PROPERTIES.putAll(PORTAL_PROPERTIES);
ALL_PROPERTIES.putAll(PAGE_PROPERTIES);
@@ -174,4 +211,10 @@
{
return (PropertyInfo)entries.get(name);
}
+
+ public static boolean isControlProperty(String name)
+ {
+ return CONTROL_PROPERTIES.containsKey(name);
+ }
+
}
18 years, 11 months
JBoss Portal SVN: r7439 - in trunk/core/src/main/org/jboss/portal/core/model/portal/control: portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-06-15 09:07:00 -0400 (Fri, 15 Jun 2007)
New Revision: 7439
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/control/page/DefaultPageControlPolicy.java
trunk/core/src/main/org/jboss/portal/core/model/portal/control/portal/DefaultPortalControlPolicy.java
Log:
correct of wrong constants usage
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/control/page/DefaultPageControlPolicy.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/control/page/DefaultPageControlPolicy.java 2007-06-15 12:11:33 UTC (rev 7438)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/control/page/DefaultPageControlPolicy.java 2007-06-15 13:07:00 UTC (rev 7439)
@@ -158,7 +158,7 @@
}
else if (ControlConstants.JSP_CONTROL_VALUE.equals(policyValue))
{
- String resourceURI = (String)properties.get(ControlConstants.PORTAL_RESOURCE_URI_CONTROL_KEY);
+ String resourceURI = (String)properties.get(ControlConstants.PAGE_RESOURCE_URI_CONTROL_KEY);
if (resourceURI != null)
{
ControllerContext controllerCtx = controlContext.getControllerContext();
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-15 12:11:33 UTC (rev 7438)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/control/portal/DefaultPortalControlPolicy.java 2007-06-15 13:07:00 UTC (rev 7439)
@@ -142,7 +142,7 @@
{
if (ControlConstants.JSP_CONTROL_VALUE.equals(policyValue))
{
- String resourceURI = object.getProperty(ControlConstants.PAGE_RESOURCE_URI_CONTROL_KEY);
+ String resourceURI = object.getProperty(ControlConstants.PORTAL_RESOURCE_URI_CONTROL_KEY);
if (resourceURI != null)
{
ControllerContext controllerCtx = controlContext.getControllerContext();
18 years, 11 months