[jboss-svn-commits] JBL Code SVN: r5818 - in labs/shotoku/trunk: . cms-template cms-template/feeds cms-template/feeds/templates cms-template/file-access cms-template/shotoku-admin

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Aug 12 07:04:07 EDT 2006


Author: adamw
Date: 2006-08-12 07:04:03 -0400 (Sat, 12 Aug 2006)
New Revision: 5818

Added:
   labs/shotoku/trunk/cms-template/
   labs/shotoku/trunk/cms-template/feeds/
   labs/shotoku/trunk/cms-template/feeds/feeds.properties
   labs/shotoku/trunk/cms-template/feeds/templates/
   labs/shotoku/trunk/cms-template/feeds/templates/atom-normal.vm
   labs/shotoku/trunk/cms-template/feeds/templates/atom-podcast.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rdf-normal.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rdf-podcast.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-comments.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-normal.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-podcast.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_res.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_tags.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-resource.vm
   labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-tags.vm
   labs/shotoku/trunk/cms-template/file-access/
   labs/shotoku/trunk/cms-template/file-access/file-access.properties
   labs/shotoku/trunk/cms-template/file-access/listing.jsp
   labs/shotoku/trunk/cms-template/file-access/normal.jsp
   labs/shotoku/trunk/cms-template/shotoku-admin/
   labs/shotoku/trunk/cms-template/shotoku-admin/services.jsp
Log:
CMS template

Added: labs/shotoku/trunk/cms-template/feeds/feeds.properties
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/feeds.properties	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/feeds.properties	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,18 @@
+# Each property is prefixed with a feeds configuration id - you can have
+# several separate and individual configurations of feeds.
+
+# Variables that will be resolved and for each variable a resolver class, which
+# should implement org.jboss.shotoku.feeds.variables.VariableResolver and have
+# a one-parameter constructor: org.w3c.dom.Node.
+default.variables = ${type}
+default.variable.${type} = org.jboss.shotoku.feeds.variables.XmlNodeTypeVariableResolver
+
+# Content manager and directory for feed definiton xml files (in shotoku).
+default.xml.cmid = default
+default.xml.directory = /feeds
+
+# Used by the view servlet/ portlet to determine, basing on the request, what
+# feed shold be displayed. This shold be a class implementing the interface
+# org.jboss.shotoku.feeds.portlet.getter.ViewFeedGetter and have a no-parameter
+# constructor.
+default.view.getter = org.jboss.shotoku.feeds.portlet.getter.StandardFeedGetter

Added: labs/shotoku/trunk/cms-template/feeds/templates/atom-normal.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/atom-normal.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/atom-normal.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en">
+	<title mode="escaped">$escape.all($title)</title>
+	<link rel="alternate" type="text/html" href="$link"/>
+
+	<modified>$rdfDateFormat.format($nodesYoungest)</modified>
+
+	<info type="application/xhtml+xml" mode="xml">
+		<div xmlns="http://www.w3.org/1999/xhtml">
+		This is an Atom syndication feed. It is intended to be viewed in a news aggregator or syndicated to
+		another site.  Please visit the <a href="http://intertwingly.net/wiki/pie/">Atom Project</a> for
+		more information.
+		</div>
+	</info>
+
+	<generator url="http://labs.jboss.com/shotoku" version="1.0">Shotoku</generator>
+	<copyright mode="escaped">Copyright &#169; 2005 JBoss Labs</copyright>
+
+	<author>
+		<name>$author</name>
+	</author>
+
+	<id>$link</id>
+
+	#foreach($node in $nodes)
+	#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+	<entry>
+		<title>$escape.all($node.getProperty("title"))</title>
+		<link>$nodeLink</link>
+		<link rel="alternate" type="text/html" href="$nodeLink"/>
+
+		<modified>$rdfDateFormat.format($node.getCreatedDate())</modified>
+		<issued>$rdfDateFormat.format($node.getCreatedDate())</issued>
+		<created>$rdfDateFormat.format($node.getCreatedDate())</created>
+		<id>$nodeLink</id>
+
+		<content type="text/html" mode="escaped" xml:lang="en">
+			$escape.all($node.getContent())
+		</content>
+	</entry>
+	#end
+</feed>

