. RSS Feed logo now shown on the main Browse screen for a space if it has a feed template applied

. Fixed TemplateContentServlet to allow addition URL elements to specify filename for output stream

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3539 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-08-17 16:31:45 +00:00
parent 08fd4699f5
commit 592b1da0ce
4 changed files with 52 additions and 9 deletions

View File

@@ -471,18 +471,41 @@ public class SpaceDetailsBean extends BaseDetailsBean
*/
public boolean isRSSFeed()
{
return (getSpace().hasAspect(ContentModel.ASPECT_FEEDSOURCE) &&
getSpace().getProperties().get(ContentModel.PROP_FEEDTEMPLATE) != null);
return hasRSSFeed(getSpace());
}
/**
* @return true if the current space has an RSS feed applied
*/
public static boolean hasRSSFeed(Node space)
{
return (space.hasAspect(ContentModel.ASPECT_FEEDSOURCE) &&
space.getProperties().get(ContentModel.PROP_FEEDTEMPLATE) != null);
}
/**
* @return RSS Feed URL for the current space
*/
public String getRSSFeedURL()
{
// build RSS feed template URL from selected template and current space NodeRef and
return buildRSSFeedURL(getSpace());
}
/**
* Build URL for an RSS space based on the 'feedsource' aspect property.
*
* @param space Node to build RSS template URL for
*
* @return URL for the RSS feed for a space
*/
public static String buildRSSFeedURL(Node space)
{
// build RSS feed template URL from selected template and the space NodeRef and
// add the guest=true URL parameter - this is required for no login access and
// add the mimetype=text/xml URL parameter - required to return correct stream type
return TemplateContentServlet.generateURL(getSpace().getNodeRef(),
(NodeRef)getSpace().getProperties().get(ContentModel.PROP_FEEDTEMPLATE))
+ "?guest=true" + "&mimetype=text%2Fxml";
return TemplateContentServlet.generateURL(space.getNodeRef(),
(NodeRef)space.getProperties().get(ContentModel.PROP_FEEDTEMPLATE))
+ "/rss.xml?guest=true" + "&mimetype=text%2Fxml";
}
/**