JBoss Portal SVN: r7168 - trunk/wsrp/src/main/org/jboss/portal/wsrp/services.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-05-02 01:40:38 -0400 (Wed, 02 May 2007)
New Revision: 7168
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
- Make unavailable if provided URL is invalid.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-05-02 04:25:29 UTC (rev 7167)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-05-02 05:40:38 UTC (rev 7168)
@@ -90,6 +90,7 @@
IllegalArgumentException iae = new IllegalArgumentException("Require a well-formed URL specifying where to " +
"find the WSRP services definition");
iae.initCause(e);
+ available = false;
throw iae;
}
catch (Exception e)
19 years
JBoss Portal SVN: r7167 - trunk/wsrp/src/main/org/jboss/portal/test/wsrp/handler.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-05-02 00:25:29 -0400 (Wed, 02 May 2007)
New Revision: 7167
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java
Log:
- Make it compile on Java 6 (thanks to Ricardo A. Harari).
Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java 2007-05-01 23:44:19 UTC (rev 7166)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java 2007-05-02 04:25:29 UTC (rev 7167)
@@ -131,4 +131,9 @@
{
throw new UnsupportedOperationException();
}
+
+ public void removeAttachments(MimeHeaders mimeHeaders)
+ {
+ throw new UnsupportedOperationException();
+ }
}
19 years
JBoss Portal SVN: r7166 - in trunk/wsrp/src: main/org/jboss/portal/wsrp/consumer and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-05-01 19:44:19 -0400 (Tue, 01 May 2007)
New Revision: 7166
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/RegistrationInfoTestCase.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml
Log:
- Fixed incorrect update of RegistrationInfo properties when replacing local data. Might need a better solution via better Hibernate mapping.
- Added length on hibernate mapping to hopefully resolve JBPORTAL-1375 (though it's far from certain).
- RegistrationProperty is now marked as invalid if the value is null.
Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/RegistrationInfoTestCase.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/RegistrationInfoTestCase.java 2007-05-01 21:06:42 UTC (rev 7165)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/RegistrationInfoTestCase.java 2007-05-01 23:44:19 UTC (rev 7166)
@@ -32,6 +32,7 @@
import org.jboss.portal.wsrp.core.ServiceDescription;
import java.util.Map;
+import java.util.Set;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -62,12 +63,14 @@
{
String key = "foo";
info.setRegistrationPropertyValue(key, "bar");
- assertFalse(info.getRegistrationProperties().isEmpty());
- assertFalse(info.getRegistrationPropertyNames().isEmpty());
- assertTrue(info.getRegistrationProperties().containsKey(key));
- assertTrue(info.getRegistrationPropertyNames().contains(key));
- assertNotNull(info.getRegistrationProperties().get(key));
- assertEquals(info.getRegistrationProperties().get(key), info.getRegistrationProperty(key));
+ Map properties = info.getRegistrationProperties();
+ assertFalse(properties.isEmpty());
+ Set names = info.getRegistrationPropertyNames();
+ assertFalse(names.isEmpty());
+ assertTrue(properties.containsKey(key));
+ assertTrue(names.contains(key));
+ assertNotNull(properties.get(key));
+ assertEquals(properties.get(key), info.getRegistrationProperty(key));
assertEquals("bar", info.getRegistrationProperty(key).getValue());
}
@@ -132,6 +135,23 @@
assertTrue(status.indexOf("prop0") != -1 && status.indexOf("prop1") != -1);
}
+ public void testRefreshRegistrationRegistrationEraseLocalInfo()
+ {
+ RegistrationInfo.RegistrationRefreshResult result = info.refreshRegistrationRequirementsFor(createServiceDescription(true, 2),
+ producerId, true);
+ assertNotNull(result);
+ assertFalse(result.isValid());
+ RegistrationProperty prop = info.getRegistrationProperty("prop0");
+ assertNotNull(prop);
+ assertNull(prop.getValue());
+ assertTrue(prop.isInvalid());
+ prop = info.getRegistrationProperty("prop1");
+ assertNotNull(prop);
+ assertNull(prop.getValue());
+ assertTrue(prop.isInvalid());
+ assertEquals(2, info.getRegistrationProperties().size());
+ }
+
private ServiceDescription createServiceDescription(boolean requiresRegistration, int numberOfProperties)
{
ServiceDescription sd = WSRPTypeFactory.createServiceDescription(requiresRegistration);
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-05-01 21:06:42 UTC (rev 7165)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-05-01 23:44:19 UTC (rev 7166)
@@ -64,13 +64,14 @@
private Map registrationProperties;
private transient RegistrationData registrationData;
+ private transient ProducerInfo parent;
public RegistrationInfo(ProducerInfo producerInfo)
{
+ this();
ParameterValidation.throwIllegalArgExceptionIfNull(producerInfo, "ProducerInfo");
producerInfo.setRegistrationInfo(this);
- consumerName = WSRPConstants.DEFAULT_CONSUMER_NAME;
- requiresRegistration = true;
+ parent = producerInfo;
}
public RegistrationInfo()
@@ -276,7 +277,37 @@
if (discardLocalInfo)
{
- registrationProperties = descriptionsMap;
+ registrationProperties = getOrCreateRegistrationPropertiesMap(true);
+
+ // Remove extra properties
+ Set unexpected = new HashSet(registrationProperties.keySet());
+ unexpected.removeAll(descriptionsMap.keySet());
+ if (!unexpected.isEmpty())
+ {
+ for (Iterator invalidProps = unexpected.iterator(); invalidProps.hasNext();)
+ {
+ registrationProperties.remove(invalidProps.next());
+ }
+ }
+
+ // Resets existing properties
+ for (Iterator props = descriptionsMap.values().iterator(); props.hasNext();)
+ {
+ RegistrationProperty prop = (RegistrationProperty)props.next();
+ String name = prop.getName();
+ RegistrationProperty existing = getRegistrationProperty(name);
+ if (existing != null)
+ {
+ existing.setValue(null);
+ existing.setDescription(prop.getDescription());
+ }
+ else
+ {
+ registrationProperties.put(name, prop);
+ }
+ }
+
+ resetRegistration();
result.setValid(false);
}
else
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2007-05-01 21:06:42 UTC (rev 7165)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2007-05-01 23:44:19 UTC (rev 7166)
@@ -52,6 +52,7 @@
this.name = name;
this.value = stringValue;
this.lang = lang;
+ invalid = (stringValue == null);
}
@@ -157,6 +158,10 @@
public void setValue(String stringValue)
{
value = stringValue;
+ if (value == null)
+ {
+ invalid = true;
+ }
}
public String getLang()
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml 2007-05-01 21:06:42 UTC (rev 7165)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml 2007-05-01 23:44:19 UTC (rev 7166)
@@ -75,8 +75,8 @@
</id>
<property name="consumerName" column="CONSUMER_NAME" type="java.lang.String" not-null="true"/>
<property name="registrationHandle" column="HANDLE" type="java.lang.String"/>
- <property name="registrationState" column="STATE" type="binary"/>
- <map name="registrationProperties" cascade="all" lazy="false">
+ <property name="registrationState" column="STATE" type="binary" length="50000000"/>
+ <map name="registrationProperties" cascade="all,delete-orphan" lazy="false" access="field">
<cache usage="@portal.hibernate.cache.usage@"/>
<key column="REG_PK" not-null="true"/>
<map-key type="string" column="name"/>
@@ -91,7 +91,9 @@
<param name="sequence">wsrpconsumer_seq</param>
</generator>
</id>
- <property name="name" type="java.lang.String" not-null="true" insert="false" update="false"/>
+ <natural-id>
+ <property name="name" type="java.lang.String" not-null="true" unique="false" insert="false" update="false"/>
+ </natural-id>
<property name="value" type="java.lang.String"/>
<property name="invalid" type="boolean"/>
<property name="lang" type="java.lang.String" not-null="true"/>
19 years
JBoss Portal SVN: r7165 - in trunk: server/src/main/org/jboss/portal/server and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-05-01 17:06:42 -0400 (Tue, 01 May 2007)
New Revision: 7165
Modified:
trunk/common/src/main/org/jboss/portal/common/util/Version.java
trunk/server/src/main/org/jboss/portal/server/PortalConstants.java
Log:
- minor update in Version class : added a type safe wrapper for suffix, so we have only valid suffixes
- set version to GA :-)
Modified: trunk/common/src/main/org/jboss/portal/common/util/Version.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/util/Version.java 2007-05-01 15:58:07 UTC (rev 7164)
+++ trunk/common/src/main/org/jboss/portal/common/util/Version.java 2007-05-01 21:06:42 UTC (rev 7165)
@@ -180,25 +180,60 @@
}
}
+ public static class Suffix
+ {
+
+ public static final Suffix EMPTY = new Suffix("");
+ public static final Suffix SUFFIX_1 = new Suffix("1");
+ public static final Suffix SUFFIX_2 = new Suffix("2");
+ public static final Suffix SUFFIX_3 = new Suffix("3");
+ public static final Suffix SUFFIX_4 = new Suffix("4");
+ public static final Suffix SUFFIX_5 = new Suffix("5");
+ public static final Suffix SUFFIX_6 = new Suffix("6");
+
+ /** . */
+ private final String value;
+
+ private Suffix(String value)
+ {
+ this.value = value;
+ }
+
+ public String toString()
+ {
+ return value;
+ }
+ }
+
+ /** . */
private final String toString;
+
+ /** . */
private final Prefix prefix;
- private final String suffix;
- public Qualifier(Prefix prefix, String suffix)
+ /** . */
+ private final Suffix suffix;
+
+ public Qualifier(Prefix prefix)
{
+ this(prefix, Suffix.EMPTY);
+ }
+
+ public Qualifier(Prefix prefix, Suffix suffix)
+ {
if (prefix == null)
{
throw new IllegalArgumentException("No prefix provided");
}
if (suffix == null)
{
- suffix = "";
+ suffix = new Suffix("");
}
- if (prefix.isSuffixable() == false && suffix.length() > 0)
+ if (prefix.isSuffixable() == false && suffix.value.length() > 0)
{
throw new IllegalArgumentException("The prefix " + prefix + " is not suffixable");
}
- this.toString = prefix + suffix;
+ this.toString = "" + prefix + suffix;
this.prefix = prefix;
this.suffix = suffix;
}
@@ -208,7 +243,7 @@
return prefix;
}
- public String getSuffix()
+ public Suffix getSuffix()
{
return suffix;
}
Modified: trunk/server/src/main/org/jboss/portal/server/PortalConstants.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-05-01 15:58:07 UTC (rev 7164)
+++ trunk/server/src/main/org/jboss/portal/server/PortalConstants.java 2007-05-01 21:06:42 UTC (rev 7165)
@@ -34,11 +34,12 @@
*/
public class PortalConstants
{
+
/** Current version. */
- public static Version VERSION = new Version("JBoss Portal", 2, 6, 0, new Version.Qualifier(Version.Qualifier.Prefix.CR, "2"), "Ninja");
+ public static final Version VERSION = new Version("JBoss Portal", 2, 6, 0, new Version.Qualifier(Version.Qualifier.Prefix.GA), "Ninja");
/** The default portal name. */
- public static String DEFAULT_PORTAL_NAME = "default";
+ public static final String DEFAULT_PORTAL_NAME = "default";
/** . */
public static final String APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded";
19 years
JBoss Portal SVN: r7164 - trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-05-01 11:58:07 -0400 (Tue, 01 May 2007)
New Revision: 7164
Added:
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
Log:
Fix For: Fine Grained CMS permissions not accurately enforced in a clustered environment - JBPORTAL-1212
Added: trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml (rev 0)
+++ trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml 2007-05-01 15:58:07 UTC (rev 7164)
@@ -0,0 +1,376 @@
+<?xml version="1.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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.portal.cms.hibernate.state.VersionBinVal" table="jbp_cms_version_binval" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="id"
+ column="BINVAL_ID"
+ type="string"
+ length="255"/>
+ <property
+ name="data"
+ column="BINVAL_DATA"
+ type="blob"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.state.VersionNode" table="jbp_cms_version_node" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="nodeId"
+ column="NODE_ID"
+ type="string"
+ length="36"/>
+ <property
+ name="data"
+ column="NODE_DATA"
+ type="binary"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.state.VersionProp" table="jbp_cms_version_prop" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="propId"
+ column="PROP_ID"
+ type="string"
+ length="255"/>
+ <property
+ name="data"
+ column="PROP_DATA"
+ type="binary"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.state.VersionRefs" table="jbp_cms_version_refs" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="refId"
+ column="NODE_ID"
+ type="string"
+ length="36"/>
+ <property
+ name="data"
+ column="REFS_DATA"
+ type="binary"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.state.WSPBinVal" table="jbp_cms_wsp_binval" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="id"
+ column="BINVAL_ID"
+ type="string"
+ length="255"/>
+ <property
+ name="data"
+ column="BINVAL_DATA"
+ type="blob"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.state.WSPNode" table="jbp_cms_wsp_node" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="nodeId"
+ column="NODE_ID"
+ type="string"
+ length="36"/>
+ <property
+ name="data"
+ column="NODE_DATA"
+ type="binary"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.state.WSPProp" table="jbp_cms_wsp_prop" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="propId"
+ column="PROP_ID"
+ type="string"
+ length="255"/>
+ <property
+ name="data"
+ column="PROP_DATA"
+ type="binary"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.state.WSPRefs" table="jbp_cms_wsp_refs" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="refId"
+ column="NODE_ID"
+ type="string"
+ length="36"/>
+ <property
+ name="data"
+ column="REFS_DATA"
+ type="binary"
+ length="100000000"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.CMSEntry" table="jbp_cms_cmsentry" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="name"
+ column="FSENTRY_NAME"
+ type="string"
+ length="255"
+ not-null="false"/>
+ <property name="path"
+ column="FSENTRY_PATH"
+ type="string"
+ not-null="true"
+ length="245"/>
+ <property name="data"
+ column="FSENTRY_DATA"
+ type="blob"
+ length="100000000"
+ not-null="false"/>
+ <property name="lastmod"
+ column="FSENTRY_LASTMOD"
+ type="long"
+ not-null="true"/>
+ <property name="length"
+ column="FSENTRY_LENGTH"
+ type="long"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.RepositoryEntry" table="jbp_cms_repositoryentry" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="name"
+ column="FSENTRY_NAME"
+ type="string"
+ length="255"
+ not-null="false"/>
+ <property name="path"
+ column="FSENTRY_PATH"
+ type="string"
+ not-null="true"
+ length="245"/>
+ <property name="data"
+ column="FSENTRY_DATA"
+ type="blob"
+ length="100000000"
+ not-null="false"/>
+ <property name="lastmod"
+ column="FSENTRY_LASTMOD"
+ type="long"
+ not-null="true"/>
+ <property name="length"
+ column="FSENTRY_LENGTH"
+ type="long"
+ not-null="true"/>
+ </class>
+ <class name="org.jboss.portal.cms.hibernate.VersionEntry" table="jbp_cms_versionentry" lazy="true">
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Integer">
+ <generator class="native"/>
+ </id>
+ <property
+ name="name"
+ column="FSENTRY_NAME"
+ type="string"
+ length="255"
+ not-null="false"/>
+ <property name="path"
+ column="FSENTRY_PATH"
+ type="string"
+ not-null="true"
+ length="245"/>
+ <property name="data"
+ column="FSENTRY_DATA"
+ type="blob"
+ length="100000000"
+ not-null="false"/>
+ <property name="lastmod"
+ column="FSENTRY_LASTMOD"
+ type="long"
+ not-null="true"/>
+ <property name="length"
+ column="FSENTRY_LENGTH"
+ type="long"
+ not-null="true"/>
+ </class>
+
+ <!-- mapping to persist CMS Fine Grained Security related objects -->
+ <class name="org.jboss.portal.cms.security.PermRoleAssoc" table="jbp_cms_perm_role">
+ <cache usage="read-write"/>
+ <id
+ name="id"
+ column="ID"
+ type="java.lang.Long">
+ <generator class="native"/>
+ </id>
+ <property
+ name="roleId"
+ column="ROLE_ID"
+ type="string"
+ not-null="true"
+ />
+ </class>
+ <class name="org.jboss.portal.cms.security.PermUserAssoc" table="jbp_cms_perm_user">
+ <cache usage="read-write"/>
+ <id
+ name="id"
+ column="ID"
+ type="java.lang.Long">
+ <generator class="native"/>
+ </id>
+ <property
+ name="userId"
+ column="USER_ID"
+ type="string"
+ not-null="true"
+ />
+ </class>
+ <class name="org.jboss.portal.cms.security.Criteria" table="jbp_cms_perm_criteria">
+ <cache usage="read-write"/>
+ <id
+ name="id"
+ column="ID"
+ type="java.lang.Long">
+ <generator class="native"/>
+ </id>
+ <property
+ name="name"
+ column="NAME"
+ type="string"
+ not-null="true"
+ />
+ <property
+ name="value"
+ column="VALUE"
+ type="string"
+ not-null="true"
+ />
+ </class>
+ <class name="org.jboss.portal.cms.security.Permission" table="jbp_cms_perm">
+ <cache usage="read-write"/>
+ <id
+ name="id"
+ column="ID"
+ type="java.lang.Long">
+ <generator class="native"/>
+ </id>
+ <!-- one-to-many association with the criteria object -->
+ <set name="criteria" lazy="false" table="jbp_cms_perm_criteria" cascade="all-delete-orphan">
+ <cache usage="read-write"/>
+ <key column="CMS_PERM_ID"/>
+ <one-to-many class="org.jboss.portal.cms.security.Criteria"/>
+ </set>
+ <!-- many-to-many association with the role object -->
+ <set name="roleAssoc" lazy="false" cascade="all-delete-orphan">
+ <cache usage="read-write"/>
+ <key column="CMS_PERM_ID"/>
+ <one-to-many class="org.jboss.portal.cms.security.PermRoleAssoc"/>
+ </set>
+ <!-- many-to-many association with the user object -->
+ <set name="userAssoc" lazy="false" cascade="all-delete-orphan">
+ <cache usage="read-write"/>
+ <key column="CMS_PERM_ID"/>
+ <one-to-many class="org.jboss.portal.cms.security.PermUserAssoc"/>
+ </set>
+ <property
+ name="service"
+ column="NAME"
+ type="string"
+ not-null="true"
+ />
+ <property
+ name="action"
+ column="ACTION"
+ type="string"
+ not-null="true"
+ />
+ <property
+ name="negated"
+ column="NEGATED"
+ type="boolean"
+ not-null="true"
+ />
+ </class>
+</hibernate-mapping>
+
Property changes on: trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
19 years
JBoss Portal SVN: r7163 - in trunk: cms and 9 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-05-01 11:54:32 -0400 (Tue, 01 May 2007)
New Revision: 7163
Added:
trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java
trunk/cms/src/resources/test/cms/clustering/datasource/
trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml
trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml
Removed:
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
Modified:
trunk/
trunk/cms/build.xml
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java
trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml
trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml
trunk/core-cms/build.xml
trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
Log:
Fix For: Fine Grained CMS permissions not accurately enforced in a clustered environment - JBPORTAL-1212
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
- .project
.classpath
thirdparty
eclipseBin
myworkspace
bin
*.settings
miscellaneous
+ .project
.classpath
thirdparty
eclipseBin
myworkspace
bin
*.settings
miscellaneous
local-tests
Modified: trunk/cms/build.xml
===================================================================
--- trunk/cms/build.xml 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/build.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -222,72 +222,93 @@
<!--
generates artifacts used for tests, requires output to be previously run
-->
- <target name="package-tests" depends="init">
-
+ <target name="package-tests" depends="init">
<jar jarfile="${build.lib}/test-cms-cluster.sar" manifest="${build.etc}/portal-cms-lib-sar.mf">
- <fileset dir="${build.resources}/portal-cms-sar"/>
- <fileset dir="${build.lib}" includes="portal-cms-lib.jar"/>
- <fileset dir="${jcr.jcr.root}/lib" includes="jcr-1.0.jar"/>
- <fileset dir="${apache.collections.root}/lib" includes="commons-collections.jar"/>
- <fileset dir="${apache.lucene.root}/lib" includes="lucene.jar"/>
+ <fileset dir="${build.resources}/portal-cms-sar"/>
+ <fileset dir="${build.lib}" includes="portal-cms-lib.jar"/>
+ <fileset dir="${jcr.jcr.root}/lib" includes="jcr-1.0.jar"/>
+ <fileset dir="${apache.collections.root}/lib" includes="commons-collections.jar"/>
+ <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="${jboss.cache.lib}" includes="jboss-cache.jar"/>
- <fileset dir="${jgroups.jgroups.lib}" includes="jgroups.jar"/>
-
-
- <fileset dir="${slf4j.slf4j.lib}" includes="slf4j-log4j12.jar"/>
+ <!-- cms optimization integration -->
+ <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"/>
- <!-- add the jboss-service.xml and hibernate configuration -->
- <fileset dir="${build.resources}/test/cms/clustering/sar"/>
- <fileset dir="${jboss.portal-core.lib}" includes="portal-core-lib.jar"/>
- <fileset dir="${jboss.portal-common.lib}" includes="portal-common-lib.jar"/>
- <fileset dir="${jboss.portal-jems.lib}" includes="portal-jems-lib.jar"/>
- <fileset dir="${jboss.portal-server.lib}" includes="portal-server-lib.jar"/>
- <fileset dir="${jboss.portal-portlet.lib}" includes="portal-portlet-testframework-lib.jar"/>
- </jar>
+ <!-- add the jboss-service.xml and hibernate configuration -->
+ <fileset dir="${build.resources}/test/cms/clustering/sar"/>
+
+ <!-- add dependencies -->
+ <!--
+ <fileset dir="${jboss.portal-core.lib}" includes="portal-core-lib.jar"/>
+ <fileset dir="${jboss.portal-common.lib}" includes="portal-common-lib.jar"/>
+ <fileset dir="${jboss.portal-jems.lib}" includes="portal-jems-lib.jar"/>
+ <fileset dir="${jboss.portal-server.lib}" includes="portal-server-lib.jar"/>
+ <fileset dir="${jboss.portal-portlet.lib}" includes="portal-portlet-lib.jar"/>
+ <fileset dir="${jboss.portlet-api.lib}" includes="portal-api-lib.jar"/>
+ <fileset dir="${jboss.portal-security.lib}" includes="portal-security-lib.jar"/>
+ -->
+ <fileset dir="${jboss.portal-core-cms.lib}" includes="portal-core-cms-lib.jar"/>
+ <fileset dir="${jboss.portal-identity.lib}" includes="portal-identity-lib.jar"/>
+ <fileset dir="${jboss.portal-workflow.lib}" includes="portal-workflow-lib.jar"/>
+ <fileset dir="${jboss.portal-portlet.lib}" includes="portal-portlet-testframework-lib.jar"/>
+ </jar>
<jar jarfile="${build.lib}/test-cms-cluster.war">
- <fileset dir="${build.resources}/test/cms/clustering/test-cms-clustering-war"/>
- <fileset dir="${build.classes}" includes="org/jboss/portal/test/cms/clustering/**"/>
+ <fileset dir="${build.resources}/test/cms/clustering/test-cms-clustering-war"/>
+ <fileset dir="${build.classes}" includes="org/jboss/portal/test/cms/clustering/**"/>
</jar>
</target>
<target name="deploy-tests"
description="Deploy."
depends="output">
- <!--
+ <!--
upgrage the jbosscache/groups of the HA instances for the puropse of testing
TODO: This is fine for this iteration. Eventually we need to integrate these libraries
for bundling in the thirdparty mechanism. This will follow in the next iteration
- -->
+ -->
<copy file="${jboss.cache.lib}/jboss-cache.jar" todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
- <copy file="${jgroups.jgroups.lib}/jgroups.jar" todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
- <copy file="${jboss.cache.lib}/jboss-cache.jar" todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
- <copy file="${jgroups.jgroups.lib}/jgroups.jar" todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+ <copy file="${jgroups.jgroups.lib}/jgroups.jar" todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
+ <copy file="${jboss.cache.lib}/jboss-cache.jar" todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+ <copy file="${jgroups.jgroups.lib}/jgroups.jar" todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+
+ <!-- deploying the test datasources -->
+ <copy file="${build.resources}/test/cms/clustering/datasource/ports01-ds.xml" todir="${jboss.home}/server/ports-01/deploy" overwrite="true"/>
+ <copy file="${build.resources}/test/cms/clustering/datasource/ports02-ds.xml" todir="${jboss.home}/server/ports-02/deploy" overwrite="true"/>
<!-- install test sars needed for the testsuite framework -->
+ <!--
<copy file="${jboss.portal-portlet.lib}/test.sar" todir="${jboss.home}/server/ports-01/deploy"/>
- <copy file="${jboss.portal-portlet.lib}/test.sar" todir="${jboss.home}/server/ports-02/deploy"/>
- <copy file="${jboss.portal-test.lib}/portal-test.sar" todir="${jboss.home}/server/ports-01/deploy"/>
- <copy file="${jboss.portal-test.lib}/portal-test.sar" todir="${jboss.home}/server/ports-02/deploy"/>
-
- <copy file="${build.lib}/test-cms-cluster.sar" todir="${jboss.home}/server/ports-01/deploy"/>
- <copy file="${build.lib}/test-cms-cluster.sar" todir="${jboss.home}/server/ports-02/deploy"/>
+ <copy file="${jboss.portal-portlet.lib}/test.sar" todir="${jboss.home}/server/ports-02/deploy"/>
+ -->
+
+ <!--
+ <copy file="${jboss.portal-test.lib}/portal-test.sar" todir="${jboss.home}/server/ports-01/deploy"/>
+ <copy file="${jboss.portal-test.lib}/portal-test.sar" todir="${jboss.home}/server/ports-02/deploy"/>
+ -->
+
+ <copy file="${build.lib}/test-cms-cluster.sar" todir="${jboss.home}/server/ports-01/deploy"/>
+ <copy file="${build.lib}/test-cms-cluster.sar" todir="${jboss.home}/server/ports-02/deploy"/>
</target>
<target name="undeploy-tests"
description="UnDeploy."
- depends="output">
-
- <!-- install test sars needed for the testsuite framework -->
- <delete file="${jboss.home}/server/ports-01/deploy/test.sar"/>
- <delete file="${jboss.home}/server/ports-02/deploy/test.sar"/>
- <delete file="${jboss.home}/server/ports-01/deploy/portal-test.sar"/>
- <delete file="${jboss.home}/server/ports-02/deploy/portal-test.sar"/>
- <delete file="${jboss.home}/server/ports-01/deploy/test-cms-cluster.sar"/>
- <delete file="${jboss.home}/server/ports-02/deploy/test-cms-cluster.sar"/>
+ depends="output">
+ <!-- install test sars needed for the testsuite framework -->
+ <!--
+ <delete file="${jboss.home}/server/ports-01/deploy/test.sar"/>
+ <delete file="${jboss.home}/server/ports-02/deploy/test.sar"/>
+ -->
+ <!--
+ <delete file="${jboss.home}/server/ports-01/deploy/portal-test.sar"/>
+ <delete file="${jboss.home}/server/ports-02/deploy/portal-test.sar"/>
+ -->
+
+ <delete file="${jboss.home}/server/ports-01/deploy/test-cms-cluster.sar"/>
+ <delete file="${jboss.home}/server/ports-02/deploy/test-cms-cluster.sar"/>
</target>
<!-- ================================================================== -->
@@ -328,7 +349,7 @@
<sysproperty key="test.uri" value="/test/redirect/"/>
</x-sysproperty>
<x-test>
- <test todir="${test.reports}" name="org.jboss.portal.test.cms.clustering.CMSTestSuite"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.cms.clustering.FileUpdateTest"/>
</x-test>
<x-classpath>
<path refid="apache.logging.classpath"/>
@@ -394,6 +415,7 @@
<test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRepositoryBootStrap"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRegEx"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRepositoryUtil"/>
+
<!-- cms file command tests -->
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileCreate"/>
@@ -405,7 +427,8 @@
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileCopy"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileCreateFailed"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileDelete"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestSearch"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestSearch"/>
+
<!-- cms folder command tests -->
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderCopy"/>
@@ -413,12 +436,14 @@
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderDelete"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderGet"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderUpdate"/>
+
- <!-- cms fine grained security related tests -->
+ <!-- cms fine grained security related tests -->
<test todir="${test.reports}" name="org.jboss.portal.test.cms.security.TestReadAccess"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.security.TestWriteAccess"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.security.TestManageAccess"/>
+
<!-- cms workflow related tests -->
<test todir="${test.reports}" name="org.jboss.portal.test.cms.workflow.TestApprovedPublish"/>
<test todir="${test.reports}" name="org.jboss.portal.test.cms.workflow.TestDeniedPublish"/>
@@ -483,6 +508,5 @@
</fileset>
<report format="frames" todir="${build.reports}/html"/>
</junitreport>
- </target>
-
+ </target>
</project>
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java 2007-05-01 15:54:32 UTC (rev 7163)
@@ -37,6 +37,7 @@
import org.jboss.portal.cms.model.Content;
import org.jboss.portal.cms.model.File;
import org.jboss.portal.cms.model.Folder;
+import org.jboss.portal.cms.model.CMSUser;
import org.jboss.portal.cms.util.RepositoryUtil;
import org.jboss.portal.common.invocation.InterceptorStackFactory;
import org.jboss.portal.common.invocation.Invocation;
@@ -65,6 +66,7 @@
import javax.jcr.Session;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
+import javax.naming.InitialContext;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
@@ -99,6 +101,8 @@
private Element config;
+ private String identitySessionFactory = null;
+
private IdentityServiceController identityServiceController;
private ApprovePublish approvePublishWorkflow;
@@ -271,7 +275,26 @@
{
this.jndiName = jndiName;
}
-
+
+ /**
+ *
+ * @return
+ */
+ public String getIdentitySessionFactory()
+ {
+ return identitySessionFactory;
+ }
+
+ /**
+ *
+ * @param identitySessionFactory
+ */
+ public void setIdentitySessionFactory(String identitySessionFactory)
+ {
+ this.identitySessionFactory = identitySessionFactory;
+ }
+
+
/** CMS Start */
public void startService() throws Exception
{
@@ -567,9 +590,30 @@
};
Object obj = null;
+ boolean isClusterDelegatedRequest = false; //used to indicate this request is from another cluster node instead of the master node
+ boolean clusterWorkflowStatus = false;
try
{
xares.start(xid, XAResource.TMNOFLAGS);
+
+ //Check and make sure in the case of a clustered call, the Identity propagated
+ //as part of the invocation is handled correctly
+ JCRCommandContext propagatedContext = (JCRCommandContext)((JCRCommand)cmd).getContext();
+ if(propagatedContext != null)
+ {
+ CMSUser propagatedUser = (CMSUser)propagatedContext.getClusterContextInfo("user");
+ if(propagatedUser != null)
+ {
+ JCRCMS.getUserInfo().set(propagatedUser);
+ isClusterDelegatedRequest = true;
+ }
+ Boolean workflowStatus = (Boolean)propagatedContext.getClusterContextInfo("workflowStatus");
+ if(workflowStatus != null)
+ {
+ JCRCMS.turnOffWorkflow();
+ clusterWorkflowStatus = true;
+ }
+ }
// .... add new nodes & properties and save them
JCRCommand jcrCmd = (JCRCommand)cmd;
@@ -637,6 +681,14 @@
//must do this otherwise, the whole cms will hang
session.logout();
}
+ if(isClusterDelegatedRequest)
+ {
+ JCRCMS.getUserInfo().set(null);
+ }
+ if(clusterWorkflowStatus)
+ {
+ JCRCMS.turnOnWorkflow();
+ }
}
return obj;
}
@@ -658,5 +710,5 @@
public InterceptorStackFactory getStackFactory()
{
return stackFactory;
- }
+ }
}
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java 2007-05-01 15:54:32 UTC (rev 7163)
@@ -22,7 +22,12 @@
******************************************************************************/
package org.jboss.portal.cms.impl.jcr;
+import java.io.Serializable;
+import java.util.Map;
+import java.util.HashMap;
+
import org.jboss.portal.cms.CMSException;
+import org.jboss.portal.cms.model.CMSUser;
import org.jboss.portal.common.invocation.AbstractInvocationContext;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
import org.jboss.portal.common.invocation.Scope;
@@ -34,15 +39,17 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class JCRCommandContext extends AbstractInvocationContext
+public class JCRCommandContext extends AbstractInvocationContext implements Serializable
{
public static final Scope scope = Scope.THREAD_SCOPE;
- private final Session session;
+ private transient final Session session;
- private final JCRCommandFactory commandFactory;
+ private transient final JCRCommandFactory commandFactory;
- private final Locale locale;
+ private transient final Locale locale;
+
+ private Map clusterContext = null;
public JCRCommandContext(Session session, JCRCommandFactory factory, Locale locale)
{
@@ -73,4 +80,36 @@
return locale;
}
+ /**
+ *
+ * @param key
+ * @param data
+ */
+ public void setClusterContextInfo(String key,Object data)
+ {
+ this.getClusterContext().put(key, data);
+ }
+
+ /**
+ *
+ * @param key
+ * @return
+ */
+ public Object getClusterContextInfo(String key)
+ {
+ return this.getClusterContext().get(key);
+ }
+
+ /**
+ * Instantiates the cluser context only on-demand
+ * @return
+ */
+ private Map getClusterContext()
+ {
+ if(this.clusterContext == null)
+ {
+ this.clusterContext = new HashMap();
+ }
+ return this.clusterContext;
+ }
}
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/ha/HAJCRCMS.java 2007-05-01 15:54:32 UTC (rev 7163)
@@ -24,9 +24,14 @@
import org.jboss.portal.cms.CMSException;
import org.jboss.portal.cms.Command;
+import org.jboss.portal.cms.model.CMSUser;
import org.jboss.portal.cms.impl.jcr.JCRCMS;
+import org.jboss.portal.cms.impl.jcr.JCRCommand;
+import org.jboss.portal.cms.impl.jcr.JCRCommandContext;
import org.jboss.portal.jems.ha.HASingletonInvoker;
+import org.jboss.portal.identity.User;
+
/**
* Extend the JCR CMS and make it run as an ha singleton.
*
@@ -52,6 +57,32 @@
{
try
{
+ //Add the user Identity ThreadLocal variable to the Command Context for propagation to the Master Node
+ if(this.getUserInfo().get() != null)
+ {
+ User user = (User)this.getUserInfo().get();
+ JCRCommandContext context = (JCRCommandContext)((JCRCommand)cmd).getContext();
+ if(context == null)
+ {
+ context = new JCRCommandContext(null,null,null);
+ ((JCRCommand)cmd).setContext(context);
+ }
+ context.setClusterContextInfo("user",new CMSUser(user.getUserName()));
+ }
+
+ //Add the Workflow ThreadLocal variable to the Command Context for propagation to the Master Node
+ if(this.turnOffWorkflow.get() != null)
+ {
+ Boolean workflowStatus = (Boolean)this.turnOffWorkflow.get();
+ JCRCommandContext context = (JCRCommandContext)((JCRCommand)cmd).getContext();
+ if(context == null)
+ {
+ context = new JCRCommandContext(null,null,null);
+ ((JCRCommand)cmd).setContext(context);
+ }
+ context.setClusterContextInfo("workflowStatus",workflowStatus);
+ }
+
// Use the proxy to invoke on the singleton
return invoker.invoke("execute", new Class[]{Command.class}, new Object[]{cmd});
}
@@ -59,7 +90,7 @@
{
e.printStackTrace();
throw new RuntimeException("Fixme bad contract", e);
- }
+ }
}
}
Added: trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java (rev 0)
+++ trunk/cms/src/main/org/jboss/portal/cms/model/CMSUser.java 2007-05-01 15:54:32 UTC (rev 7163)
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * 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.cms.model;
+
+import java.io.Serializable;
+import org.jboss.portal.identity.User;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class CMSUser implements User, Serializable
+{
+ /**
+ *
+ */
+ private String username = null;
+
+ /**
+ *
+ * @param username
+ */
+ public CMSUser(String username)
+ {
+ this.username = username;
+ }
+
+ /**
+ *
+ */
+ public Object getId()
+ {
+ return null;
+ }
+
+ /**
+ *
+ */
+ public String getUserName()
+ {
+ return this.username;
+ }
+
+ /**
+ *
+ */
+ public void updatePassword(String password)
+ {
+ throw new RuntimeException("Illegal Operation");
+ }
+
+ /**
+ *
+ */
+ public boolean validatePassword(String password)
+ {
+ throw new RuntimeException("Illegal Operation");
+ }
+}
Added: trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml (rev 0)
+++ trunk/cms/src/resources/test/cms/clustering/datasource/ports01-ds.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>PortalDS</jndi-name>
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}portal${/}hypersonic${/}database</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password><![CDATA[]]></password>
+ </local-tx-datasource>
+</datasources>
Added: trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml (rev 0)
+++ trunk/cms/src/resources/test/cms/clustering/datasource/ports02-ds.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>PortalDS</jndi-name>
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}portal${/}hypersonic${/}database</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password><![CDATA[]]></password>
+ </local-tx-datasource>
+</datasources>
Modified: trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -22,17 +22,30 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<server>
+
+ <!-- Management MBean -->
<mbean
+ code="org.jboss.portal.cms.management.CMSImpl"
+ name="portal:service=Management,type=CMS,name=Default"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <depends
+ optional-attribute-name="CMS"
+ proxy-type="attribute">portal:service=CMS</depends>
+ <xmbean/>
+ </mbean>
+
+ <mbean
code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
name="portal:service=Hibernate,type=CMS"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends>jboss.jca:service=DataSourceBinding,name=TestPortalDS</depends>
+ <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
<attribute name="DoChecking">true</attribute>
<attribute name="ConfigLocation">conf/hibernate/cms/hibernate.cfg.xml</attribute>
<attribute name="JNDIName">java:/portal/cms/CMSSessionFactory</attribute>
- </mbean>
+ </mbean>
<mbean
code="org.jboss.portal.cms.impl.jcr.ha.HAJCRCMS"
@@ -40,18 +53,23 @@
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
+ <!-- The datasource hibernate depends on, it can be commented when the file store is used -->
+ <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
+ <depends>portal:service=JAASLoginModule</depends>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
- <depends>jboss.jca:service=DataSourceBinding,name=TestPortalDS</depends>
- <depends>portal:service=Hibernate,type=CMS</depends>
- <!--depends>portal:service=JAASLoginModule</depends-->
-
- <!--depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends-->
-
+ <!-- Add this to activate publish/approval workflow integration -->
+ <!--
+ <depends optional-attribute-name="ApprovePublishWorkflow" proxy-type="attribute">portal:service=ApprovePublish,type=Workflow</depends>
+ -->
+
+ <depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends>
<attribute name="DoChecking">true</attribute>
- <attribute name="DefaultContentLocation">default-content/default/</attribute>
+ <attribute name="DefaultContentLocation">portal/cms/conf/default-content/default/</attribute>
<attribute name="DefaultLocale">en</attribute>
<attribute name="RepositoryName">PortalRepository</attribute>
- <attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
+ <attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
<attribute name="Config">
<Repository>
<!--
@@ -85,7 +103,7 @@
<!-- HibernateStore: uses RDBMS + Hibernate for storage -->
<FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
<param name="schemaObjectPrefix" value="CMSEntry"/>
- <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
</FileSystem>
<!-- LocalFileSystem: uses FileSystem for storage. -->
<!--<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
@@ -94,13 +112,13 @@
<!--
persistence manager of the workspace.
- Use XMLPersistenceManager for LocalFileSystem Store and HibernatePersistentManager .
+ Use XMLPersistenceManager for LocalFileSystem Store and JBossCachePersistenceManager .
-->
<!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage -->
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="WSP"/>
- <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
@@ -109,6 +127,7 @@
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
+ <param name="textFilterClasses" value="org.apache.jackrabbit.core.query.HTMLTextFilter" />
<param name="useCompoundFile" value="true"/>
<param name="minMergeDocs" value="100"/>
<param name="volatileIdleTime" value="3"/>
@@ -129,7 +148,7 @@
<!-- HibernateStore: uses RDBMS + Hibernate for storage -->
<FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
<param name="schemaObjectPrefix" value="VersionEntry"/>
- <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
</FileSystem>
<!-- LocalFileSystem: uses FileSystem for storage. -->
@@ -141,13 +160,13 @@
<!--
Configures the persistence manager to be used for persisting version state.
- Use XMLPersistenceManager for LocalFileSystem Store and HibernatePersistentManager for HibernateStore.
+ Use XMLPersistenceManager for LocalFileSystem Store and JBossCachePersistenceManager for HibernateStore.
-->
<!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage -->
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="Version"/>
- <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+ <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
@@ -156,10 +175,11 @@
</Versioning>
</Repository>
</attribute>
+ <attribute name="JNDIName">java:portal/CMS</attribute>
</mbean>
<!--
- | Uncomment in clustered mode : HASingleton registration
+ | Uncomment in clustered mode : Provides an HA-singleton based clustering architecture.
-->
<mbean
code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
@@ -175,10 +195,11 @@
</interceptors>
</attribute>
</mbean>
+
<mbean
code="org.jboss.portal.jems.ha.HASingletonInvoker"
name="portal:service=HASingletonInvoker,type=CMS">
- <depends>jboss:service=DefaultPartition</depends>
+ <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
<attribute name="RetryWaitingTimeMS">2000</attribute>
<attribute name="MaxRetries">5</attribute>
<attribute name="JNDIName">MyServiceInvokeTarget</attribute>
@@ -197,7 +218,48 @@
<depends optional-attribute-name="Callback" proxy-type="attribute">portal:service=CMS</depends>
<depends optional-attribute-name="ProxyFactory">portal:service=ProxyFactory,type=CMS</depends>
</mbean>
+ <!--
+ -->
+ <mbean
+ code="org.jboss.portal.core.cms.CMSObjectCommandFactoryService"
+ name="portal:commandFactory=CMSObject"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="TargetWindowRef">default.default.CMSWindow</attribute>
+ <depends
+ optional-attribute-name="CMSService"
+ proxy-type="attribute">portal:service=CMS</depends>
+ <depends
+ optional-attribute-name="ServerConfig"
+ proxy-type="attribute">portal:service=ServerConfig</depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
+ name="portal:commandFactory=Delegate,path=content"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="Path">/content</attribute>
+ <depends
+ optional-attribute-name="DelegatingFactory"
+ proxy-type="attribute">portal:commandFactory=Delegating</depends>
+ <depends
+ optional-attribute-name="DelegateFactory"
+ proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.core.cms.CMSObjectURLFactory"
+ name="portal:urlFactory=CMSObject"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="Path">/content</attribute>
+ <depends optional-attribute-name="Factory" proxy-type="attribute">portal:urlFactory=Delegating</depends>
+ </mbean>
+
<!-- TreeCache configuration used to cache CMS data -->
<mbean code="org.jboss.cache.TreeCache"
name="cms.pm.cache:service=TreeCache">
@@ -370,54 +432,129 @@
<attribute name="CacheLoaderFetchPersistentState">false</attribute>
<attribute name="CacheLoaderAsynchronous">false</attribute-->
</mbean>
-
- <!-- not sure if these should be removed since Command Framework is used now -->
- <!--mbean
- code="org.jboss.portal.core.cms.CMSObjectCommandFactory"
- name="portal:commandFactory=CMSObject"
+
+ <!-- interceptor factory where all cms interceptors are registered -->
+ <mbean
+ code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+ name="portal:service=InterceptorStackFactory,type=Cms"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute name="TargetWindowRef">default.default.DefaultCMSPortletWindow</attribute>
- <depends optional-attribute-name="CMSService" proxy-type="attribute">portal:service=CMS</depends>
+ <depends-list optional-attribute-name="InterceptorNames">
+ <depends-list-element>portal:service=Interceptor,type=Cms,name=ACL</depends-list-element>
+ <depends-list-element>portal:service=Interceptor,type=Cms,name=ApprovalWorkflow</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!-- CMS Authorization Security Service -->
+ <mbean
+ code="org.jboss.portal.cms.security.AuthorizationManagerImpl"
+ name="portal:service=AuthorizationManager,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="JNDIName">java:portal/cms/AuthorizationManager</attribute>
+ <depends optional-attribute-name="Provider" proxy-type="attribute">
+ portal:service=AuthorizationProvider,type=cms
+ </depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.cms.security.AuthorizationProviderImpl"
+ name="portal:service=AuthorizationProvider,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
</mbean>
+
+ <!-- ACL Security Interceptor -->
<mbean
- code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
- name="portal:commandFactory=Delegate,prefix=content"
+ code="org.jboss.portal.cms.impl.interceptors.ACLInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=ACL"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute name="Prefix">content</attribute>
- <depends
- optional-attribute-name="DelegatingFactory"
- proxy-type="attribute">portal:commandFactory=Delegating</depends>
- <depends
- optional-attribute-name="DelegateFactory"
- proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ <attribute name="JNDIName">java:/portal/cms/ACLInterceptor</attribute>
+ <attribute name="CmsSessionFactory">java:/portal/cms/CMSSessionFactory</attribute>
+ <attribute name="IdentitySessionFactory">java:/portal/IdentitySessionFactory</attribute>
+ <attribute name="DefaultPolicy">
+ <![CDATA[
+ <policy>
+ <!-- permissions on the root cms node -->
+ <criteria name="path" value="/">
+ <permission name="cms" action="read">
+ <role name="Anonymous"/>
+ </permission>
+ <permission name="cms" action="write">
+ <role name="User"/>
+ </permission>
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ <!-- permissions on the default cms node -->
+ <criteria name="path" value="/default">
+ <permission name="cms" action="read">
+ <role name="Anonymous"/>
+ </permission>
+ <permission name="cms" action="write">
+ <role name="User"/>
+ </permission>
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ <!-- permissions on the private/protected node -->
+ <criteria name="path" value="/default/private">
+ <permission name="cms" action="manage">
+ <role name="Admin"/>
+ </permission>
+ </criteria>
+ </policy>
+ ]]>
+ </attribute>
+ <depends optional-attribute-name="AuthorizationManager" proxy-type="attribute">
+ portal:service=AuthorizationManager,type=cms
+ </depends>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ <depends>portal:service=Module,type=IdentityServiceController</depends>
</mbean>
+
+ <!-- Approval Workflow Interceptor -->
<mbean
- code="org.jboss.portal.core.cms.CMSObjectURLFactory"
- name="portal:urlFactory=CMSObject"
+ code="org.jboss.portal.cms.impl.interceptors.ApprovalWorkflowInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=ApprovalWorkflow"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Prefix">content</attribute>
- <depends optional-attribute-name="Factory" proxy-type="attribute">portal:urlFactory=Delegating</depends>
- </mbean-->
-
- <!-- intereceptors -->
+ <xmbean/>
+ <attribute name="JNDIName">java:/portal/cms/ApprovalWorkflowInterceptor</attribute>
+ <depends>portal:service=Hibernate,type=CMS</depends>
+ </mbean>
+
+ <!-- logging interceptor -->
<!--mbean
code="org.jboss.portal.cms.impl.interceptors.LogInterceptor"
name="portal:service=Interceptor,type=Cms,name=Log"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- </mbean>
+ </mbean-->
+
+ <!--
<mbean
+ code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
+ name="portal:service=Interceptor,type=Cms,name=Cache"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portal:service=CMSTreeCacheService</depends>
+ </mbean>
+ //this is not needed anymore. this cache is redundant since there is a JBossCache PM
+ <mbean
code="org.jboss.portal.cms.impl.cache.CMSTreeCacheServiceImpl"
name="portal:service=CMSTreeCacheService"
xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Cache" proxy-type="attribute">
<mbean
@@ -431,27 +568,8 @@
</mbean>
</depends>
<attribute name="JNDIName">java:/portal/cms/CMSTreeCache</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
- name="portal:service=Interceptor,type=Cms,name=Cache"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=CMSTreeCacheService</depends>
</mbean>
- <mbean
- code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
- name="portal:service=InterceptorStackFactory,type=Cms"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends-list optional-attribute-name="InterceptorNames">
- <depends-list-element>portal:service=Interceptor,type=Cms,name=Cache</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Cms,name=Log</depends-list-element>
- </depends-list>
- </mbean-->
-
+ -->
<!--
| Uncomment in clustered mode : TreeCache configuration for the clustered JackRabbit in-memory cache...
| This helps with node synching, but there are other aspects of JackRabbit like versioning subsystem
@@ -528,4 +646,42 @@
<attribute name="UseRegionBasedMarshalling">false</attribute>
</mbean-->
+
+ <mbean
+ code="org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor"
+ name="portal:service=Interceptor,type=Server,name=CMSIdentityBinding"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.server.impl.invocation.JBossInterceptorRegistration"
+ name="portal:service=InterceptorRegistration,type=Server,name=CMSIdentityBinding"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <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>
+
+ <!-- Content renderer integration -->
+ <mbean
+ code="org.jboss.portal.core.cms.content.InternalCMSContentProvider"
+ name="portal:service=ContentRenderer,type=cms"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="ContentType">cms</attribute>
+ <attribute name="DecorateContent">false</attribute>
+ <attribute name="PortletInstanceName">CMSPortletInstance</attribute>
+ <depends
+ optional-attribute-name="Registry"
+ proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
+ <depends
+ optional-attribute-name="CommandFactory"
+ proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+ </mbean>
</server>
Deleted: trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -1,278 +0,0 @@
-<?xml version="1.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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.jboss.portal.cms.hibernate.state.VersionBinVal" table="jbp_cms_version_binval" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="id"
- column="BINVAL_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="BINVAL_DATA"
- type="blob"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.VersionNode" table="jbp_cms_version_node" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="nodeId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="NODE_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.VersionProp" table="jbp_cms_version_prop" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="propId"
- column="PROP_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="PROP_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.VersionRefs" table="jbp_cms_version_refs" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="refId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="REFS_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPBinVal" table="jbp_cms_wsp_binval" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="id"
- column="BINVAL_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="BINVAL_DATA"
- type="blob"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPNode" table="jbp_cms_wsp_node" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="nodeId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="NODE_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPProp" table="jbp_cms_wsp_prop" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="propId"
- column="PROP_ID"
- type="string"
- length="255"/>
- <property
- name="data"
- column="PROP_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.state.WSPRefs" table="jbp_cms_wsp_refs" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="refId"
- column="NODE_ID"
- type="string"
- length="36"/>
- <property
- name="data"
- column="REFS_DATA"
- type="binary"
- length="100000000"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.CMSEntry" table="jbp_cms_cmsentry" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="name"
- column="FSENTRY_NAME"
- type="string"
- length="255"
- not-null="false"/>
- <property name="path"
- column="FSENTRY_PATH"
- type="string"
- not-null="true"
- length="245"/>
- <property name="data"
- column="FSENTRY_DATA"
- type="blob"
- length="100000000"
- not-null="false"/>
- <property name="lastmod"
- column="FSENTRY_LASTMOD"
- type="long"
- not-null="true"/>
- <property name="length"
- column="FSENTRY_LENGTH"
- type="long"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.RepositoryEntry" table="jbp_cms_repositoryentry" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="name"
- column="FSENTRY_NAME"
- type="string"
- length="255"
- not-null="false"/>
- <property name="path"
- column="FSENTRY_PATH"
- type="string"
- not-null="true"
- length="245"/>
- <property name="data"
- column="FSENTRY_DATA"
- type="blob"
- length="100000000"
- not-null="false"/>
- <property name="lastmod"
- column="FSENTRY_LASTMOD"
- type="long"
- not-null="true"/>
- <property name="length"
- column="FSENTRY_LENGTH"
- type="long"
- not-null="true"/>
- </class>
- <class name="org.jboss.portal.cms.hibernate.VersionEntry" table="jbp_cms_versionentry" lazy="true">
- <id
- name="key"
- column="PK"
- type="java.lang.Integer">
- <generator class="native"/>
- </id>
- <property
- name="name"
- column="FSENTRY_NAME"
- type="string"
- length="255"
- not-null="false"/>
- <property name="path"
- column="FSENTRY_PATH"
- type="string"
- not-null="true"
- length="245"/>
- <property name="data"
- column="FSENTRY_DATA"
- type="blob"
- length="100000000"
- not-null="false"/>
- <property name="lastmod"
- column="FSENTRY_LASTMOD"
- type="long"
- not-null="true"/>
- <property name="length"
- column="FSENTRY_LENGTH"
- type="long"
- not-null="true"/>
- </class>
-</hibernate-mapping>
-
Modified: trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -27,7 +27,7 @@
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
- <property name="connection.datasource">java:TestPortalDS</property>
+ <property name="connection.datasource">java:PortalDS</property>
<property name="show_sql">false</property>
<property name="cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
Modified: trunk/core-cms/build.xml
===================================================================
--- trunk/core-cms/build.xml 2007-05-01 13:29:46 UTC (rev 7162)
+++ trunk/core-cms/build.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -220,6 +220,14 @@
name="portal-cms-exploded.sar"
/>
</target>
+
+ <target name="explode-ha" depends="init">
+ <explode
+ file="${build.lib}/portal-cms-ha.sar"
+ todir="${build.lib}"
+ name="portal-cms-ha-exploded.sar"
+ />
+ </target>
<target name="artifacts"
description="Generate all target output."
@@ -378,7 +386,14 @@
<fileset dir="${build.lib}/portal-cms-exploded.sar"/>
</copy>
</target>
-
+
+ <target name="deploy-ha-explode" description="Deploy." depends="output-ha,explode-ha">
+ <require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
+ <copy todir="${jboss.home}/server/${portal-ha.deploy.dir}/jboss-portal-ha.sar/portal-cms-ha.sar" overwrite="true">
+ <fileset dir="${build.lib}/portal-cms-ha-exploded.sar"/>
+ </copy>
+ </target>
+
<!--
| Undeploy the application
-->
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-05-01 13:29:46 UTC (rev 7162)
+++ trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-05-01 15:54:32 UTC (rev 7163)
@@ -70,6 +70,7 @@
<attribute name="DefaultLocale">en</attribute>
<attribute name="RepositoryName">PortalRepository</attribute>
<attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
+ <attribute name="IdentitySessionFactory">java:/portal/IdentitySessionFactory</attribute>
<attribute name="Config">
<Repository>
<!--
@@ -201,7 +202,7 @@
name="portal:service=HASingletonInvoker,type=CMS">
<depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
<attribute name="RetryWaitingTimeMS">2000</attribute>
- <attribute name="MaxRetries">5</attribute>
+ <attribute name="MaxRetries">1</attribute>
<attribute name="JNDIName">MyServiceInvokeTarget</attribute>
<attribute name="JNDIProperties">
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
@@ -531,123 +532,7 @@
<depends>portal:service=Hibernate,type=CMS</depends>
</mbean>
- <!-- logging interceptor -->
- <!--mbean
- code="org.jboss.portal.cms.impl.interceptors.LogInterceptor"
- name="portal:service=Interceptor,type=Cms,name=Log"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean-->
-
- <!--
<mbean
- code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
- name="portal:service=Interceptor,type=Cms,name=Cache"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=CMSTreeCacheService</depends>
- </mbean>
- //this is not needed anymore. this cache is redundant since there is a JBossCache PM
- <mbean
- code="org.jboss.portal.cms.impl.cache.CMSTreeCacheServiceImpl"
- name="portal:service=CMSTreeCacheService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
- <xmbean/>
- <depends optional-attribute-name="Cache" proxy-type="attribute">
- <mbean
- code="org.jboss.cache.TreeCache"
- name="portal:service=CMSTreeCache">
- <depends>jboss:service=Naming</depends>
- <depends>jboss:service=TransactionManager</depends>
- <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
- <attribute name="CacheMode">REPL_ASYNC</attribute>
- <attribute name="IsolationLevel">NONE</attribute>
- </mbean>
- </depends>
- <attribute name="JNDIName">java:/portal/cms/CMSTreeCache</attribute>
- </mbean>
- -->
- <!--
- | Uncomment in clustered mode : TreeCache configuration for the clustered JackRabbit in-memory cache...
- | This helps with node synching, but there are other aspects of JackRabbit like versioning subsystem
- | and locking system that get out-of-sync in the cluster. This leads to unpredicatable results and hence
- | the idea to cluster JackRabbit needs to be dropped at this time
- -->
- <!--mbean code="org.jboss.cache.TreeCache"
- name="jackrabbit.inmemory.cache:service=TreeCache">
-
- <depends>jboss:service=Naming</depends>
- <depends>jboss:service=TransactionManager</depends>
-
- <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
-
-
-
- <attribute name="IsolationLevel">NONE</attribute>
-
-
- <attribute name="CacheMode">INVALIDATION_ASYNC</attribute>
-
-
- <attribute name="UseReplQueue">false</attribute>
-
-
- <attribute name="ReplQueueInterval">0</attribute>
-
-
- <attribute name="ReplQueueMaxElements">0</attribute>
-
-
- <attribute name="ClusterName">JackRabbitInternalCache</attribute>
-
-
-
- <attribute name="ClusterConfig">
- <config>
- <UDP mcast_addr="228.1.2.3" mcast_port="48866"
- ip_ttl="64" ip_mcast="true"
- receive_on_all_interfaces="true"
- mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
- ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
- loopback="false"/>
- <PING timeout="2000" num_initial_members="3"
- up_thread="false" down_thread="false"/>
- <MERGE2 min_interval="10000" max_interval="20000"/>
- <FD_SOCK/>
- <VERIFY_SUSPECT timeout="1500"
- up_thread="false" down_thread="false"/>
- <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
- max_xmit_size="8192" up_thread="false" down_thread="false"/>
- <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
- down_thread="false"/>
- <pbcast.STABLE desired_avg_gossip="20000"
- up_thread="false" down_thread="false"/>
- <FRAG frag_size="8192"
- down_thread="false" up_thread="false"/>
- <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
- shun="true" print_local_addr="true"/>
- <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
- </config>
- </attribute>
-
- <attribute name="FetchInMemoryState">false</attribute>
-
- <attribute name="InitialStateRetrievalTimeout">20000</attribute>
-
- <attribute name="SyncReplTimeout">20000</attribute>
-
- <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-
- <attribute name="EvictionPolicyClass"></attribute>
-
- <attribute name="UseRegionBasedMarshalling">false</attribute>
- </mbean-->
-
- <mbean
code="org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor"
name="portal:service=Interceptor,type=Server,name=CMSIdentityBinding"
xmbean-dd=""
19 years
JBoss Portal SVN: r7162 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-05-01 09:29:46 -0400 (Tue, 01 May 2007)
New Revision: 7162
Modified:
docs/trunk/referenceGuide/en/modules/security.xml
Log:
- just a typo
Modified: docs/trunk/referenceGuide/en/modules/security.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/security.xml 2007-05-01 10:42:47 UTC (rev 7161)
+++ docs/trunk/referenceGuide/en/modules/security.xml 2007-05-01 13:29:46 UTC (rev 7162)
@@ -152,7 +152,7 @@
<listitem><emphasis>PortalServletWithPathMapping</emphasis> is used for path mapping mappings.</listitem>
<listitem><emphasis>PortalServletWithDefaultServletMapping</emphasis> is used for the default servlet mapping.</listitem>
</itemizedlist>
- The portal servlet is mapped for times with different semantics, the differences between the semantics are related to the transport layer.
+ The portal servlet is mapped four times with different semantics, the differences between the semantics are related to the transport layer.
Each one of those for mappings will have the same request meaning for the portal beside the transport aspect. By default
those mappings are
<itemizedlist>
19 years
JBoss Portal SVN: r7161 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-05-01 06:42:47 -0400 (Tue, 01 May 2007)
New Revision: 7161
Modified:
docs/trunk/referenceGuide/en/modules/clustering.xml
Log:
- remove dummy copy-pasted caption
Modified: docs/trunk/referenceGuide/en/modules/clustering.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/clustering.xml 2007-05-01 10:11:19 UTC (rev 7160)
+++ docs/trunk/referenceGuide/en/modules/clustering.xml 2007-05-01 10:42:47 UTC (rev 7161)
@@ -411,9 +411,6 @@
...
}
]]></programlisting>
- <caption>
- <para>Configures YourPortlet to be replicated in jboss-portlet.xml</para>
- </caption>
</para>
</sect2>
</sect1>
19 years
JBoss Portal SVN: r7160 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-05-01 06:11:19 -0400 (Tue, 01 May 2007)
New Revision: 7160
Modified:
docs/trunk/referenceGuide/en/modules/installation.xml
docs/trunk/referenceGuide/en/modules/overview.xml
Log:
- update company to Red Hat
- AS version to 4.0.5+ for installation
Modified: docs/trunk/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/installation.xml 2007-05-01 08:51:15 UTC (rev 7159)
+++ docs/trunk/referenceGuide/en/modules/installation.xml 2007-05-01 10:11:19 UTC (rev 7160)
@@ -131,7 +131,7 @@
<sect3>
<title>Application Server Setup</title>
<para>Of course you will need to install JBoss Application Server prior to installing JBoss
- portal, if you didn't do so yet, please install JBoss 4.0.4+ from
+ portal, if you didn't do so yet, please install JBoss 4.0.5+ from
<ulink
url="http://labs.jboss.com/portal/jbossas/download/index.html"
>here
@@ -292,7 +292,7 @@
<sect3>
<title>Application Server Setup</title>
<para>Of course you will need to install JBoss Application Server prior to installing JBoss
- portal, if you didn't do so yet, please install JBoss 4.0.4+ from
+ portal, if you didn't do so yet, please install JBoss 4.0.5+ from
<ulink
url="http://labs.jboss.com/portal/jbossas/download/index.html"
>here
Modified: docs/trunk/referenceGuide/en/modules/overview.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/overview.xml 2007-05-01 08:51:15 UTC (rev 7159)
+++ docs/trunk/referenceGuide/en/modules/overview.xml 2007-05-01 10:11:19 UTC (rev 7160)
@@ -11,7 +11,7 @@
goal by deploying enterprise portals within their IT infrastructure. Enterprise portals
simplify access to information by providing a single source of interaction with corporate
information. Although today's packaged portal frameworks help enterprises launch portals more
- quickly, only JBoss Portal can deliver the benefits of a zero-cost open source license
+ quickly, only JBoss Portal can deliver the benefits of a zero-cost open source license,
combined with a flexible and scalable underlying platform.
</para>
<para>JBoss Portal provides an open source and standards-based environment for hosting and
@@ -24,12 +24,12 @@
</ulink>
open source license and is
supported by
- <ulink url="http://www.jboss.com/services/index">JBoss Inc. Professional Support
+ <ulink url="http://www.jboss.com/services/index">Red Hat Middleware, LLC Professional Support
and Consulting
</ulink>
. JBoss support services are available to assist you in designing,
developing, deploying, and ultimately managing your portal environment. JBoss Portal is
- currently developed by JBoss, Inc. developers, Novell developers, and community contributors.
+ currently developed by Red Hat Middleware, LLC developers and community contributors.
</para>
<para>The JBoss Portal framework and architecture includes the portal container and supports a
wide range of features including standard portlets, single sign-on, clustering and
19 years
JBoss Portal SVN: r7159 - in trunk: core-samples/src/resources/portal-samples-war/WEB-INF/jsp and 3 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-05-01 04:51:15 -0400 (Tue, 01 May 2007)
New Revision: 7159
Added:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/event/
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/event/view.jsp
trunk/samples/src/main/org/jboss/samples/portlet/event/
trunk/samples/src/main/org/jboss/samples/portlet/event/EventPortlet.java
Modified:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
Log:
- make Page Event sample page verbose on whats happening there.
Modified: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml 2007-05-01 05:52:03 UTC (rev 7158)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/default-object.xml 2007-05-01 08:51:15 UTC (rev 7159)
@@ -107,38 +107,38 @@
<page-name>page event test</page-name>
<listener>window_event_listener</listener>
<window>
- <window-name>CatalogPortletWindow1</window-name>
- <instance-ref>CatalogPortletInstance</instance-ref>
+ <window-name>EventPortletWindow1</window-name>
+ <instance-ref>EventPortletInstance</instance-ref>
<region>left</region>
<height>0</height>
</window>
<window>
- <window-name>CatalogPortletWindow2</window-name>
- <instance-ref>CatalogPortletInstance</instance-ref>
+ <window-name>EventPortletWindow2</window-name>
+ <instance-ref>EventPortletInstance</instance-ref>
<region>left</region>
<height>1</height>
</window>
<window>
- <window-name>CatalogPortletWindow3</window-name>
- <instance-ref>CatalogPortletInstance</instance-ref>
+ <window-name>EventPortletWindow3</window-name>
+ <instance-ref>EventPortletInstance</instance-ref>
<region>left</region>
<height>2</height>
</window>
<window>
- <window-name>CatalogPortletWindow4</window-name>
- <instance-ref>CatalogPortletInstance</instance-ref>
+ <window-name>EventPortletWindow4</window-name>
+ <instance-ref>EventPortletInstance</instance-ref>
<region>center</region>
<height>0</height>
</window>
<window>
- <window-name>CatalogPortletWindow5</window-name>
- <instance-ref>CatalogPortletInstance</instance-ref>
+ <window-name>EventPortletWindow5</window-name>
+ <instance-ref>EventPortletInstance</instance-ref>
<region>center</region>
<height>1</height>
</window>
<window>
- <window-name>CatalogPortletWindow6</window-name>
- <instance-ref>CatalogPortletInstance</instance-ref>
+ <window-name>EventPortletWindow6</window-name>
+ <instance-ref>EventPortletInstance</instance-ref>
<region>center</region>
<height>2</height>
</window>
Added: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/event/view.jsp
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/event/view.jsp (rev 0)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jsp/event/view.jsp 2007-05-01 08:51:15 UTC (rev 7159)
@@ -0,0 +1,41 @@
+<%@ page import="org.jboss.portal.server.PortalConstants" %>
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~ 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. ~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<%@ page isELIgnored="false" %>
+
+<portlet:defineObjects/>
+
+<table border="0" cellspacing="2" cellpadding="2">
+ <tr>
+ <td class="portlet-section-alternate">
+ <font class="portlet-font">This is simple showcase of Portal Node Event Listener. For this portal page it ensures
+ that in every column, only one portlet window is in <b>NORMAL</b> state. Try to change window state of other
+ portlets and see what happens. To learn more read <b>InterPortlet Communication (IPC)</b> chapter in
+ <b>JBoss Portal Reference Guide</b>, or check source code of
+ <i><b>org.jboss.portal.core.portlet.test.event.WindowConstraintEventListener</b></i> class .
+ </font>
+ </td>
+ </tr>
+</table>
Modified: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml 2007-05-01 05:52:03 UTC (rev 7158)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet-instances.xml 2007-05-01 08:51:15 UTC (rev 7159)
@@ -35,6 +35,12 @@
</deployment>
<deployment>
<instance>
+ <instance-id>EventPortletInstance</instance-id>
+ <portlet-ref>EventPortlet</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
<instance-id>NewsPortletInstance</instance-id>
<portlet-ref>NewsPortlet</portlet-ref>
</instance>
Modified: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml 2007-05-01 05:52:03 UTC (rev 7158)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml 2007-05-01 08:51:15 UTC (rev 7159)
@@ -42,6 +42,20 @@
</portlet-info>
</portlet>
<portlet>
+ <description>Simple Portlet</description>
+ <portlet-name>EventPortlet</portlet-name>
+ <display-name>Event Portlet</display-name>
+ <portlet-class>org.jboss.samples.portlet.event.EventPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Portal Node Event Listener</title>
+ <keywords>event, sample,test</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
<description>Portlet to test modification of head content</description>
<portlet-name>HeaderContentPortlet</portlet-name>
<display-name>Header Content Portlet</display-name>
Added: trunk/samples/src/main/org/jboss/samples/portlet/event/EventPortlet.java
===================================================================
--- trunk/samples/src/main/org/jboss/samples/portlet/event/EventPortlet.java (rev 0)
+++ trunk/samples/src/main/org/jboss/samples/portlet/event/EventPortlet.java 2007-05-01 08:51:15 UTC (rev 7159)
@@ -0,0 +1,47 @@
+/*
+* 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.samples.portlet.event;
+
+import org.jboss.samples.portlet.jsp.JSPPortlet;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.UnavailableException;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:roy@jboss.org">Roy Russo</a>
+ */
+public class EventPortlet extends GenericPortlet
+{
+ private static final String JSP_PATH = "/WEB-INF/jsp/event";
+
+ protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException, UnavailableException
+ {
+ rResponse.setContentType("text/html");
+ javax.portlet.PortletRequestDispatcher pRD = this.getPortletContext().getRequestDispatcher(JSP_PATH + "/view.jsp");
+ pRD.include(rRequest, rResponse);
+ }
+}
19 years