Added: labs/shotoku/trunk/cms-template/feeds/templates/atom-podcast.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/atom-podcast.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/atom-podcast.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en">
+	<title mode="escaped">$escape.all($title)</title>
+	<link rel="alternate" type="text/html" href="$link"/>
+
+	<modified>$rdfDateFormat.format($nodesYoungest)</modified>
+
+	<info type="application/xhtml+xml" mode="xml">
+		<div xmlns="http://www.w3.org/1999/xhtml">
+		This is an Atom syndication feed. It is intended to be viewed in a news aggregator or syndicated to
+		another site.  Please visit the <a href="http://intertwingly.net/wiki/pie/">Atom Project</a> for
+		more information.
+		</div>
+	</info>
+
+	<generator url="http://labs.jboss.com/shotoku" version="1.0">Shotoku</generator>
+	<copyright mode="escaped">Copyright &#169; 2005 JBoss Labs</copyright>
+
+	<author>
+		<name>$author</name>
+	</author>
+
+	<id>$link</id>
+
+	#foreach($node in $nodes)
+	#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+	<entry>
+		<title>$escape.all($node.getProperty("title"))</title>
+		<link>$nodeLink</link>
+		<link rel="alternate" type="text/html" href="$nodeLink"/>
+
+		<updated>$rdfDateFormat.format($node.getCreatedDate())</updated>
+		<id>$nodeLink</id>
+
+		<content type="text/html" mode="escaped" xml:lang="en">
+			$escape.all($node.getProperty("description"))
+		</content>
+
+		<link rel="enclosure" length="$node.getLength()" href="$nodeLink" type="$node.getMimeType()" />
+	</entry>
+	#end
+</feed>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rdf-normal.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rdf-normal.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rdf-normal.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<rdf:RDF
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns="http://purl.org/rss/1.0/">
+
+<channel rdf:about="$link">
+	<title>$escape.all($title)</title>
+	<link>$link</link>
+	<description>
+		$escape.all($description)
+	</description>
+	<dc:date>$rdfDateFormat.format($nodesYoungest)</dc:date>
+	<dc:creator>$author</dc:creator>
+	<dc:language>en</dc:language>
+
+	<items>
+		<rdf:Seq>
+		#foreach($node in $nodes)
+		#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+			<rdf:li resource="$nodeLink" />
+		#end
+		</rdf:Seq>
+	</items>
+</channel>
+
+	#foreach($node in $nodes)
+	#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+	<item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html">
+		<title>$escape.all($node.getProperty("title"))</title>
+		<link>$nodeLink</link>
+		<description>
+			$escape.all($node.getContent())
+		</description>
+		<dc:date>$rdfDateFormat.format($node.getCreatedDate())</dc:date>
+	</item>
+	#end
+</rdf:RDF>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rdf-podcast.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rdf-podcast.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rdf-podcast.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+
+<rdf:RDF
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:enc="http://purl.oclc.org/net/rss_2.0/enc#"
+	xmlns="http://purl.org/rss/1.0/">
+
+<channel rdf:about="$link">
+	<title>$escape.all($title)</title>
+	<link>$link</link>
+	<description>
+		$escape.all($description)
+	</description>
+	<dc:date>$rdfDateFormat.format($nodesYoungest)</dc:date>
+	<dc:creator>$author</dc:creator>
+	<dc:language>en</dc:language>
+
+	<items>
+		<rdf:Seq>
+		#foreach($node in $nodes)
+		#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+			<rdf:li resource="$nodeLink" />
+		#end
+		</rdf:Seq>
+	</items>
+</channel>
+
+	#foreach($node in $nodes)
+	#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+	<item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html">
+		<title>$escape.all($node.getProperty("title"))</title>
+		<link>$nodeLink</link>
+		<description>
+			$escape.all($node.getProperty("description"))
+		</description>
+		<dc:date>$rdfDateFormat.format($node.getLastModificationDate())</dc:date>
+
+		<enc:enclosure>
+			<enc:Enclosure>
+				<enc:type>$node.getMimeType()</enc:type>
+				<enc:length>$node.getLength()</enc:length>
+				<enc:url>$nodeLink</enc:url>
+			</enc:Enclosure>
+		</enc:enclosure>
+	</item>
+	#end
+</rdf:RDF>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-comments.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-comments.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-comments.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+	        <title>Comments for: $escape.all($commented.getProperty("title"))</title>
+        	<link>$link</link>
+	        <description>A feed of comments for a blog entry.</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor>$author</managingEditor>
+		<webMaster>$author</webMaster>
+		<pubDate>$rssDateFormat.format($youngest)</pubDate>
+
+		#foreach($node in $nodes)
+		#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+		<item>
+			<title>$escape.all($node.getProperty("title"))</title>
+			<author>$escape.all($node.getProperty("author"))</author>
+			<link>$nodeLink</link>
+			<description>$escape.all($node.getContent())</description>
+			<guid>$nodeLink</guid>
+			<pubDate>$rssDateFormat.format($node.getCreatedDate())</pubDate>
+		</item>
+		#end
+	
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-normal.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-normal.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-normal.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+	        <title>$escape.all($title)</title>
+        	<link>$link</link>
+	        <description>$escape.all($description)</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor>$author</managingEditor>
+		<webMaster>$author</webMaster>
+		<pubDate>$rssDateFormat.format($nodesYoungest)</pubDate>
+
+		#foreach($node in $nodes)
+		#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+		<item>
+			<title>$escape.all($node.getProperty("title"))</title>
+			<link>$nodeLink</link>
+			<description>$escape.all($node.getContent())</description>
+			<guid>$baseServerAddress/$node.getFullName()</guid>
+				
+			#if($commentsEnabled == "true")
+			<wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">
+			$baseServerAddress$commentsService.getCommentFeedLink($name, $node.getFullName(), "rss2")
+			</wfw:commentRss>
+			#end
+			
+			<pubDate>$rssDateFormat.format($node.getCreatedDate())</pubDate>
+		</item>
+		#end
+	
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-podcast.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-podcast.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-podcast.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<rss version="2.0" xmlns:itunes="http://example.com/DTDs/Podcast-1.0.dtd">
+	<channel>
+	        <title>$title</title>
+        	<link>$link</link>
+	        <description>$description</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor></managingEditor>
+		<webMaster></webMaster>
+		<pubDate>$rssDateFormat.format($nodesYoungest)</pubDate>
+
+		<itunes:summary>$description</itunes:summary>
+		<itunes:author>$author</itunes:author>
+
+		#foreach($node in $nodes)
+		#set($nodeLink="$baseServerAddress/$linkBase/$node.getName()")
+		<item>
+			<title>$node.getProperty("title")</title>
+			<link>$nodeLink</link>
+			<description>$node.getProperty("description")</description>
+			<guid>$nodeLink</guid>
+			<pubDate>$rssDateFormat.format($node.getCreatedDate())</pubDate>
+			
+			<enclosure url="$nodeLink" length="$node.getLength()" type="$node.getMimeType()" />
+			
+			#set($thumbnail=$node.getProperty("thumbnail"))
+			#if($thumbnail)
+				<image>
+					<title>$node.getProperty("title")</title>
+					<url>$baseServerAddress/$thumbnail</url>
+				</image>
+
+				<itunes:image href="$baseServerAddress/$thumbnail" />
+			#end
+			
+			<itunes:summary>$node.getProperty("description")</itunes:summary>
+			
+			#if($node.getProperty("author"))
+				<itunes:author>$node.getProperty("author")</itunes:author>
+			#end
+
+			#if($node.getProperty("duration"))
+				<itunes:duration>$node.getProperty("duration")</itunes:duration>
+			#end
+			
+			#if($node.getProperty("subtitle"))
+				<itunes:subtitle>$node.getProperty("subtitle")</itunes:subtitle>
+			#end
+
+			#if($node.getProperty("keywords"))
+				<itunes:keywords>$node.getProperty("keywords")</itunes:keywords>
+			#end
+		</item>
+		#end
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+	        <title>Feed of tagged resources by $escape.all($author)</title>
+	        <description>A feed of all tags by author</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor>$author</managingEditor>
+		<webMaster>$author</webMaster>
+		<pubDate>$rssDateFormat.format($youngest)</pubDate>
+
+		#foreach($tag in $tags)
+		<item>
+			<title>$escape.all($tag.getName())</title>
+			<link>$linkbase$parser.parseLink($tag.getResourceId(), $tag.getType())</link>
+			<description>$tag.getData()</description>
+			<pubDate>$rssDateFormat.format($tag.getDateCreated())</pubDate>
+		</item>
+		#end
+	
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_res.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_res.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_res.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+	        <title>Feed of resources tagged with $escape.all($tagName) by $escape.all($author)</title>
+	        <description>A feed of all resources tagged with a given tag by a given author</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor>$author</managingEditor>
+		<webMaster>$author</webMaster>
+		<pubDate>$rssDateFormat.format($youngest)</pubDate>
+
+		#foreach($tag in $tags)
+		<item>
+			<title>$escape.all($tag.getName())</title>
+			<link>$linkbase$parser.parseLink($tag.getResourceId(), $tag.getType())</link>
+			<description>$tag.getData()</description>
+			<pubDate>$rssDateFormat.format($tag.getDateCreated())</pubDate>
+		</item>
+		#end
+	
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_tags.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_tags.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-author_tags.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+	        <title>Feed of tags created by $escape.all($author)</title>
+	        <description>A feed of unique tags by author</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor>$author</managingEditor>
+		<webMaster>$author</webMaster>
+		<pubDate>$rssDateFormat.format($youngest)</pubDate>
+
+		#foreach($tag in $tags)
+		<item>
+			<title>$escape.all($tag.getName())</title>
+			<link>$linkbase/feeds/tag/tags/$tag.getName()/rss2</link>
+			<description></description>
+			<pubDate>$rssDateFormat.format($tag.getDateCreated())</pubDate>
+		</item>
+		#end
+	
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-resource.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-resource.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-resource.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+	        <title>Tag feed for resource $escape.all($resource)</title>
+	        <description>A feed of tag changes for a resource</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor>$author</managingEditor>
+		<webMaster>$author</webMaster>
+		<pubDate>$rssDateFormat.format($youngest)</pubDate>
+
+		#foreach($tag in $tags)
+		<item>
+			<title>$escape.all($tag.getName())</title>
+			<link>$linkbase/feeds/tag/tags/$tag.getName()/rss2</link>
+			<description>$tag.getData()</description>
+			<pubDate>$rssDateFormat.format($tag.getDateCreated())</pubDate>
+		</item>
+		#end
+	
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-tags.vm
===================================================================
--- labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-tags.vm	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/feeds/templates/rss2-tags-tags.vm	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+	        <title>Tag feed for tags: $escape.all($tagsAsString)</title>
+	        <description>A feed of tags</description>
+        	<language>en</language>
+	        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Shotoku</generator>
+		<managingEditor>$author</managingEditor>
+		<webMaster>$author</webMaster>
+		<pubDate>$rssDateFormat.format($youngest)</pubDate>
+
+		#foreach($tag in $tags)
+		<item>
+			<title>$escape.all($tag.getName())</title>
+			<link>$linkbase$parser.parseLink($tag.getResourceId(), $tag.getType())</link>
+			<description>$tag.getResourceId()</description>
+			<pubDate>$rssDateFormat.format($tag.getDateCreated())</pubDate>
+		</item>
+		#end
+	
+	</channel>
+</rss>

