JBoss Portal SVN: r11604 - in branches/JBoss_Portal_Branch_2_7: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF and 5 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-07-28 19:03:33 -0400 (Mon, 28 Jul 2008)
New Revision: 11604
Added:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java
Removed:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConverter.java
Modified:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml
branches/JBoss_Portal_Branch_2_7/registration/src/main/org/jboss/portal/registration/impl/RegistrationManagerImpl.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationInfoTestCase.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationPropertyTestCase.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
Log:
- JBPORTAL-2092: status is now localizable.
- Improved behavior of RegistrationProperty.setInvalid
- RegistrationProperty status is now an enum instead of String.
- Some generification and clean-ups.
- Updated tests.
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -61,17 +61,20 @@
protected void createLocalizedMessage(String target, String message, Object severity, Object... params)
{
- String localizedMessage = MessageFormat.format(getMessageFromBundle(message), params);
- createMessage(target, localizedMessage, severity);
+ createMessage(target, getMessageFromBundle(message, params), severity);
}
- protected String getMessageFromBundle(String message)
+ protected String getMessageFromBundle(String message, Object... params)
{
- Locale locale = getLocale();
- ResourceBundle rb = ResourceBundle.getBundle(RESOURCE_NAME, locale);
- return rb.getString(message);
+ return getLocalizedMessage(message, getLocale(), params);
}
+ public static String getLocalizedMessage(String localizationKey, Locale locale, Object... params)
+ {
+ ResourceBundle rb = ResourceBundle.getBundle(RESOURCE_NAME, locale);
+ return MessageFormat.format(rb.getString(localizationKey), params);
+ }
+
protected void createErrorMessageFrom(Exception e)
{
createErrorMessageFrom(STATUS, e);
Deleted: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConverter.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConverter.java 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConverter.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -1,47 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2007, 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.wsrp.admin.ui;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.xml.namespace.QName;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @since 2.6.3
- */
-public class QNameConverter implements Converter
-{
- public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String s)
- {
- return s == null ? null : QName.valueOf(s);
- }
-
- public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object o)
- {
- return o == null ? null : o.toString();
- }
-}
Added: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -0,0 +1,57 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.wsrp.admin.ui;
+
+import org.jboss.portal.wsrp.consumer.RegistrationProperty;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import java.util.Locale;
+
+/**
+ * Convert the status key to a localized message.
+ *
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class StatusConverter implements Converter
+{
+ public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String s)
+ {
+ throw new UnsupportedOperationException("Should not be used!");
+ }
+
+ public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object o)
+ {
+ if (o == null)
+ {
+ return null;
+ }
+
+ Locale locale = facesContext.getExternalContext().getRequestLocale();
+ RegistrationProperty.Status status = (RegistrationProperty.Status)o;
+ String key = status.getLocalizationKey();
+ return BeanContext.getLocalizedMessage(key, locale);
+ }
+}
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-28 23:03:33 UTC (rev 11604)
@@ -163,3 +163,11 @@
bean_producer_cannot_reload = Couldn't reload producer configuration. Cause: {0}
bean_producer_save_success = Producer configuration successfully saved!
bean_producer_cancel_success = All modifications made to the producer configuration have been cancelled!
+
+## RegistrationProperty Status localization
+registration_property_status_inexistent = Inexistent on producer
+registration_property_status_missing = Missing
+registration_property_status_missing_value = Missing value
+registration_property_status_unchecked_value = Undetermined status
+registration_property_status_invalid_value = Invalid value
+registration_property_status_valid = Valid
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-07-28 23:03:33 UTC (rev 11604)
@@ -134,4 +134,10 @@
bean_producer_cancel_success=Toutes les modifications faites \u00e0 la configuration du producteur ont \u00e9t\u00e9 annull\u00e9es!
bean_producer_save_success=La configuration du producteur a bien \u00e9t\u00e9 sauvegard\u00e9e!
bean_consumermanager_refresh_modify=Les informations locales ont chang\u00e9, vous devriez modifier votre enregistrement avec le producteur.
-bean_consumer_update_success=Consommateur mis \u00e0 jour!
\ No newline at end of file
+bean_consumer_update_success=Consommateur mis \u00e0 jour!
+registration_property_status_inexistent=Inexistant sur le producteur
+registration_property_status_invalid_value=Invalide valeur
+registration_property_status_missing=Manquant
+registration_property_status_missing_value=Valeur manquante
+registration_property_status_unchecked_value=Status ind\u00e9termin\u00e9
+registration_property_status_valid=Valide
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2008-07-28 23:03:33 UTC (rev 11604)
@@ -23,7 +23,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
@@ -31,7 +31,7 @@
<application>
<view-handler>
- org.jboss.portletbridge.application.PortletViewHandler
+ org.jboss.portletbridge.application.PortletViewHandler
</view-handler>
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
</application>
@@ -40,11 +40,12 @@
<converter-for-class>org.jboss.portal.wsrp.registration.LocalizedString</converter-for-class>
<converter-class>org.jboss.portal.wsrp.admin.ui.LocalizedStringConverter</converter-class>
</converter>
- <!--<converter>
- <converter-for-class>javax.xml.namespace.QName</converter-for-class>
- <converter-class>org.jboss.portal.wsrp.admin.ui.QNameConverter</converter-class>
- </converter>-->
+ <converter>
+ <converter-id>faces.convert.RegistrationProperty.Status</converter-id>
+ <converter-class>org.jboss.portal.wsrp.admin.ui.StatusConverter</converter-class>
+ </converter>
+
<managed-bean>
<managed-bean-name>beanContext</managed-bean-name>
<managed-bean-class>org.jboss.portal.wsrp.admin.ui.JSFBeanContext</managed-bean-class>
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/consumers/editConsumer.xhtml 2008-07-28 23:03:33 UTC (rev 11604)
@@ -89,18 +89,21 @@
<th class="descColumn">#{i18n.edit_consumer_prop_desc}</th>
<th>#{i18n.edit_consumer_prop_value}</th>
</tr>
- <tr jsfc="ui:repeat" value="#{consumer.producerInfo.registrationInfo.registrationProperties}"
- var="prop" title="#{prop.value.description.label.value}">
- <td>#{prop.value.name}</td>
- <td>#{prop.value.description.label.value}</td>
- <td>
- <h:inputText value="#{prop.value.value}" size="50"
- valueChangeListener="#{consumer.regPropListener}"
- disabled="#{consumer.registrationModified}"/>
- <h:outputText styleClass="portlet-msg-error" value="#{prop.value.status}"
- rendered="#{prop.value.determinedInvalid}"/>
- </td>
- </tr>
+ <c:forEach items="#{consumer.producerInfo.registrationInfo.registrationProperties}"
+ var="prop">
+ <tr title="#{prop.description.label.value}">
+ <td>#{prop.name}</td>
+ <td>#{prop.description.label.value}</td>
+ <td>
+ <h:inputText value="#{prop.value}" size="50"
+ valueChangeListener="#{consumer.regPropListener}"
+ disabled="#{consumer.registrationModified}"/>
+ <h:outputText styleClass="portlet-msg-error" value="#{prop.status}"
+ rendered="#{prop.determinedInvalid}"
+ converter="faces.convert.RegistrationProperty.Status"/>
+ </td>
+ </tr>
+ </c:forEach>
</table>
<h:commandLink action="#{consumer.update}"
value="#{i18n.edit_consumer_registration_update_props}"
@@ -132,16 +135,19 @@
<th class="descColumn">#{i18n.edit_consumer_prop_desc}</th>
<th>#{i18n.edit_consumer_prop_value}</th>
</tr>
- <tr jsfc="ui:repeat" value="#{consumer.expectedRegistrationInfo.registrationProperties}"
- var="prop" title="#{prop.value.description.label.value}">
- <td>#{prop.value.name}</td>
- <td>#{prop.value.description.label.value}</td>
- <td>
- <h:inputText value="#{prop.value.value}" size="50"/>
- <h:outputText styleClass="portlet-msg-error" value="#{prop.value.status}"
- rendered="#{prop.value.determinedInvalid}"/>
- </td>
- </tr>
+
+ <c:forEach items="#{consumer.expectedRegistrationInfo.registrationProperties}" var="prop">
+ <tr title="#{prop.description.label.value}">
+ <td>#{prop.name}</td>
+ <td>#{prop.description.label.value}</td>
+ <td>
+ <h:inputText value="#{prop.value}" size="50"/>
+ <h:outputText styleClass="portlet-msg-error" value="#{prop.status}"
+ rendered="#{prop.determinedInvalid}"
+ converter="faces.convert.RegistrationProperty.Status"/>
+ </td>
+ </tr>
+ </c:forEach>
</table>
</c:when>
<c:otherwise>
Modified: branches/JBoss_Portal_Branch_2_7/registration/src/main/org/jboss/portal/registration/impl/RegistrationManagerImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/registration/src/main/org/jboss/portal/registration/impl/RegistrationManagerImpl.java 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/registration/src/main/org/jboss/portal/registration/impl/RegistrationManagerImpl.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -83,7 +83,7 @@
}
public Registration addRegistrationTo(String consumerName, Map registrationProperties, boolean createConsumerIfNeeded)
- throws RegistrationException
+ throws RegistrationException
{
// the policy determines the identity of the consumer based on the given information (note that this might be obsoleted by using WS-Security)
String identity = policy.getConsumerIdFrom(consumerName, registrationProperties);
@@ -246,7 +246,7 @@
}
private Consumer getOrCreateConsumer(String identity, boolean createConsumerIfNeeded, String consumerName)
- throws RegistrationException
+ throws RegistrationException
{
Consumer consumer = getConsumerByIdentity(identity);
if (consumer == null)
@@ -287,9 +287,9 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(group, "ConsumerGroup");
- for (Iterator consumers = group.getConsumers().iterator(); consumers.hasNext();)
+ for (Object consumer : group.getConsumers())
{
- removeConsumer((Consumer)consumers.next());
+ removeConsumer((Consumer)consumer);
}
persistenceManager.removeConsumerGroup(group.getName());
@@ -308,16 +308,16 @@
public void clear() throws RegistrationException
{
- Collection tmpColl = new ArrayList(getConsumers());
- for (Iterator consumers = tmpColl.iterator(); consumers.hasNext();)
+ Collection<Consumer> consumers = new ArrayList<Consumer>(getConsumers());
+ for (Consumer consumer : consumers)
{
- removeConsumer((Consumer)consumers.next());
+ removeConsumer(consumer);
}
- tmpColl = new ArrayList(getConsumerGroups());
- for (Iterator groups = tmpColl.iterator(); groups.hasNext();)
+ Collection<ConsumerGroup> groups = new ArrayList<ConsumerGroup>(getConsumerGroups());
+ for (ConsumerGroup group : groups)
{
- removeConsumerGroup((ConsumerGroup)groups.next());
+ removeConsumerGroup(group);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationInfoTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationInfoTestCase.java 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationInfoTestCase.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -123,13 +123,13 @@
// specifiy that the prop is valid to simulate a successful registration (integration test, should have something
// testing that in ProducerInfoTestCase)
- prop.setInvalid(Boolean.FALSE, null);
+ prop.setInvalid(Boolean.FALSE, RegistrationProperty.Status.VALID);
info.setRegistrationPropertyValue("prop0", "value1");
assertTrue(info.isRefreshNeeded());
assertNull("Property value has changed since last refresh, status should be unknown", prop.isInvalid());
assertEquals("Property value has changed since last refresh, status should be unknown",
- RegistrationProperty.UNCHECKED_VALUE_STATUS, prop.getStatus());
+ RegistrationProperty.Status.UNCHECKED_VALUE, prop.getStatus());
}
public void testRefreshNoRegistration()
@@ -191,7 +191,7 @@
assertNotNull(prop);
assertEquals("bar", prop.getValue());
assertTrue(prop.isInvalid());
- assertEquals(RegistrationProperty.INEXISTENT_STATUS, prop.getStatus());
+ assertEquals(RegistrationProperty.Status.INEXISTENT, prop.getStatus());
}
public void testRefreshRegistrationRegistrationNoLocalInfo()
@@ -212,11 +212,11 @@
RegistrationProperty prop = (RegistrationProperty)regProps.get("prop0");
assertNotNull(prop);
assertTrue(prop.isInvalid());
- assertEquals(RegistrationProperty.MISSING_STATUS, prop.getStatus());
+ assertEquals(RegistrationProperty.Status.MISSING, prop.getStatus());
prop = (RegistrationProperty)regProps.get("prop1");
assertNotNull(prop);
assertTrue(prop.isInvalid());
- assertEquals(RegistrationProperty.MISSING_STATUS, prop.getStatus());
+ assertEquals(RegistrationProperty.Status.MISSING, prop.getStatus());
}
public void testRefreshRegistrationRegistrationMergeWithLocalInfo()
@@ -232,13 +232,13 @@
assertNotNull(prop);
assertNull(prop.getValue());
assertTrue(prop.isInvalid());
- assertEquals(RegistrationProperty.MISSING_VALUE_STATUS, prop.getStatus());
+ assertEquals(RegistrationProperty.Status.MISSING_VALUE, prop.getStatus());
prop = info.getRegistrationProperty("prop1");
assertNotNull(prop);
assertNull(prop.getValue());
assertTrue(prop.isInvalid());
- assertEquals(RegistrationProperty.MISSING_VALUE_STATUS, prop.getStatus());
+ assertEquals(RegistrationProperty.Status.MISSING_VALUE, prop.getStatus());
assertEquals(2, info.getRegistrationProperties().size());
assertEquals(2, result.getRegistrationProperties().size());
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationPropertyTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationPropertyTestCase.java 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/RegistrationPropertyTestCase.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -48,24 +48,58 @@
assertNull(prop.isInvalid());
assertFalse(prop.isDeterminedInvalid());
assertNull(prop.getDescription());
- assertEquals(RegistrationProperty.UNCHECKED_VALUE_STATUS, prop.getStatus());
+ assertEquals(RegistrationProperty.Status.UNCHECKED_VALUE, prop.getStatus());
}
public void testSetValue()
{
- prop.setInvalid(Boolean.FALSE, null);
- assertEquals(Boolean.FALSE, prop.isInvalid());
- assertNull(prop.getStatus());
+ prop.setInvalid(Boolean.FALSE, RegistrationProperty.Status.VALID);
// we haven't changed the value, so the status shouldn't have changed
prop.setValue("value");
assertEquals(Boolean.FALSE, prop.isInvalid());
- assertNull(prop.getStatus());
+ assertEquals(RegistrationProperty.Status.VALID, prop.getStatus());
// we changed the value, status is now unknown
prop.setValue("value2");
assertEquals("value2", prop.getValue());
assertNull(prop.isInvalid());
- assertEquals(RegistrationProperty.UNCHECKED_VALUE_STATUS, prop.getStatus());
+ assertEquals(RegistrationProperty.Status.UNCHECKED_VALUE, prop.getStatus());
}
+
+ public void testSetInvalid()
+ {
+ prop.setInvalid(Boolean.FALSE, RegistrationProperty.Status.VALID);
+ assertEquals(Boolean.FALSE, prop.isInvalid());
+ assertEquals(RegistrationProperty.Status.VALID, prop.getStatus());
+
+ // whatever the status, if we specifiy that the property is valid, its status should be VALID
+ prop.setInvalid(Boolean.FALSE, RegistrationProperty.Status.INEXISTENT);
+ assertEquals(Boolean.FALSE, prop.isInvalid());
+ assertEquals(RegistrationProperty.Status.VALID, prop.getStatus());
+
+ prop.setInvalid(Boolean.FALSE, null);
+ assertEquals(Boolean.FALSE, prop.isInvalid());
+ assertEquals(RegistrationProperty.Status.VALID, prop.getStatus());
+
+ try
+ {
+ prop.setInvalid(true, null);
+ fail("setInvalid should not accept a prop to be set invalid without a proper status");
+ }
+ catch (IllegalArgumentException e)
+ {
+ // expected
+ }
+
+ try
+ {
+ prop.setInvalid(true, RegistrationProperty.Status.VALID);
+ fail("setInvalid should not accept a prop to be set invalid with a VALID status");
+ }
+ catch (IllegalArgumentException e)
+ {
+ // expected
+ }
+ }
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -447,7 +447,7 @@
}
else
{
- prop.setStatus(RegistrationProperty.MISSING_STATUS);
+ prop.setStatus(RegistrationProperty.Status.MISSING);
result.getRegistrationProperties().put(name, prop);
}
@@ -546,11 +546,11 @@
{
// mark the prop as invalid
RegistrationProperty prop = properties.get(name);
- prop.setInvalid(Boolean.TRUE, RegistrationProperty.INEXISTENT_STATUS);
+ prop.setInvalid(Boolean.TRUE, RegistrationProperty.Status.INVALID_VALUE);
// do the same in the result
prop = result.getRegistrationProperties().get(name);
- prop.setInvalid(Boolean.TRUE, RegistrationProperty.INEXISTENT_STATUS);
+ prop.setInvalid(Boolean.TRUE, RegistrationProperty.Status.INEXISTENT);
}
else
{
@@ -583,7 +583,7 @@
RegistrationPropertyDescription desc = WSRPUtils.convertToRegistrationPropertyDescription(description);
RegistrationProperty prop = new RegistrationProperty(name, null, WSRPUtils.toString(desc.getLang()));
prop.setDescription(desc);
- prop.setInvalid(Boolean.TRUE, RegistrationProperty.MISSING_VALUE_STATUS);
+ prop.setInvalid(Boolean.TRUE, RegistrationProperty.Status.MISSING_VALUE);
result.put(name, prop);
}
@@ -623,7 +623,7 @@
for (Object o : persistentRegistrationProperties.values())
{
RegistrationProperty prop = (RegistrationProperty)o;
- prop.setInvalid(Boolean.FALSE, null);
+ prop.setInvalid(Boolean.FALSE, RegistrationProperty.Status.VALID);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2008-07-28 22:41:40 UTC (rev 11603)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2008-07-28 23:03:33 UTC (rev 11604)
@@ -24,6 +24,7 @@
package org.jboss.portal.wsrp.consumer;
import org.jboss.portal.common.util.ParameterValidation;
+import static org.jboss.portal.wsrp.consumer.RegistrationProperty.Status.*;
import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
/**
@@ -40,13 +41,37 @@
private String persistentName;
private String persistentValue;
- private transient String status;
+ /*private transient String status;
public static final String INEXISTENT_STATUS = "Inexistent on Producer";
public static final String MISSING_STATUS = "Missing";
public static final String MISSING_VALUE_STATUS = "Missing value";
public static final String UNCHECKED_VALUE_STATUS = "Undetermined status";
- public static final String INVALID_VALUE_STATUS = "Invalid value";
+ public static final String INVALID_VALUE_STATUS = "Invalid value";*/
+ private transient Status status;
+
+ public enum Status
+ {
+ INEXISTENT("registration_property_status_inexistent"),
+ MISSING("registration_property_status_missing"),
+ MISSING_VALUE("registration_property_status_missing_value"),
+ UNCHECKED_VALUE("registration_property_status_unchecked_value"),
+ INVALID_VALUE("registration_property_status_invalid_value"),
+ VALID("registration_property_status_valid");
+
+ Status(String localizationKey)
+ {
+ this.localizationKey = localizationKey;
+ }
+
+ public String getLocalizationKey()
+ {
+ return localizationKey;
+ }
+
+ private String localizationKey;
+ }
+
public RegistrationProperty()
{
}
@@ -144,13 +169,25 @@
public boolean isDeterminedInvalid()
{
- return persistentInvalid != null && persistentInvalid && !UNCHECKED_VALUE_STATUS.equals(getStatus());
+ return persistentInvalid != null && persistentInvalid && !UNCHECKED_VALUE.equals(getStatus());
}
- public void setInvalid(Boolean invalid, String status)
+ public void setInvalid(Boolean invalid, Status status)
{
this.persistentInvalid = invalid;
- this.status = status;
+ if (!invalid)
+ {
+ this.status = VALID;
+ }
+ else
+ {
+ if (status == null || VALID.equals(status))
+ {
+ throw new IllegalArgumentException("Invalid status: " + status + " for an invalid property!");
+ }
+
+ this.status = status;
+ }
}
public void setValue(String stringValue)
@@ -161,11 +198,11 @@
persistentInvalid = null;
if (persistentValue == null)
{
- status = MISSING_VALUE_STATUS;
+ status = MISSING_VALUE;
}
else
{
- status = UNCHECKED_VALUE_STATUS;
+ status = UNCHECKED_VALUE;
}
}
}
@@ -181,12 +218,12 @@
this.persistentLang = lang;
}
- public String getStatus()
+ public Status getStatus()
{
return status;
}
- void setStatus(String status)
+ public void setStatus(Status status)
{
this.status = status;
}
15 years, 11 months
JBoss Portal SVN: r11602 - branches.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-28 17:48:31 -0400 (Mon, 28 Jul 2008)
New Revision: 11602
Removed:
branches/JBoss_Portal_Branch_2_6_SYBASE/
Log:
Deleting branch
15 years, 11 months
JBoss Portal SVN: r11601 - branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/conf/hibernate/cms.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-28 17:40:30 -0400 (Mon, 28 Jul 2008)
New Revision: 11601
Added:
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/conf/hibernate/cms/sybase.domain.hbm.xml
Log:
Adding sybase specific hibernate descriptor
Added: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/conf/hibernate/cms/sybase.domain.hbm.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/conf/hibernate/cms/sybase.domain.hbm.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/conf/hibernate/cms/sybase.domain.hbm.xml 2008-07-28 21:40:30 UTC (rev 11601)
@@ -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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/conf/hibernate/cms/sybase.domain.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
15 years, 11 months
JBoss Portal SVN: r11600 - branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-28 10:39:58 -0400 (Mon, 28 Jul 2008)
New Revision: 11600
Added:
branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/sybase.domain.hbm.xml
Modified:
branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml
Log:
Oups, can't change the schema like that
Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml 2008-07-28 14:29:23 UTC (rev 11599)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml 2008-07-28 14:39:58 UTC (rev 11600)
@@ -60,7 +60,7 @@
<property
name="data"
column="NODE_DATA"
- type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ type="binary"
length="100000000"
not-null="true"/>
</class>
@@ -79,7 +79,7 @@
<property
name="data"
column="PROP_DATA"
- type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ type="binary"
length="100000000"
not-null="true"/>
</class>
@@ -98,7 +98,7 @@
<property
name="data"
column="REFS_DATA"
- type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ type="binary"
length="100000000"
not-null="true"/>
</class>
@@ -136,7 +136,7 @@
<property
name="data"
column="NODE_DATA"
- type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ type="binary"
length="100000000"
not-null="true"/>
</class>
@@ -155,7 +155,7 @@
<property
name="data"
column="PROP_DATA"
- type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ type="binary"
length="100000000"
not-null="true"/>
</class>
@@ -174,7 +174,7 @@
<property
name="data"
column="REFS_DATA"
- type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ type="binary"
length="100000000"
not-null="true"/>
</class>
Added: branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/sybase.domain.hbm.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/sybase.domain.hbm.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/sybase.domain.hbm.xml 2008-07-28 14:39:58 UTC (rev 11600)
@@ -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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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="org.jboss.portal.cms.hibernate.MaterializedBlobType"
+ 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: branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/sybase.domain.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
15 years, 11 months
JBoss Portal SVN: r11599 - branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/services.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-07-28 10:29:23 -0400 (Mon, 28 Jul 2008)
New Revision: 11599
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
- JBPORTAL-2085: do not re-read remote WSDL if we didn't change the URL.
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2008-07-28 13:07:58 UTC (rev 11598)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2008-07-28 14:29:23 UTC (rev 11599)
@@ -76,26 +76,31 @@
if (wsdlDefinitionURL == null || wsdlDefinitionURL.length() == 0)
{
throw new IllegalArgumentException("Require a non-empty, non-null URL specifying where to find the WSRP " +
- "services definition");
+ "services definition");
}
- this.wsdlDefinitionURL = wsdlDefinitionURL;
- try
+
+ if (!wsdlDefinitionURL.equals(this.wsdlDefinitionURL))
{
- initServices();
- setFailed(false);
+ this.wsdlDefinitionURL = wsdlDefinitionURL;
+
+ try
+ {
+ initServices();
+ setFailed(false);
+ }
+ catch (MalformedURLException e)
+ {
+ setFailed(true);
+ throw new IllegalArgumentException("Require a well-formed URL specifying where to find the WSRP services definition", e);
+ }
+ catch (Exception e)
+ {
+ log.info("Couldn't access WSDL information. Service won't be available", e);
+ setAvailable(false);
+ throw e;
+ }
}
- catch (MalformedURLException e)
- {
- setFailed(true);
- throw new IllegalArgumentException("Require a well-formed URL specifying where to find the WSRP services definition", e);
- }
- catch (Exception e)
- {
- log.info("Couldn't access WSDL information. Service won't be available", e);
- setAvailable(false);
- throw e;
- }
- }
+ }
private void initServices() throws MalformedURLException
{
15 years, 11 months
JBoss Portal SVN: r11598 - in examples/trunk/JSFHelloUser: src/main/webapp/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-28 09:07:58 -0400 (Mon, 28 Jul 2008)
New Revision: 11598
Added:
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml
Modified:
examples/trunk/JSFHelloUser/pom.xml
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml
examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp
Log:
A version that works
Modified: examples/trunk/JSFHelloUser/pom.xml
===================================================================
--- examples/trunk/JSFHelloUser/pom.xml 2008-07-28 11:37:13 UTC (rev 11597)
+++ examples/trunk/JSFHelloUser/pom.xml 2008-07-28 13:07:58 UTC (rev 11598)
@@ -10,27 +10,129 @@
<version>0.0.1</version>
<description />
+
+ <build>
+ <finalName>JSFHelloUser</finalName>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ </build>
+
<dependencies>
+
<dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_07</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_07</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+
+ <dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
- <version>2.0</version>
+ <version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.portletbridge</groupId>
<artifactId>portletbridge-api</artifactId>
- <version>1.0.0.B3</version>
+ <version>1.0.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
-
+
<dependency>
<groupId>org.jboss.portletbridge</groupId>
<artifactId>portletbridge-impl</artifactId>
- <version>1.0.0.B3</version>
+ <version>1.0.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
+
</dependencies>
-
+
<repositories>
<repository>
<id>JBoss repository</id>
Added: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/faces-config.xml 2008-07-28 13:07:58 UTC (rev 11598)
@@ -0,0 +1,33 @@
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+
+ <application>
+ <view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
+ <state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
+ </application>
+
+ <managed-bean>
+ <managed-bean-name>user</managed-bean-name>
+ <managed-bean-class>
+ org.jboss.portal.portlet.samples.jsf.UserBean
+ </managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>sayHello</from-outcome>
+ <to-view-id>/jsf/hello.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>back</from-outcome>
+ <to-view-id>/jsf/welcome.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
Added: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml (rev 0)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/jboss-app.xml 2008-07-28 13:07:58 UTC (rev 11598)
@@ -0,0 +1,3 @@
+<jboss-app>
+ <app-name>JSFHelloUser</app-name>
+</jboss-app>
\ No newline at end of file
Modified: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml 2008-07-28 11:37:13 UTC (rev 11597)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/web.xml 2008-07-28 13:07:58 UTC (rev 11598)
@@ -3,14 +3,37 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
version="2.5">
- <servlet>
- <servlet-name>JSFServlet</servlet-name>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.jsp</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.portlet.faces.renderPolicy</param-name>
+ <param-value>NEVER_DELEGATE</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
</servlet>
-
+
<servlet-mapping>
- <servlet-name>JSFServlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.resource</url-pattern>
+ </servlet-mapping>
+
+
</web-app>
Modified: examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp 2008-07-28 11:37:13 UTC (rev 11597)
+++ examples/trunk/JSFHelloUser/src/main/webapp/jsf/hello.jsp 2008-07-28 13:07:58 UTC (rev 11598)
@@ -3,10 +3,12 @@
<f:view>
<portlet:defineObjects/>
-<div class="portlet-section-header">Remember we love you: <h:outputText value="#{user.userName}"/>}</div>
+<div class="portlet-section-header">Remember we love you: <h:outputText value="#{user.userName}"/></div>
<br/>
-<h:commandLink action="back">
- <h:outputText value="Ask Me Again"/>
-</h:commandLink>
+<h:form>
+ <h:commandLink action="back">
+ <h:outputText value="Ask Me Again"/>
+ </h:commandLink>
+</h:form>
</f:view>
\ No newline at end of file
15 years, 11 months
JBoss Portal SVN: r11597 - in branches/JBoss_Portal_Branch_2_7: core and 2 other directories.
by portal-commits@lists.jboss.org
Author: galder.zamarreno(a)jboss.com
Date: 2008-07-28 07:37:13 -0400 (Mon, 28 Jul 2008)
New Revision: 11597
Modified:
branches/JBoss_Portal_Branch_2_7/cms/.classpath
branches/JBoss_Portal_Branch_2_7/core/.classpath
branches/JBoss_Portal_Branch_2_7/jems/.classpath
branches/JBoss_Portal_Branch_2_7/security/.classpath
Log:
Updated .classpath to point to the correct JBoss Cache jar.
Modified: branches/JBoss_Portal_Branch_2_7/cms/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/cms/.classpath 2008-07-28 09:49:11 UTC (rev 11596)
+++ branches/JBoss_Portal_Branch_2_7/cms/.classpath 2008-07-28 11:37:13 UTC (rev 11597)
@@ -22,7 +22,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-local-jdbc.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-transaction.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache.jar"/>
<classpathentry kind="lib" path="/thirdparty/jcr/lib/jcr-1.0.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jnpserver.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
@@ -44,5 +43,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-ant/lib/ant.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbpm/jpdl/lib/jbpm-jpdl.jar" sourcepath="/jbpm"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache-jdk50.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-07-28 09:49:11 UTC (rev 11596)
+++ branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-07-28 11:37:13 UTC (rev 11597)
@@ -23,7 +23,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-transaction.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-xml-binding.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache.jar"/>
<classpathentry kind="lib" path="/thirdparty/jgroups/lib/jgroups.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jnpserver.jar"/>
<classpathentry kind="lib" path="/thirdparty/jwebunit/lib/jwebunit-1.2.jar"/>
@@ -52,5 +51,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-trunk"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-controller-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache-jdk50.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/jems/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/jems/.classpath 2008-07-28 09:49:11 UTC (rev 11596)
+++ branches/JBoss_Portal_Branch_2_7/jems/.classpath 2008-07-28 11:37:13 UTC (rev 11597)
@@ -13,7 +13,6 @@
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jbossha.jar"/>
<classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss.jar"/>
@@ -24,5 +23,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jmx-invoker-adaptor-client.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache-jdk50.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/security/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/security/.classpath 2008-07-28 09:49:11 UTC (rev 11596)
+++ branches/JBoss_Portal_Branch_2_7/security/.classpath 2008-07-28 11:37:13 UTC (rev 11597)
@@ -7,7 +7,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
<classpathentry kind="lib" path="/thirdparty/dom4j/lib/dom4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-j2ee.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
@@ -17,5 +16,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/jems"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache-jdk50.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
15 years, 11 months
JBoss Portal SVN: r11596 - in branches/JBoss_Portal_Branch_2_6: cms/src/main/org/jboss/portal/cms/hibernate and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-28 05:49:11 -0400 (Mon, 28 Jul 2008)
New Revision: 11596
Added:
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/MaterializedBlobType.java
Modified:
branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java
branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml
Log:
Fixes for Sybase, would hopefully work with the open source JDBC connector jtds
Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2008-07-27 12:55:55 UTC (rev 11595)
+++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2008-07-28 09:49:11 UTC (rev 11596)
@@ -77,7 +77,7 @@
<componentref name="ehcache" version="1.2.2"/>
<componentref name="el" version="1.0"/>
<componentref name="facelets" version="1.1.1-patched-jboss4.2"/>
- <componentref name="hibernate" version="3.2.0.CR2"/>
+ <componentref name="hibernate" version="3.2.4.SP1"/>
<componentref name="httpunit" version="1.6"/>
<componentref name="hsqldb" version="1.8.0.2"/>
<componentref name="ibm-wsdl4j" version="1.5.2jboss"/>
Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java 2008-07-27 12:55:55 UTC (rev 11595)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java 2008-07-28 09:49:11 UTC (rev 11596)
@@ -142,18 +142,18 @@
selectFileExistStmt = "select 1 from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
+ + "and FSENTRY_NAME = ?";
- selectFolderExistStmt = "select 1 from "
+ selectFolderExistStmt = "select data from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ? and FSENTRY_DATA is null";
+ + "and FSENTRY_NAME = ?";
selectChildCountStmt = "select count(FSENTRY_NAME) from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ?";
selectDataStmt = "select data from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
+ + "and FSENTRY_NAME = ? ";
selectLastModifiedStmt = "select FSENTRY_LASTMOD from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
@@ -161,7 +161,7 @@
selectLengthStmt = "select FSENTRY_LENGTH from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
+ + "and FSENTRY_NAME = ?";
initialized = true;
}
@@ -221,27 +221,27 @@
try
{
- String query = "from " + schemaObjectPrefix + " where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
+ String query = "from " + schemaObjectPrefix + " where FSENTRY_PATH = ? and FSENTRY_NAME = ?";
List result = session.createQuery(query)
.setString(0, parentDir)
.setString(1, name)
.list();
+
+ boolean deleted = false;
- if (result.size() == 0)
- {
- throw new FileSystemException("no such file: " + filePath);
- }
-
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
Iterator iter = result.iterator();
while (iter.hasNext())
{
VersionEntry versionEntry = (VersionEntry)iter.next();
- session.delete(versionEntry);
+ if (versionEntry.getData() != null)
+ {
+ session.delete(versionEntry);
+ deleted = true;
+ }
}
-
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
@@ -249,9 +249,12 @@
while (iter.hasNext())
{
CMSEntry cmsEntry = (CMSEntry)iter.next();
- session.delete(cmsEntry);
+ if (cmsEntry.getData() != null)
+ {
+ session.delete(cmsEntry);
+ deleted = true;
+ }
}
-
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
@@ -259,10 +262,19 @@
while (iter.hasNext())
{
RepositoryEntry repoEntry = (RepositoryEntry)iter.next();
- session.delete(repoEntry);
+ if (repoEntry.getData() != null)
+ {
+ session.delete(repoEntry);
+ deleted = true;
+ }
}
+ }
+ if (!deleted)
+ {
+ throw new FileSystemException("no such file: " + filePath);
}
+
tx.commit();
}
catch (Exception e)
@@ -317,7 +329,7 @@
{
String query = "from " + schemaObjectPrefix + " where FSENTRY_PATH = ? and FSENTRY_NAME = ? " +
- "and FSENTRY_DATA is null or (FSENTRY_PATH = ?) or (FSENTRY_PATH like ?)";
+ "or (FSENTRY_PATH = ?) or (FSENTRY_PATH like ?)";
List result = session.createQuery(query)
.setString(0, parentDir)
@@ -326,21 +338,20 @@
.setString(3, folderPath + FileSystem.SEPARATOR + "%")
.list();
- if (result.size() == 0)
- {
- throw new FileSystemException("no such folder: " + folderPath);
- }
-
+ boolean deleted = false;
+
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
Iterator iter = result.iterator();
while (iter.hasNext())
{
VersionEntry versionEntry = (VersionEntry)iter.next();
- session.delete(versionEntry);
-
+ if (versionEntry.getData() == null)
+ {
+ session.delete(versionEntry);
+ deleted = true;
+ }
}
-
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
@@ -348,10 +359,12 @@
while (iter.hasNext())
{
CMSEntry cmsEntry = (CMSEntry)iter.next();
- session.delete(cmsEntry);
-
+ if (cmsEntry.getData() == null)
+ {
+ session.delete(cmsEntry);
+ deleted = true;
+ }
}
-
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
@@ -359,11 +372,19 @@
while (iter.hasNext())
{
RepositoryEntry repoEntry = (RepositoryEntry)iter.next();
- session.delete(repoEntry);
-
+ if (repoEntry.getData() == null)
+ {
+ session.delete(repoEntry);
+ deleted = true;
+ }
}
+ }
+ if (!deleted)
+ {
+ throw new FileSystemException("no such folder: " + folderPath);
}
+
tx.commit();
}
catch (Exception e)
@@ -449,7 +470,11 @@
Iterator iter = rs.iterator();
if (iter.hasNext())
{
- return true;
+ Object object = iter.next();
+ if (object != null)
+ {
+ return true;
+ }
}
return false;
}
@@ -492,7 +517,11 @@
Iterator iter = rs.iterator();
if (iter.hasNext())
{
- return true;
+ Object object = iter.next();
+ if (object == null)
+ {
+ return true;
+ }
}
return false;
}
@@ -960,11 +989,11 @@
in = IOTools.safeBufferedWrapper(new FileInputStream(f));
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
- Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
+ Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
query.setString(0, parentDir);
query.setString(1, name);
VersionEntry versionEntry = (VersionEntry)query.uniqueResult();
- if (versionEntry == null)
+ if (versionEntry == null || versionEntry.getData() == null)
{
throw new Exception("No such Entry " + name);
}
@@ -977,11 +1006,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
- Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
+ Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
query.setString(0, parentDir);
query.setString(1, name);
CMSEntry cmsEntry = (CMSEntry)query.uniqueResult();
- if (cmsEntry == null)
+ if (cmsEntry == null || cmsEntry.getData() == null)
{
throw new Exception("No such Entry " + name);
}
@@ -994,11 +1023,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
- Query query = session.createQuery("from RepositoryEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
+ Query query = session.createQuery("from RepositoryEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
query.setString(0, parentDir);
query.setString(1, name);
RepositoryEntry repoEntry = (RepositoryEntry)query.uniqueResult();
- if (repoEntry == null)
+ if (repoEntry == null || repoEntry.getData() == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1169,11 +1198,11 @@
in = IOTools.safeBufferedWrapper(new FileInputStream(f));
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
- Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
+ Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
query.setString(0, parentDir);
query.setString(1, name);
VersionEntry versionEntry = (VersionEntry)query.uniqueResult();
- if (versionEntry == null)
+ if (versionEntry == null || versionEntry.getData() == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1186,11 +1215,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
- Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
+ Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
query.setString(0, parentDir);
query.setString(1, name);
CMSEntry cmsEntry = (CMSEntry)query.uniqueResult();
- if (cmsEntry == null)
+ if (cmsEntry == null || cmsEntry.getData() == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1203,11 +1232,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
- Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
+ Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
query.setString(0, parentDir);
query.setString(1, name);
RepositoryEntry repoEntry = (RepositoryEntry)query.uniqueResult();
- if (repoEntry == null)
+ if (repoEntry == null || repoEntry.getData() == null)
{
throw new Exception("No such Entry " + name);
}
Added: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/MaterializedBlobType.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/MaterializedBlobType.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/MaterializedBlobType.java 2008-07-28 09:49:11 UTC (rev 11596)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.cms.hibernate;
+
+import java.sql.Types;
+
+import org.hibernate.type.AbstractBynaryType;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class MaterializedBlobType extends AbstractBynaryType
+{
+ public int sqlType()
+ {
+ return Types.BLOB;
+ }
+
+ public String getName()
+ {
+ return "materialized-blob";
+ }
+
+ public Class getReturnedClass()
+ {
+ return byte[].class;
+ }
+
+ protected Object toExternalFormat(byte[] bytes)
+ {
+ return bytes;
+ }
+
+ protected byte[] toInternalFormat(Object bytes)
+ {
+ return (byte[]) bytes;
+ }
+}
Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml 2008-07-27 12:55:55 UTC (rev 11595)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.xml 2008-07-28 09:49:11 UTC (rev 11596)
@@ -60,7 +60,7 @@
<property
name="data"
column="NODE_DATA"
- type="binary"
+ type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
length="100000000"
not-null="true"/>
</class>
@@ -79,7 +79,7 @@
<property
name="data"
column="PROP_DATA"
- type="binary"
+ type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
length="100000000"
not-null="true"/>
</class>
@@ -98,7 +98,7 @@
<property
name="data"
column="REFS_DATA"
- type="binary"
+ type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
length="100000000"
not-null="true"/>
</class>
@@ -136,7 +136,7 @@
<property
name="data"
column="NODE_DATA"
- type="binary"
+ type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
length="100000000"
not-null="true"/>
</class>
@@ -155,7 +155,7 @@
<property
name="data"
column="PROP_DATA"
- type="binary"
+ type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
length="100000000"
not-null="true"/>
</class>
@@ -174,7 +174,7 @@
<property
name="data"
column="REFS_DATA"
- type="binary"
+ type="org.jboss.portal.cms.hibernate.MaterializedBlobType"
length="100000000"
not-null="true"/>
</class>
15 years, 11 months
JBoss Portal SVN: r11595 - in branches/JBoss_Portal_Branch_2_7/core-samples/src: resources/portal-weather-samples-war/WEB-INF and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-27 08:55:55 -0400 (Sun, 27 Jul 2008)
New Revision: 11595
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
Log:
no need to set the expiration cache in portlet.xml if we always set it programmaticially during the renderp phase
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java 2008-07-27 12:50:22 UTC (rev 11594)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java 2008-07-27 12:55:55 UTC (rev 11595)
@@ -108,8 +108,9 @@
protected void doView(RenderRequest request, RenderResponse response) throws IOException, PortletException
{
-// response.setProperty("expiration-cache", request.getPreferences().getValue("expires", "180"));
+ response.setProperty("expiration-cache", request.getPreferences().getValue("expires", "180"));
+ //
InputStream xmlInputStream = null;
InputStream xslInputStream = null;
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2008-07-27 12:50:22 UTC (rev 11594)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2008-07-27 12:55:55 UTC (rev 11595)
@@ -44,7 +44,6 @@
<name>base_url</name>
<value>http://xml.weather.yahoo.com/forecastrss?p=</value>
</init-param>
- <!--<expiration-cache>180</expiration-cache>-->
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
15 years, 11 months
JBoss Portal SVN: r11594 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-27 08:50:22 -0400 (Sun, 27 Jul 2008)
New Revision: 11594
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
Log:
fix customization bug where the controller portlet controller context was using directly an instance lookup instead of using the customization manager
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-07-27 12:38:45 UTC (rev 11593)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-07-27 12:50:22 UTC (rev 11594)
@@ -24,6 +24,7 @@
import org.apache.log4j.Logger;
import org.jboss.portal.Mode;
+import org.jboss.portal.identity.User;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.impl.model.content.InternalContentProviderRegistry;
@@ -36,6 +37,7 @@
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.model.CustomizationManager;
import org.jboss.portal.core.navstate.NavigationalStateContext;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
@@ -241,9 +243,15 @@
Window window = PortletInvocationFactory.getTargetWindow(actionInvocation);
//
- Instance instance = instances.get(window.getName());
+ User user = controllerContext.getUser();
//
+ CustomizationManager customizationManager = controllerContext.getController().getCustomizationManager();
+
+ //
+ Instance instance = customizationManager.getInstance(window, user);
+
+ //
return instance.invoke(actionInvocation);
}
15 years, 11 months