JBoss Portal SVN: r6034 - in trunk/core/src/main/org/jboss/portal/core: metadata/portlet and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-01-18 11:44:51 -0500 (Thu, 18 Jan 2007)
New Revision: 6034
Modified:
trunk/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/HeaderContentMetaData.java
Log:
cleanup in header content stuff
Modified: trunk/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2007-01-18 16:28:48 UTC (rev 6033)
+++ trunk/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2007-01-18 16:44:51 UTC (rev 6034)
@@ -29,7 +29,6 @@
import org.jboss.portal.portlet.container.info.ContainerPortletInfo;
import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
-import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -49,15 +48,14 @@
{
PortletInvocationResponse response = (PortletInvocationResponse)invocation.invokeNext();
- //
+ // Only affect fragments
if (response instanceof FragmentResponse)
{
- RenderInvocation render = (RenderInvocation)invocation;
FragmentResponse fragment = (FragmentResponse)response;
// Add declaratively injected header content here (get it via the component)
String headerChars = fragment.getHeader(); // Chris' modif: note that the header might to be re-written...
- PortletContainer container = ((ContainerPortletInfo)render.getInfo()).getContainer();
+ PortletContainer container = ((ContainerPortletInfo)invocation.getInfo()).getContainer();
JBossPortletMetaData portletMD = (JBossPortletMetaData)container.getJBossMetaData();
if (portletMD != null)
{
@@ -91,5 +89,4 @@
writer.write(element.outputToStringWith(contextPath));
}
}
-
}
Modified: trunk/core/src/main/org/jboss/portal/core/metadata/portlet/HeaderContentMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/portlet/HeaderContentMetaData.java 2007-01-18 16:28:48 UTC (rev 6033)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/portlet/HeaderContentMetaData.java 2007-01-18 16:44:51 UTC (rev 6034)
@@ -27,16 +27,16 @@
/**
* Meta data to describe a portlet's data to inject into the header of the page. <p>A portlet can define additional
- * script or link tags in its descriptor (jboss-portlet.xml) that will be injected into the head (via a separtate jsp
+ * script or link tags in its descriptor (jboss-portlet.xml) that will be injected into the head (via a separate jsp
* tag)</p>
*
* @author <a href="mailto:mholzner@novell.com>Martin Holzner</a>
* @version $LastChangedRevision$, $LastChangedDate$
- * @see org.jboss.portal.common.plugin.PluginMetaData
*/
public class HeaderContentMetaData
{
+ /** . */
private List elements;
public HeaderContentMetaData()
@@ -58,13 +58,30 @@
public static abstract class Element
{
- protected final String type;
- protected final String elementType;
- private String bodyContent;
+ /** . */
public static final String LINK = "link";
+
+ /** . */
public static final String SCRIPT = "script";
+
+ /** . */
public static final String META = "meta";
+ /** . */
+ protected final String type;
+
+ /** . */
+ protected final String elementType;
+
+ /** . */
+ private String bodyContent;
+
+ protected Element(String elementType, String type)
+ {
+ this.type = type;
+ this.elementType = elementType;
+ }
+
public String getElementType()
{
return elementType;
@@ -75,13 +92,6 @@
return type;
}
-
- protected Element(String elementType, String type)
- {
- this.type = type;
- this.elementType = elementType;
- }
-
/**
* Create a link header element. <p>This element will create a link tag.</p>
*
@@ -109,18 +119,6 @@
return new ScriptElement(type, src);
}
- /**
- * Create a meta header element. <p>This element will create a meta tag.</p>
- *
- * @param name name attribute of the meta element
- * @param content content attribute of the meta element
- * @return a new meta header element
- */
- public static Element createNamedMetaElement(String name, String content)
- {
- return new NamedMetaElement(name, content);
- }
-
public String getBodyContent()
{
return bodyContent;
@@ -174,16 +172,34 @@
}
protected abstract void outputSpecificWith(String contextPath, StringBuffer buffer);
+ /**
+ * Create a meta header element. <p>This element will create a meta tag.</p>
+ *
+ * @param name name attribute of the meta element
+ * @param content content attribute of the meta element
+ * @return a new meta header element
+ */
+ public static Element createNamedMetaElement(String name, String content)
+ {
+ return new NamedMetaElement(name, content);
+ }
}
public static class LinkElement extends Element
{
+
+ /** . */
private String rel;
+
+ /** . */
private String href;
+
+ /** . */
private String title;
+
+ /** . */
private String media;
-
public LinkElement(String rel, String type, String href, String title, String media)
{
super(LINK, type);
@@ -224,9 +240,10 @@
public static class ScriptElement extends Element
{
+
+ /** . */
private String src;
-
public ScriptElement(String type, String src)
{
super(SCRIPT, type);
@@ -246,7 +263,11 @@
public static class NamedMetaElement extends Element
{
+
+ /** . */
private String name;
+
+ /** . */
private String content;
public NamedMetaElement(String name, String content)
19 years, 3 months
JBoss Portal SVN: r6033 - in trunk/core/src/main/org/jboss/portal/core: metadata and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-01-18 11:28:48 -0500 (Thu, 18 Jan 2007)
New Revision: 6033
Added:
trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/
trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/InstanceMetaData.java
trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/PreferencesMetaData.java
Removed:
trunk/core/src/main/org/jboss/portal/core/metadata/InstanceMetaData.java
trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java
trunk/core/src/main/org/jboss/portal/core/metadata/PreferencesMetaData.java
trunk/core/src/main/org/jboss/portal/core/metadata/PropertyHelper.java
trunk/core/src/main/org/jboss/portal/core/metadata/SecurityConstraintMetaData.java
Modified:
trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
Log:
- move instance metadata to a more appropriate package
- removed unused classes
Modified: trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2007-01-18 16:17:04 UTC (rev 6032)
+++ trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -30,8 +30,8 @@
import org.jboss.portal.common.util.XML;
import org.jboss.portal.common.value.StringValue;
import org.jboss.portal.common.value.Value;
-import org.jboss.portal.core.metadata.InstanceMetaData;
-import org.jboss.portal.core.metadata.PreferencesMetaData;
+import org.jboss.portal.core.model.instance.metadata.InstanceMetaData;
+import org.jboss.portal.core.model.instance.metadata.PreferencesMetaData;
import org.jboss.portal.core.metadata.ServiceMetaData;
import org.jboss.portal.core.metadata.portlet.JBossApplicationMetaData;
import org.jboss.portal.core.model.instance.DuplicateInstanceException;
Deleted: trunk/core/src/main/org/jboss/portal/core/metadata/InstanceMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/InstanceMetaData.java 2007-01-18 16:17:04 UTC (rev 6032)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/InstanceMetaData.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -1,276 +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.metadata;
-
-import org.apache.log4j.Logger;
-import org.jboss.portal.common.metadata.MetaData;
-import org.jboss.portal.common.util.XML;
-import org.jboss.portal.common.value.StringValue;
-import org.jboss.portal.common.value.Value;
-import org.jboss.portal.core.model.instance.DuplicateInstanceException;
-import org.jboss.portal.core.model.instance.Instance;
-import org.jboss.portal.core.model.instance.InstanceContainer;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
-import org.jboss.portal.portlet.state.PropertyChange;
-import org.jboss.portal.security.RoleSecurityBinding;
-import org.jboss.portal.security.SecurityConstants;
-import org.jboss.portal.security.metadata.SecurityConstraintsMetaData;
-import org.jboss.portal.security.spi.provider.AuthorizationDomain;
-import org.jboss.portal.security.spi.provider.DomainConfigurator;
-import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
-import org.w3c.dom.Element;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Represent metadata of an instance.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class InstanceMetaData implements MetaData
-{
-
- /** The logger. */
- private static final Logger log = Logger.getLogger(InstanceMetaData.class);
-
- /** The instance id. */
- private String id;
-
- /** The specific preferences of this instance. */
- private PreferencesMetaData preferences;
-
- /** The portlet referenced by the instance. */
- private String portletRef;
-
- /** The security constraints. */
- private SecurityConstraintsMetaData securityConstraints;
-
- public InstanceMetaData()
- {
- }
-
- public String getId()
- {
- return id;
- }
-
- public void setId(String id)
- {
- this.id = id;
- }
-
- public PreferencesMetaData getPreferences()
- {
- return preferences;
- }
-
- public void setPreferences(PreferencesMetaData preferences)
- {
- this.preferences = preferences;
- }
-
- public String getPortletRef()
- {
- return portletRef;
- }
-
- public void setPortletRef(String portletRef)
- {
- this.portletRef = portletRef;
- }
-
- public SecurityConstraintsMetaData getSecurityConstraints()
- {
- return securityConstraints;
- }
-
- public void setSecurityConstraints(SecurityConstraintsMetaData securityConstraints)
- {
- this.securityConstraints = securityConstraints;
- }
-
- public static InstanceMetaData buildMetaData(Element instanceElt)
- {
- String instanceName = XML.asString(XML.getUniqueChild(instanceElt, "instance-id", true));
- String componentRef = XML.asString(XML.getUniqueChild(instanceElt, "portlet-ref", true));
-
- // Configure preferences override
- PreferencesMetaData preferencesMD = new PreferencesMetaData();
- Element preferencesElt = XML.getUniqueChild(instanceElt, "preferences", false);
- if (preferencesElt != null)
- {
- for (Iterator i = buildPreferencesMetaData(preferencesElt).values().iterator(); i.hasNext();)
- {
- PreferenceMetaData preferenceMD = (PreferenceMetaData)i.next();
- preferencesMD.addPreference(preferenceMD);
- }
- }
-
- // Create the meta data
- InstanceMetaData instanceMD = new InstanceMetaData();
- instanceMD.setId(instanceName);
- instanceMD.setPortletRef(componentRef);
- instanceMD.setPreferences(preferencesMD);
-
- // Add the security constraints
- Element securityConstraintElt = XML.getUniqueChild(instanceElt, "security-constraint", false);
- if (securityConstraintElt != null)
- {
- SecurityConstraintsMetaData securityConstraintsMD = SecurityConstraintsMetaData.buildSecurityConstraintMetaData(securityConstraintElt);
- instanceMD.setSecurityConstraints(securityConstraintsMD);
- }
-
- //
- return instanceMD;
- }
-
- /**
- * @param instanceElt the instance xml element
- * @param pwaId the portlet application id
- */
- public static InstanceMetaData buildLegacyMetaData(Element instanceElt, String pwaId)
- {
- Element instanceNameElt = XML.getUniqueChild(instanceElt, "instance-name", true);
- Element componentRefElt = XML.getUniqueChild(instanceElt, "component-ref", true);
-
- //
- String instanceName = XML.asString(instanceNameElt);
- String componentRef = XML.asString(componentRefElt);
-
- //
- int dotIndex = componentRef.indexOf('.');
-
- //
- if (dotIndex == -1)
- {
- log.warn("Bad component ref " + componentRef);
- }
- else
- {
- String appId = componentRef.substring(0, dotIndex);
- if (appId.equals(pwaId) == false)
- {
- log.warn("The instance " + instanceName + " will not be created because the component referenced is outside of the same web app " + componentRef);
- }
- else
- {
- String portletRef = componentRef.substring(dotIndex + 1);
-
- if (portletRef.length() == 0)
- {
- log.warn("Zero portlet ref length are not considered " + componentRef);
- }
- else
- {
- log.debug("Adding legacy instance " + instanceName);
-
- //
- InstanceMetaData instanceMD = new InstanceMetaData();
- instanceMD.setId(instanceName);
- instanceMD.setPortletRef(portletRef);
-
- // Configure preferences
- PreferencesMetaData preferencesMD = new PreferencesMetaData();
- Element preferencesElt = XML.getUniqueChild(instanceElt, "preferences", false);
- if (preferencesElt != null)
- {
- for (Iterator j = InstanceMetaData.buildPreferencesMetaData(preferencesElt).values().iterator(); j.hasNext();)
- {
- PreferenceMetaData preferenceMD = (PreferenceMetaData)j.next();
- preferencesMD.addPreference(preferenceMD);
- }
- }
-
- // Add the security constraints
- Element securityConstraintElt = XML.getUniqueChild(instanceElt, "security-constraint", false);
- if (securityConstraintElt != null)
- {
- SecurityConstraintsMetaData securityConstraintsMD = SecurityConstraintsMetaData.buildSecurityConstraintMetaData(securityConstraintElt);
- instanceMD.setSecurityConstraints(securityConstraintsMD);
- }
-
- //
- return instanceMD;
- }
- }
- }
-
- //
- return null;
- }
-
- public static Map buildPreferencesMetaData(Element portletPreferencesElt)
- {
- Map preferences = new HashMap();
- for (Iterator i = XML.getChildrenIterator(portletPreferencesElt, "preference"); i.hasNext();)
- {
- Element preferenceElt = (Element)i.next();
- PreferenceMetaData preference = buildPreferenceMetaData(preferenceElt);
- preferences.put(preference.getName(), preference);
- }
- return preferences;
- }
-
- public static PreferenceMetaData buildPreferenceMetaData(Element preferenceElt)
- {
- PreferenceMetaData preferenceMD = new PreferenceMetaData();
- List valuesElt = XML.getChildren(preferenceElt, "value");
- String[] values = new String[valuesElt.size()];
- for (int i = 0; i < valuesElt.size(); i++)
- {
- values[i] = XML.asString((Element)valuesElt.get(i));
- }
- Element readOnlyElt = XML.getUniqueChild(preferenceElt, "read-only", false);
- boolean readOnly = false;
- if (readOnlyElt != null)
- {
- String value = XML.asString(readOnlyElt);
- if ("true".equals(value))
- {
- readOnly = true;
- }
- else if ("false".equals(value))
- {
- readOnly = false;
- }
- else
- {
- // log.debug("Unrecognized value for read only " + value);
- readOnly = false;
- }
- }
- else
- {
- readOnly = false;
- }
- preferenceMD.setName(XML.asString(XML.getUniqueChild(preferenceElt, "name", true)));
- preferenceMD.setReadOnly(readOnly);
- preferenceMD.setValues(values);
- return preferenceMD;
- }
-}
Deleted: trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java 2007-01-18 16:17:04 UTC (rev 6032)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -1,83 +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.metadata;
-
-import org.jboss.portal.core.model.instance.InstanceContainer;
-import org.jboss.portal.core.model.instance.NoSuchInstanceException;
-import org.jboss.portal.portlet.PortletInvokerException;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class InstancesMetaData
-{
-
- private Map instances;
-
- public InstancesMetaData()
- {
- instances = new HashMap();
- }
-
- public Map getInstances()
- {
- return instances;
- }
-
- public void setInstances(Map instances)
- {
- this.instances = instances;
- }
-
- public interface BuildContext
- {
- InstanceContainer getContainer();
-
- String resolvePortletRef(String ref);
- }
-
- public void destroy(InstanceContainer container)
- {
- for (Iterator i = instances.values().iterator(); i.hasNext();)
- {
- InstanceMetaData instanceMD = (InstanceMetaData)i.next();
- try
- {
- container.destroyDefinition(instanceMD.getId());
- }
- catch (NoSuchInstanceException e)
- {
- e.printStackTrace();
- }
- catch (PortletInvokerException e)
- {
- e.printStackTrace();
- }
- }
- }
-}
Deleted: trunk/core/src/main/org/jboss/portal/core/metadata/PreferencesMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/PreferencesMetaData.java 2007-01-18 16:17:04 UTC (rev 6032)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/PreferencesMetaData.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -1,59 +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.metadata;
-
-import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class PreferencesMetaData
-{
-
- private Map map = new HashMap();
-
- public void addPreference(PreferenceMetaData preference)
- {
- map.put(preference.getName(), preference);
- }
-
- public Iterator iterator()
- {
- return map.values().iterator();
- }
-
- public int size()
- {
- return map.size();
- }
-
- public PreferenceMetaData getPreference(String key)
- {
- return (PreferenceMetaData)map.get(key);
- }
-}
Deleted: trunk/core/src/main/org/jboss/portal/core/metadata/PropertyHelper.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/PropertyHelper.java 2007-01-18 16:17:04 UTC (rev 6032)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/PropertyHelper.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -1,68 +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.metadata;
-
-import org.apache.log4j.Logger;
-import org.jboss.portal.common.util.XML;
-import org.w3c.dom.Element;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Helper class to handle properties / maps of properties.
- *
- * @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
- * @version $Revision$
- */
-public class PropertyHelper
-{
- private static Logger log = Logger.getLogger(PropertyHelper.class);
-
- /**
- * Convert the "property" child nodes of the provided node into a <code>java.util.Map</code> of property name and
- * value.
- *
- * @param propertiesElt the paret element in the Dom tree that will be inspected for 'property' child nodes
- * @return a Map of all the found properties, keyed by property name
- */
- public static Map buildPropertiesMap(Element propertiesElt)
- {
- Map properties = new HashMap();
- List propertyElts = XML.getChildren(propertiesElt, "property");
- for (int i = 0; i < propertyElts.size(); i++)
- {
- Element propertyElt = (Element)propertyElts.get(i);
- Element nameElt = XML.getUniqueChild(propertyElt, "name", true);
- Element valueElt = XML.getUniqueChild(propertyElt, "value", true);
- String name = XML.asString(nameElt);
- String value = XML.asString(valueElt);
-
- //
- log.debug("Found property " + name + " = " + value);
- properties.put(name, value);
- }
- return properties;
- }
-}
Deleted: trunk/core/src/main/org/jboss/portal/core/metadata/SecurityConstraintMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/SecurityConstraintMetaData.java 2007-01-18 16:17:04 UTC (rev 6032)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/SecurityConstraintMetaData.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -1,122 +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.metadata;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.StringTokenizer;
-
-/**
- * Holder of information for one security constraint. <p>A security constraint can be created by the deployer,
- * containing the information of one security-constraint element in the descriptor, or it can be created via a UI for
- * dynamic security policy creation. In both cases, the constraint will be added to the PortalPolicy for the secured
- * portal object.</p>
- *
- * @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
- * @version $Revision$
- * @see org.jboss.portal.core.security.PortalPolicy
- */
-public final class SecurityConstraintMetaData implements Serializable
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 2237631466093073685L;
- private String displayName;
- private String actions;
- private String roles;
-
- public String getDisplayName()
- {
- return (displayName == null ? "" : displayName);
- }
-
- public String getActions()
- {
- return (actions == null ? "" : actions);
- }
-
- public String getRoles()
- {
- return (roles == null ? "" : roles);
- }
-
- public List getActionList()
- {
- return buildListFromString(actions);
- }
-
- public List getRoleList()
- {
- return buildListFromString(roles);
- }
-
- public void setDisplayName(String displayName)
- {
- this.displayName = displayName;
- }
-
- public void setActions(String actions)
- {
- // make it pretty
- this.actions = buildStringFromList(buildListFromString(actions));
- }
-
- public void setRoles(String roles)
- {
- // make it pretty
- this.roles = buildStringFromList(buildListFromString(roles));
- }
-
- public String toString()
- {
- return "SecurityConstraintMetaData: " + displayName + "; actions [" + actions + "] roles [" + roles + "]";
- }
-
- private List buildListFromString(String src)
- {
- StringTokenizer tokens = new StringTokenizer(src, ",");
- List list = new ArrayList();
- while (tokens.hasMoreTokens())
- {
- list.add(tokens.nextToken().trim());
- }
- return Collections.unmodifiableList(list);
- }
-
- private String buildStringFromList(List tokens)
- {
- StringBuffer list = new StringBuffer();
-
- for (int i = 0; i < tokens.size(); i++)
- {
- if (i > 0)
- {
- list.append(", ");
- }
- list.append(((String)tokens.get(i)).trim());
- }
-
- return list.toString();
- }
-}
Copied: trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/InstanceMetaData.java (from rev 6022, trunk/core/src/main/org/jboss/portal/core/metadata/InstanceMetaData.java)
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/InstanceMetaData.java (rev 0)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/InstanceMetaData.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -0,0 +1,264 @@
+/******************************************************************************
+ * 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.instance.metadata;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.common.metadata.MetaData;
+import org.jboss.portal.common.util.XML;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
+import org.jboss.portal.security.metadata.SecurityConstraintsMetaData;
+import org.w3c.dom.Element;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represent metadata of an instance.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision$
+ */
+public class InstanceMetaData implements MetaData
+{
+
+ /** The logger. */
+ private static final Logger log = Logger.getLogger(InstanceMetaData.class);
+
+ /** The instance id. */
+ private String id;
+
+ /** The specific preferences of this instance. */
+ private PreferencesMetaData preferences;
+
+ /** The portlet referenced by the instance. */
+ private String portletRef;
+
+ /** The security constraints. */
+ private SecurityConstraintsMetaData securityConstraints;
+
+ public InstanceMetaData()
+ {
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public PreferencesMetaData getPreferences()
+ {
+ return preferences;
+ }
+
+ public void setPreferences(PreferencesMetaData preferences)
+ {
+ this.preferences = preferences;
+ }
+
+ public String getPortletRef()
+ {
+ return portletRef;
+ }
+
+ public void setPortletRef(String portletRef)
+ {
+ this.portletRef = portletRef;
+ }
+
+ public SecurityConstraintsMetaData getSecurityConstraints()
+ {
+ return securityConstraints;
+ }
+
+ public void setSecurityConstraints(SecurityConstraintsMetaData securityConstraints)
+ {
+ this.securityConstraints = securityConstraints;
+ }
+
+ public static InstanceMetaData buildMetaData(Element instanceElt)
+ {
+ String instanceName = XML.asString(XML.getUniqueChild(instanceElt, "instance-id", true));
+ String componentRef = XML.asString(XML.getUniqueChild(instanceElt, "portlet-ref", true));
+
+ // Configure preferences override
+ PreferencesMetaData preferencesMD = new PreferencesMetaData();
+ Element preferencesElt = XML.getUniqueChild(instanceElt, "preferences", false);
+ if (preferencesElt != null)
+ {
+ for (Iterator i = buildPreferencesMetaData(preferencesElt).values().iterator(); i.hasNext();)
+ {
+ PreferenceMetaData preferenceMD = (PreferenceMetaData)i.next();
+ preferencesMD.addPreference(preferenceMD);
+ }
+ }
+
+ // Create the meta data
+ InstanceMetaData instanceMD = new InstanceMetaData();
+ instanceMD.setId(instanceName);
+ instanceMD.setPortletRef(componentRef);
+ instanceMD.setPreferences(preferencesMD);
+
+ // Add the security constraints
+ Element securityConstraintElt = XML.getUniqueChild(instanceElt, "security-constraint", false);
+ if (securityConstraintElt != null)
+ {
+ SecurityConstraintsMetaData securityConstraintsMD = SecurityConstraintsMetaData.buildSecurityConstraintMetaData(securityConstraintElt);
+ instanceMD.setSecurityConstraints(securityConstraintsMD);
+ }
+
+ //
+ return instanceMD;
+ }
+
+ /**
+ * @param instanceElt the instance xml element
+ * @param pwaId the portlet application id
+ */
+ public static InstanceMetaData buildLegacyMetaData(Element instanceElt, String pwaId)
+ {
+ Element instanceNameElt = XML.getUniqueChild(instanceElt, "instance-name", true);
+ Element componentRefElt = XML.getUniqueChild(instanceElt, "component-ref", true);
+
+ //
+ String instanceName = XML.asString(instanceNameElt);
+ String componentRef = XML.asString(componentRefElt);
+
+ //
+ int dotIndex = componentRef.indexOf('.');
+
+ //
+ if (dotIndex == -1)
+ {
+ log.warn("Bad component ref " + componentRef);
+ }
+ else
+ {
+ String appId = componentRef.substring(0, dotIndex);
+ if (appId.equals(pwaId) == false)
+ {
+ log.warn("The instance " + instanceName + " will not be created because the component referenced is outside of the same web app " + componentRef);
+ }
+ else
+ {
+ String portletRef = componentRef.substring(dotIndex + 1);
+
+ if (portletRef.length() == 0)
+ {
+ log.warn("Zero portlet ref length are not considered " + componentRef);
+ }
+ else
+ {
+ log.debug("Adding legacy instance " + instanceName);
+
+ //
+ InstanceMetaData instanceMD = new InstanceMetaData();
+ instanceMD.setId(instanceName);
+ instanceMD.setPortletRef(portletRef);
+
+ // Configure preferences
+ PreferencesMetaData preferencesMD = new PreferencesMetaData();
+ Element preferencesElt = XML.getUniqueChild(instanceElt, "preferences", false);
+ if (preferencesElt != null)
+ {
+ for (Iterator j = InstanceMetaData.buildPreferencesMetaData(preferencesElt).values().iterator(); j.hasNext();)
+ {
+ PreferenceMetaData preferenceMD = (PreferenceMetaData)j.next();
+ preferencesMD.addPreference(preferenceMD);
+ }
+ }
+
+ // Add the security constraints
+ Element securityConstraintElt = XML.getUniqueChild(instanceElt, "security-constraint", false);
+ if (securityConstraintElt != null)
+ {
+ SecurityConstraintsMetaData securityConstraintsMD = SecurityConstraintsMetaData.buildSecurityConstraintMetaData(securityConstraintElt);
+ instanceMD.setSecurityConstraints(securityConstraintsMD);
+ }
+
+ //
+ return instanceMD;
+ }
+ }
+ }
+
+ //
+ return null;
+ }
+
+ public static Map buildPreferencesMetaData(Element portletPreferencesElt)
+ {
+ Map preferences = new HashMap();
+ for (Iterator i = XML.getChildrenIterator(portletPreferencesElt, "preference"); i.hasNext();)
+ {
+ Element preferenceElt = (Element)i.next();
+ PreferenceMetaData preference = buildPreferenceMetaData(preferenceElt);
+ preferences.put(preference.getName(), preference);
+ }
+ return preferences;
+ }
+
+ public static PreferenceMetaData buildPreferenceMetaData(Element preferenceElt)
+ {
+ PreferenceMetaData preferenceMD = new PreferenceMetaData();
+ List valuesElt = XML.getChildren(preferenceElt, "value");
+ String[] values = new String[valuesElt.size()];
+ for (int i = 0; i < valuesElt.size(); i++)
+ {
+ values[i] = XML.asString((Element)valuesElt.get(i));
+ }
+ Element readOnlyElt = XML.getUniqueChild(preferenceElt, "read-only", false);
+ boolean readOnly = false;
+ if (readOnlyElt != null)
+ {
+ String value = XML.asString(readOnlyElt);
+ if ("true".equals(value))
+ {
+ readOnly = true;
+ }
+ else if ("false".equals(value))
+ {
+ readOnly = false;
+ }
+ else
+ {
+ // log.debug("Unrecognized value for read only " + value);
+ readOnly = false;
+ }
+ }
+ else
+ {
+ readOnly = false;
+ }
+ preferenceMD.setName(XML.asString(XML.getUniqueChild(preferenceElt, "name", true)));
+ preferenceMD.setReadOnly(readOnly);
+ preferenceMD.setValues(values);
+ return preferenceMD;
+ }
+}
Property changes on: trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/InstanceMetaData.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/PreferencesMetaData.java (from rev 6022, trunk/core/src/main/org/jboss/portal/core/metadata/PreferencesMetaData.java)
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/PreferencesMetaData.java (rev 0)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/PreferencesMetaData.java 2007-01-18 16:28:48 UTC (rev 6033)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * 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.instance.metadata;
+
+import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PreferencesMetaData
+{
+
+ private Map map = new HashMap();
+
+ public void addPreference(PreferenceMetaData preference)
+ {
+ map.put(preference.getName(), preference);
+ }
+
+ public Iterator iterator()
+ {
+ return map.values().iterator();
+ }
+
+ public int size()
+ {
+ return map.size();
+ }
+
+ public PreferenceMetaData getPreference(String key)
+ {
+ return (PreferenceMetaData)map.get(key);
+ }
+}
Property changes on: trunk/core/src/main/org/jboss/portal/core/model/instance/metadata/PreferencesMetaData.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
19 years, 3 months
JBoss Portal SVN: r6032 - trunk/core-cms/src/resources/portal-cms-sar/META-INF.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-01-18 11:17:04 -0500 (Thu, 18 Jan 2007)
New Revision: 6032
Modified:
trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
Log:
fixes CMS deployment issues by adding a dependence of the ACL interceptor over the hibernate factory binder service
Modified: trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-01-18 15:56:25 UTC (rev 6031)
+++ trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-01-18 16:17:04 UTC (rev 6032)
@@ -483,6 +483,7 @@
</policy>
]]>
</attribute>
+ <depends>portal:service=Hibernate,type=CMS</depends>
<depends>portal:service=Module,type=IdentityServiceController</depends>
<!--<depends optional-attribute-name="RoleModule" proxy-type="attribute">
portal:service=Module,type=Role
19 years, 3 months
JBoss Portal SVN: r6031 - in trunk: server/src/main/org/jboss/portal/server/impl/invocation and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-01-18 10:56:25 -0500 (Thu, 18 Jan 2007)
New Revision: 6031
Modified:
trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStack.java
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java
Log:
- improved the impl of JBossInterceptorStackFactory
- corrected issue in cms service wiring with the integration of identity interceptor in the server stack
Modified: trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-01-18 13:05:47 UTC (rev 6030)
+++ trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-01-18 15:56:25 UTC (rev 6031)
@@ -620,7 +620,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends
- optional-attribute-name="InterceptorName">portal:service=PortalAuthorizationManagerFactory</depends>
+ optional-attribute-name="InterceptorName">portal:service=Interceptor,type=Server,name=CMSIdentityBinding</depends>
<depends
optional-attribute-name="StackFactory">portal:service=InterceptorStackFactory,type=Server</depends>
</mbean>
Modified: trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStack.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStack.java 2007-01-18 13:05:47 UTC (rev 6030)
+++ trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStack.java 2007-01-18 15:56:25 UTC (rev 6031)
@@ -33,8 +33,11 @@
{
/** . */
- protected Interceptor[] interceptors;
+ public static final InterceptorStack EMPTY_STACK = new JBossInterceptorStack(new Interceptor[0]);
+ /** . */
+ private final Interceptor[] interceptors;
+
public JBossInterceptorStack(Interceptor[] interceptors)
{
if (interceptors == null)
Modified: trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java 2007-01-18 13:05:47 UTC (rev 6030)
+++ trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java 2007-01-18 15:56:25 UTC (rev 6031)
@@ -29,6 +29,8 @@
import javax.management.ObjectName;
import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -40,8 +42,20 @@
/** . */
protected List interceptorNames;
+ /** . */
+ protected List dynamicInterceptorNames;
+
+ /** . */
protected InterceptorStack stack;
+
+ public JBossInterceptorStackFactory()
+ {
+ interceptorNames = null;
+ dynamicInterceptorNames = new ArrayList();
+ stack = JBossInterceptorStack.EMPTY_STACK;
+ }
+
public List getInterceptorNames()
{
return interceptorNames;
@@ -52,6 +66,11 @@
this.interceptorNames = interceptorNames;
}
+ public List getDynamicInterceptorNames()
+ {
+ return Collections.unmodifiableList(dynamicInterceptorNames);
+ }
+
public InterceptorStack getInterceptorStack()
{
return stack;
@@ -65,7 +84,7 @@
*/
public void addInterceptor(ObjectName name) throws Exception
{
- interceptorNames.add(name);
+ dynamicInterceptorNames.add(name);
}
/**
@@ -87,20 +106,33 @@
/** Rebuild the interceptor stack. */
public void rebuild() throws Exception
{
+ List names = new ArrayList();
+
+ //
if (interceptorNames != null)
{
- Interceptor[] interceptors = new Interceptor[interceptorNames.size()];
- for (int i = 0; i < interceptorNames.size(); i++)
- {
- ObjectName name = (ObjectName)interceptorNames.get(i);
- interceptors[i] = (Interceptor)server.getAttribute(name, "Interceptor");
- }
- stack = new JBossInterceptorStack(interceptors);
+ names.addAll(interceptorNames);
}
+
+ //
+ names.addAll(dynamicInterceptorNames);
+
+ //
+ log.debug("Building interceptor stack " + getName());
+ Interceptor[] interceptors = new Interceptor[names.size()];
+ for (int i = 0; i < names.size(); i++)
+ {
+ ObjectName name = (ObjectName)names.get(i);
+ log.debug("Adding interceptor " + name + " to the stack");
+ interceptors[i] = (Interceptor)server.getAttribute(name, "Interceptor");
+ }
+
+ //
+ stack = new JBossInterceptorStack(interceptors);
}
public void stopService()
{
- this.stack = null;
+ this.stack = JBossInterceptorStack.EMPTY_STACK;
}
}
19 years, 3 months
JBoss Portal SVN: r6030 - trunk/core/src/main/org/jboss/portal/core/impl/model/portal.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-01-18 08:05:47 -0500 (Thu, 18 Jan 2007)
New Revision: 6030
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
Log:
implement toArray in the Collection returned by PortalObjectImpl getChildren()
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-01-18 10:47:32 UTC (rev 6029)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-01-18 13:05:47 UTC (rev 6030)
@@ -186,7 +186,7 @@
public Object[] toArray()
{
- throw new UnsupportedOperationException();
+ return toArray(new Object[0]);
}
public boolean add(Object o)
19 years, 3 months
JBoss Portal SVN: r6029 - in trunk: cms and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-01-18 05:47:32 -0500 (Thu, 18 Jan 2007)
New Revision: 6029
Modified:
trunk/build/build-thirdparty.xml
trunk/cms/build.xml
trunk/core-cms/build.xml
Log:
Updating to jackrabbit 1.1.1
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-01-18 09:32:29 UTC (rev 6028)
+++ trunk/build/build-thirdparty.xml 2007-01-18 10:47:32 UTC (rev 6029)
@@ -51,7 +51,7 @@
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
- <componentref name="jackrabbit" version="1.0"/>
+ <componentref name="jackrabbit" version="1.1.1"/>
<componentref name="apache-myfaces" version="1.1.1"/>
<componentref name="apache-codec" version="1.3.0"/>
<componentref name="apache-collections" version="3.1"/>
Modified: trunk/cms/build.xml
===================================================================
--- trunk/cms/build.xml 2007-01-18 09:32:29 UTC (rev 6028)
+++ trunk/cms/build.xml 2007-01-18 10:47:32 UTC (rev 6029)
@@ -198,7 +198,7 @@
<fileset dir="${apache.lucene.root}/lib" includes="lucene.jar"/>
<!-- cms optimization integration -->
- <fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core-1.0.jar"/>
+ <fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core.jar"/>
<fileset dir="${jboss.cache.lib}" includes="jboss-cache.jar"/>
<fileset dir="${jgroups.jgroups.lib}" includes="jgroups.jar"/>
Modified: trunk/core-cms/build.xml
===================================================================
--- trunk/core-cms/build.xml 2007-01-18 09:32:29 UTC (rev 6028)
+++ trunk/core-cms/build.xml 2007-01-18 10:47:32 UTC (rev 6029)
@@ -236,7 +236,7 @@
<fileset dir="${apache.collections.lib}" includes="commons-collections.jar"/>
<fileset dir="${apache.lucene.lib}" includes="lucene.jar"/>
<!-- cms optimization integration - this contains a clustered cache enabled version -->
- <fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core-1.0.jar"/>
+ <fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core.jar"/>
<fileset dir="${jboss.cache.lib}" includes="jboss-cache.jar"/>
<fileset dir="${jgroups.jgroups.lib}" includes="jgroups.jar"/>
<fileset dir="${slf4j.slf4j.lib}" includes="slf4j-log4j12.jar"/>
19 years, 3 months
JBoss Portal SVN: r6028 - in trunk: core-management and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-01-18 04:32:29 -0500 (Thu, 18 Jan 2007)
New Revision: 6028
Added:
trunk/core-cms/.classpath
trunk/core-management/.classpath
Modified:
trunk/core-cms/
trunk/core-cms/.project
trunk/core-management/
trunk/core-management/.project
Log:
Update Eclipse files
Property changes on: trunk/core-cms
___________________________________________________________________
Name: svn:ignore
+ bin
Added: trunk/core-cms/.classpath
===================================================================
--- trunk/core-cms/.classpath (rev 0)
+++ trunk/core-cms/.classpath 2007-01-18 09:32:29 UTC (rev 6028)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/cms"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/core"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/server"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/portlet"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/api"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/common"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/identity"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jems"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/theme"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/workflow"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbpm/lib/jbpm-3.1.2.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/core-cms/.project
===================================================================
--- trunk/core-cms/.project 2007-01-18 09:14:51 UTC (rev 6027)
+++ trunk/core-cms/.project 2007-01-18 09:32:29 UTC (rev 6028)
@@ -5,7 +5,13 @@
<projects>
</projects>
<buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Property changes on: trunk/core-management
___________________________________________________________________
Name: svn:ignore
+ bin
Added: trunk/core-management/.classpath
===================================================================
--- trunk/core-management/.classpath (rev 0)
+++ trunk/core-management/.classpath 2007-01-18 09:32:29 UTC (rev 6028)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/core"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jems"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/federation"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/portlet"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/core-management/.project
===================================================================
--- trunk/core-management/.project 2007-01-18 09:14:51 UTC (rev 6027)
+++ trunk/core-management/.project 2007-01-18 09:32:29 UTC (rev 6028)
@@ -5,7 +5,13 @@
<projects>
</projects>
<buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
19 years, 3 months
JBoss Portal SVN: r6027 - in trunk: cms and 4 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-01-18 04:14:51 -0500 (Thu, 18 Jan 2007)
New Revision: 6027
Added:
trunk/core-cms/.project
trunk/core-management/.project
Modified:
trunk/build/ide/eclipse/3.2/team/anonymous-projectSet.psf
trunk/build/ide/eclipse/3.2/team/commiter-projectSet.psf
trunk/cms/.classpath
trunk/search/.classpath
trunk/workflow/.classpath
Log:
Update Eclipse files
Modified: trunk/build/ide/eclipse/3.2/team/anonymous-projectSet.psf
===================================================================
--- trunk/build/ide/eclipse/3.2/team/anonymous-projectSet.psf 2007-01-18 08:21:36 UTC (rev 6026)
+++ trunk/build/ide/eclipse/3.2/team/anonymous-projectSet.psf 2007-01-18 09:14:51 UTC (rev 6027)
@@ -3,7 +3,6 @@
<provider id="org.tigris.subversion.subclipse.core.svnnature">
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/api,api"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/bridge,bridge"/>
- <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/build,build"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/cms,cms"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/common,common"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/core,core"/>
@@ -12,15 +11,20 @@
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/format,format"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/identity,identity"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/jems,jems"/>
- <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/migration,migration"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/portlet,portlet"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/registration,registration"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/samples,samples"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/search,search"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/security,security"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/server,server"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/test,test"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/theme,theme"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/workflow,workflow"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/wsrp,wsrp"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/build,build"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/core-cms,core-cms"/>
+ <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/core-management,core-ma..."/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/testsuite,testsuite"/>
- <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/theme,theme"/>
<project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/tools,tools"/>
- <project reference="0.9.3,http://anonsvn.jboss.org/repos/portal/trunk/wsrp,wsrp"/>
</provider>
</psf>
Modified: trunk/build/ide/eclipse/3.2/team/commiter-projectSet.psf
===================================================================
--- trunk/build/ide/eclipse/3.2/team/commiter-projectSet.psf 2007-01-18 08:21:36 UTC (rev 6026)
+++ trunk/build/ide/eclipse/3.2/team/commiter-projectSet.psf 2007-01-18 09:14:51 UTC (rev 6027)
@@ -3,7 +3,6 @@
<provider id="org.tigris.subversion.subclipse.core.svnnature">
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/api,api"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/bridge,bridge"/>
- <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/build,build"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/cms,cms"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/common,common"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/core,core"/>
@@ -12,15 +11,20 @@
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/format,format"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/identity,identity"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/jems,jems"/>
- <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/migration,migration"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/portlet,portlet"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/registration,registration"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/samples,samples"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/search,search"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/security,security"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/server,server"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/test,test"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/theme,theme"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/workflow,workflow"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/wsrp,wsrp"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/build,build"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/core-cms,core-cms"/>
+ <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/core-management,core-manag..."/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/testsuite,testsuite"/>
- <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/theme,theme"/>
<project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/tools,tools"/>
- <project reference="0.9.3,https://svn.jboss.org/repos/portal/trunk/wsrp,wsrp"/>
</provider>
</psf>
Modified: trunk/cms/.classpath
===================================================================
--- trunk/cms/.classpath 2007-01-18 08:21:36 UTC (rev 6026)
+++ trunk/cms/.classpath 2007-01-18 09:14:51 UTC (rev 6027)
@@ -13,7 +13,6 @@
<classpathentry kind="lib" path="/thirdparty/cglib/lib/cglib.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-logging/lib/commons-logging.jar"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jackrabbit/lib/jackrabbit-core-1.0.jar"/>
<classpathentry kind="lib" path="/thirdparty/hsqldb/lib/hsqldb.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
@@ -42,5 +41,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/search"/>
<classpathentry combineaccessrules="false" kind="src" path="/workflow"/>
<classpathentry kind="lib" path="/thirdparty/jbpm/lib/jbpm-3.1.2.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jackrabbit/lib/jackrabbit-core-1.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Added: trunk/core-cms/.project
===================================================================
--- trunk/core-cms/.project (rev 0)
+++ trunk/core-cms/.project 2007-01-18 09:14:51 UTC (rev 6027)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>core-cms</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: trunk/core-management/.project
===================================================================
--- trunk/core-management/.project (rev 0)
+++ trunk/core-management/.project 2007-01-18 09:14:51 UTC (rev 6027)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>core-management</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Modified: trunk/search/.classpath
===================================================================
--- trunk/search/.classpath 2007-01-18 08:21:36 UTC (rev 6026)
+++ trunk/search/.classpath 2007-01-18 09:14:51 UTC (rev 6027)
@@ -8,5 +8,7 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-lucene/lib/lucene.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jcr/lib/jcr-1.0.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/identity"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/workflow/.classpath
===================================================================
--- trunk/workflow/.classpath 2007-01-18 08:21:36 UTC (rev 6026)
+++ trunk/workflow/.classpath 2007-01-18 09:14:51 UTC (rev 6027)
@@ -11,5 +11,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/common"/>
<classpathentry kind="output" path="bin"/>
</classpath>
19 years, 3 months
JBoss Portal SVN: r6026 - trunk.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-01-18 03:21:36 -0500 (Thu, 18 Jan 2007)
New Revision: 6026
Removed:
trunk/management/
Log:
Empty module
19 years, 3 months
JBoss Portal SVN: r6025 - trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-01-17 19:40:25 -0500 (Wed, 17 Jan 2007)
New Revision: 6025
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
Log:
- JBPORTAL-1204: Use getResources and keep the last one returned to make sure we get the deepest/more specific one on the path.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java 2007-01-17 22:17:59 UTC (rev 6024)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java 2007-01-18 00:40:25 UTC (rev 6025)
@@ -31,6 +31,7 @@
import org.jboss.xb.binding.UnmarshallerFactory;
import java.net.URL;
+import java.util.Enumeration;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -69,7 +70,15 @@
{
throw new Exception("The config location is null");
}
- URL configURL = Thread.currentThread().getContextClassLoader().getResource(configLocation);
+
+ // make sure we pick the furthest down the path in case there's several similarly named resources in the path
+ Enumeration enum = Thread.currentThread().getContextClassLoader().getResources(configLocation);
+ URL configURL = null;
+ while (enum.hasMoreElements())
+ {
+ configURL = (URL)enum.nextElement();
+ }
+
if (configURL == null)
{
throw new Exception("The config " + configLocation + " does not exist");
19 years, 3 months