Added: labs/shotoku/trunk/cms-template/file-access/file-access.properties
===================================================================
--- labs/shotoku/trunk/cms-template/file-access/file-access.properties	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/file-access/file-access.properties	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,13 @@
+# A list of classes, each implementing FileAccessMonitor, which will be used 
+# when a resource is requested. Each of them can return an alternative resource
+# information to be transmitted, or even redirect the request.
+# To have ftp-like capabilities (that is, directory listing and opening by 
+# default index.htm/ index.html is there is one), use the class:
+# org.jboss.shotoku.fileaccess.monitors.ListingMonitor.
+monitor.stack=
+
+# A list of strings, comma-separated, from which the requested path must contain
+# at least one, for a resource to be permitted to be displayed. For example:
+# /downloads/ would allow only to access resources which are located in the
+# downloads directory.
+allowed.paths.containing=

Added: labs/shotoku/trunk/cms-template/file-access/listing.jsp
===================================================================
--- labs/shotoku/trunk/cms-template/file-access/listing.jsp	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/file-access/listing.jsp	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,27 @@
+<!-- 
+  JBoss, the OpenSource J2EE webOS
+  Distributable under LGPL license.
+  See terms of license at gnu.org. 
+ -->
+<%@ page language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ page isELIgnored ="false" %>
+
+<h1>Directory listing for: ${directory.fullPath}</h1>
+
+<c:if test="${not empty directory.directories}">
+<h2>Directories:</h2>
+<c:forEach var="dir" items="${directory.directories}">
+<a href="${dir.name}">${dir.name}</a><br />
+</c:forEach>
+</c:if>
+
+<c:if test="${not empty directory.nodes}">
+<h2>Files:</h2>
+<c:forEach var="file" items="${directory.nodes}">
+<a href="${file.name}">${file.name}</a><br />
+</c:forEach>
+</c:if>
+
+<hr />
+<p>Generated by <a href="http://labs.jboss.org/projects/shotoku">Shotoku</a>.</p>

