| java.lang.Object org.sakaiproject.component.app.podcasts.PodcastServiceImpl
Method Summary | |
public void | addPodcast(String title, Date displayDate, String description, byte[] body, String filename, String contentType) | public boolean | allowAccess(String id) | public boolean | canUpdateSite(String siteId) | public boolean | canUpdateSite() | public void | cancelContentCollection(ContentCollectionEdit cce) | public List | checkDISPLAY_DATE(List resourcesList) Checks if podcast resources have a DISPLAY_DATE set. | public boolean | checkForActualPodcasts() | public boolean | checkPodcastFolder() | public void | commitContentCollection(ContentCollectionEdit cce) | public void | destroy() | protected void | enablePodcastSecurityAdvisor() Establish a security advisor to allow the "embedded" azg work to occur
with no need for additional security permissions. | public List | filterPodcasts(List resourcesList) | public List | filterResources(List resourcesList) | public ContentResourceEdit | getAResource(String resourceId) Pulls a ContentResourceEdit from ContentHostingService. | public ContentCollection | getContentCollection(String siteId) | public ContentCollectionEdit | getContentCollectionEditable(String siteId) | public Date | getGMTdate(long date) | public int | getOptions() | public String | getPodcastFileURL(String resourceId) | public List | getPodcasts() Retrieve Podcasts for site and if podcast folder does not exist, create
it. | public List | getPodcasts(String siteId) Retrieve Podcasts for site and if podcast folder does not exist, create
it. | public String | getSiteId() | public String | getSiteURL() | public String | getUserId() | public String | getUserName() | public boolean | hasPerm(String function) | public void | init() | public boolean | isPublic(String podcastFolderId) | public void | removePodcast(String resourceId) | public String | retrievePodcastFolderId(String siteId) Returns podcast folder id using either 'podcasts' or 'Podcasts'. | public void | reviseOptions(boolean option) | public void | revisePodcast(String resourceId, String title, Date date, String description, byte[] body, String filename) | public void | setContentHostingService(ContentHostingService chs) | public void | setDISPLAY_DATE(ResourceProperties rp) Sets the DISPLAY_DATE property to the creation date of the podcast.
Needed if file added using Resources. | public void | setToolManager(ToolManager tm) |
m_relativeAccessPoint | protected String m_relativeAccessPoint(Code) | | Needed for when Notification implemented *
|
PodcastServiceImpl | PodcastServiceImpl()(Code) | | |
addPodcast | public void addPodcast(String title, Date displayDate, String description, byte[] body, String filename, String contentType) throws OverQuotaException, ServerOverloadException, InconsistentException, IdInvalidException, IdLengthException, PermissionException, IdUniquenessException(Code) | | Add a podcast to the site's resources
Parameters: title - The title of this podcast resource Parameters: displayDate - The display date for this podcast resource Parameters: description - The description of this podcast resource Parameters: body - The bytes of this podcast throws: OverQuotaException - To display Over Quota Alert to user throws: ServerOverloadException - To display Internal Server Error Alert to user throws: InconsistentException - To display Internal Server Error Alert to user throws: IdInvalidException - To display Invalid Id Alert to user throws: IdLengthException - To display File path too long Alert to user throws: PermissionException - To display Permission denied Alert to user throws: IdUniquenessException - To display Duplicate id used Alert to user |
allowAccess | public boolean allowAccess(String id)(Code) | | Determines if authenticated user has 'read' access to podcast collection folder
Parameters: id - The id for the podcast collection folderTRUE - has read access, FALSE - does not |
canUpdateSite | public boolean canUpdateSite(String siteId)(Code) | | Determine whether user and update the site
Parameters: siteId - The siteId for the site to test True True if can update, False otherwise |
canUpdateSite | public boolean canUpdateSite()(Code) | | Determine whether user and update the site
Parameters: siteId - The siteId for the site to test True if can update, False otherwise |
cancelContentCollection | public void cancelContentCollection(ContentCollectionEdit cce)(Code) | | Cancels attempt at changing this collection (releases the lock)
Parameters: cce - The ContentCollectionEdit that is not to be changed |
checkDISPLAY_DATE | public List checkDISPLAY_DATE(List resourcesList)(Code) | | Checks if podcast resources have a DISPLAY_DATE set. Occurs when files
uploaded to podcast folder from Resources.
Parameters: List - The list of podcast resources List The list of podcast resource all with DISPLAY_DATE property |
checkForActualPodcasts | public boolean checkForActualPodcasts()(Code) | | Determines if folder contains actual files
boolean true if files are stored there, false otherwise |
checkPodcastFolder | public boolean checkPodcastFolder() throws PermissionException, InUseException(Code) | | Tests whether the podcasts folder exists and create it if it does not
True - if exists, false - otherwise |
destroy | public void destroy()(Code) | | |
enablePodcastSecurityAdvisor | protected void enablePodcastSecurityAdvisor()(Code) | | Establish a security advisor to allow the "embedded" azg work to occur
with no need for additional security permissions.
|
filterPodcasts | public List filterPodcasts(List resourcesList)(Code) | | Returns only those podcasts whose DISPLAY_DATE property is today or earlier
Parameters: resourcesList - List of podcasts List List of podcasts whose DISPLAY_DATE is today or before |
filterResources | public List filterResources(List resourcesList)(Code) | | Remove on file resources from list of potential podcasts
Parameters: resourcesList - The list of potential podcasts List List of files to make up the podcasts |
getGMTdate | public Date getGMTdate(long date)(Code) | | Returns the date set in GMT time
Parameters: date - The date represented as a long value DateThe Date object set in GMT time |
getOptions | public int getOptions()(Code) | | Returns (from content hosting) whether the podcast folder is PUBLIC or
SITE
int 0 = Display to non-members, 1 = Display to Site |
getSiteId | public String getSiteId()(Code) | | Retrieve the site id
|
getSiteURL | public String getSiteURL()(Code) | | Returns the site URL as a string
String containing the sites URL |
getUserId | public String getUserId()(Code) | | Retrieve the current user id
|
getUserName | public String getUserName()(Code) | | Retrieve the current user display name
|
init | public void init()(Code) | | FUTURE: needed to implement Notification services
|
isPublic | public boolean isPublic(String podcastFolderId)(Code) | | Returns boolean TRUE = Display to non-members FALSE - Display to Site
Parameters: podcastFolderId - The podcast folder id to check boolean TRUE - Display to non-members, FALSE - Display to Site |
retrievePodcastFolderId | public String retrievePodcastFolderId(String siteId) throws PermissionException(Code) | | Returns podcast folder id using either 'podcasts' or 'Podcasts'. If it
does not exist in either form, will create it.
Parameters: siteId - The site to search String Contains the complete id for the podcast folder throws: PermissionException - Access denied or Not found so not available throws: IdInvalidException - Constructed Id not valid throws: IdUsedException - When attempting to create Podcast folder, id is a duplicate |
reviseOptions | public void reviseOptions(boolean option)(Code) | | Changes the podcast folder view status (either PUBLIC or SITE)
booleanTrue means PUBLIC view, FALSE means private |
setContentHostingService | public void setContentHostingService(ContentHostingService chs)(Code) | | Injects ContentHostingService into this service *
|
setDISPLAY_DATE | public void setDISPLAY_DATE(ResourceProperties rp)(Code) | | Sets the DISPLAY_DATE property to the creation date of the podcast.
Needed if file added using Resources. Time stored is GMT so when pulled
need to convert to local.
Parameters: ResourceProperties - The ResourceProperties that need DISPLAY_DATE added |
setToolManager | public void setToolManager(ToolManager tm)(Code) | | Injects ToolManager into this service *
|
|
|