Author: julien_viet
Date: 2011-08-16 05:51:44 -0400 (Tue, 16 Aug 2011)
New Revision: 7148
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationContext.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationId.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
Log:
more work
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-16
09:13:51 UTC (rev 7147)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-16
09:51:44 UTC (rev 7148)
@@ -544,9 +544,10 @@
}
else if (ManagedContent.class.equals(type))
{
- final String categoryId = id.getComponent(CATEGORY_COMPONENT);
- final Category category = get(categoryId(categoryId));
- result = category.getManagedContent(id.getComponent("name"));
+// final String categoryId = id.getComponent(CATEGORY_COMPONENT);
+// final Category category = get(categoryId(categoryId));
+// result = category.getManagedContent(id.getComponent("name"));
+ throw new UnsupportedOperationException("disabled");
}
else if (Navigation.class.equals(type))
{
@@ -562,20 +563,18 @@
public Site getSite(Site.Id siteId)
{
- final String siteType = siteId.getComponent(SITE_TYPE_COMPONENT);
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(siteType, "Site
type", "A valid Site Id");
-
- if (Site.PORTAL_TYPE_NAME.equals(siteType))
+ Type<Site> siteType = siteId.getType();
+ if (Site.PORTAL == siteType)
{
return getPortal(siteId);
}
- else if (Site.GROUP_TYPE_NAME.equals(siteType))
+ else if (Site.GROUP == siteType)
{
- return getGroupSite(siteId.getComponent(SITE_NAME_COMPONENT));
+ return getGroupSite(siteId.getName());
}
- else if (Site.DASHBOARD_TYPE_NAME.equals(siteType))
+ else if (Site.DASHBOARD == siteType)
{
- return getDashboard(siteId.getComponent(SITE_NAME_COMPONENT));
+ return getDashboard(siteId.getName());
}
else
{
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-16
09:13:51 UTC (rev 7147)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-08-16
09:51:44 UTC (rev 7148)
@@ -237,6 +237,7 @@
{
PortletContext portletContext;
Object regitryItem;
+/*
if (!id.knowsComponent(GateInImpl.INVOKER_COMPONENT))
{
portletContext =
PortletContext.createPortletContext(id.getComponent(GateInImpl.APPLICATION_COMPONENT),
id.getComponent(GateInImpl.PORTLET_COMPONENT));
@@ -248,6 +249,8 @@
regitryItem = gateIn.getPortletInvoker().getPortlet(portletContext);
}
return regitryItem;
+*/
+ throw new UnsupportedOperationException("disabled for now");
}
private <T extends Content> Content newContentFrom(Id id, Object registryItem,
Class<T> wanted)
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationContext.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationContext.java 2011-08-16
09:13:51 UTC (rev 7147)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationContext.java 2011-08-16
09:51:44 UTC (rev 7148)
@@ -23,15 +23,13 @@
package org.gatein.portal.api.impl.id;
import org.gatein.api.content.Portlet;
-import org.gatein.api.id.Context;
import org.gatein.api.id.Id;
import org.gatein.api.id.Identifiable;
import org.gatein.portal.api.impl.GateInImpl;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a> */
-public class ComplexApplicationContext implements Context
+public class ComplexApplicationContext // implements Context
{
- public static final Context INSTANCE = new ComplexApplicationContext();
public String getName()
{
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationId.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationId.java 2011-08-16
09:13:51 UTC (rev 7147)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/id/ComplexApplicationId.java 2011-08-16
09:51:44 UTC (rev 7148)
@@ -23,9 +23,7 @@
package org.gatein.portal.api.impl.id;
import org.gatein.api.content.Portlet;
-import org.gatein.api.id.Context;
import org.gatein.api.id.Id;
-import org.gatein.api.id.RenderingContext;
import org.gatein.portal.api.impl.GateInImpl;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a> */
@@ -36,7 +34,7 @@
private final String category;
private final String app;
private final String portlet;
- private final Context context;
+// private final Context context;
private final String separator;
public ComplexApplicationId(String category, String appName, String portletName,
String separator, ComplexApplicationContext context)
@@ -44,19 +42,19 @@
this.category = category;
this.app = appName;
this.portlet = portletName;
- this.context = context;
+// this.context = context;
this.separator = separator;
}
@Override
public String toString()
{
- return toString(context);
+ return toString(null);
}
- public String toString(RenderingContext context)
+ public String toString(Object context)
{
- if (this.context.equals(context))
+ if (false != true)
{
if ("/".equals(separator))
{
@@ -148,11 +146,6 @@
}
}
- public Context getOriginalContext()
- {
- return context;
- }
-
public int getComponentNumber()
{
return 4;
@@ -180,7 +173,7 @@
public boolean knowsComponent(String name)
{
- return context.hasComponent(name);
+ return false;
}
public int compareTo(Id o)
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-08-16
09:13:51 UTC (rev 7147)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-08-16
09:51:44 UTC (rev 7148)
@@ -284,8 +284,8 @@
Locale locale = getUserLocale();
bundle = rbMgr.getNavigationResourceBundle(
locale.getLanguage(),
- site.getId().getComponent(GateInImpl.SITE_TYPE_COMPONENT),
- site.getId().getComponent(GateInImpl.SITE_NAME_COMPONENT));
+ site.getId().getType().getName(),
+ site.getId().getName());
if (bundle == null)
{
Show replies by date