Added: labs/shotoku/trunk/cms-template/file-access/normal.jsp
===================================================================
--- labs/shotoku/trunk/cms-template/file-access/normal.jsp	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/file-access/normal.jsp	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,43 @@
+<!-- 
+  JBoss, the OpenSource J2EE webOS
+  Distributable under LGPL license.
+  See terms of license at gnu.org. 
+ -->
+<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+ <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="n" %>
+ <%@ taglib uri="/WEB-INF/tld/forge.tld" prefix="forge" %>
+ <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+ <%@ page isELIgnored ="false" %>
+ <portlet:defineObjects/>
+<n:if ctx="counters" > 
+<h2>Download Counter</h2>
+<div id="blog-entry">
+<span class="portlet-font" style="font-size:12">
+<table class="infotable" cellspacing="5" style="font-size:90%; padding:2px; margin: 2px;">
+	<tr>
+		<th width="140" class="grey">File Name</th>
+		<th width="180" class="grey">Downloaded</th>
+	</tr>
+
+	<n:iterate ctx="counter">
+		<div class="item">
+			<tr>
+				<td>
+					${n:out('counters.counter.link')}
+				</td>
+				<td>
+					${n:out('counters.counter.value')}
+				</td>
+			</tr>
+		</div>
+
+	</n:iterate> 
+
+</table>
+</div>   
+</span>
+</div>
+</n:if>
+
+ 

