Author: smilek
Date: Wed Feb 21 12:46:09 2007
New Revision: 510193
URL: http://svn.apache.org/viewvc?view=rev&rev=510193
Log:
removed support for desktop-themes and added support to retrieve decorations
(portlet and layout) which support jetspeed desktop
Modified:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/getthemes.vm
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/Constants.java
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetThemesAction.java
Modified:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/getthemes.vm
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/getthemes.vm?view=diff&rev=510193&r1=510192&r2=510193
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/getthemes.vm
(original)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/getthemes.vm
Wed Feb 21 12:46:09 2007
@@ -11,9 +11,15 @@
#if($velocityCount > 1),#end["$p", "$p"]
#end
]
-#elseif ($type == "desktopThemes")
+#elseif ($type == "desktopPageDecorations")
[
-#foreach($dt in $desktopThemes)
+#foreach($dt in $desktopPageDecorations)
+#if($velocityCount > 1),#end["$dt", "$dt"]
+#end
+]
+#elseif ($type == "desktopPortletDecorations")
+[
+#foreach($dt in $desktopPortletDecorations)
#if($velocityCount > 1),#end["$dt", "$dt"]
#end
]
@@ -43,10 +49,15 @@
<portlet-decoration>$p</portlet-decoration>
#end
</portlet-decorations>
- <desktop-themes>
-#foreach($dt in $desktopThemes)
- <desktop-theme>$dt</desktop-theme>
+ <desktop-page-decorations>
+#foreach($dt in $desktopPageDecorations)
+ <page-decoration>$dt</page-decoration>
#end
- </desktop-themes>
+ </desktop-page-decorations>
+ <desktop-portlet-decorations>
+#foreach($p in $desktopPortletDecorations)
+ <portlet-decoration>$p</portlet-decoration>
+#end
+ </desktop-portlet-decorations>
</js>
#end
Modified:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/Constants.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/Constants.java?view=diff&rev=510193&r1=510192&r2=510193
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/Constants.java
(original)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/Constants.java
Wed Feb 21 12:46:09 2007
@@ -28,6 +28,7 @@
public static final String ACTION = "action";
public static final String REASON = "reason";
public static final String PORTLETID = "id";
+ public static final String FRAGMENTID = "id";
public static final String PORTLETENTITY = "entity";
public static final String LAYOUTID = "layoutid";
public static final String WINDOW_STATE = "state";
@@ -72,10 +73,11 @@
public static final String PAGE_DECORATIONS = "pageDecorations";
public static final String PORTLET_DECORATIONS = "portletDecorations";
+ public static final String DESKTOP_PAGE_DECORATIONS =
"desktopPageDecorations";
+ public static final String DESKTOP_PORTLET_DECORATIONS =
"desktopPortletDecorations";
public static final String LAYOUTS = "layouts";
public static final String LAYOUT = "layout";
public static final String DEFAULT_LAYOUT = "defaultLayout";
- public static final String DESKTOP_THEMES = "desktopThemes";
public static final String TITLE = "title";
public static final String SHORT_TITLE = "short-title";
public static final String LINK = "link";
Modified:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetThemesAction.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetThemesAction.java?view=diff&rev=510193&r1=510192&r2=510193
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetThemesAction.java
(original)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetThemesAction.java
Wed Feb 21 12:46:09 2007
@@ -28,7 +28,7 @@
/**
* Get Portal-wide themes lists
- * (page decorators, portlet decorators, layouts, desktop-themes (skins))
+ * (page decorators, portlet decorators, layouts, desktop-page-decorators,
desktop-portlet-decorators)
*
* AJAX Parameters:
* none
@@ -52,39 +52,41 @@
this.decorationFactory = decorationFactory;
}
- public boolean run(RequestContext requestContext, Map resultMap)
+ public boolean run( RequestContext requestContext, Map resultMap )
{
boolean success = true;
String status = "success";
try
{
- resultMap.put(ACTION, "getthemes");
- if (false == checkAccess(requestContext, JetspeedActions.VIEW))
+ resultMap.put( ACTION, "getthemes" );
+ if (false == checkAccess( requestContext, JetspeedActions.VIEW ) )
{
success = false;
- resultMap.put(REASON, "Insufficient access to get themes");
+ resultMap.put( REASON, "Insufficient access to get themes"
);
return success;
}
- String type = getActionParameter(requestContext, TYPE);
- String format = getActionParameter(requestContext, FORMAT);
+ String type = getActionParameter(requestContext, TYPE );
+ String format = getActionParameter(requestContext, FORMAT );
if (format == null)
format = "xml";
- if (type == null || type.equals(PAGE_DECORATIONS))
- resultMap.put(PAGE_DECORATIONS,
decorationFactory.getPageDecorations(requestContext));
- if (type == null || type.equals(PORTLET_DECORATIONS))
- resultMap.put(PORTLET_DECORATIONS,
decorationFactory.getPortletDecorations(requestContext));
- if (type == null || type.equals(LAYOUTS))
- resultMap.put(LAYOUTS,
decorationFactory.getLayouts(requestContext));
- if (type == null || type.equals(DESKTOP_THEMES))
- resultMap.put(DESKTOP_THEMES,
decorationFactory.getDesktopThemes(requestContext));
- resultMap.put (TYPE, type);
- resultMap.put(FORMAT, format);
- resultMap.put(STATUS, status);
+ if (type == null || type.equals( PAGE_DECORATIONS ) )
+ resultMap.put( PAGE_DECORATIONS,
decorationFactory.getPageDecorations( requestContext ) );
+ if (type == null || type.equals( PORTLET_DECORATIONS ) )
+ resultMap.put( PORTLET_DECORATIONS,
decorationFactory.getPortletDecorations( requestContext ) );
+ if (type == null || type.equals( LAYOUTS ) )
+ resultMap.put( LAYOUTS, decorationFactory.getLayouts(
requestContext ) );
+ if (type == null || type.equals( DESKTOP_PAGE_DECORATIONS) )
+ resultMap.put( DESKTOP_PAGE_DECORATIONS,
decorationFactory.getDesktopPageDecorations( requestContext ) );
+ if (type == null || type.equals( DESKTOP_PORTLET_DECORATIONS ) )
+ resultMap.put( DESKTOP_PORTLET_DECORATIONS,
decorationFactory.getDesktopPortletDecorations( requestContext ) );
+ resultMap.put( TYPE, type );
+ resultMap.put( FORMAT, format );
+ resultMap.put( STATUS, status );
}
catch (Exception e)
{
// Log the exception
- log.error("exception while getting theme info", e);
+ log.error( "exception while getting theme info", e );
// Return a failure indicator
success = false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]