gatein SVN: r4180 - portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-09-14 00:11:00 -0400 (Tue, 14 Sep 2010)
New Revision: 4180
Modified:
portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties
portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties
portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_pt_BR.properties
portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
Log:
GTNPORTAL-1319 Change visisble copyright info from 2009 to 2010 for som language...
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties 2010-09-13 20:54:23 UTC (rev 4179)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties 2010-09-14 04:11:00 UTC (rev 4180)
@@ -254,7 +254,7 @@
UILoginForm.label.Signin=Anmelden
UILoginForm.label.ForAccount=Jetzt ein Konto registrieren
UILoginForm.label.SigninFail=Anmeldung fehlgeschlagen. Falscher Benutzername oder falsches Passwort.
-UILoginForm.label.Copyright=Copyright © 2009. Alle Rechte vorbehalten, eXo Platform SAS und Red Hat, Inc.
+UILoginForm.label.Copyright=Copyright © 2010. Alle Rechte vorbehalten, eXo Platform SAS und Red Hat, Inc.
#############################################################################
# Message Error #
@@ -925,7 +925,7 @@
# org.exoplatform.portal.component.customization.UIPortalToolPanel #
############################################################################
-UIPortalToolPanel.label.copyrightText=Copyright © 2009. Alle Rechte vorbehalten,
+UIPortalToolPanel.label.copyrightText=Copyright © 2010. Alle Rechte vorbehalten,
UIPortalToolPanel.label.companyTitleText= eXo Platform SAS und Red Hat, Inc..
############################################################################
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-09-13 20:54:23 UTC (rev 4179)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-09-14 04:11:00 UTC (rev 4180)
@@ -263,7 +263,7 @@
UILoginForm.label.Signin=Sign in
UILoginForm.label.ForAccount=Register now for an account
UILoginForm.label.SigninFail=Sign in failed. Wrong username or password.
-UILoginForm.label.Copyright=Copyright © 2009-2010. All rights reserved, Red Hat, Inc and eXo Platform SAS
+UILoginForm.label.Copyright=Copyright © 2010. All rights reserved, Red Hat, Inc and eXo Platform SAS
#############################################################################
# Message Error #
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties 2010-09-13 20:54:23 UTC (rev 4179)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties 2010-09-14 04:11:00 UTC (rev 4180)
@@ -922,7 +922,7 @@
############################################################################
UIPortalToolPanel.label.copyrightText=Copyright © 2010. All rights Reserved,
-UIPortalToolPanel.label.companyTitleText= eXo Platform SAS and Red Hat, Inc..
+UIPortalToolPanel.label.companyTitleText= eXo SAS Plataforma y Red Hat, Inc..
############################################################################
# org.exoplatform.portal.component.view.UIContainer #
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2010-09-13 20:54:23 UTC (rev 4179)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2010-09-14 04:11:00 UTC (rev 4180)
@@ -239,7 +239,7 @@
UILoginForm.label.Signup=Enregistrement
UILoginForm.label.ForAccount=Créer un compte
UILoginForm.label.SigninFail=La connexion a échouée. Le nom d'utilisateur ou mot de passe est incorrecte.
-UILoginForm.label.Copyright=Copyright © 2009-2010. All rights reserved, Red Hat, Inc. and eXo Platform SAS
+UILoginForm.label.Copyright=Copyright © 2010. All rights reserved, Red Hat, Inc. and eXo Platform SAS
#############################################################################
# Message Error #
@@ -911,7 +911,7 @@
# org.exoplatform.portal.component.customization.UIPortalToolPanel #
############################################################################
-UIPortalToolPanel.label.copyrightText=Copyright © 2009-2010. Tous droits réservés,
+UIPortalToolPanel.label.copyrightText=Copyright © 2010. Tous droits réservés,
UIPortalToolPanel.label.companyTitleText=Red Hat, Inc. et eXo Platform SAS
############################################################################
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties 2010-09-13 20:54:23 UTC (rev 4179)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties 2010-09-14 04:11:00 UTC (rev 4180)
@@ -254,7 +254,7 @@
UILoginForm.label.Signin=\u30b5\u30a4\u30f3\u30a4\u30f3
UILoginForm.label.ForAccount=\u30a2\u30ab\u30a6\u30f3\u30c8\u767b\u9332
UILoginForm.label.SigninFail=\u30b5\u30a4\u30f3\u30a4\u30f3\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u8aa4\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u307e\u305f\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u3059\u3002
-UILoginForm.label.Copyright=Copyright © 2009. All rights Reserved, eXo Platform SAS and Red Hat, Inc.
+UILoginForm.label.Copyright=Copyright © 2010. All rights Reserved, eXo Platform SAS \u3057\u3066 Red Hat, Inc.
#############################################################################
# Message Error #
@@ -926,8 +926,8 @@
# org.exoplatform.portal.component.customization.UIPortalToolPanel #
############################################################################
-UIPortalToolPanel.label.copyrightText=Copyright © 2009. All rights Reserved,
-UIPortalToolPanel.label.companyTitleText= eXo Platform SAS and Red Hat, Inc..
+UIPortalToolPanel.label.copyrightText=Copyright © 2010. All rights Reserved,
+UIPortalToolPanel.label.companyTitleText= eXo Platform SAS \u3057\u3066 Red Hat, Inc..
############################################################################
# org.exoplatform.portal.component.view.UIContainer #
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_pt_BR.properties
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_pt_BR.properties 2010-09-13 20:54:23 UTC (rev 4179)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_pt_BR.properties 2010-09-14 04:11:00 UTC (rev 4180)
@@ -922,8 +922,8 @@
# org.exoplatform.portal.component.customization.UIPortalToolPanel #
############################################################################
-UIPortalToolPanel.label.copyrightText=Copyright © 2009. All rights Reserved,
-UIPortalToolPanel.label.companyTitleText= eXo Platform SAS and Red Hat, Inc..
+UIPortalToolPanel.label.copyrightText=Copyright © 2010. All rights reserved,
+UIPortalToolPanel.label.companyTitleText= SAS eXo Platform e Red Hat, Inc..
############################################################################
# org.exoplatform.portal.component.view.UIContainer #
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2010-09-13 20:54:23 UTC (rev 4179)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2010-09-14 04:11:00 UTC (rev 4180)
@@ -898,7 +898,7 @@
############################################################################
UIPortalToolPanel.label.copyrightText=Copyright © 2010. All rights Reserved,
-UIPortalToolPanel.label.companyTitleText= eXo Platform SAS and Red Hat, Inc..
+UIPortalToolPanel.label.companyTitleText= eXo Platform SAS і Red Hat Inc..
############################################################################
# org.exoplatform.portal.component.view.UIContainer #
14 years, 4 months
gatein SVN: r4179 - portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-13 16:54:23 -0400 (Mon, 13 Sep 2010)
New Revision: 4179
Modified:
portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
Log:
- Use Described mixin to get the name of components. Currently causing issues with the GUI as the underlying model object in WorkspaceObjectImpl sometimes ends being null causing NPEs. Mitigating by caching pageIdToUUIDs but problem still present for windowIdToUUIDs. :(
- Started trying to implement re-customization of window.
- Adapted for method signature change and typo fix in PortalStructureProvider.
Modified: portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
===================================================================
--- portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-09-13 20:49:31 UTC (rev 4178)
+++ portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-09-13 20:54:23 UTC (rev 4179)
@@ -27,9 +27,9 @@
import org.exoplatform.commons.chromattic.ChromatticLifeCycle;
import org.exoplatform.commons.chromattic.ChromatticManager;
import org.exoplatform.container.ExoContainer;
+import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.gatein.common.util.ParameterValidation;
-import org.gatein.mop.api.content.ContentType;
import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.Page;
@@ -38,6 +38,9 @@
import org.gatein.mop.api.workspace.ui.UIComponent;
import org.gatein.mop.api.workspace.ui.UIContainer;
import org.gatein.mop.api.workspace.ui.UIWindow;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletStateType;
+import org.gatein.pc.api.StatefulPortletContext;
import org.gatein.wsrp.api.PortalStructureProvider;
import java.util.Collection;
@@ -67,27 +70,30 @@
public List<String> getPageIdentifiers()
{
- ChromatticSession session = lifeCycle.getChromattic().openSession();
- Workspace workspace = session.findByPath(Workspace.class, "mop:workspace");
- Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
+ if (pageIdToUUIDs.isEmpty())
+ {
+ ChromatticSession session = lifeCycle.getChromattic().openSession();
+ Workspace workspace = session.findByPath(Workspace.class, "mop:workspace");
+ Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
- for (Site site : sites)
- {
- Page page = site.getRootPage().getChild("pages");
- if (page != null)
+ for (Site site : sites)
{
- processPage(page, true);
+ Page page = site.getRootPage().getChild("pages");
+ if (page != null)
+ {
+ processPage(page, true);
+ }
}
+
+ /*POMSession session = (POMSession) lifeCycle.getChromattic().openSession();
+ Iterator<Page> pages = session.findObjects(ObjectType.PAGE, ObjectType.PORTAL_SITE, null, null);
+ while (pages.hasNext())
+ {
+ Page page = pages.next();
+ pageIdToUUIDs.put(page.getName(), page.getObjectId());
+ }*/
}
- /*POMSession session = (POMSession) lifeCycle.getChromattic().openSession();
- Iterator<Page> pages = session.findObjects(ObjectType.PAGE, ObjectType.PORTAL_SITE, null, null);
- while (pages.hasNext())
- {
- Page page = pages.next();
- pageIdToUUIDs.put(page.getName(), page.getObjectId());
- }*/
-
LinkedList<String> identifiers = new LinkedList<String>(pageIdToUUIDs.keySet());
Collections.sort(identifiers);
return identifiers;
@@ -97,7 +103,8 @@
{
if (!ignoreCurrent)
{
- pageIdToUUIDs.put(page.getName(), page.getObjectId());
+ Described described = page.adapt(Described.class);
+ pageIdToUUIDs.put(described.getName(), page.getObjectId());
}
Collection<Page> children = page.getChildren();
@@ -110,7 +117,7 @@
}
}
- public List<String> getWindowIndentifiersFor(String pageId)
+ public List<String> getWindowIdentifiersFor(String pageId)
{
ChromatticSession session = lifeCycle.getChromattic().openSession();
String uuid = pageIdToUUIDs.get(pageId);
@@ -132,7 +139,8 @@
ObjectType<? extends UIComponent> type = component.getObjectType();
if (ObjectType.WINDOW.equals(type))
{
- String name = component.getName();
+ Described described = component.adapt(Described.class);
+ String name = described.getName();
windowIdToUUIDs.put(name, component.getObjectId());
windows.add(name);
}
@@ -147,17 +155,33 @@
}
}
- public void assignPortletToWindow(String portletId, String windowId, String pageId)
+ public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId)
{
ChromatticSession session = lifeCycle.getChromattic().openSession();
String uuid = windowIdToUUIDs.get(windowId);
ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
UIWindow window = session.findById(UIWindow.class, uuid);
- /*WSRP wsrp = new WSRP();
+ WSRP wsrp = new WSRP();
+ String portletId = portletContext.getId();
wsrp.setPortletId(portletId);
- wsrp.setState();
- window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);*/
+ if (portletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext context = (StatefulPortletContext)portletContext;
+ if (PortletStateType.OPAQUE.equals(context.getType()))
+ {
+ wsrp.setState((byte[])context.getState());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Don't know how to deal with state: " + context.getState());
+ }
+ }
+
+ // destroy existing customization
Customization<?> customization = window.getCustomization();
-// window.customize()
+ customization.destroy();
+
+ // and re-customize
+ window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);
}
}
14 years, 4 months
gatein SVN: r4178 - in components/wsrp/trunk/admin-gui/src/main/webapp: jsf/consumers and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-13 16:49:31 -0400 (Mon, 13 Sep 2010)
New Revision: 4178
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/import.xhtml
Log:
- GTNWSRP-61: Improved navigation.
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2010-09-13 20:48:02 UTC (rev 4177)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2010-09-13 20:49:31 UTC (rev 4178)
@@ -82,6 +82,7 @@
portlets_table_column_include = Include in export?
portlets_table_column_portlet_name = Portlet
portlets_table_export = Export
+portlets_table_configure = Back to consumer configuration
export_detail_export_time = Export time
export_detail_expiration_time = Expiration time
export_detail_portlets = Exported portlets
@@ -135,6 +136,10 @@
edit_consumer_refresh = Refresh & Save
edit_consumer_refresh_title = Save changes and refresh information from producer
edit_consumer_cancel = Cancel
+edit_consumer_import = Import portlets
+edit_consumer_import_title = Importing portlets
+edit_consumer_export = Export portlets
+edit_consumer_export_title = Exporting portlets
# Confirm registration property deletion screen
confirm_delete_reg_property_title = Delete ''{0}'' registration property description?
@@ -180,7 +185,8 @@
bean_consumer_cannot_erase_reg = Couldn't erase local registration!
bean_consumer_malformed_url = ''{0}'' is not a valid URL: {1}
bean_consumer_update_success = Successfully updated consumer!
-bean_consumer_import_success = ''{0}'' portlets were successfully imported!
+bean_consumer_import_success = {0} portlets were successfully imported!
+bean_consumer_import_failed_portlets = The following portlets couldn't be imported: {0}
# ConsumerManagerBean
bean_consumermanager_invalid_new_consumer_name = Need a non-null, non-empty name for the new consumer!
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2010-09-13 20:48:02 UTC (rev 4177)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2010-09-13 20:49:31 UTC (rev 4178)
@@ -174,4 +174,9 @@
import_assign=Assigner � la fen�tre
import_import=Importer
import_use=Importer?
-bean_consumer_import_success=''{0}'' portlets ont �t� correctement import�es!
\ No newline at end of file
+bean_consumer_import_success=''{0}'' portlets ont �t� correctement import�es!
+bean_consumer_import_failed_portlets=Les portlets suivantes n'ont pas pu �tre import�es: {0}
+edit_consumer_export=Exporter portlets
+edit_consumer_export_title=Portlets en export
+edit_consumer_import=Importer portlets
+edit_consumer_import_title=Portlets en import
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-09-13 20:48:02 UTC (rev 4177)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-09-13 20:49:31 UTC (rev 4178)
@@ -258,6 +258,36 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
+ <h:commandLink id="export-cons-link" action="#{consumersMgr.exportPortlets}"
+ actionListener="#{consumersMgr.selectConsumer}"
+ rendered="#{consumer.supportsExport}"
+ value="#{i18n.edit_consumer_export}"
+ title="#{i18n.edit_consumer_export_title}">
+ <f:param name="id" value="#{consumer.id}"/>
+ </h:commandLink>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="import-cons-link" action="#{consumersMgr.importPortlets}"
+ actionListener="#{consumersMgr.selectConsumer}"
+ rendered="#{consumer.supportsExport and ! consumer.availableExportInfosEmpty}"
+ value="#{i18n.edit_consumer_import}"
+ title="#{i18n.edit_consumer_import_title}">
+ <f:param name="id" value="#{consumer.id}"/>
+ </h:commandLink>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
<h:commandButton id="refresh-cons-link" action="#{consumer.refreshConsumer}"
value="#{i18n.edit_consumer_refresh}"
title="#{i18n.edit_consumer_refresh_title}"/>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml 2010-09-13 20:48:02 UTC (rev 4177)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/export.xhtml 2010-09-13 20:49:31 UTC (rev 4178)
@@ -56,6 +56,27 @@
</div>
</div>
</td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink action="#{consumersMgr.configureConsumer}" id="configure">
+ <f:param name="id" value="#{consumer.id}"/>
+ #{i18n.portlets_table_configure}
+ </h:commandLink>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandButton id="consumers" action="consumers" value="#{i18n.export_detail_consumers}"/>
+ </div>
+ </div>
+ </div>
+ </td>
</tr>
</table>
</h:form>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml 2010-09-13 20:48:02 UTC (rev 4177)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exportDetail.xhtml 2010-09-13 20:49:31 UTC (rev 4178)
@@ -79,6 +79,18 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
+ <h:commandLink action="import" id="use">
+ #{i18n.exports_
+ actions_use}
+ </h:commandLink>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
<h:commandButton id="exports" action="exports" value="#{i18n.export_detail_exports}"/>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml 2010-09-13 20:48:02 UTC (rev 4177)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/exports.xhtml 2010-09-13 20:49:31 UTC (rev 4178)
@@ -43,7 +43,7 @@
<h:column>
<f:facet name="header">#{i18n.export_detail_has_failed}</f:facet>
- <h:selectBooleanCheckbox id="hasFailed" value="#{export.hasFailedPortlets}" disabled="true"/>
+ <h:selectBooleanCheckbox id="hasFailed" value="#{export.hasFailedPortlets}" disabled="true"/>
</h:column>
<h:column>
@@ -53,7 +53,8 @@
#{i18n.exports_actions_view}
</h:commandLink>
|
- <h:commandLink action="confirmDeleteExport" actionListener="#{consumer.selectExport}" styleClass="actionDelete" id="delete">
+ <h:commandLink action="confirmDeleteExport" actionListener="#{consumer.selectExport}"
+ styleClass="actionDelete" id="delete">
#{i18n.exports_actions_delete}
</h:commandLink>
|
@@ -73,6 +74,18 @@
</div>
</div>
</td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink action="#{consumersMgr.configureConsumer}" id="configure">
+ <f:param name="id" value="#{consumer.id}"/>
+ #{i18n.portlets_table_configure}
+ </h:commandLink>
+ </div>
+ </div>
+ </div>
+ </td>
</tr>
</table>
</h:form>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/import.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/import.xhtml 2010-09-13 20:48:02 UTC (rev 4177)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/exports/import.xhtml 2010-09-13 20:49:31 UTC (rev 4178)
@@ -33,7 +33,7 @@
rowClasses="EvenRow,OddRow" styleClass="UIGrid" width="100%">
<h:column>
<f:facet name="header">#{i18n.import_use}</f:facet>
- <h:selectBooleanCheckbox id="selected" value="#{portlet.selected}"
+ <h:selectBooleanCheckbox id="selected" value="#{portlet.selected}"
valueChangeListener="#{portlet.select}"
immediate="true" onclick="this.form.submit()"/>
</h:column>
@@ -56,17 +56,40 @@
</h:selectOneListbox>
</h:column>
</h:dataTable>
+
<table class="ActionContainer">
<tr>
<td>
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <h:commandButton id="import" action="#{consumer.importPortlets}" value="#{i18n.import_import}"/>
+ <h:commandButton id="import" action="#{consumer.importPortlets}"
+ value="#{i18n.import_import}"/>
</div>
</div>
</div>
</td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink action="#{consumersMgr.configureConsumer}" id="configure">
+ <f:param name="id" value="#{consumer.id}"/>
+ #{i18n.portlets_table_configure}
+ </h:commandLink>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="exports" action="exports" value="#{i18n.export_detail_exports}"/>
+ </div>
+ </div>
+ </div>
+ </td>
</tr>
</table>
</h:form>
14 years, 4 months
gatein SVN: r4177 - components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-13 16:48:02 -0400 (Mon, 13 Sep 2010)
New Revision: 4177
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
Log:
- GTNWSRP-61: Started hooking up import capability with backend. Still needs work.
- Added isSupportsExport and isAvailableExportInfosEmpty methods.
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-09-13 20:45:09 UTC (rev 4176)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-09-13 20:48:02 UTC (rev 4177)
@@ -23,16 +23,20 @@
package org.gatein.wsrp.admin.ui;
+import com.google.common.base.Function;
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.Portlet;
+import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.api.PortalStructureProvider;
import org.gatein.wsrp.consumer.EndpointConfigurationInfo;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.RegistrationInfo;
import org.gatein.wsrp.consumer.RegistrationProperty;
import org.gatein.wsrp.consumer.migration.ExportInfo;
+import org.gatein.wsrp.consumer.migration.ImportInfo;
import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
@@ -61,6 +65,7 @@
*/
public class ConsumerBean extends ManagedBean
{
+ public static final SelectablePortletToHandleFunction SELECTABLE_TO_HANDLE = new SelectablePortletToHandleFunction();
private WSRPConsumer consumer;
private ConsumerRegistry registry;
private ConsumerManagerBean manager;
@@ -78,6 +83,7 @@
private static final String UPDATE_SUCCESS = "bean_consumer_update_success";
private static final String CANNOT_EXPORT = "bean_consumer_cannot_export";
private static final String IMPORT_SUCCESS = "bean_consumer_import_success";
+ private static final String FAILED_PORTLETS = "bean_consumer_import_failed_portlets";
private static final String CONSUMER_TYPE = "CONSUMER_TYPE";
private DataModel portletHandles;
@@ -595,20 +601,42 @@
public String importPortlets()
{
List<SelectablePortletHandle> exportedPortlets = currentExport.getExportedPortlets();
- PortalStructureProvider structureProvider = consumer.getMigrationService().getStructureProvider();
- int importCount = 0;
- for (SelectablePortletHandle exportedPortlet : exportedPortlets)
+
+ try
{
- if(exportedPortlet.isSelected())
+ List<SelectablePortletHandle> portletsToImport = new ArrayList<SelectablePortletHandle>(exportedPortlets.size());
+ for (SelectablePortletHandle exportedPortlet : exportedPortlets)
{
- structureProvider.assignPortletToWindow(exportedPortlet.getHandle(), exportedPortlet.getWindow(), exportedPortlet.getPage());
- importCount++;
+ if (exportedPortlet.isSelected())
+ {
+ portletsToImport.add(exportedPortlet);
+ }
}
+ ImportInfo info = consumer.importPortlets(currentExport.getExport(), WSRPUtils.transform(portletsToImport, SELECTABLE_TO_HANDLE));
+
+ PortalStructureProvider structureProvider = consumer.getMigrationService().getStructureProvider();
+ int importCount = 0;
+ for (SelectablePortletHandle importedPortlet : portletsToImport)
+ {
+ PortletContext portletContext = info.getPortletContextFor(importedPortlet.getHandle());
+ if (portletContext != null)
+ {
+ structureProvider.assignPortletToWindow(portletContext, importedPortlet.getWindow(), importedPortlet.getPage());
+ importCount++;
+ }
+ }
+
+ beanContext.createLocalizedMessage(BeanContext.STATUS, IMPORT_SUCCESS, beanContext.getInfoSeverity(), importCount);
+ beanContext.createErrorMessage(FAILED_PORTLETS, info.getErrorCodesToFailedPortletHandlesMapping());
+
+ return ConsumerManagerBean.CONSUMERS;
}
+ catch (PortletInvokerException e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ return null;
+ }
- beanContext.createLocalizedMessage(BeanContext.STATUS, IMPORT_SUCCESS, beanContext.getInfoSeverity(), importCount);
-
- return ConsumerManagerBean.CONSUMERS;
}
public String deleteExport()
@@ -633,6 +661,16 @@
currentExport = (ExportInfoDisplay)existingExports.getRowData();
}
+ public boolean isSupportsExport()
+ {
+ return consumer.isSupportsExport();
+ }
+
+ public boolean isAvailableExportInfosEmpty()
+ {
+ return consumer.getMigrationService().isAvailableExportInfosEmpty();
+ }
+
public static class SelectablePortletHandle
{
private String handle;
@@ -708,12 +746,12 @@
public List<SelectItem> getWindows()
{
- return getSelectItemsFrom(provider.getWindowIndentifiersFor(page));
+ return getSelectItemsFrom(provider.getWindowIdentifiersFor(page));
}
public void select(ValueChangeEvent event)
{
- selected = (Boolean) event.getNewValue();
+ selected = (Boolean)event.getNewValue();
}
}
@@ -810,4 +848,12 @@
return faiedPortlets;
}
}
+
+ private static class SelectablePortletToHandleFunction implements Function<SelectablePortletHandle, String>
+ {
+ public String apply(SelectablePortletHandle from)
+ {
+ return from.getHandle();
+ }
+ }
}
14 years, 4 months
gatein SVN: r4176 - in components/wsrp/trunk: api/src/main/java/org/gatein/wsrp/api and 4 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-13 16:45:09 -0400 (Mon, 13 Sep 2010)
New Revision: 4176
Modified:
components/wsrp/trunk/api/pom.xml
components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/PortalStructureProvider.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ImportInfo.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
Log:
- GTNWSRP-61: More work on import capability.
+ Changed signature of PortalStructureProvider.assignPortletToWindow to use a PortletContext instead of a portlet handle and fixed typo.
+ Fixed NPE in importPortlets and promoted method to WSRPConsumer interface.
+ Added ImportInfo.getPortletContextFor method.
Modified: components/wsrp/trunk/api/pom.xml
===================================================================
--- components/wsrp/trunk/api/pom.xml 2010-09-13 15:24:42 UTC (rev 4175)
+++ components/wsrp/trunk/api/pom.xml 2010-09-13 20:45:09 UTC (rev 4176)
@@ -35,6 +35,11 @@
<dependencies>
<dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-api</artifactId>
+ <version>2.2.0-Beta01-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
Modified: components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/PortalStructureProvider.java
===================================================================
--- components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/PortalStructureProvider.java 2010-09-13 15:24:42 UTC (rev 4175)
+++ components/wsrp/trunk/api/src/main/java/org/gatein/wsrp/api/PortalStructureProvider.java 2010-09-13 20:45:09 UTC (rev 4176)
@@ -23,6 +23,8 @@
package org.gatein.wsrp.api;
+import org.gatein.pc.api.PortletContext;
+
import java.util.List;
/**
@@ -33,7 +35,7 @@
{
List<String> getPageIdentifiers();
- List<String> getWindowIndentifiersFor(String pageId);
+ List<String> getWindowIdentifiersFor(String pageId);
- void assignPortletToWindow(String portletId, String windowId, String pageId);
+ void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId);
}
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java 2010-09-13 15:24:42 UTC (rev 4175)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/WSRPConsumer.java 2010-09-13 20:45:09 UTC (rev 4176)
@@ -31,6 +31,7 @@
import org.gatein.wsrp.consumer.RefreshResult;
import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
import org.gatein.wsrp.consumer.migration.ExportInfo;
+import org.gatein.wsrp.consumer.migration.ImportInfo;
import org.gatein.wsrp.consumer.migration.MigrationService;
import javax.servlet.http.HttpSession;
@@ -132,4 +133,6 @@
MigrationService getMigrationService();
boolean isSupportsExport();
+
+ ImportInfo importPortlets(ExportInfo exportInfo, List<String> portlets) throws PortletInvokerException;
}
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-09-13 15:24:42 UTC (rev 4175)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-09-13 20:45:09 UTC (rev 4176)
@@ -911,7 +911,7 @@
resourceListHolder, new Holder<List<Extension>>());
List<ImportedPortlet> importedPortlets = importedPortletsHolder.value;
- SortedMap<String, PortletContext> importIdToPortletContext = null;
+ SortedMap<String, PortletContext> importIdToPortletContext = new TreeMap<String, PortletContext>();
if (ParameterValidation.existsAndIsNotEmpty(importedPortlets))
{
for (ImportedPortlet importedPortlet : importedPortlets)
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ImportInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ImportInfo.java 2010-09-13 15:24:42 UTC (rev 4175)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/ImportInfo.java 2010-09-13 20:45:09 UTC (rev 4176)
@@ -1,24 +1,25 @@
/*
-* 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.
-*/
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.consumer.migration;
@@ -52,5 +53,8 @@
}
}
-
+ public PortletContext getPortletContextFor(String id)
+ {
+ return importIdToPortletContext.get(id);
+ }
}
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java 2010-09-13 15:24:42 UTC (rev 4175)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/migration/MigrationService.java 2010-09-13 20:45:09 UTC (rev 4176)
@@ -24,10 +24,10 @@
package org.gatein.wsrp.consumer.migration;
import org.gatein.common.util.ParameterValidation;
+import org.gatein.pc.api.PortletContext;
import org.gatein.wsrp.api.PortalStructureProvider;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -45,6 +45,7 @@
private PortalStructureProvider structureProvider = new PortalStructureProvider()
{
private Map<String, List<String>> pagesToWindows = new HashMap<String, List<String>>(7);
+
{
List<String> windows = new ArrayList<String>(3);
windows.add("p1w1");
@@ -65,14 +66,14 @@
return new ArrayList<String>(pagesToWindows.keySet());
}
- public List<String> getWindowIndentifiersFor(String pageId)
+ public List<String> getWindowIdentifiersFor(String pageId)
{
return pagesToWindows.get(pageId);
}
- public void assignPortletToWindow(String portletId, String windowId, String pageId)
+ public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId)
{
- System.out.println("Assigned portlet " + portletId + " to window " + windowId + " on page " + pageId);
+ System.out.println("Assigned portlet " + portletContext + " to window " + windowId + " on page " + pageId);
}
};
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-09-13 15:24:42 UTC (rev 4175)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2010-09-13 20:45:09 UTC (rev 4176)
@@ -39,6 +39,7 @@
import org.gatein.wsrp.consumer.RefreshResult;
import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
import org.gatein.wsrp.consumer.migration.ExportInfo;
+import org.gatein.wsrp.consumer.migration.ImportInfo;
import org.gatein.wsrp.consumer.migration.MigrationService;
import javax.servlet.http.HttpSession;
@@ -179,6 +180,11 @@
return false;
}
+ public ImportInfo importPortlets(ExportInfo exportInfo, List<String> portlets) throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
public void destroy()
{
}
14 years, 4 months
gatein SVN: r4175 - portal/branches/branch-r4047/web/portal/src/main/webapp/groovy/webui/core.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-09-13 11:24:42 -0400 (Mon, 13 Sep 2010)
New Revision: 4175
Modified:
portal/branches/branch-r4047/web/portal/src/main/webapp/groovy/webui/core/UIConfirmation.gtmpl
Log:
GTNPORTAL-1368 Fix UIConfirmation bug with IE
Modified: portal/branches/branch-r4047/web/portal/src/main/webapp/groovy/webui/core/UIConfirmation.gtmpl
===================================================================
--- portal/branches/branch-r4047/web/portal/src/main/webapp/groovy/webui/core/UIConfirmation.gtmpl 2010-09-13 13:40:17 UTC (rev 4174)
+++ portal/branches/branch-r4047/web/portal/src/main/webapp/groovy/webui/core/UIConfirmation.gtmpl 2010-09-13 15:24:42 UTC (rev 4175)
@@ -41,7 +41,7 @@
void printMessage(String message, String messageType)
{
- println "<div class=\"UITabContent\"";
+ println "<div class=\"UITabContent\">";
println " <div class=\"PopupMessageBox\">";
println " <div class=\"$messageType\">";
println " <div class=\"PopupMessageContainer\">";
14 years, 4 months
gatein SVN: r4174 - in portal/branches/wsrp2-integration/component/wsrp: src/main/java/org/gatein/portal/wsrp and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-13 09:40:17 -0400 (Mon, 13 Sep 2010)
New Revision: 4174
Modified:
portal/branches/wsrp2-integration/component/wsrp/pom.xml
portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
Log:
- Hooked up MOPPortalStructureProvider. More work needed: mostly synchronization commit.
Modified: portal/branches/wsrp2-integration/component/wsrp/pom.xml
===================================================================
--- portal/branches/wsrp2-integration/component/wsrp/pom.xml 2010-09-13 13:25:39 UTC (rev 4173)
+++ portal/branches/wsrp2-integration/component/wsrp/pom.xml 2010-09-13 13:40:17 UTC (rev 4174)
@@ -79,6 +79,11 @@
<artifactId>exo.portal.component.common</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.portal</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
Modified: portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
===================================================================
--- portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-09-13 13:25:39 UTC (rev 4173)
+++ portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-09-13 13:40:17 UTC (rev 4174)
@@ -26,14 +26,18 @@
import org.chromattic.api.ChromatticSession;
import org.exoplatform.commons.chromattic.ChromatticLifeCycle;
import org.exoplatform.commons.chromattic.ChromatticManager;
-import org.gatein.common.NotYetImplemented;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.gatein.common.util.ParameterValidation;
+import org.gatein.mop.api.content.ContentType;
+import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.Page;
import org.gatein.mop.api.workspace.Site;
import org.gatein.mop.api.workspace.Workspace;
import org.gatein.mop.api.workspace.ui.UIComponent;
import org.gatein.mop.api.workspace.ui.UIContainer;
+import org.gatein.mop.api.workspace.ui.UIWindow;
import org.gatein.wsrp.api.PortalStructureProvider;
import java.util.Collection;
@@ -53,8 +57,9 @@
private Map<String, String> pageIdToUUIDs;
private Map<String, String> windowIdToUUIDs;
- public MOPPortalStructureProvider(ChromatticManager manager)
+ public MOPPortalStructureProvider(ExoContainer container)
{
+ ChromatticManager manager = (ChromatticManager)container.getComponentInstanceOfType(ChromatticManager.class);
lifeCycle = manager.getLifeCycle("mop");
pageIdToUUIDs = new HashMap<String, String>();
windowIdToUUIDs = new HashMap<String, String>();
@@ -63,29 +68,44 @@
public List<String> getPageIdentifiers()
{
ChromatticSession session = lifeCycle.getChromattic().openSession();
- Workspace workspace = session.findByPath(Workspace.class, "/production/mop:workspace");
+ Workspace workspace = session.findByPath(Workspace.class, "mop:workspace");
Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
for (Site site : sites)
{
- Page page = site.getRootPage();
- processPage(page);
+ Page page = site.getRootPage().getChild("pages");
+ if (page != null)
+ {
+ processPage(page, true);
+ }
}
- LinkedList<String> identifiers = new LinkedList<String>(pageIdToUUIDs.values());
+ /*POMSession session = (POMSession) lifeCycle.getChromattic().openSession();
+ Iterator<Page> pages = session.findObjects(ObjectType.PAGE, ObjectType.PORTAL_SITE, null, null);
+ while (pages.hasNext())
+ {
+ Page page = pages.next();
+ pageIdToUUIDs.put(page.getName(), page.getObjectId());
+ }*/
+
+ LinkedList<String> identifiers = new LinkedList<String>(pageIdToUUIDs.keySet());
Collections.sort(identifiers);
return identifiers;
}
- private void processPage(Page page)
+ private void processPage(Page page, boolean ignoreCurrent)
{
+ if (!ignoreCurrent)
+ {
+ pageIdToUUIDs.put(page.getName(), page.getObjectId());
+ }
+
Collection<Page> children = page.getChildren();
if (ParameterValidation.existsAndIsNotEmpty(children))
{
for (Page child : children)
{
- pageIdToUUIDs.put(child.getName(), child.getObjectId());
- processPage(child);
+ processPage(child, false);
}
}
}
@@ -129,6 +149,15 @@
public void assignPortletToWindow(String portletId, String windowId, String pageId)
{
- throw new NotYetImplemented();
+ ChromatticSession session = lifeCycle.getChromattic().openSession();
+ String uuid = windowIdToUUIDs.get(windowId);
+ ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
+ UIWindow window = session.findById(UIWindow.class, uuid);
+ /*WSRP wsrp = new WSRP();
+ wsrp.setPortletId(portletId);
+ wsrp.setState();
+ window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);*/
+ Customization<?> customization = window.getCustomization();
+// window.customize()
}
}
Modified: portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
===================================================================
--- portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-09-13 13:25:39 UTC (rev 4173)
+++ portal/branches/wsrp2-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-09-13 13:40:17 UTC (rev 4174)
@@ -54,6 +54,7 @@
import org.gatein.wci.WebAppListener;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.registry.ActivatingNullInvokerHandler;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
import org.gatein.wsrp.producer.ProducerHolder;
@@ -227,6 +228,12 @@
consumerRegistry = new JCRConsumerRegistry(container);
consumerRegistry.setFederatingPortletInvoker(federatingPortletInvoker);
consumerRegistry.setSessionEventBroadcaster(sessionEventBroadcaster);
+
+ // migration service
+ MigrationService migrationService = new MigrationService();
+ migrationService.setStructureProvider(new MOPPortalStructureProvider(container));
+ consumerRegistry.setMigrationService(migrationService);
+
consumerRegistry.start();
// set up a NullInvokerHandler so that when a remote producer is queried, we can start it if needed
14 years, 4 months
gatein SVN: r4173 - in portal/branches/navcontroller: webui/portal/src/main/java/org/exoplatform/portal/url and 2 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-09-13 09:25:39 -0400 (Mon, 13 Sep 2010)
New Revision: 4173
Added:
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/component/
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/component/ComponentLocator.java
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceLocator.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java
Log:
rework the ResourceLocator interface
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceLocator.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceLocator.java 2010-09-13 13:15:25 UTC (rev 4172)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceLocator.java 2010-09-13 13:25:39 UTC (rev 4173)
@@ -19,8 +19,10 @@
package org.exoplatform.web.url;
-import java.io.IOException;
+import org.exoplatform.web.controller.QualifiedName;
+import java.util.Set;
+
/**
* <p>A locator for a resource.</p>
*
@@ -48,11 +50,18 @@
void setResource(R resource);
/**
- * Append the resource locator path.
+ * Returns the set of parameter names provided this locator.
*
- * @param appendable the appendable
- * @throws IOException any IOException thrown by the appendable
+ * @return the parameter names
*/
- void append(Appendable appendable) throws IOException;
+ Set<QualifiedName> getParameterNames();
+ /**
+ * Returns a specified parameter value or null when it is not available
+ *
+ * @param parameterName the parameter name
+ * @return the parameter value
+ */
+ String getParameterValue(QualifiedName parameterName);
+
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java 2010-09-13 13:15:25 UTC (rev 4172)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java 2010-09-13 13:25:39 UTC (rev 4173)
@@ -88,26 +88,19 @@
buffer.append("javascript:ajaxGet('");
}
- //
- StringBuilder builder = new StringBuilder();
- try
- {
- locator.append(builder);
- }
- catch (IOException e)
- {
- AssertionError ae = new AssertionError();
- ae.initCause(e);
- throw ae;
- }
-
// julien : find out how to change the hardcoded "classic"
Map<QualifiedName, String> parameters = new HashMap<QualifiedName, String>();
- parameters.put(PortalRequestHandler.REQUEST_PATH, builder.toString());
parameters.put(PortalRequestHandler.REQUEST_SITE_NAME, "classic");
parameters.put(WebAppController.HANDLER_PARAM, "portal");
//
+ for (QualifiedName parameterName : locator.getParameterNames())
+ {
+ String parameterValue = locator.getParameterValue(parameterName);
+ parameters.put(parameterName, parameterValue);
+ }
+
+ //
requestContext.getControllerContext().renderURL(parameters, renderContext);
//
Added: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/component/ComponentLocator.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/component/ComponentLocator.java (rev 0)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/component/ComponentLocator.java 2010-09-13 13:25:39 UTC (rev 4173)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.portal.url.component;
+
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.url.ResourceLocator;
+import org.exoplatform.webui.core.UIComponent;
+
+import java.util.Collections;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ComponentLocator implements ResourceLocator<UIComponent>
+{
+
+ /** . */
+ private UIComponent resource;
+
+ public UIComponent getResource()
+ {
+ return resource;
+ }
+
+ public void setResource(UIComponent resource)
+ {
+ this.resource = resource;
+ }
+
+ public Set<QualifiedName> getParameterNames()
+ {
+ return Collections.emptySet();
+ }
+
+ public String getParameterValue(QualifiedName parameterName)
+ {
+ return null;
+ }
+}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java 2010-09-13 13:15:25 UTC (rev 4172)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java 2010-09-13 13:25:39 UTC (rev 4173)
@@ -20,10 +20,12 @@
package org.exoplatform.portal.url.navigation;
import org.exoplatform.portal.config.model.PageNode;
+import org.exoplatform.web.controller.QualifiedName;
import org.exoplatform.web.url.ResourceLocator;
import org.exoplatform.web.url.ResourceType;
-import java.io.IOException;
+import java.util.Collections;
+import java.util.Set;
/**
* A resource locator for navigation nodes.
@@ -35,9 +37,15 @@
{
/** . */
+ public static final QualifiedName PATH = new QualifiedName("gtn", "path");
+
+ /** . */
public static final ResourceType<PageNode, NavigationLocator> TYPE = new ResourceType<PageNode, NavigationLocator>(){};
/** . */
+ private static final Set<QualifiedName> PARAMETER_NAMES = Collections.singleton(PATH);
+
+ /** . */
private PageNode resource;
public PageNode getResource()
@@ -50,8 +58,17 @@
this.resource = resource;
}
- public void append(Appendable appendable) throws IOException
+ public Set<QualifiedName> getParameterNames()
{
- appendable.append('/').append(resource.getUri());
+ return PARAMETER_NAMES;
}
+
+ public String getParameterValue(QualifiedName parameterName)
+ {
+ if (PATH.equals(parameterName))
+ {
+ return "/" + resource.getUri();
+ }
+ return null;
+ }
}
14 years, 4 months
gatein SVN: r4172 - components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-13 09:15:25 -0400 (Mon, 13 Sep 2010)
New Revision: 4172
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java
Log:
- Should compile properly now.
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java 2010-09-13 10:54:28 UTC (rev 4171)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java 2010-09-13 13:15:25 UTC (rev 4172)
@@ -30,6 +30,7 @@
import org.gatein.wsrp.consumer.ConsumerException;
import org.gatein.wsrp.consumer.EndpointConfigurationInfo;
import org.gatein.wsrp.consumer.ProducerInfo;
+import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
import java.util.ArrayList;
@@ -150,4 +151,14 @@
{
throw new UnsupportedOperationException();
}
+
+ public MigrationService getMigrationService()
+ {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public void setMigrationService(MigrationService migrationService)
+ {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
}
14 years, 4 months