Author: taylor
Date: Fri Mar 27 22:53:36 2009
New Revision: 759380
URL: http://svn.apache.org/viewvc?rev=759380&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-942
backport: handle case when no decorations found due to root folder.metadata
<defaults> tag removed.
Modified:
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/portal/src/java/org/apache/jetspeed/decoration/DecorationFactoryImpl.java
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/decoration/DecorationFactory.java
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/desktop.xml
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/theme-engine.xml
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/conf/jetspeed.properties
Modified:
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/portal/src/java/org/apache/jetspeed/decoration/DecorationFactoryImpl.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/portal/src/java/org/apache/jetspeed/decoration/DecorationFactoryImpl.java?rev=759380&r1=759379&r2=759380&view=diff
==============================================================================
---
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/portal/src/java/org/apache/jetspeed/decoration/DecorationFactoryImpl.java
(original)
+++
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/portal/src/java/org/apache/jetspeed/decoration/DecorationFactoryImpl.java
Fri Mar 27 22:53:36 2009
@@ -72,6 +72,8 @@
private String defaultDesktopLayoutDecoration = null;
private String defaultDesktopPortletDecoration = null;
+ private String defaultLayoutDecoration = null;
+ private String defaultPortletDecoration = null;
private Set layoutDecorationsDir = Collections.EMPTY_SET;
private Set portletDecorationsDir = Collections.EMPTY_SET;
@@ -89,20 +91,22 @@
public DecorationFactoryImpl( String decorationsPath,
ResourceValidator validator )
{
- this( null, decorationsPath, validator, null );
+ this( null, decorationsPath, validator, null, null, null);
}
public DecorationFactoryImpl( String decorationsPath,
ResourceValidator validator,
JetspeedCache decorationConfigurationCache )
{
- this( null, decorationsPath, validator, decorationConfigurationCache );
+ this( null, decorationsPath, validator, decorationConfigurationCache,
null, null );
}
public DecorationFactoryImpl( PortletRegistry registry,
String decorationsPath,
ResourceValidator validator,
- JetspeedCache decorationConfigurationCache )
+ JetspeedCache decorationConfigurationCache,
+ String defLayoutDecoration,
+ String defPortletDecoration)
{
this.registry = registry;
this.decorationsPath = new Path( decorationsPath );
@@ -112,6 +116,8 @@
this.portletDecorationsPathStr =
this.portletDecorationsPath.toString();
this.validator = validator;
this.decorationConfigurationCache = decorationConfigurationCache;
+ this.defaultLayoutDecoration = defLayoutDecoration;
+ this.defaultPortletDecoration = defPortletDecoration;
}
public ResourceValidator getResourceValidator()
@@ -430,6 +436,10 @@
{
// use page specified layout decorator name
decoration =
page.getEffectiveDefaultDecorator(Fragment.LAYOUT);
+ if (decoration == null)
+ {
+ decoration = this.defaultLayoutDecoration;
+ }
}
else
{
@@ -441,9 +451,12 @@
{
// use page specified default portlet decorator name
decoration =
page.getEffectiveDefaultDecorator(Fragment.PORTLET);
+ if (decoration == null)
+ {
+ decoration = this.defaultPortletDecoration;
+ }
}
}
-
return decoration;
}
@@ -621,4 +634,14 @@
this.defaultDesktopPortletDecoration = newOne;
}
}
+
+ public String getDefaultPortletDecoration()
+ {
+ return this.defaultPortletDecoration;
+ }
+
+ public String getDefaultLayoutDecoration()
+ {
+ return this.defaultLayoutDecoration;
+ }
}
Modified:
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/decoration/DecorationFactory.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/decoration/DecorationFactory.java?rev=759380&r1=759379&r2=759380&view=diff
==============================================================================
---
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/decoration/DecorationFactory.java
(original)
+++
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/decoration/DecorationFactory.java
Fri Mar 27 22:53:36 2009
@@ -203,4 +203,20 @@
* selected portlet decoration does not support /desktop.
*/
void setDefaultDesktopPortletDecoration( String newOne );
+
+ /**
+ * Get the default portal portlet decoration to be used when
+ * selected portlet decoration does not support /portal.
+ *
+ * @return default desktop portlet decoration.
+ */
+ String getDefaultPortletDecoration();
+
+ /**
+ * Get the default portlet layout decoration to be used when
+ * selected layout decoration does not support /portal.
+ *
+ * @return default desktop layout decoration.
+ */
+ String getDefaultLayoutDecoration();
}
Modified:
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/desktop.xml
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/desktop.xml?rev=759380&r1=759379&r2=759380&view=diff
==============================================================================
---
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/desktop.xml
(original)
+++
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/desktop.xml
Fri Mar 27 22:53:36 2009
@@ -44,10 +44,10 @@
supports the settings 'desktop.decoration.layout' and
'desktop.decoration.portlet', which if
specified, override the values set here -->
<constructor-arg index="5"> <!-- default desktop layout decoration
-->
- <value>tigris</value>
+ <value>${decorator.desktop.page.default}</value>
</constructor-arg>
<constructor-arg index="6"> <!-- default desktop portlet decoration
-->
- <value>tigris</value>
+ <value>${decorator.desktop.portlet.default}</value>
</constructor-arg>
<!-- Uncomment this to HARD CODE your portal URL -->
Modified:
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/theme-engine.xml
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/theme-engine.xml?rev=759380&r1=759379&r2=759380&view=diff
==============================================================================
---
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/theme-engine.xml
(original)
+++
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/theme-engine.xml
Fri Mar 27 22:53:36 2009
@@ -34,6 +34,12 @@
<constructor-arg index="3">
<ref bean="decorationConfigurationCache" />
</constructor-arg>
+ <constructor-arg index="4"><!-- default layout decoration -->
+ <value>${decorator.page.default}</value>
+ </constructor-arg>
+ <constructor-arg index="5"><!-- default portlet decoration -->
+ <value>${decorator.portlet.default}</value>
+ </constructor-arg>
</bean>
</beans>
Modified:
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/conf/jetspeed.properties
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/conf/jetspeed.properties?rev=759380&r1=759379&r2=759380&view=diff
==============================================================================
---
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/conf/jetspeed.properties
(original)
+++
portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/conf/jetspeed.properties
Fri Mar 27 22:53:36 2009
@@ -203,6 +203,10 @@
decorator.page.default = tigris
# default portlet decorator if none specified
decorator.portlet.default = tigris
+# Desktop: default page decorator if none specified
+decorator.desktop.page.default = tigris
+# Desktop: default portlet decorator if none specified
+decorator.desktop.portlet.default = tigris
#-------------------------------------------------------------------------
# P S M L
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]