Author: chris.laprun(a)jboss.com
Date: 2011-08-09 04:23:32 -0400 (Tue, 09 Aug 2011)
New Revision: 7020
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
Log:
- Added TODOs to point at optimization opportunities.
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-09
08:21:51 UTC (rev 7019)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-08-09
08:23:32 UTC (rev 7020)
@@ -510,8 +510,9 @@
Id<Site> siteId = (Id<Site>)id;
result = getSite(siteId, null);
}
- else if (Content.class.equals(type))
+ else if (Content.class.isAssignableFrom(type))
{
+ // todo: split by types and optimize by calling portlet invoker or gadget
registry directly
final IterableIdentifiableCollection<Portal> portals = getPortals();
for (Portal portal : portals)
{
@@ -524,6 +525,7 @@
}
else if (Category.class.equals(type))
{
+ // todo: optimize by adding portal id to category id (so that appropriate
content registry can be retrieved) and calling application registry directly
final IterableIdentifiableCollection<Portal> portals = getPortals();
for (Portal portal : portals)
{
@@ -545,7 +547,7 @@
final String siteStringId = id.getComponent(NAVIGATION_SITE_COMPONENT);
final Id<Site> siteId = SITE_CONTEXT.parse(siteStringId, Site.class);
final Site site = getSite(siteId, null);
- result = site.getNavigation().get(id.toString()); //todo: this probably
doesn't work correctly
+ result = site.getNavigation().get(id.getComponent(NAVIGATION_COMPONENT));
//todo: this probably doesn't work correctly
}
else
{
Show replies by date