roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ganes...@apache.org
Subject svn commit: r768849 - in /roller/branches/roller_mediablogging/apps/weblogger: src/java/org/apache/roller/weblogger/business/ src/java/org/apache/roller/weblogger/pojos/ src/java/org/apache/roller/weblogger/ui/rendering/model/ src/java/org/apache/rolle...
Date Mon, 27 Apr 2009 01:06:30 GMT
Author: ganeshmb
Date: Mon Apr 27 01:06:29 2009
New Revision: 768849

URL: http://svn.apache.org/viewvc?rev=768849&view=rev
Log: (empty)

Added:
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/MediaFilesPager.java
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit-validation.xml
    roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/templates/feeds/weblog-files-atom.vm
Modified:
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/URLStrategy.java
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.java
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.orm.xml
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/FeedModel.java
    roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java
    roller/branches/roller_mediablogging/apps/weblogger/src/sql/400-to-410-migration.vm
    roller/branches/roller_mediablogging/apps/weblogger/src/sql/createdb.vm
    roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/feeds.vm

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
(original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
Mon Apr 27 01:06:29 2009
@@ -94,6 +94,32 @@
     
     
     /**
+     * Get url for a single weblog media file on a given weblog.
+     */
+    public String getMediaFileURL(
+            String fileAnchor,
+            boolean absolute) {
+        
+        if(fileAnchor == null) {
+            return null;
+        }
+        
+        StringBuffer url = new StringBuffer();
+        
+        if(absolute) {
+            url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
+        } else {
+            url.append(WebloggerRuntimeConfig.getRelativeContextURL());
+        }
+        
+        url.append("/roller-ui/rendering/media-resources/").append(URLUtilities.encode(fileAnchor));
+        
+        return url.toString();
+    }
+
+    
+    
+    /**
      * Get url for a single weblog entry comments on a given weblog.
      */
     public String getWeblogCommentsURL(Weblog weblog,

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/URLStrategy.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/URLStrategy.java?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/URLStrategy.java
(original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/business/URLStrategy.java
Mon Apr 27 01:06:29 2009
@@ -150,6 +150,12 @@
     
     
     /**
+     * Get url for a single mediafile on a given weblog.
+     */
+    public String getMediaFileURL(String entryAnchor,
+                                                 boolean absolute);
+
+    /**
      * Get url for a collection of entries on a given weblog.
      */
     public String getWeblogCollectionURL(Weblog weblog,

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.java?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.java
(original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.java
Mon Apr 27 01:06:29 2009
@@ -22,7 +22,10 @@
 import java.sql.Timestamp;
 import java.util.Set;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.roller.util.UUIDGenerator;
+import org.apache.roller.weblogger.business.WebloggerFactory;
 
 /**
  * Media file
@@ -31,8 +34,12 @@
  * @hibernate.class lazy="true" table="media_file"
  */
 public class MediaFile {
+    private static Log log =
+        LogFactory.getFactory().getInstance(MediaFile.class);
 
 	final String id;
+	// TODO: anchor to be populated
+	String anchor;
     String name;
     String description;
     String copyrightText;
@@ -45,6 +52,7 @@
     String contentType;
     InputStream is;
     FileContent content;
+    String creatorUserName;
     
     public MediaFile() {
     	this.id = UUIDGenerator.generateUUID();
@@ -226,4 +234,28 @@
 		return (this.contentType.toLowerCase().startsWith(
 				MediaFileType.IMAGE.getContentTypePrefix().toLowerCase()));
 	}
+
+	public String getPermalink() {
+        return WebloggerFactory.getWeblogger().getUrlStrategy().getMediaFileURL(
+        		this.id, true);
+	}
+
+	public String getCreatorUserName() {
+		return creatorUserName;
+	}
+
+	public void setCreatorUserName(String creatorUserName) {
+		this.creatorUserName = creatorUserName;
+	}
+	
+    public User getCreator() {
+        try {
+            return WebloggerFactory.getWeblogger().getUserManager().getUserByUserName(getCreatorUserName());
+        } catch (Exception e) {
+            log.error("ERROR fetching user object for username: " + getCreatorUserName(),
e);
+        }
+        return null;
+    }   
+    
+
 }

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.orm.xml
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.orm.xml?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.orm.xml
(original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/pojos/MediaFile.orm.xml
Mon Apr 27 01:06:29 2009
@@ -40,6 +40,9 @@
             <basic name="sharedForGallery">
                 <column name="is_public" insertable="true" updatable="true" unique="false"/>
             </basic>
+            <basic name="creatorUserName">
+                <column name="creator" insertable="true" updatable="true" unique="false"
/>
+            </basic>
             <many-to-one name="directory" target-entity="org.apache.roller.weblogger.pojos.MediaFileDirectory">
                 <join-column name="directory_id" insertable="true" updatable="true" nullable="false"/>
             </many-to-one>

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/FeedModel.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/FeedModel.java?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/FeedModel.java
(original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/FeedModel.java
Mon Apr 27 01:06:29 2009
@@ -30,6 +30,7 @@
 import org.apache.roller.weblogger.pojos.Weblog;
 import org.apache.roller.weblogger.pojos.wrapper.WeblogWrapper;
 import org.apache.roller.weblogger.ui.rendering.pagers.CommentsPager;
+import org.apache.roller.weblogger.ui.rendering.pagers.MediaFilesPager;
 import org.apache.roller.weblogger.ui.rendering.pagers.Pager;
 import org.apache.roller.weblogger.ui.rendering.pagers.WeblogEntriesListPager;
 import org.apache.roller.weblogger.ui.rendering.util.WeblogFeedRequest;
@@ -134,6 +135,14 @@
     }    
         
     /**
+     * Gets most recently uploaded media files limited by: weblog specified 
+     * in request and the weblog.entryDisplayCount.
+     */
+    public Pager getMediaFilesPager() {
+        return new FeedFilesPager(feedRequest);
+    }    
+        
+    /**
      * Returns the list of tags specified in the request /?tags=foo+bar
      * @return
      */
@@ -205,4 +214,36 @@
             return createURL(super.getUrl(), new HashMap());
         }
     }      
+
+    public class FeedFilesPager extends MediaFilesPager {
+        
+        private WeblogFeedRequest feedRequest;
+        
+        public FeedFilesPager(WeblogFeedRequest feedRequest) {            
+            super(urlStrategy, urlStrategy.getWeblogFeedURL(feedRequest.getWeblog(), 
+                    feedRequest.getLocale(), feedRequest.getType(),
+                    feedRequest.getFormat(), null, null,
+                    null, false, true), feedRequest.getWeblog(), -1, feedRequest.getPage(),
DEFAULT_ENTRIES);
+            this.feedRequest = feedRequest;
+        }
+        
+        protected String createURL(String url, Map params) {
+            List tags = feedRequest.getTags();
+            if(tags != null && tags.size() > 0) {
+                params.put("tags", URLUtilities.getEncodedTagsString(tags));
+            }
+            String category = feedRequest.getWeblogCategoryName();
+            if(category != null && category.trim().length() > 0) {
+                params.put("cat", URLUtilities.encode(category));
+            }  
+            if(feedRequest.isExcerpts()) {
+                params.put("excerpts", "true");
+            }   
+            return super.createURL(url, params);
+        }
+        
+        public String getUrl() {
+            return createURL(super.getUrl(), new HashMap());
+        }
+    }      
 }

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java
(original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java
Mon Apr 27 01:06:29 2009
@@ -314,6 +314,10 @@
         public CommentFeedURLS getComments() {
             return new CommentFeedURLS();
         }
+
+        public MediaFileFeedURLS getMediaFiles() {
+            return new MediaFileFeedURLS();
+        }
     }
     
     public class EntryFeedURLS {
@@ -367,4 +371,23 @@
         
     }
     
+    public class MediaFileFeedURLS {
+        
+        public String getRss() {
+            return urlStrategy.getWeblogFeedURL(weblog, locale, "files", "rss", null, null,
null, false, true);
+        }
+        
+        public String rss(String catPath, boolean excerpts) {
+            return urlStrategy.getWeblogFeedURL(weblog, locale, "files", "rss", catPath,
null, null, excerpts, true);
+        }
+        
+        public String getAtom() {
+            return urlStrategy.getWeblogFeedURL(weblog, locale, "files", "atom", null, null,
null, false, true);
+        }
+        
+        public String atom(String catPath, boolean excerpts) {
+            return urlStrategy.getWeblogFeedURL(weblog, locale, "files", "atom", catPath,
null, null, excerpts, true);
+        }
+        
+    }
 }

Added: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/MediaFilesPager.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/MediaFilesPager.java?rev=768849&view=auto
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/MediaFilesPager.java
(added)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/MediaFilesPager.java
Mon Apr 27 01:06:29 2009
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+package org.apache.roller.weblogger.ui.rendering.pagers;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.roller.weblogger.business.MediaFileManager;
+import org.apache.roller.weblogger.business.URLStrategy;
+import org.apache.roller.weblogger.business.Weblogger;
+import org.apache.roller.weblogger.business.WebloggerFactory;
+import org.apache.roller.weblogger.pojos.MediaFile;
+import org.apache.roller.weblogger.pojos.MediaFileFilter;
+import org.apache.roller.weblogger.pojos.Weblog;
+import org.apache.roller.weblogger.pojos.MediaFileFilter.MediaFileOrder;
+
+
+/**
+ * Paging through a collection of media files.
+ */
+public class MediaFilesPager extends AbstractPager {
+    
+    private static Log log = LogFactory.getLog(MediaFilesPager.class);
+    
+    private Weblog weblog = null;
+    private int sinceDays = -1;
+    private int length = 0;
+    
+    // the collection for the pager
+    private List<MediaFile> mediaFiles;
+    
+    // are there more items?
+    private boolean more = false;
+    
+    // most recent update time of current set of entries
+    private Date lastUpdated = null;        
+    
+    public MediaFilesPager(
+            URLStrategy    strat,
+            String         baseUrl,
+            Weblog         weblog,
+            int            sinceDays,
+            int            page,
+            int            length) {
+        
+        super(strat, baseUrl, page);
+        
+        this.weblog = weblog;
+        this.sinceDays = sinceDays;
+        this.length = length;
+        
+        // initialize the collection
+        getItems();
+    }
+    
+    
+    public List<MediaFile> getItems() {
+        
+        if (this.mediaFiles == null) {
+            // calculate offset
+            int offset = getPage() * length;
+            
+            List<MediaFile> results = new ArrayList<MediaFile>();
+            
+            Date startDate = null;
+            if(sinceDays > 0) {
+                Calendar cal = Calendar.getInstance();
+                cal.setTime(new Date());
+                cal.add(Calendar.DATE, -1 * sinceDays);
+                startDate = cal.getTime();
+            }
+            
+            try {
+                Weblogger roller = WebloggerFactory.getWeblogger();
+                MediaFileManager mgr = roller.getMediaFileManager();
+                MediaFileFilter fileFilter = new MediaFileFilter();
+                fileFilter.setStartIndex(offset);
+                fileFilter.setLength(length + 1);
+                fileFilter.setOrder(MediaFileOrder.DATE_UPLOADED);
+                results = mgr.searchMediaFiles(weblog, fileFilter);
+            } catch (Exception e) {
+                log.error("ERROR: fetching comment list", e);
+            }
+            this.mediaFiles = results;
+        }
+        
+        return this.mediaFiles;
+    }
+    
+    
+    public boolean hasMoreItems() {
+        return more;
+    }
+    
+    /** Get last updated time from items in pager */
+    public Date getLastUpdated() {
+        if (lastUpdated == null) {
+            // feeds are sorted by pubtime, so first might not be last updated
+            List<MediaFile> items = (List<MediaFile>)getItems();
+            if (items != null && items.size() > 0) {
+                Timestamp newest = ((MediaFile)items.get(0)).getLastUpdated();
+                for (MediaFile file : items) {
+                    if (file.getLastUpdated().after(newest)) {
+                        newest = file.getLastUpdated();
+                    }
+                }
+                lastUpdated = new Date(newest.getTime());
+            } else {
+                // no update so we assume it's brand new
+                lastUpdated = new Date();
+            }
+        }
+        return lastUpdated;
+    }
+}
+

Added: roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit-validation.xml
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit-validation.xml?rev=768849&view=auto
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit-validation.xml
(added)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit-validation.xml
Mon Apr 27 01:06:29 2009
@@ -0,0 +1,29 @@
+<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+       "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+    
+    <field name="bean.name">
+        <field-validator type="requiredstring">
+            <message key="MediaFile.error.nameNull">unspecified key</message>
+        </field-validator>
+        
+        <field-validator type="stringlength">
+            <param name="maxLength">255</param>
+            <message key="MediaFile.error.nameSize">unspecified key</message>
+        </field-validator>
+    </field>
+    
+    <field name="bean.description">
+        <field-validator type="stringlength">
+            <param name="maxLength">255</param>
+            <message key="MediaFile.error.descriptionSize">unspecified key</message>
+        </field-validator>
+    </field>
+    
+    <field name="bean.copyrightText">
+        <field-validator type="stringlength">
+            <param name="maxLength">1023</param>
+            <message key="MediaFile.error.copyrightTextSize">unspecified key</message>
+        </field-validator>
+    </field>
+</validators>

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/sql/400-to-410-migration.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/sql/400-to-410-migration.vm?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/sql/400-to-410-migration.vm (original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/sql/400-to-410-migration.vm Mon
Apr 27 01:06:29 2009
@@ -74,10 +74,12 @@
     description     varchar(255),
     content_type    varchar(50)  not null,
     copyright_text  varchar(1023),
-    directory_id    varchar(48),
+    directory_id    varchar(48), 
     size_in_bytes   integer,
     date_uploaded   $db.TIMESTAMP_SQL_TYPE not null,
     last_updated    $db.TIMESTAMP_SQL_TYPE,
+    anchor          varchar(255),
+    creator         varchar(255),
     is_public       $db.BOOLEAN_SQL_TYPE_FALSE not null
 );
 

Modified: roller/branches/roller_mediablogging/apps/weblogger/src/sql/createdb.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/src/sql/createdb.vm?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/src/sql/createdb.vm (original)
+++ roller/branches/roller_mediablogging/apps/weblogger/src/sql/createdb.vm Mon Apr 27 01:06:29
2009
@@ -516,6 +516,8 @@
     size_in_bytes   integer,
     date_uploaded   $db.TIMESTAMP_SQL_TYPE not null,
     last_updated    $db.TIMESTAMP_SQL_TYPE,
+    anchor          varchar(255),
+    creator         varchar(255),
     is_public       $db.BOOLEAN_SQL_TYPE_FALSE not null
 );
 

Modified: roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/feeds.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/feeds.vm?rev=768849&r1=768848&r2=768849&view=diff
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/feeds.vm (original)
+++ roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/feeds.vm Mon
Apr 27 01:06:29 2009
@@ -23,6 +23,7 @@
       #showEntriesRSS20()
       #showCommentsAtom10()
       #showCommentsRSS20()
+      #showFilesAtom10()
 *#
 
 #macro(showEntriesAtom10 $entries)
@@ -112,6 +113,26 @@
     #end
 #end
 
+#macro(showFilesAtom10 $mediaFiles)
+#foreach($file in $mediaFiles)
+    <entry>
+        <id>$file.permalink</id>
+        <title type="html">$utils.escapeXML($file.name)</title>
+        <author><name>$file.creator.screenName</name></author>
+        <link rel="alternate" type="text/html" href="$file.permalink"/>
+        <published>$utils.formatIso8601Date($file.dateUploaded)</published>
+        <updated>$utils.formatIso8601Date($file.lastUpdated)</updated> 
+#foreach($tag in $file.tags)
+        <category term="$utils.escapeXML($tag.name)" scheme="http://roller.apache.org/ns/tags/"
/>
+#end        
+#if( $utils.isNotEmpty($file.description))
+        <summary type="html">$utils.escapeXML($file.description)</summary>
+#end
+        <link rel="enclosure" type="$file.contentType" href="$utils.escapeXML($file.permalink)"/>
+    </entry>
+#end
+#end
+
 #macro(showFeedHistory $pager)
 <link rel="first" type="application/atom+xml" href="$utils.escapeXML($pager.url)" />
 #if($pager.hasMoreItems())

Added: roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/templates/feeds/weblog-files-atom.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/templates/feeds/weblog-files-atom.vm?rev=768849&view=auto
==============================================================================
--- roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/templates/feeds/weblog-files-atom.vm
(added)
+++ roller/branches/roller_mediablogging/apps/weblogger/web/WEB-INF/velocity/templates/feeds/weblog-files-atom.vm
Mon Apr 27 01:06:29 2009
@@ -0,0 +1,31 @@
+#**
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  The ASF licenses this file to You
+  under the Apache License, Version 2.0 (the "License"); you may not
+  use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.  For additional information regarding
+  copyright in this work, please see the NOTICE file in the top level
+  directory of this distribution.
+
+*#<?xml version="1.0" encoding='utf-8'?>
+#if($config.feedStyle)<?xml-stylesheet type="text/xsl" href="$url.absoluteSite/roller-ui/styles/atom.xsl"
media="screen"?>#end
+#set($pager = $model.mediaFilesPager)
+<feed xmlns="http://www.w3.org/2005/Atom">
+    <title type="html">$utils.escapeXML($model.weblog.name)</title>
+    <subtitle type="html">$utils.escapeXML($model.weblog.description)</subtitle>
+    <id>$url.feed.mediaFiles.atom</id>
+    <link rel="self" type="application/atom+xml" href="$url.feed.mediaFiles.atom" />
+    <link rel="alternate" type="text/html" href="$url.home" />
+    <updated>$utils.formatIso8601Date($model.weblog.lastModified)</updated>
+    <generator uri="http://roller.apache.org" version="$config.rollerVersion ($config.rollerBuildTimestamp:$config.rollerBuildUser)">Apache
Roller (incubating)</generator>
+    #showFilesAtom10($pager.items)
+</feed>
+



Mime
View raw message