JBoss Portal SVN: r13598 - in modules/wsrp/trunk: service and 3 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-07-23 12:05:57 -0400 (Thu, 23 Jul 2009)
New Revision: 13598
Added:
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml
Removed:
modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/
Modified:
modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java
modules/wsrp/trunk/service/pom.xml
Log:
- JBPORTAL-2186:
+ Forgot to add conf directory, including producer and hibernate configuration.
+ Changed final name of service to wsrp-producer.
+ Use proper WSRP producer object name in WSRPConstants.
+ Removed useless consumer configuration.
Modified: modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java
===================================================================
--- modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java 2009-07-23 13:14:28 UTC (rev 13597)
+++ modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java 2009-07-23 16:05:57 UTC (rev 13598)
@@ -42,7 +42,7 @@
/** JMX object name for the Portal web app registry */
public static final String WEB_APP_REGISTRY_OBJECT_NAME = "portal:service=WebAppRegistry";
/** JMX object name for the WSRP Producer */
- public static final String WSRP_PRODUCER_OBJECT_NAME = "portal.wsrp:service=WSRPProducer";
+ public static final String WSRP_PRODUCER_OBJECT_NAME = "portletcontainer.wsrp:service=WSRPProducer";
// Window State Names ***********************************************************************************************
Modified: modules/wsrp/trunk/service/pom.xml
===================================================================
--- modules/wsrp/trunk/service/pom.xml 2009-07-23 13:14:28 UTC (rev 13597)
+++ modules/wsrp/trunk/service/pom.xml 2009-07-23 16:05:57 UTC (rev 13598)
@@ -35,7 +35,7 @@
<name>JBoss Portal WSRP Service</name>
<build>
- <finalName>portal-wsrp</finalName>
+ <finalName>wsrp-producer</finalName>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
Added: modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml 2009-07-23 16:05:57 UTC (rev 13598)
@@ -0,0 +1,279 @@
+<?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.wsrp.state.PersistentPortletState"
+ table="JBP_PORTLET_STATE">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ access="field">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <property
+ name="portletId"
+ column="PORTLET_ID"
+ not-null="true"
+ unique="false"/>
+ <many-to-one
+ name="relatedRegistration"
+ column="REGISTRATION_ID"
+ class="org.jboss.portal.wsrp.state.PersistentRegistration"
+ not-null="false"/>
+ <property
+ name="creationTime"
+ column="REGISTRATION_TIME"
+ not-null="false"
+ unique="false"/>
+ <property
+ name="terminationTime"
+ column="TERMINATION_TIME"
+ not-null="false"
+ unique="false"/>
+ <map
+ name="entries"
+ sort="unsorted"
+ inverse="false"
+ cascade="all-delete-orphan"
+ fetch="join">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <key column="ENTRY_KEY"/>
+ <index
+ column="NAME"
+ type="java.lang.String"/>
+ <one-to-many class="org.jboss.portal.wsrp.state.PersistentPortletStateEntry"/>
+ </map>
+ <set
+ name="children"
+ inverse="true"
+ cascade="save-update"
+ fetch="select"
+ lazy="extra">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <key column="PARENT_PK"/>
+ <one-to-many class="org.jboss.portal.wsrp.state.PersistentPortletState"/>
+ </set>
+ <many-to-one
+ name="parent"
+ column="PARENT_PK"
+ class="org.jboss.portal.wsrp.state.PersistentPortletState"
+ cascade="none"
+ fetch="select"/>
+ </class>
+
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentPortletStateEntry"
+ table="JBP_PORTLET_STATE_ENTRY">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <array
+ name="strings"
+ table="JBP_PORTLET_STATE_ENTRY_VALUE"
+ cascade="all"
+ fetch="join">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <key column="PK"/>
+ <index column="IDX"/>
+ <element
+ column="jbp_value"
+ type="java.lang.String"
+ not-null="false"
+ unique="false"/>
+ </array>
+ <property
+ name="name"
+ column="NAME"
+ type="java.lang.String"
+ update="false"
+ insert="true"
+ not-null="false"/>
+ <property
+ name="type"
+ column="TYPE"
+ type="int"
+ not-null="true"
+ unique="false"/>
+ <property
+ name="readOnly"
+ column="READ_ONLY"
+ type="boolean"
+ not-null="true"
+ unique="false"/>
+ </class>
+
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentConsumerGroup"
+ table="JBP_PORTLET_GROUP">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <property
+ name="persistentName"
+ column="ID"
+ type="java.lang.String"
+ not-null="true"
+ unique="true"/>
+ <property
+ name="persistentStatus"
+ column="STATUS"
+ type="org.jboss.portal.wsrp.state.RegistrationStatusUserType"/>
+ <map
+ name="relatedConsumers"
+ inverse="true">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <key column="GROUP_PK"/>
+ <map-key
+ type="string"
+ column="ID"/>
+ <one-to-many class="org.jboss.portal.wsrp.state.PersistentConsumer"/>
+ </map>
+ </class>
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentConsumer"
+ table="JBP_PORTLET_CONSUMER">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <property
+ name="persistentId"
+ column="ID"
+ type="java.lang.String"
+ not-null="true"
+ unique="true"/>
+ <property
+ name="persistentName"
+ column="NAME"
+ type="java.lang.String"/>
+ <property
+ name="persistentAgent"
+ column="AGENT"
+ type="java.lang.String"/>
+ <property
+ name="persistentStatus"
+ column="STATUS"
+ type="org.jboss.portal.wsrp.state.RegistrationStatusUserType"/>
+ <many-to-one
+ name="relatedGroup"
+ column="GROUP_PK"
+ class="org.jboss.portal.wsrp.state.PersistentConsumerGroup"/>
+ <set
+ name="relatedRegistrations"
+ inverse="true">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <key column="CONSUMER_PK"/>
+ <one-to-many class="org.jboss.portal.wsrp.state.PersistentRegistration"/>
+ </set>
+ </class>
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentRegistration"
+ table="JBP_PORTLET_REG">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <map
+ name="persistentProperties"
+ table="JBP_PORTLET_REG_PROPERTIES"
+ sort="unsorted"
+ inverse="false"
+ cascade="all-delete-orphan"
+ fetch="join">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <key column="REGISTRATION_PK"/>
+ <map-key
+ type="org.jboss.portal.jems.hibernate.QNameUserType"
+ column="QNAME"/>
+ <element
+ type="string"
+ column="VALUE"/>
+ </map>
+ <property
+ name="persistentHandle"
+ column="HANDLE"
+ type="java.lang.String"/>
+ <property
+ name="persistentStatus"
+ column="STATUS"
+ type="org.jboss.portal.wsrp.state.RegistrationStatusUserType"/>
+ <many-to-one
+ name="relatedConsumer"
+ column="CONSUMER_PK"
+ class="org.jboss.portal.wsrp.state.PersistentConsumer"
+ not-null="true"
+ update="false"/>
+ <set
+ name="relatedPortletStates"
+ inverse="true"
+ cascade="save-update"
+ fetch="select"
+ lazy="extra">
+ <!--<cache usage="@portal.hibernate.cache.usage@"/>-->
+ <cache usage="transactional"/>
+ <key column="REGISTRATION_ID"/>
+ <one-to-many class="org.jboss.portal.wsrp.state.PersistentPortletState"/>
+ </set>
+ </class>
+</hibernate-mapping>
Added: modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml 2009-07-23 16:05:57 UTC (rev 13598)
@@ -0,0 +1,61 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<ehcache>
+
+ <!-- Sets the path to the directory where cache .data files are created.
+
+If the path is a Java System Property it is replaced by
+its value in the running VM.
+
+The following properties are translated:
+user.home - User's home directory
+user.dir - User's current working directory
+java.io.tmpdir - Default temp file path -->
+ <diskStore path="java.io.tmpdir/portlet"/>
+
+
+ <!--Default Cache configuration. These will applied to caches programmatically created through
+ the CacheManager.
+
+ The following attributes are required for defaultCache:
+
+ maxInMemory - Sets the maximum number of objects that will be created in memory
+ eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
+ is never expired.
+ timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
+ if the element is not eternal. Idle time is now - last accessed time
+ timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
+ if the element is not eternal. TTL is now - creation time
+ overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
+ has reached the maxInMemory limit.
+
+ -->
+ <defaultCache
+ maxElementsInMemory="10000"
+ eternal="false"
+ timeToIdleSeconds="1800"
+ timeToLiveSeconds="1800"
+ overflowToDisk="false"
+ />
+</ehcache>
Property changes on: modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml 2009-07-23 16:05:57 UTC (rev 13598)
@@ -0,0 +1,63 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+ <!--<property name="connection.datasource">java:@portal.datasource.name@</property>-->
+ <property name="connection.datasource">java:WSRPProducerDS</property>
+ <!--<property name="show_sql">@portal.sql.show@</property>-->
+ <property name="cache.use_second_level_cache">true</property>
+ <property name="cache.use_query_cache">false</property>
+
+ <!--
+ | Uncomment in clustered mode : use transactional replicated cache
+ @portal.single.xml.close@
+ <property name="cache.provider_class">org.jboss.hibernate.jbc.cacheprovider.JmxBoundTreeCacheProvider</property>
+ <property name="treecache.mbean.object_name">portal:service=TreeCache,type=hibernate</property>
+ @portal.single.xml.open@
+ -->
+
+ <!--
+ | Comment in clustered mode
+ @portal.clustered.xml.close@
+ <property name="cache.provider_configuration_file_resource_path">conf/hibernate/portlet/ehcache.xml</property>
+ <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
+ @portal.clustered.xml.open@
+ -->
+
+ <property name="cache.provider_configuration_file_resource_path">conf/producer/hibernate/ehcache.xml</property>
+ <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
+
+ <!-- Force the dialect instead of using autodetection -->
+ <!--
+ <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ -->
+
+ <!-- Mapping files -->
+ <mapping resource="conf/producer/hibernate/domain.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file
16 years, 9 months
JBoss Portal SVN: r13597 - in branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium: portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-07-23 09:14:28 -0400 (Thu, 23 Jul 2009)
New Revision: 13597
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
Log:
[selenium] - several fixes
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-07-23 09:25:11 UTC (rev 13596)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-07-23 13:14:28 UTC (rev 13597)
@@ -441,32 +441,13 @@
}
/**
- * Tests the input validation properties of WSRP producers part of JBP. The
- * test is navigated into producers part of WSRP interface. The XSS string
- * is typed in registration policy input and after clicking save, is it
- * asserted, that the validation error message is present. The XSS string is
- * typed in "Registration property validator class name" input and after
- * clicking save, is it asserted, that the validation error message is
- * present. Valid inputs are saved to three inputs of
+ * Valid inputs are saved to three inputs of
* "registration properties" and they are saved. Then in three steps each of
* this input is filled with the XSS string and after clicking save it is
* asserted, that the validation error message is present.
*/
- @Test(enabled = true, groups = {"XSS"})
- public void testXssProducerManage() {
-
- goToProducers();
- selenium.type("//input[contains(@id,'producer-form:registrationPolicy')]", XSS_STR1);
- selenium.click(SUB_PROD_SAVE);
- selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPOL_VALID),"validation error message missing or other than expected.");
-
- goToProducers();
- selenium.type("//input[contains(@id,'producer-form:validator')]", XSS_STR1);
- selenium.click(SUB_PROD_SAVE);
- selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPROP_VALID),"validation error message missing or other than expected.");
-
+ @Test(enabled = true, dependsOnMethods={"testConfigureProducer"})
+ public void testXssProducerProperties() {
goToWSRP();
clickIfVisible(ID_LINK_PRODCONF);
@@ -506,6 +487,33 @@
selenium.click(SUB_PROD_SAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent(MSG_PROD_HINT_VALID),"validation error message missing or other than expected.");
+
+ }
+
+ /**
+ * Tests the input validation properties of WSRP producers part of JBP. The
+ * test is navigated into producers part of WSRP interface. The XSS string
+ * is typed in registration policy input and after clicking save, is it
+ * asserted, that the validation error message is present. The XSS string is
+ * typed in "Registration property validator class name" input and after
+ * clicking save, is it asserted, that the validation error message is
+ * present.
+ */
+ @Test(enabled = true, dependsOnMethods={"testConfigureProducer"})
+ public void testXssProducerClassNames() {
+
+ goToProducers();
+ selenium.type("//input[contains(@id,'producer-form:registrationPolicy')]", XSS_STR1);
+ selenium.click(SUB_PROD_SAVE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPOL_VALID),"validation error message missing or other than expected.");
+
+ goToProducers();
+ selenium.type("//input[contains(@id,'producer-form:validator')]", XSS_STR1);
+ selenium.click(SUB_PROD_SAVE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_REGPROP_VALID),"validation error message missing or other than expected.");
+
}
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-07-23 09:25:11 UTC (rev 13596)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-07-23 13:14:28 UTC (rev 13597)
@@ -9,10 +9,10 @@
iden.man.chk.role=Create new role
cms.sec.denied=Access Denied
-cms.dir.msg.inv.desc=A value below is invalid
-cms.file.msg.val.invalid.filename=A value below is invalid
-cms.file.msg.val.invalid.title=A value below is invalid
-cms.file.msg.val.invalid.desc=A value below is invalid
+cms.dir.msg.inv.desc=A value below was invalid
+cms.file.msg.val.invalid.filename=A value below was invalid
+cms.file.msg.val.invalid.title=A value below was invalid
+cms.file.msg.val.invalid.desc=A value below was invalid
test.wsrp.msg.cons.add.valid=is not a valid URL
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-07-23 09:25:11 UTC (rev 13596)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-07-23 13:14:28 UTC (rev 13597)
@@ -356,13 +356,13 @@
portal.port.ins.link.20.page=link=20
portal.port.ins.link.pref.welcomeport=//a[contains(@id,'security-JSPPortletInstance')]
portal.port.ins.table.pref.key=//form[contains(@id,'common-edit-pref-form')]/table
-portal.port.ins.submit.pref.delete=//input[contains(@id,'common-edit-exisiting-form:row_0')]
+portal.port.ins.submit.pref.delete=//input[contains(@id,'common-edit-existing-form:row_0')]
portal.port.ins.link.pref.guestnum=//a[contains(@id,'common-edit-pref-form:pref-link-0')]
portal.port.ins.input.pref.newval=//input[contains(@id,'common-append-form:new_value')]
portal.port.ins.submit.pref.update=//input[contains(@id,'common-append-form:append-button')]
portal.port.ins.submit.pref.save=//input[contains(@id,':save')]
-portal.port.ins.input.pref.update=//input[contains(@id,'common-edit-exisiting-form:update')]
-portal.port.ins.input.pref.append=//input[contains(@id,'common-edit-exisiting-form:pref-input-0')]
+portal.port.ins.input.pref.update=//input[contains(@id,'common-edit-existing-form:update')]
+portal.port.ins.input.pref.append=//input[contains(@id,'common-edit-existing-form:pref-input-0')]
portal.port.ins.submit.pref.cancel=//input[contains(@id,':cancel')]
portal.port.ins.link.curuser.preferences=//a[contains(@id,'instances-form:preference-CurrentUsersPortletInstance')]
portal.port.ins.link.del.exceptport=//a[contains(@id,'instances-form:delete-GoogleMapPortletInstance')]
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-07-23 09:25:11 UTC (rev 13596)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-07-23 13:14:28 UTC (rev 13597)
@@ -403,7 +403,7 @@
goToProperties();
// add original drag and drop
- selenium.setSpeed("5000");
+ //selenium.setSpeed("5000");
selectIfNotSelected(SEL_PREDEF_PROP, "Drag and drop");
selenium.click(SUB_POR_PROPERTY);
selenium.waitForPageToLoad(PAGE_LOAD);
16 years, 9 months
JBoss Portal SVN: r13596 - in branches/Enterprise_Portal_Platform_4_3/core-identity/src: main/org/jboss/portal/core/identity/ui/admin and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-23 05:25:11 -0400 (Thu, 23 Jul 2009)
New Revision: 13596
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
Log:
JBEPP-87: "Registered Users" won't be updated correctly after a user is created.
JBEPP-88: The results of "search users" link won't be updated correctly after a user is created
Modified: branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2009-07-23 08:35:09 UTC (rev 13595)
+++ branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2009-07-23 09:25:11 UTC (rev 13596)
@@ -29,6 +29,7 @@
import org.jboss.portal.core.identity.services.metadata.CoreIdentityConfigurationException;
import org.jboss.portal.core.identity.services.workflow.RegistrationService;
import org.jboss.portal.core.identity.ui.IdentityUIUser;
+import org.jboss.portal.core.identity.ui.admin.UserAdministrationBean;
import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
import org.jboss.portal.core.identity.ui.common.MetaDataServiceBean;
import org.jboss.portal.identity.User;
@@ -71,6 +72,9 @@
/** . */
private MetaDataServiceBean metaDataService;
+
+ /** . */
+ private UserAdministrationBean userAdministrationBean;
/** . */
private static final Logger log = Logger.getLogger(CreateUserAction.class);
@@ -130,7 +134,17 @@
{
this.metaDataService = metaDataService;
}
+
+ public UserAdministrationBean getUserAdministrationBean()
+ {
+ return userAdministrationBean;
+ }
+ public void setUserAdministrationBean(UserAdministrationBean userAdministrationBean)
+ {
+ this.userAdministrationBean = userAdministrationBean;
+ }
+
public String cancelRegistration()
{
this.uiUser = new IdentityUIUser();
@@ -183,6 +197,10 @@
registrationStatus = this.registrationService.registerUser(wURL, wUsername, wPassword, wProfileMap, wRoles,
wLocale, false);
}
+
+ // Need to update the usercount and the search result
+ userAdministrationBean.markUserCountDirty();
+ userAdministrationBean.markUserListDirty();
}
catch (CoreIdentityConfigurationException e)
Modified: branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2009-07-23 08:35:09 UTC (rev 13595)
+++ branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2009-07-23 09:25:11 UTC (rev 13596)
@@ -58,6 +58,9 @@
/** A list of users. */
private ListDataModel userList;
+ /** Mark the user list dirty when there is a change */
+ private boolean userListDirty = false;
+
/** The page. */
private int page = 1;
@@ -67,6 +70,9 @@
/** The user count. */
private int userCount = 0;
+ /** Mark the user count dirty when there is a change */
+ private boolean userCountDirty = false;
+
/** The roles */
private List<String> roles = new ArrayList<String>();
@@ -116,7 +122,7 @@
public DataModel getUserList()
{
- if ( this.userList == null)
+ if ( this.userList == null || this.userListDirty)
{
this.searchUsers();
}
@@ -319,7 +325,7 @@
public int getUserCount()
{
- if (userCount == 0)
+ if (userCount == 0 || userCountDirty)
{
try
{
@@ -335,6 +341,16 @@
return userCount;
}
+ public void markUserCountDirty()
+ {
+ userCountDirty = true;
+ }
+
+ public void markUserListDirty()
+ {
+ userListDirty = true;
+ }
+
public List<UserContainer> getPendingUsers()
{
try
@@ -491,4 +507,5 @@
this.pendingUsers = null;
return "success";
}
+
}
Modified: branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2009-07-23 08:35:09 UTC (rev 13595)
+++ branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2009-07-23 09:25:11 UTC (rev 13596)
@@ -129,6 +129,10 @@
<property-name>registrationService</property-name>
<value>#{applicationScope.RegistrationService}</value>
</managed-property>
+ <managed-property>
+ <property-name>userAdministrationBean</property-name>
+ <value>#{useradministrationbean}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>assignrolemgr</managed-bean-name>
16 years, 9 months
JBoss Portal SVN: r13595 - modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-23 04:35:09 -0400 (Thu, 23 Jul 2009)
New Revision: 13595
Modified:
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
Log:
JBEPP-98: SQLException on user login if hibernate schema name is specified
Don't throw the error for testcase's sake :(
Modified: modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-23 07:25:55 UTC (rev 13594)
+++ modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-23 08:35:09 UTC (rev 13595)
@@ -91,11 +91,23 @@
this.userModule = (UserModule)identityServiceController
.getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
- HibernateProvider hibernateProvider = (HibernateProvider)MBeanProxy.get(HibernateProvider.class, new ObjectName("portal:service=Hibernate,type=Instance"), getServer());
- if(hibernateProvider!=null)
+ // We need to access the default schema
+ try
{
- schemaName = hibernateProvider.getConfig().getProperty("hibernate.default_schema");
+ HibernateProvider hibernateProvider = (HibernateProvider)MBeanProxy.get(HibernateProvider.class, new ObjectName("portal:service=Hibernate,type=Instance"), getServer());
+ if(hibernateProvider!=null)
+ {
+ schemaName = hibernateProvider.getConfig().getProperty("hibernate.default_schema");
+ }
}
+ catch (Exception e)
+ {
+ // Related to: JBEPP-98
+ // For the testcase to pass we need to not throw the error.
+ // This means that we can't create a testcase with default_schema set.
+ // Will require a rework once fully based on MC.
+ log.warn("Can't access \"portal:service=Hibernate,type=Instance\" MBean");
+ }
}
// ------AuthorizationDomain
16 years, 9 months
JBoss Portal SVN: r13594 - modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-23 03:25:55 -0400 (Thu, 23 Jul 2009)
New Revision: 13594
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml
modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
Log:
JBEPP-98: SQLException on user login if hibernate schema name is specified
Rollback and use Martin's solution. (Weird service ordering issue)
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2009-07-22 23:10:45 UTC (rev 13593)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2009-07-23 07:25:55 UTC (rev 13594)
@@ -474,7 +474,6 @@
<attribute name="CmsRootUserName">admin</attribute>
<attribute name="CmsSessionFactory">java:/portal/cms/CMSSessionFactory</attribute>
<depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
- <depends optional-attribute-name="SessionFactoryBinder" proxy-type="attribute">portal:service=Hibernate,type=CMS</depends>
</mbean>
<!-- ACL Security Interceptor -->
Modified: modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-22 23:10:45 UTC (rev 13593)
+++ modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-23 07:25:55 UTC (rev 13594)
@@ -25,6 +25,7 @@
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
+import org.jboss.mx.util.MBeanProxy;
import org.jboss.portal.cms.util.HibernateUtil;
import org.jboss.portal.cms.impl.jcr.JCRCMS;
import org.jboss.portal.identity.AnonymousRole;
@@ -46,6 +47,7 @@
import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
import org.jboss.portal.security.impl.jacc.JACCPortalPrincipal;
+import javax.management.ObjectName;
import javax.security.auth.Subject;
import javax.security.jacc.PolicyContext;
import javax.security.jacc.PolicyContextException;
@@ -65,8 +67,6 @@
{
private IdentityServiceController identityServiceController = null;
- private HibernateProvider sessionFactoryBinder = null;
-
private MembershipModule membershipModule = null;
private UserModule userModule = null;
@@ -77,6 +77,8 @@
private String cmsSessionFactory = null;
+ private String schemaName = null;
+
/**
*
*/
@@ -88,6 +90,12 @@
IdentityContext.TYPE_MEMBERSHIP_MODULE);
this.userModule = (UserModule)identityServiceController
.getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
+
+ HibernateProvider hibernateProvider = (HibernateProvider)MBeanProxy.get(HibernateProvider.class, new ObjectName("portal:service=Hibernate,type=Instance"), getServer());
+ if(hibernateProvider!=null)
+ {
+ schemaName = hibernateProvider.getConfig().getProperty("hibernate.default_schema");
+ }
}
// ------AuthorizationDomain
@@ -331,16 +339,6 @@
this.identityServiceController = identityServiceController;
}
- public HibernateProvider getSessionFactoryBinder()
- {
- return sessionFactoryBinder;
- }
-
- public void setSessionFactoryBinder(HibernateProvider sessionFactoryBinder)
- {
- this.sessionFactoryBinder = sessionFactoryBinder;
- }
-
// --------------------------------------------------------------------------------------------------------------
/**
* Stores a permission and its associations into peristent storage
@@ -452,8 +450,6 @@
if (this.userModule instanceof HibernateUserModuleImpl)
{
-
- String schemaName = sessionFactoryBinder.getConfig().getProperty("hibernate.default_schema");
String schemaPrefix = (schemaName!=null ? schemaName+"." : "");
// in case of a database version, use the cache optimized way to
Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml 2009-07-22 23:10:45 UTC (rev 13593)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml 2009-07-23 07:25:55 UTC (rev 13594)
@@ -120,16 +120,9 @@
<property name="identitySessionFactory">java:/SessionFactory</property>
</bean>
- <bean name="SessionFactoryBinder" class="org.jboss.portal.jems.hibernate.SessionFactoryBinder">
- <property name="doChecking">true</property>
- <property name="configLocation">hibernate.cfg.xml</property>
- <property name="JNDIName">java:/portal/cms/CMSSessionFactory</property>
- </bean>
-
<!-- setup for cms security testing -->
<bean name="AuthorizationProvider" class="org.jboss.portal.cms.security.AuthorizationProviderImpl">
<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>
- <property name="sessionFactoryBinder"><inject bean="SessionFactoryBinder"/></property>
<property name="cmsRootUserName">admin</property>
<property name="cmsSessionFactory">java:/SessionFactory</property>
</bean>
Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml 2009-07-22 23:10:45 UTC (rev 13593)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml 2009-07-23 07:25:55 UTC (rev 13594)
@@ -120,20 +120,13 @@
<property name="identitySessionFactory">java:/SessionFactory</property>
</bean>
- <bean name="SessionFactoryBinder" class="org.jboss.portal.jems.hibernate.SessionFactoryBinder">
- <property name="doChecking">true</property>
- <property name="configLocation">hibernate.cfg.xml</property>
- <property name="JNDIName">java:/portal/cms/CMSSessionFactory</property>
- </bean>
-
<!-- setup for cms security testing -->
<bean name="AuthorizationProvider" class="org.jboss.portal.cms.security.AuthorizationProviderImpl">
<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>
- <property name="sessionFactoryBinder"><inject bean="SessionFactoryBinder"/></property>
<property name="cmsRootUserName">admin</property>
<property name="cmsSessionFactory">java:/SessionFactory</property>
</bean>
-
+
<bean name="AuthorizationManager" class="org.jboss.portal.cms.security.AuthorizationManagerImpl">
<property name="provider"><inject bean="AuthorizationProvider"/></property>
<property name="JNDIName">java:portal/cms/AuthorizationManager</property>
16 years, 9 months
JBoss Portal SVN: r13593 - branches/JBoss_Portal_Branch_2_7_AS5/theme/src/resources/test/theme-test-war/WEB-INF/theme.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2009-07-22 19:10:45 -0400 (Wed, 22 Jul 2009)
New Revision: 13593
Modified:
branches/JBoss_Portal_Branch_2_7_AS5/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld
Log:
JBPORTAL-2430 it lets drag and drop and partial refresh in a region
Modified: branches/JBoss_Portal_Branch_2_7_AS5/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld
===================================================================
--- branches/JBoss_Portal_Branch_2_7_AS5/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld 2009-07-22 23:10:05 UTC (rev 13592)
+++ branches/JBoss_Portal_Branch_2_7_AS5/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld 2009-07-22 23:10:45 UTC (rev 13593)
@@ -43,6 +43,12 @@
<attribute>
<name>regionID</name>
</attribute>
+ <attribute>
+ <name>dndEnabled</name>
+ </attribute>
+ <attribute>
+ <name>partialRefreshEnabled</name>
+ </attribute>
</tag>
<tag>
<name>portlet</name>
16 years, 9 months
JBoss Portal SVN: r13592 - branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2009-07-22 19:10:05 -0400 (Wed, 22 Jul 2009)
New Revision: 13592
Modified:
branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java
Log:
JBPORTAL-2430 it lets drag and drop and partial refresh in a region
Modified: branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java 2009-07-22 23:09:27 UTC (rev 13591)
+++ branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java 2009-07-22 23:10:05 UTC (rev 13592)
@@ -22,25 +22,27 @@
******************************************************************************/
package org.jboss.portal.theme.tag;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
import org.jboss.logging.Logger;
import org.jboss.portal.theme.LayoutConstants;
import org.jboss.portal.theme.Orientation;
import org.jboss.portal.theme.impl.JSPRendererContext;
+import org.jboss.portal.theme.impl.render.dynamic.DynaRenderOptions;
import org.jboss.portal.theme.render.RenderException;
import org.jboss.portal.theme.render.renderer.PageRendererContext;
import org.jboss.portal.theme.render.renderer.RegionRendererContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.JspWriter;
-import javax.servlet.jsp.PageContext;
-import javax.servlet.jsp.tagext.SimpleTagSupport;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
/**
* Tag handler for the region tag. <p>A region represents a subsection of a portal page. A region can host several
* portlets. The portlets can be arranged horizontally or vertically. The region tag utilizes a render set to create the
@@ -60,6 +62,8 @@
private Orientation regionOrientation;
private String regionName = null;
private String regionCssId = null;
+ private String dndEnabled = null;
+ private String partialRefreshEnabled = null;
/**
* create the markup of this tag
@@ -190,6 +194,15 @@
return region.getProperties();
}
};
+
+ if (dndEnabled != null)
+ rrc.getProperties().put(DynaRenderOptions.DND_ENABLED,
+ dndEnabled);
+
+ if (partialRefreshEnabled != null)
+ rrc.getProperties().put(DynaRenderOptions.PARTIAL_REFRESH_ENABLED,
+ partialRefreshEnabled);
+
try
{
PrintWriter pw = new PrintWriter(out);
@@ -252,4 +265,30 @@
{
this.regionCssId = regionID;
}
+
+ /**
+ * Attribute handler for the drag and drop of this tag
+ * <p>
+ * This field enables drag and drop on a chosen region
+ * </p>
+ *
+ * @param dndEnabled
+ * it can be true or false
+ */
+ public void setDndEnabled(String dndEnabled) {
+ this.dndEnabled = dndEnabled;
+ }
+
+ /**
+ * Attribute handler for the partial refresh of this tag
+ * <p>
+ * This field enables partial refresh on a chosen region
+ * </p>
+ *
+ * @param partialRefreshEnabled
+ * it can be true or false
+ */
+ public void setPartialRefreshEnabled(String partialRefreshEnabled) {
+ this.partialRefreshEnabled = partialRefreshEnabled;
+ }
}
16 years, 9 months
JBoss Portal SVN: r13591 - branches/JBoss_Portal_Branch_2_7_AS5/core/src/resources/portal-core-sar/conf/theme.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2009-07-22 19:09:27 -0400 (Wed, 22 Jul 2009)
New Revision: 13591
Modified:
branches/JBoss_Portal_Branch_2_7_AS5/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld
Log:
JBPORTAL-2430 it lets drag and drop and partial refresh in a region
Modified: branches/JBoss_Portal_Branch_2_7_AS5/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld
===================================================================
--- branches/JBoss_Portal_Branch_2_7_AS5/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld 2009-07-22 23:04:42 UTC (rev 13590)
+++ branches/JBoss_Portal_Branch_2_7_AS5/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld 2009-07-22 23:09:27 UTC (rev 13591)
@@ -43,6 +43,12 @@
<attribute>
<name>regionID</name>
</attribute>
+ <attribute>
+ <name>dndEnabled</name>
+ </attribute>
+ <attribute>
+ <name>partialRefreshEnabled</name>
+ </attribute>
</tag>
<tag>
<name>portlet</name>
16 years, 9 months
JBoss Portal SVN: r13590 - branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/theme.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2009-07-22 19:04:42 -0400 (Wed, 22 Jul 2009)
New Revision: 13590
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld
Log:
JBPORTAL-2430 it lets drag and drop and partial refresh in a region
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld 2009-07-22 23:04:01 UTC (rev 13589)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/conf/theme/portal-layout.tld 2009-07-22 23:04:42 UTC (rev 13590)
@@ -43,6 +43,12 @@
<attribute>
<name>regionID</name>
</attribute>
+ <attribute>
+ <name>dndEnabled</name>
+ </attribute>
+ <attribute>
+ <name>partialRefreshEnabled</name>
+ </attribute>
</tag>
<tag>
<name>portlet</name>
16 years, 9 months
JBoss Portal SVN: r13589 - branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2009-07-22 19:04:01 -0400 (Wed, 22 Jul 2009)
New Revision: 13589
Modified:
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java
Log:
JBPORTAL-2430 it lets drag and drop and partial refresh in a region
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java 2009-07-22 23:03:30 UTC (rev 13588)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java 2009-07-22 23:04:01 UTC (rev 13589)
@@ -22,234 +22,254 @@
******************************************************************************/
package org.jboss.portal.theme.tag;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
import org.jboss.logging.Logger;
import org.jboss.portal.theme.LayoutConstants;
import org.jboss.portal.theme.Orientation;
import org.jboss.portal.theme.impl.JSPRendererContext;
+import org.jboss.portal.theme.impl.render.dynamic.DynaRenderOptions;
import org.jboss.portal.theme.render.RenderException;
import org.jboss.portal.theme.render.renderer.PageRendererContext;
import org.jboss.portal.theme.render.renderer.RegionRendererContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.JspWriter;
-import javax.servlet.jsp.PageContext;
-import javax.servlet.jsp.tagext.SimpleTagSupport;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
/**
- * Tag handler for the region tag. <p>A region represents a subsection of a portal page. A region can host several
- * portlets. The portlets can be arranged horizontally or vertically. The region tag utilizes a render set to create the
- * markup around the individual portlets.</p>
- *
+ * Tag handler for the region tag.
+ * <p>
+ * A region represents a subsection of a portal page. A region can host several
+ * portlets. The portlets can be arranged horizontally or vertically. The region
+ * tag utilizes a render set to create the markup around the individual
+ * portlets.
+ * </p>
+ *
* @author <a href="mailto:mholzner@novell.com>Martin Holzner</a>
* @author <a href="mailto:roy@jboss.org>Roy Russo</a>
- * @version $LastChangedRevision$, $LastChangedDate$
+ * @version $LastChangedRevision$, $LastChangedDate: 2007-10-28 01:01:46
+ * +0200 (dom, 28 ott 2007) $
* @see org.jboss.portal.theme.PortalRenderSet
*/
-public class RegionTagHandler
- extends SimpleTagSupport
-{
- private static Logger log = Logger.getLogger(RegionTagHandler.class);
- //default to vertical
+public class RegionTagHandler extends SimpleTagSupport {
+ private static Logger log = Logger.getLogger(RegionTagHandler.class);
+ // default to vertical
- private Orientation regionOrientation;
- private String regionName = null;
- private String regionCssId = null;
+ private Orientation regionOrientation;
+ private String regionName = null;
+ private String regionCssId = null;
+ private String dndEnabled = null;
+ private String partialRefreshEnabled = null;
- /**
- * create the markup of this tag
- *
- * @throws JspException
- * @throws IOException
- */
- public void doTag() throws JspException, IOException
- {
- if (regionCssId == null)
- {
- regionCssId = regionName;
- }
- log.debug("rendering " + regionName + " [" + regionOrientation + "] cssId[" + regionCssId + "]");
+ /**
+ * create the markup of this tag
+ *
+ * @throws JspException
+ * @throws IOException
+ */
+ public void doTag() throws JspException, IOException {
+ if (regionCssId == null) {
+ regionCssId = regionName;
+ }
+ log.debug("rendering " + regionName + " [" + regionOrientation
+ + "] cssId[" + regionCssId + "]");
- // get page and region
- PageContext app = (PageContext)getJspContext();
- HttpServletRequest request = (HttpServletRequest)app.getRequest();
+ // get page and region
+ PageContext app = (PageContext) getJspContext();
+ HttpServletRequest request = (HttpServletRequest) app.getRequest();
- PageRendererContext page = (PageRendererContext)request.getAttribute(LayoutConstants.ATTR_PAGE);
- JspWriter out = this.getJspContext().getOut();
- if (page == null)
- {
- out.write("<p bgcolor='red'>No page to render!</p>");
- out.write("<p bgcolor='red'>The page to render (PageResult) must be set in the request attribute '" +
- LayoutConstants.ATTR_PAGE + "'</p>");
- out.flush();
- return;
- }
+ PageRendererContext page = (PageRendererContext) request
+ .getAttribute(LayoutConstants.ATTR_PAGE);
+ JspWriter out = this.getJspContext().getOut();
+ if (page == null) {
+ out.write("<p bgcolor='red'>No page to render!</p>");
+ out
+ .write("<p bgcolor='red'>The page to render (PageResult) must be set in the request attribute '"
+ + LayoutConstants.ATTR_PAGE + "'</p>");
+ out.flush();
+ return;
+ }
- final String cssId = regionCssId == null ? regionName : regionCssId;
- final Orientation orientation = this.regionOrientation == null ? Orientation.DEFAULT : this.regionOrientation;
+ final String cssId = regionCssId == null ? regionName : regionCssId;
+ final Orientation orientation = this.regionOrientation == null ? Orientation.DEFAULT
+ : this.regionOrientation;
- if (page.getRegion(regionName) == null) // non-window display of content
- {
- // Create a dummy region obj, based on region name
- RegionRendererContext rrc = new RegionRendererContext()
- {
- public String getId()
- {
- return regionName;
- }
+ if (page.getRegion(regionName) == null) // non-window display of content
+ {
+ // Create a dummy region obj, based on region name
+ RegionRendererContext rrc = new RegionRendererContext() {
+ public String getId() {
+ return regionName;
+ }
- public Collection getWindows()
- {
- return Collections.EMPTY_LIST;
- }
+ public Collection getWindows() {
+ return Collections.EMPTY_LIST;
+ }
- public PageRendererContext getPage()
- {
- return null;
- }
+ public PageRendererContext getPage() {
+ return null;
+ }
- public Orientation getOrientation()
- {
- return orientation;
- }
+ public Orientation getOrientation() {
+ return orientation;
+ }
- public String getCSSId()
- {
- return cssId;
- }
+ public String getCSSId() {
+ return cssId;
+ }
- public String getProperty(String name)
- {
- return null;
- }
+ public String getProperty(String name) {
+ return null;
+ }
- public Map getProperties()
- {
- return Collections.EMPTY_MAP;
- }
- };
+ public Map getProperties() {
+ return Collections.EMPTY_MAP;
+ }
+ };
- JSPRendererContext renderContext = (JSPRendererContext)request.getAttribute(LayoutConstants.ATTR_RENDERCONTEXT);
- try
- {
- PrintWriter pw = new PrintWriter(out);
- renderContext.setWriter(pw);
- renderContext.render(rrc);
- pw.flush();
- }
- catch (RenderException e)
- {
- throw new JspException(e);
- }
- }
- else
- {
- // window-centric display of content
- JSPRendererContext renderContext = (JSPRendererContext)request.getAttribute(LayoutConstants.ATTR_RENDERCONTEXT);
- if (renderContext == null)
- {
- log.debug("no render context available in request");
- return;
- }
+ JSPRendererContext renderContext = (JSPRendererContext) request
+ .getAttribute(LayoutConstants.ATTR_RENDERCONTEXT);
+ try {
+ PrintWriter pw = new PrintWriter(out);
+ renderContext.setWriter(pw);
+ renderContext.render(rrc);
+ pw.flush();
+ } catch (RenderException e) {
+ throw new JspException(e);
+ }
+ } else {
+ // window-centric display of content
+ JSPRendererContext renderContext = (JSPRendererContext) request
+ .getAttribute(LayoutConstants.ATTR_RENDERCONTEXT);
+ if (renderContext == null) {
+ log.debug("no render context available in request");
+ return;
+ }
- final RegionRendererContext region = page.getRegion(regionName);
- RegionRendererContext rrc = new RegionRendererContext()
- {
- public String getId()
- {
- return region.getId();
- }
+ final RegionRendererContext region = page.getRegion(regionName);
+ RegionRendererContext rrc = new RegionRendererContext() {
+ public String getId() {
+ return region.getId();
+ }
- public Collection getWindows()
- {
- return region.getWindows();
- }
+ public Collection getWindows() {
+ return region.getWindows();
+ }
- public Orientation getOrientation()
- {
- return orientation;
- }
+ public Orientation getOrientation() {
+ return orientation;
+ }
- public String getCSSId()
- {
- return cssId;
- }
+ public String getCSSId() {
+ return cssId;
+ }
- public String getProperty(String name)
- {
- return region.getProperty(name);
- }
+ public String getProperty(String name) {
+ return region.getProperty(name);
+ }
- public Map getProperties()
- {
- return region.getProperties();
- }
- };
- try
- {
- PrintWriter pw = new PrintWriter(out);
- renderContext.setWriter(pw);
- renderContext.render(rrc);
- pw.flush();
- }
- catch (RenderException e)
- {
- throw new JspException(e);
- }
+ public Map getProperties() {
+ return region.getProperties();
+ }
+ };
+
+ if (dndEnabled != null)
+ rrc.getProperties().put(DynaRenderOptions.DND_ENABLED,
+ dndEnabled);
+
+ if (partialRefreshEnabled != null)
+ rrc.getProperties().put(DynaRenderOptions.PARTIAL_REFRESH_ENABLED,
+ partialRefreshEnabled);
+
+ try {
+ PrintWriter pw = new PrintWriter(out);
+ renderContext.setWriter(pw);
+ renderContext.render(rrc);
+ pw.flush();
+ } catch (RenderException e) {
+ throw new JspException(e);
+ }
- log.debug("done rendering page region [" + regionName + "]");
- }
- }
+ log.debug("done rendering page region [" + regionName + "]");
+ }
+ }
- // ------ attribute handlers
+ // ------ attribute handlers
- /**
- * Attribute handler for the orientation attribute of this tag
- *
- * @param orientation the orientation attribute value set in the hosting jsp
- */
- public void setOrientation(String orientation)
- {
- if (orientation == null)
- {
- log.error("no null value allowed");
- }
+ /**
+ * Attribute handler for the orientation attribute of this tag
+ *
+ * @param orientation
+ * the orientation attribute value set in the hosting jsp
+ */
+ public void setOrientation(String orientation) {
+ if (orientation == null) {
+ log.error("no null value allowed");
+ }
- try
- {
- this.regionOrientation = Orientation.parse(orientation);
- }
- catch (IllegalArgumentException e)
- {
- log.error(e);
- this.regionOrientation = Orientation.DEFAULT;
- }
- }
+ try {
+ this.regionOrientation = Orientation.parse(orientation);
+ } catch (IllegalArgumentException e) {
+ log.error(e);
+ this.regionOrientation = Orientation.DEFAULT;
+ }
+ }
- /**
- * Attribute handler for the region name attribute of this tag
- *
- * @param regionName the name of the region this tag should render the markup for
- */
- public void setRegionName(String regionName)
- {
- this.regionName = regionName;
- }
+ /**
+ * Attribute handler for the region name attribute of this tag
+ *
+ * @param regionName
+ * the name of the region this tag should render the markup for
+ */
+ public void setRegionName(String regionName) {
+ this.regionName = regionName;
+ }
- /**
- * Attribute handler for the region id attribute of this tag <p>The region Id can be used as the value of the id
- * attribute of the region container tag. In case of the DivRenderer render set, this is the id attribute of the div
- * tag that represents this region on the page.</p>
- *
- * @param regionID the id attribute value to set for this tag
- */
- public void setRegionID(String regionID)
- {
- this.regionCssId = regionID;
- }
+ /**
+ * Attribute handler for the region id attribute of this tag
+ * <p>
+ * The region Id can be used as the value of the id attribute of the region
+ * container tag. In case of the DivRenderer render set, this is the id
+ * attribute of the div tag that represents this region on the page.
+ * </p>
+ *
+ * @param regionID
+ * the id attribute value to set for this tag
+ */
+ public void setRegionID(String regionID) {
+ this.regionCssId = regionID;
+ }
+
+ /**
+ * Attribute handler for the drag and drop of this tag
+ * <p>
+ * This field enables drag and drop on a chosen region
+ * </p>
+ *
+ * @param dndEnabled
+ * it can be true or false
+ */
+ public void setDndEnabled(String dndEnabled) {
+ this.dndEnabled = dndEnabled;
+ }
+
+ /**
+ * Attribute handler for the partial refresh of this tag
+ * <p>
+ * This field enables partial refresh on a chosen region
+ * </p>
+ *
+ * @param partialRefreshEnabled
+ * it can be true or false
+ */
+ public void setPartialRefreshEnabled(String partialRefreshEnabled) {
+ this.partialRefreshEnabled = partialRefreshEnabled;
+ }
}
16 years, 9 months