[gatein-commits] gatein SVN: r1802 - portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Feb 22 08:33:49 EST 2010
Author: chris.laprun at jboss.com
Date: 2010-02-22 08:33:49 -0500 (Mon, 22 Feb 2010)
New Revision: 1802
Modified:
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
Log:
- GTNPORTAL-711: added (remote) suffix to remote portlet display names.
Modified: portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
--- portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-02-22 13:29:58 UTC (rev 1801)
+++ portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-02-22 13:33:49 UTC (rev 1802)
@@ -79,6 +79,7 @@
/** . */
final POMSessionManager mopManager;
+ private static final String REMOTE_DISPLAY_NAME_SUFFIX = " (remote)";
public ApplicationRegistryServiceImpl(ChromatticManager manager, POMSessionManager mopManager)
{
@@ -447,7 +448,8 @@
}
// Additionally categorise the portlet as remote
- if (portlet.isRemote())
+ boolean remote = portlet.isRemote();
+ if (remote)
{
categoryNames.add(REMOTE_CATEGORY_NAME);
}
@@ -471,14 +473,19 @@
ContentDefinition app = category.getContentMap().get(portletName);
if (app == null)
{
- LocalizedString descriptionLS = portlet.getInfo().getMeta().getMetaValue(MetaInfo.DESCRIPTION);
- LocalizedString displayNameLS = portlet.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
+ MetaInfo metaInfo = portlet.getInfo().getMeta();
+ LocalizedString descriptionLS = metaInfo.getMetaValue(MetaInfo.DESCRIPTION);
+
+ LocalizedString displayNameLS = metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME);
+ String displayName = getLocalizedStringValue(displayNameLS, portletName);
+
ContentType<?> contentType;
String contentId;
- if (portlet.isRemote())
+ if (remote)
{
contentType = WSRP.CONTENT_TYPE;
contentId = portlet.getContext().getId();
+ displayName += REMOTE_DISPLAY_NAME_SUFFIX; // add remote to display name to make it more obvious that the portlet is remote
}
else
{
@@ -488,7 +495,7 @@
//
app = category.createContent(portletName, contentType, contentId);
- app.setDisplayName(getLocalizedStringValue(displayNameLS, portletName));
+ app.setDisplayName(displayName);
app.setDescription(getLocalizedStringValue(descriptionLS, portletName));
}
}
More information about the gatein-commits
mailing list