Added: labs/shotoku/trunk/cms-template/shotoku-admin/services.jsp
===================================================================
--- labs/shotoku/trunk/cms-template/shotoku-admin/services.jsp	2006-08-12 06:14:40 UTC (rev 5817)
+++ labs/shotoku/trunk/cms-template/shotoku-admin/services.jsp	2006-08-12 11:04:03 UTC (rev 5818)
@@ -0,0 +1,65 @@
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
+<html>
+<body>
+
+<h2>Shotoku service administration</h2>
+
+<a href="admin">Refresh</a>
+
+<hr />
+
+<c:if test="${not empty status}">
+	<b>Status message: </b> ${status}
+	<hr />
+</c:if>
+
+<c:forEach var="asg" items="${asgs}">
+	<c:set var="service" value="${asg.service}" />
+	<table border="0">
+	<tr>
+		<td><b>Service name:</b></td>
+		<td>${service.serviceName}</td>
+	</tr>
+	<tr>
+		<td><b>Service description:</b></td>
+		<td>${service.serviceDescription}</td>
+	</tr>
+	<tr>
+		<td><b>Service runnable:</b></td>
+		<td>
+			<span style="<c:if test="${service.serviceRunnable == false}">color: red; font-weight: bold</c:if>">
+			${service.serviceRunnable}</span>
+		</td>
+	</tr>
+	<tr>
+		<td><b>Last update:</b></td>
+		<td>	
+			<c:set var="lastUpdate" value="${(now - service.lastUpdate)/1000}" />
+			<fmt:formatDate value="${service.lastUpdateDate}" type="both" dateStyle="full" timeStyle="full"/>, that is:
+			<span style="<c:if test="${lastUpdate > 120}">color: red</c:if>; font-weight: bold">
+				<fmt:formatNumber value="${lastUpdate}" maxFractionDigits="0" />
+			</span> seconds ago.
+		</td>
+	</tr>
+	<tr>
+		<td><b>Actions:</b></td>
+		<td>
+			<c:choose>
+				<c:when test="${service.serviceRunnable == true}">
+					<a href="admin?action=stop&serviceId=${service.serviceId}">Stop</a>
+        			</c:when>
+			        <c:otherwise>
+					<a href="admin?action=start&serviceId=${service.serviceId}">Start</a>
+			        </c:otherwise>
+			</c:choose>
+		</td>
+	</tr>
+	</table>
+
+	<hr />
+</c:forEach>
+
+</body>
+</html>




More information about the jboss-svn-commits mailing list