001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/podcasts/tags/sakai_2-4-1/podcasts-api/src/java/org/sakaiproject/api/app/podcasts/PodfeedService.java $
003: * $Id: PodfeedService.java 18624 2006-12-04 20:15:46Z josrodri@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.api.app.podcasts;
021:
022: import org.sakaiproject.exception.PermissionException;
023:
024: public interface PodfeedService {
025:
026: public static final String PODFEED_CATEGORY = "Podcast";
027:
028: /**
029: * Method to generate the XML file for the feed.
030: */
031: public String generatePodcastRSS();
032:
033: /**
034: * Method to generate the XML file for the specific category of feed with the name, siteId,
035: * and feedType passed it. So if different formats are supported, we are ready.
036: *
037: * @param siteID
038: * The siteId for the site wanted
039: * @param feedType
040: * The feed type (Currently RSS 2.0)
041: *
042: * @return A string that is the XML file
043: */
044: public String generatePodcastRSS(String siteID, String feedType);
045:
046: /**
047: * Gets the global feed title for the podcast.
048: *
049: * @return String containing the global podcast feed title.
050: */
051: public String getPodfeedTitle();
052:
053: public String getPodfeedTitle(String siteId);
054:
055: /**
056: * Sets the global feed title to the string passed in.
057: *
058: * @param feedTitle The new title for the podcast feed.
059: */
060: public void setPodfeedTitle(String feedTitle);
061:
062: /**
063: * Returns the global description for the podcast feed.
064: *
065: * @return String containing the global podcast feed description.
066: */
067: public String getPodfeedDescription();
068:
069: public String getPodfeedDescription(String siteId);
070:
071: /**
072: * Sets the global feed description to the string passed in.
073: *
074: * @param feedDescription The new description for the podcast feed.
075: */
076: public void setPodfeedDescription(String feedDescription);
077:
078: /**
079: * Returns the global description for the podcast feed.
080: *
081: * @return String containing the global podcast feed description.
082: */
083: public String getPodfeedGenerator();
084:
085: public String getPodfeedGenerator(String siteId);
086:
087: /**
088: * Sets the global feed description to the string passed in.
089: *
090: * @param feedDescription The new description for the podcast feed.
091: */
092: public void setPodfeedGenerator(String feedGenerator);
093:
094: /**
095: * Returns the global description for the podcast feed.
096: *
097: * @return String containing the global podcast feed description.
098: */
099: public String getPodfeedCopyright();
100:
101: public String getPodfeedCopyright(String siteId);
102:
103: /**
104: * Sets the global feed description to the string passed in.
105: *
106: * @param feedDescription The new description for the podcast feed.
107: */
108: public void setPodfeedCopyright(String feedCopyright);
109:
110: /**
111: * Returns podcast folder id using either 'podcasts' or 'Podcasts'.
112: * If it does not exist in either form, will create it.
113: *
114: * @param siteId The site to search
115: * @return String containing the complete id for the podcast folder
116: *
117: * @throws PermissionException
118: */
119: public String retrievePodcastFolderId(String siteId);
120:
121: /**
122: * Determines if authenticated user has 'read' access to podcast collection folder
123: *
124: * @param id
125: * The id for the podcast collection folder
126: *
127: * @return
128: * TRUE - has read access, FALSE - does not
129: */
130: public boolean allowAccess(String id);
131:
132: }
|