JBoss Portal SVN: r11582 - branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-24 12:27:14 -0400 (Thu, 24 Jul 2008)
New Revision: 11582
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
Log:
JBPORTAL-2081: NPE when deleting a portal
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml 2008-07-24 16:25:35 UTC (rev 11581)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml 2008-07-24 16:27:14 UTC (rev 11582)
@@ -12,8 +12,6 @@
<h3 class="sectionTitle tenpx-top-bottom">#{bundle.MANAGE} <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
#{portalobjectmgr.selectedObject.typeName}</h3>
-
-
<h:form>
<h:panelGroup rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}"><h:commandLink
action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionLayout">
@@ -32,21 +30,19 @@
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.THEME}
</h:commandLink><h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template')))}">
| <h:commandLink
action="renameObject" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.RENAME}
</h:commandLink></h:panelGroup>
- <h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
| <h:commandLink
action="#{addDisplayNameAction.editDisplayNames}" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}" />
#{bundle.DISPLAY_NAMES}
- </h:commandLink></h:panelGroup>
+ </h:commandLink>
<h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.default)))}">
| <h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
15 years, 11 months
JBoss Portal SVN: r11581 - tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-24 12:25:35 -0400 (Thu, 24 Jul 2008)
New Revision: 11581
Modified:
tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
Log:
JBPORTAL-2081: NPE when deleting a portal
Modified: tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
===================================================================
--- tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2008-07-24 16:22:17 UTC (rev 11580)
+++ tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2008-07-24 16:25:35 UTC (rev 11581)
@@ -12,8 +12,6 @@
<h3 class="sectionTitle tenpx-top-bottom">#{bundle.MANAGE} <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
#{portalobjectmgr.selectedObject.typeName}</h3>
-
-
<h:form>
<h:panelGroup rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}"><h:commandLink
action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionLayout">
@@ -32,21 +30,19 @@
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.THEME}
</h:commandLink><h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template')))}">
| <h:commandLink
action="renameObject" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.RENAME}
</h:commandLink></h:panelGroup>
- <h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
| <h:commandLink
action="#{addDisplayNameAction.editDisplayNames}" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}" />
#{bundle.DISPLAY_NAMES}
- </h:commandLink></h:panelGroup>
+ </h:commandLink>
<h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.default)))}">
| <h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
15 years, 11 months
JBoss Portal SVN: r11580 - branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-24 12:22:17 -0400 (Thu, 24 Jul 2008)
New Revision: 11580
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
Log:
JBPORTAL-2081: NPE when deleting a portal
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2008-07-24 15:37:32 UTC (rev 11579)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2008-07-24 16:22:17 UTC (rev 11580)
@@ -12,8 +12,6 @@
<h3 class="sectionTitle tenpx-top-bottom">#{bundle.MANAGE} <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
#{portalobjectmgr.selectedObject.typeName}</h3>
-
-
<h:form>
<h:panelGroup rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}"><h:commandLink
action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionLayout">
@@ -32,21 +30,19 @@
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.THEME}
</h:commandLink><h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template')))}">
| <h:commandLink
action="renameObject" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.RENAME}
</h:commandLink></h:panelGroup>
- <h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
| <h:commandLink
action="#{addDisplayNameAction.editDisplayNames}" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}" />
#{bundle.DISPLAY_NAMES}
- </h:commandLink></h:panelGroup>
+ </h:commandLink>
<h:panelGroup
- rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.name == 'default')))}">
+ rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.default)))}">
| <h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
15 years, 11 months
JBoss Portal SVN: r11579 - in tags/JBoss_Portal_2_6_6: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-24 11:37:32 -0400 (Thu, 24 Jul 2008)
New Revision: 11579
Modified:
tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java
tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
Log:
- JBPORTAL-2084: Should now correctly detect when a call to modifyRegistration is needed.
Modified: tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-07-24 15:37:32 UTC (rev 11579)
@@ -482,6 +482,11 @@
if (!registrationLocallyModified)
{
registrationLocallyModified = isOldAndNewEqual(event.getOldValue(), event.getNewValue());
+
+ // FIX-ME: this should be handled better
+ // if we modified locally, mark the registration info as modified as well
+ getProducerInfo().getRegistrationInfo().setModified(registrationLocallyModified);
+ getProducerInfo().setModifyRegistrationRequired(true);
}
}
}
Modified: tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-07-24 15:37:32 UTC (rev 11579)
@@ -55,6 +55,7 @@
private static final String REFRESH_SUCCESS = "bean_consumermanager_refresh_success";
private static final String REFRESH_FAILURE = "bean_consumermanager_refresh_failure";
private static final String REFRESH_EXCEPTION = "bean_consumermanager_refresh_exception";
+ private static final String REFRESH_MODIFY = "bean_consumermanager_refresh_modify";
public ConsumerRegistry getRegistry()
{
@@ -287,6 +288,10 @@
// todo: extract information from registration result to be more precise
return REFRESH_FAILURE;
}
+ else if (RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED.equals(status))
+ {
+ return REFRESH_MODIFY;
+ }
else
{
return REFRESH_EXCEPTION;
Modified: tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
===================================================================
--- tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-24 15:37:32 UTC (rev 11579)
@@ -154,6 +154,7 @@
bean_consumermanager_refresh_success = Refresh was successful.
bean_consumermanager_refresh_failure = Refresh failed (probably because the registration information was not valid).
bean_consumermanager_refresh_exception = An unexpected error occurred.
+bean_consumermanager_refresh_modify = The local information has been changed, you should modify your registration with the remote producer.
# ProducerBean
bean_producer_regpolicy_unset = RegistrationPolicy unset
Modified: tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
===================================================================
--- tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-07-24 15:37:32 UTC (rev 11579)
@@ -132,4 +132,5 @@
bean_consumermanager_refresh_failure=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'informations d'enregistrement non valides)
bean_consumermanager_refresh_success=Le rafra\u00eechissement a r\u00e9ussi.
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!
\ No newline at end of file
+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.
\ No newline at end of file
Modified: tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2008-07-24 15:37:32 UTC (rev 11579)
@@ -175,6 +175,11 @@
public RegistrationInfo getRegistrationInfo()
{
+ // update parent since it might not be set when unfrozen from Hibernate
+ if (persistentRegistrationInfo != null)
+ {
+ persistentRegistrationInfo.setParent(this);
+ }
return persistentRegistrationInfo;
}
@@ -248,6 +253,12 @@
return isModifyRegistrationRequired || (persistentRegistrationInfo != null && persistentRegistrationInfo.isModified());
}
+ // FIX-ME: remove when a better dirty management is in place at property level
+ public void setModifyRegistrationRequired(boolean modifyRegistrationRequired)
+ {
+ this.isModifyRegistrationRequired = modifyRegistrationRequired;
+ }
+
public CookieProtocol getRequiresInitCookie()
{
return requiresInitCookie;
@@ -296,6 +307,12 @@
private RefreshResult internalRefresh(boolean forceRefresh) throws PortletInvokerException
{
ServiceDescription serviceDescription;
+
+ if(isModifyRegistrationRequired)
+ {
+ return new RefreshResult(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
+ }
+
// might neeed a different cache value: right now, we cache the whole producer info but we might want to cache
// POPs and rest of producer info separetely...
if (forceRefresh || isRefreshNeeded(true))
Modified: tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java
===================================================================
--- tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2008-07-24 15:37:32 UTC (rev 11579)
@@ -35,7 +35,7 @@
{
public enum Status
{
- SUCCESS, FAILURE, UNAVAILABLE, BYPASSED, UNKNOWN
+ SUCCESS, FAILURE, UNAVAILABLE, BYPASSED, UNKNOWN, MODIFY_REGISTRATION_REQUIRED
}
private ServiceDescription serviceDescription;
Modified: tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
--- tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2008-07-24 15:37:32 UTC (rev 11579)
@@ -91,6 +91,7 @@
ParameterValidation.throwIllegalArgExceptionIfNull(other, "RegistrationInfo to clone from");
this.persistentConsumerName = other.persistentConsumerName;
this.persistentRegistrationHandle = other.persistentRegistrationHandle;
+ this.parent = other.parent;
if (other.persistentRegistrationState != null)
{
Modified: tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
===================================================================
--- tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2008-07-24 14:11:47 UTC (rev 11578)
+++ tags/JBoss_Portal_2_6_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2008-07-24 15:37:32 UTC (rev 11579)
@@ -144,7 +144,7 @@
public boolean isDeterminedInvalid()
{
- return persistentInvalid != null && persistentInvalid;
+ return persistentInvalid != null && persistentInvalid && !UNCHECKED_VALUE_STATUS.equals(getStatus());
}
public void setInvalid(Boolean invalid, String status)
15 years, 11 months
JBoss Portal SVN: r11578 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal: core/impl/coordination and 1 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-07-24 10:11:47 -0400 (Thu, 24 Jul 2008)
New Revision: 11578
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
Log:
change <name>-> <id> in xml for <alias-binding> and <parameter-binding>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java 2008-07-24 14:09:33 UTC (rev 11577)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/coordination/ParameterBindingInfo.java 2008-07-24 14:11:47 UTC (rev 11578)
@@ -34,7 +34,7 @@
*/
public interface ParameterBindingInfo
{
- String getName();
+ String getId();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 14:09:33 UTC (rev 11577)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-07-24 14:11:47 UTC (rev 11578)
@@ -159,7 +159,7 @@
{
if (entry.getKey().getName().equals(window.getName()) && entry.getValue().equals(name))
{
- names.add(info.getName());
+ names.add(info.getId());
}
}
}
@@ -171,7 +171,7 @@
{
if (info.getNames().contains(name))
{
- names.add(info.getName());
+ names.add(info.getId());
}
}
}
@@ -562,7 +562,7 @@
}
// Remove all entries
- String prop_wiring = PREFIX_PARAMETER_BINDING + "." + info.getName();
+ String prop_wiring = PREFIX_PARAMETER_BINDING + "." + info.getId();
//
for (Window window : info.getWindows().keySet())
@@ -670,7 +670,7 @@
AliasInfoPOJO alias = (AliasInfoPOJO)aliasInfo;
//
- String propName = PREFIX_PARAMETER_ALIAS_NAME + "." + aliasInfo.getName();
+ String propName = PREFIX_PARAMETER_ALIAS_NAME + "." + aliasInfo.getId();
if (alias.page.getProperties().keySet().contains(propName))
{
alias.page.setDeclaredProperty(propName,null);
@@ -978,7 +978,7 @@
this.immutableWindows = Collections.unmodifiableMap(windows);
}
- public String getName()
+ public String getId()
{
return name;
}
@@ -1012,7 +1012,7 @@
this.immutableNames = Collections.unmodifiableSet(names);
}
- public String getName()
+ public String getId()
{
return name;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-24 14:09:33 UTC (rev 11577)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-07-24 14:11:47 UTC (rev 11578)
@@ -354,7 +354,7 @@
assertTrue(bindings1.size() == 1);
AliasBindingInfo info = bindings1.iterator().next();
- assertTrue(info.getName().equals("alias1"));
+ assertTrue(info.getId().equals("alias1"));
assertTrue(info.getNames().size() == 3);
assertTrue(info.getNames().contains(qname1));
assertTrue(info.getNames().contains(qname2));
@@ -372,11 +372,11 @@
for (AliasBindingInfo aliasBindingInfo : bindings2)
{
- if (aliasBindingInfo.getName().equals("alias2"))
+ if (aliasBindingInfo.getId().equals("alias2"))
{
info2 = aliasBindingInfo;
}
- if (aliasBindingInfo.getName().equals("alias3"))
+ if (aliasBindingInfo.getId().equals("alias3"))
{
info3 = aliasBindingInfo;
}
@@ -387,13 +387,13 @@
assertNotNull(info2);
assertNotNull(info3);
- assertTrue(info2.getName().equals("alias2"));
+ assertTrue(info2.getId().equals("alias2"));
assertTrue(info2.getNames().size() == 3);
assertTrue(info2.getNames().contains(qname4));
assertTrue(info2.getNames().contains(qname5));
assertTrue(info2.getNames().contains(qname6));
- assertTrue(info3.getName().equals("alias3"));
+ assertTrue(info3.getId().equals("alias3"));
assertTrue(info3.getNames().size() == 3);
assertTrue(info3.getNames().contains(qname7));
assertTrue(info3.getNames().contains(qname8));
15 years, 11 months
JBoss Portal SVN: r11577 - in branches/JBoss_Portal_Branch_2_7: core/src/resources/portal-core-sar/dtd and 1 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-07-24 10:09:33 -0400 (Thu, 24 Jul 2008)
New Revision: 11577
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationAliasBindingMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowBindingMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd
Log:
change <name>-> <id> in xml for <alias-binding> and <parameter-binding>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationAliasBindingMetaData.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationAliasBindingMetaData.java 2008-07-24 14:05:20 UTC (rev 11576)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationAliasBindingMetaData.java 2008-07-24 14:09:33 UTC (rev 11577)
@@ -73,7 +73,7 @@
public static CoordinationAliasBindingMetaData buildMetaData(Element bindingElement)
{
- Element nameElt = XMLTools.getUniqueChild(bindingElement, "name", true);
+ Element nameElt = XMLTools.getUniqueChild(bindingElement, "id", true);
CoordinationAliasBindingMetaData aliasMetaData = new CoordinationAliasBindingMetaData(XMLTools.asString(nameElt));
Iterator qnameIter = XMLTools.getChildrenIterator(bindingElement, "qname");
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowBindingMetaData.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowBindingMetaData.java 2008-07-24 14:05:20 UTC (rev 11576)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/metadata/coordination/CoordinationWindowBindingMetaData.java 2008-07-24 14:09:33 UTC (rev 11577)
@@ -71,7 +71,7 @@
public static CoordinationWindowBindingMetaData buildMetaData(Element bindingElement)
{
- Element nameElt = XMLTools.getUniqueChild(bindingElement, "name", true);
+ Element nameElt = XMLTools.getUniqueChild(bindingElement, "id", true);
CoordinationWindowBindingMetaData paramMetaData = new CoordinationWindowBindingMetaData(XMLTools.asString(nameElt));
Iterator windowIter = XMLTools.getChildrenIterator(bindingElement, "window-coordination");
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd 2008-07-24 14:05:20 UTC (rev 11576)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/dtd/portal-object_2_6.dtd 2008-07-24 14:09:33 UTC (rev 11577)
@@ -368,13 +368,13 @@
<!--
Shared parameter binding definition
-->
-<!ELEMENT parameter-binding (name, window-coordination+)>
+<!ELEMENT parameter-binding (id, window-coordination+)>
<!--
Alias binding definition
-->
-<!ELEMENT alias-binding (name, qname+)>
+<!ELEMENT alias-binding (id, qname+)>
<!--
This element defines window for coordination. It can be either source or destination window for event distribution or
@@ -387,4 +387,9 @@
-->
<!ELEMENT qname (#PCDATA)>
+<!--
+Id
+-->
+<!ELEMENT id (#PCDATA)>
+
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-24 14:05:20 UTC (rev 11576)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-coordination-samples-war/WEB-INF/default-object.xml 2008-07-24 14:09:33 UTC (rev 11577)
@@ -291,7 +291,7 @@
<!-- Same foo qname among 3 windows -->
<parameter-binding>
- <name>binding1</name>
+ <id>binding1</id>
<window-coordination>
<window-name>PublicParametersPortletWindow1</window-name>
<qname>foo</qname>
@@ -308,7 +308,7 @@
<!-- Bind different namespaces -->
<parameter-binding>
- <name>binding2</name>
+ <id>binding2</id>
<window-coordination>
<window-name>PublicParametersPortletWindow1</window-name>
<qname>bar1</qname>
@@ -377,17 +377,17 @@
<implicit-mode>FALSE</implicit-mode>
<alias-binding>
- <name>binding1</name>
+ <id>binding1</id>
<qname>foo</qname>
</alias-binding>
<alias-binding>
- <name>binding2</name>
+ <id>binding2</id>
<qname>{urn:jboss:portal:samples:juu}juu</qname>
</alias-binding>
<alias-binding>
- <name>binding3</name>
+ <id>binding3</id>
<qname>bar1</qname>
<qname>{urn:jboss:portal:samples:daa2}daa2</qname>
</alias-binding>
@@ -443,7 +443,7 @@
<implicit-mode>FALSE</implicit-mode>
<parameter-binding>
- <name>binding1</name>
+ <id>binding1</id>
<window-coordination>
<window-name>PublicParametersPortletWindow1</window-name>
<qname>foo</qname>
@@ -455,7 +455,7 @@
</parameter-binding>
<alias-binding>
- <name>binding2</name>
+ <id>binding2</id>
<qname>foo</qname>
</alias-binding>
15 years, 11 months
JBoss Portal SVN: r11576 - in branches/JBoss_Portal_Branch_2_6: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-07-24 10:05:20 -0400 (Thu, 24 Jul 2008)
New Revision: 11576
Modified:
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
Log:
- JBPORTAL-2084: Should now correctly detect when a call to modifyRegistration is needed.
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-07-24 14:05:20 UTC (rev 11576)
@@ -482,6 +482,11 @@
if (!registrationLocallyModified)
{
registrationLocallyModified = isOldAndNewEqual(event.getOldValue(), event.getNewValue());
+
+ // FIX-ME: this should be handled better
+ // if we modified locally, mark the registration info as modified as well
+ getProducerInfo().getRegistrationInfo().setModified(registrationLocallyModified);
+ getProducerInfo().setModifyRegistrationRequired(true);
}
}
}
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-07-24 14:05:20 UTC (rev 11576)
@@ -55,6 +55,7 @@
private static final String REFRESH_SUCCESS = "bean_consumermanager_refresh_success";
private static final String REFRESH_FAILURE = "bean_consumermanager_refresh_failure";
private static final String REFRESH_EXCEPTION = "bean_consumermanager_refresh_exception";
+ private static final String REFRESH_MODIFY = "bean_consumermanager_refresh_modify";
public ConsumerRegistry getRegistry()
{
@@ -287,6 +288,10 @@
// todo: extract information from registration result to be more precise
return REFRESH_FAILURE;
}
+ else if (RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED.equals(status))
+ {
+ return REFRESH_MODIFY;
+ }
else
{
return REFRESH_EXCEPTION;
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-24 14:05:20 UTC (rev 11576)
@@ -154,6 +154,7 @@
bean_consumermanager_refresh_success = Refresh was successful.
bean_consumermanager_refresh_failure = Refresh failed (probably because the registration information was not valid).
bean_consumermanager_refresh_exception = An unexpected error occurred.
+bean_consumermanager_refresh_modify = The local information has been changed, you should modify your registration with the remote producer.
# ProducerBean
bean_producer_regpolicy_unset = RegistrationPolicy unset
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-07-24 14:05:20 UTC (rev 11576)
@@ -132,4 +132,5 @@
bean_consumermanager_refresh_failure=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'informations d'enregistrement non valides)
bean_consumermanager_refresh_success=Le rafra\u00eechissement a r\u00e9ussi.
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!
\ No newline at end of file
+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.
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2008-07-24 14:05:20 UTC (rev 11576)
@@ -175,6 +175,11 @@
public RegistrationInfo getRegistrationInfo()
{
+ // update parent since it might not be set when unfrozen from Hibernate
+ if (persistentRegistrationInfo != null)
+ {
+ persistentRegistrationInfo.setParent(this);
+ }
return persistentRegistrationInfo;
}
@@ -248,6 +253,12 @@
return isModifyRegistrationRequired || (persistentRegistrationInfo != null && persistentRegistrationInfo.isModified());
}
+ // FIX-ME: remove when a better dirty management is in place at property level
+ public void setModifyRegistrationRequired(boolean modifyRegistrationRequired)
+ {
+ this.isModifyRegistrationRequired = modifyRegistrationRequired;
+ }
+
public CookieProtocol getRequiresInitCookie()
{
return requiresInitCookie;
@@ -296,6 +307,12 @@
private RefreshResult internalRefresh(boolean forceRefresh) throws PortletInvokerException
{
ServiceDescription serviceDescription;
+
+ if(isModifyRegistrationRequired)
+ {
+ return new RefreshResult(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
+ }
+
// might neeed a different cache value: right now, we cache the whole producer info but we might want to cache
// POPs and rest of producer info separetely...
if (forceRefresh || isRefreshNeeded(true))
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2008-07-24 14:05:20 UTC (rev 11576)
@@ -35,7 +35,7 @@
{
public enum Status
{
- SUCCESS, FAILURE, UNAVAILABLE, BYPASSED, UNKNOWN
+ SUCCESS, FAILURE, UNAVAILABLE, BYPASSED, UNKNOWN, MODIFY_REGISTRATION_REQUIRED
}
private ServiceDescription serviceDescription;
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2008-07-24 14:05:20 UTC (rev 11576)
@@ -91,6 +91,7 @@
ParameterValidation.throwIllegalArgExceptionIfNull(other, "RegistrationInfo to clone from");
this.persistentConsumerName = other.persistentConsumerName;
this.persistentRegistrationHandle = other.persistentRegistrationHandle;
+ this.parent = other.parent;
if (other.persistentRegistrationState != null)
{
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2008-07-24 14:02:59 UTC (rev 11575)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2008-07-24 14:05:20 UTC (rev 11576)
@@ -144,7 +144,7 @@
public boolean isDeterminedInvalid()
{
- return persistentInvalid != null && persistentInvalid;
+ return persistentInvalid != null && persistentInvalid && !UNCHECKED_VALUE_STATUS.equals(getStatus());
}
public void setInvalid(Boolean invalid, String status)
15 years, 11 months
JBoss Portal SVN: r11575 - in branches/JBoss_Portal_Branch_2_7: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-07-24 10:02:59 -0400 (Thu, 24 Jul 2008)
New Revision: 11575
Modified:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.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/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.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-2084: Should now correctly detect when a call to modifyRegistration is needed.
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-07-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-07-24 14:02:59 UTC (rev 11575)
@@ -482,6 +482,11 @@
if (!registrationLocallyModified)
{
registrationLocallyModified = isOldAndNewEqual(event.getOldValue(), event.getNewValue());
+
+ // FIX-ME: this should be handled better
+ // if we modified locally, mark the registration info as modified as well
+ getProducerInfo().getRegistrationInfo().setModified(registrationLocallyModified);
+ getProducerInfo().setModifyRegistrationRequired(true);
}
}
-}
\ No newline at end of file
+}
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-07-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-07-24 14:02:59 UTC (rev 11575)
@@ -55,6 +55,7 @@
private static final String REFRESH_SUCCESS = "bean_consumermanager_refresh_success";
private static final String REFRESH_FAILURE = "bean_consumermanager_refresh_failure";
private static final String REFRESH_EXCEPTION = "bean_consumermanager_refresh_exception";
+ private static final String REFRESH_MODIFY = "bean_consumermanager_refresh_modify";
public ConsumerRegistry getRegistry()
{
@@ -287,6 +288,10 @@
// todo: extract information from registration result to be more precise
return REFRESH_FAILURE;
}
+ else if (RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED.equals(status))
+ {
+ return REFRESH_MODIFY;
+ }
else
{
return REFRESH_EXCEPTION;
@@ -349,4 +354,4 @@
{
beanContext.createErrorMessage(NO_CONSUMER);
}
-}
\ 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.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-07-24 14:02:59 UTC (rev 11575)
@@ -154,6 +154,7 @@
bean_consumermanager_refresh_success = Refresh was successful.
bean_consumermanager_refresh_failure = Refresh failed (probably because the registration information was not valid).
bean_consumermanager_refresh_exception = An unexpected error occurred.
+bean_consumermanager_refresh_modify = The local information has been changed, you should modify your registration with the remote producer.
# ProducerBean
bean_producer_regpolicy_unset = RegistrationPolicy unset
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-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-07-24 14:02:59 UTC (rev 11575)
@@ -133,3 +133,4 @@
bean_consumermanager_refresh_success=Le rafra\u00eechissement a r\u00e9ussi.
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.
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2008-07-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2008-07-24 14:02:59 UTC (rev 11575)
@@ -175,6 +175,11 @@
public RegistrationInfo getRegistrationInfo()
{
+ // update parent since it might not be set when unfrozen from Hibernate
+ if (persistentRegistrationInfo != null)
+ {
+ persistentRegistrationInfo.setParent(this);
+ }
return persistentRegistrationInfo;
}
@@ -248,6 +253,12 @@
return isModifyRegistrationRequired || (persistentRegistrationInfo != null && persistentRegistrationInfo.isModified());
}
+ // FIX-ME: remove when a better dirty management is in place at property level
+ public void setModifyRegistrationRequired(boolean modifyRegistrationRequired)
+ {
+ this.isModifyRegistrationRequired = modifyRegistrationRequired;
+ }
+
public CookieProtocol getRequiresInitCookie()
{
return requiresInitCookie;
@@ -296,6 +307,12 @@
private RefreshResult internalRefresh(boolean forceRefresh) throws PortletInvokerException
{
ServiceDescription serviceDescription;
+
+ if(isModifyRegistrationRequired)
+ {
+ return new RefreshResult(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
+ }
+
// might neeed a different cache value: right now, we cache the whole producer info but we might want to cache
// POPs and rest of producer info separetely...
if (forceRefresh || isRefreshNeeded(true))
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2008-07-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2008-07-24 14:02:59 UTC (rev 11575)
@@ -35,7 +35,7 @@
{
public enum Status
{
- SUCCESS, FAILURE, UNAVAILABLE, BYPASSED, UNKNOWN
+ SUCCESS, FAILURE, UNAVAILABLE, BYPASSED, UNKNOWN, MODIFY_REGISTRATION_REQUIRED
}
private ServiceDescription serviceDescription;
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-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2008-07-24 14:02:59 UTC (rev 11575)
@@ -91,6 +91,7 @@
ParameterValidation.throwIllegalArgExceptionIfNull(other, "RegistrationInfo to clone from");
this.persistentConsumerName = other.persistentConsumerName;
this.persistentRegistrationHandle = other.persistentRegistrationHandle;
+ this.parent = other.parent;
if (other.persistentRegistrationState != null)
{
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-24 10:53:53 UTC (rev 11574)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationProperty.java 2008-07-24 14:02:59 UTC (rev 11575)
@@ -144,7 +144,7 @@
public boolean isDeterminedInvalid()
{
- return persistentInvalid != null && persistentInvalid;
+ return persistentInvalid != null && persistentInvalid && !UNCHECKED_VALUE_STATUS.equals(getStatus());
}
public void setInvalid(Boolean invalid, String status)
15 years, 11 months
JBoss Portal SVN: r11574 - branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-24 06:53:53 -0400 (Thu, 24 Jul 2008)
New Revision: 11574
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
Log:
Don't let the admin delete a default page
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml 2008-07-24 10:52:05 UTC (rev 11573)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml 2008-07-24 10:53:53 UTC (rev 11574)
@@ -110,12 +110,15 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.DISPLAY_NAMES}
- </h:commandLink> |<h:commandLink action="confirm" styleClass="actionDelete"
+ </h:commandLink>
+ <h:panelGroup
+ rendered="#{not object.default}"> | <h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.COMMON_DELETE}
</h:commandLink>
- <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
+ </h:panelGroup>
+ <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
action="#{portalobjectmgr.makeObjectDefault}">
<f:param name="id" value="#{object.id}"/>
#{bundle.MAKE_DEFAULT}
15 years, 11 months
JBoss Portal SVN: r11573 - tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-24 06:52:05 -0400 (Thu, 24 Jul 2008)
New Revision: 11573
Modified:
tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
Log:
Don't let the admin delete a default page
Modified: tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
--- tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2008-07-24 10:37:59 UTC (rev 11572)
+++ tags/JBoss_Portal_2_6_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2008-07-24 10:52:05 UTC (rev 11573)
@@ -110,12 +110,15 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.DISPLAY_NAMES}
- </h:commandLink> |<h:commandLink action="confirm" styleClass="actionDelete"
+ </h:commandLink>
+ <h:panelGroup
+ rendered="#{not object.default}"> | <h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.COMMON_DELETE}
</h:commandLink>
- <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
+ </h:panelGroup>
+ <h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
action="#{portalobjectmgr.makeObjectDefault}">
<f:param name="id" value="#{object.id}"/>
#{bundle.MAKE_DEFAULT}
15 years, 11 months