public class PodcastServiceImpl extends Object implements PodcastService
| Modifier and Type | Field and Description |
|---|---|
protected String |
m_relativeAccessPoint
Needed for when Notification implemented *
|
COLLECTION_PODCASTS, COLLECTION_PODCASTS_ALT, COLLECTION_PODCASTS_DESCRIPTION, COLLECTION_PODCASTS_FEED, COLLECTION_PODCASTS_TITLE, DISPLAY_DATE, DISPLAY_TITLE, PODCASTS_SERVICE_NAME| Modifier and Type | Method and Description |
|---|---|
void |
addPodcast(String title,
Date displayDate,
String description,
byte[] body,
String filename,
String contentType)
Add a podcast to the site's resources
|
boolean |
allowAccess(String id)
Determines if authenticated user has 'read' access to podcast collection folder
|
boolean |
allowOptions(int option) |
void |
cancelContentCollection(ContentCollectionEdit cce)
Cancels attempt at changing this collection (releases the lock)
|
List |
checkDISPLAY_DATE(List resourcesList)
Checks if podcast resources have a DISPLAY_DATE set.
|
List |
checkDISPLAY_DATE(List resourcesList,
String siteId) |
boolean |
checkForActualPodcasts()
Determines if folder contains actual files
|
boolean |
checkPodcastFolder()
Tests whether the podcasts folder exists and create it if it does not
|
void |
commitContentCollection(ContentCollectionEdit cce)
Commits changes to ContentHosting (releases the lock)
|
void |
destroy() |
protected void |
enablePodcastSecurityAdvisor()
Establish a security advisor to allow the "embedded" azg work to occur
with no need for additional security permissions.
|
List |
filterPodcasts(List resourcesList)
Returns only those podcasts whose DISPLAY_DATE property is today or earlier
|
List |
filterPodcasts(List resourcesList,
String siteId)
Returns only those podcasts whose DISPLAY_DATE property is today or earlier
This version for feed so can pass siteId
|
List |
filterResources(List resourcesList)
Remove non-file resources from list of potential podcasts and
files restricted to groups user not part of
|
List |
filterResources(List resourcesList,
String siteId) |
ContentCollection |
getContentCollection(String siteId)
Get ContentCollection object for podcasts
|
ContentCollectionEdit |
getContentCollectionEditable(String siteId)
Get ContentCollection object for podcasts
|
Time |
getDISPLAY_DATE(ResourceProperties rp)
If Release Date property not set, check if DISPLAY_DATE exists
and if it does, return it so it can be set as the Release Date.
|
Date |
getGMTdate(long date)
Returns the date set in GMT time
|
int |
getOptions()
Returns (from content hosting) whether the podcast folder is PUBLIC or
SITE
|
String |
getPodcastFileURL(String resourceId)
Returns the file's URL
|
List |
getPodcasts()
Retrieve Podcasts for site and if podcast folder does not exist, create
it.
|
List |
getPodcasts(String siteId)
Retrieve Podcasts for site and if podcast folder does not exist, create
it.
|
String |
getPodcastsFolderRef()
Returns a reference to Podcasts folder in Resources to pass to
permissions page.
|
String |
getSiteId()
Retrieve the site id
|
String |
getSiteURL()
Returns the site URL as a string
|
String |
getUserId()
Retrieve the current user id
|
String |
getUserName()
Retrieve the current user display name
|
void |
init()
FUTURE: needed to implement Notification services
|
boolean |
isPodcastFolderHidden(String siteId)
Returns TRUE if Podcasts folder has HIDDEN property set
OR release date is in the future
OR retract date is in the past
05/08 - enable security advisor since if folder is truly
hidden and a student/access user attempts to access it will
generate a Permissions error
|
boolean |
isPublic(String podcastFolderId)
Returns boolean TRUE = Display to non-members FALSE - Display to Site
|
void |
removePodcast(String resourceId)
Removes a podcast
|
String |
retrievePodcastFolderId(String siteId)
Returns podcast folder id using either 'podcasts' or 'Podcasts'.
|
void |
reviseOptions(boolean option)
Changes the podcast folder view status (either PUBLIC or SITE)
|
void |
revisePodcast(String resourceId,
String title,
Date date,
String description,
byte[] body,
String filename)
Will apply changes made (if any) to podcast
|
void |
setContentHostingService(ContentHostingService chs)
Injects ContentHostingService into this service
|
ContentResource |
setDISPLAY_DATE(String siteId,
String resourceId,
Time releaseDate) |
ContentResource |
setDISPLAY_DATE(String resourceId,
Time releaseDate)
Sets the DISPLAY_DATE property to the creation date of the podcast.
|
void |
setEventTrackingService(EventTrackingService ets)
Injects the EventTrackingService into this service
|
void |
setPodcastPermissionsService(PodcastPermissionsService podcastPermissionsService)
Injects PodcastAuthzService into this service
|
void |
setSecurityService(SecurityService ss)
Injects the SecurityService into this service
|
void |
setSessionManager(SessionManager sm)
Injects the SessionManager into this service
|
void |
setSiteService(SiteService ss)
Injects the SiteService into this service
|
void |
setTimeService(TimeService ts)
Injects the TimeService into this service
|
void |
setToolManager(ToolManager tm)
Injects ToolManager into this service
|
void |
setUserDirectoryService(UserDirectoryService uds)
Injects the UserDirectoryService into this service
|
protected String m_relativeAccessPoint
public void setContentHostingService(ContentHostingService chs)
setContentHostingService in interface PodcastServicepublic void setToolManager(ToolManager tm)
setToolManager in interface PodcastServicepublic void setUserDirectoryService(UserDirectoryService uds)
public void setSessionManager(SessionManager sm)
public void setTimeService(TimeService ts)
public void setSecurityService(SecurityService ss)
public void setSiteService(SiteService ss)
public void setEventTrackingService(EventTrackingService ets)
public void setPodcastPermissionsService(PodcastPermissionsService podcastPermissionsService)
public String getSiteId()
getSiteId in interface PodcastServicepublic String getUserId()
getUserId in interface PodcastServicepublic String getUserName()
getUserName in interface PodcastServicepublic String getSiteURL()
public List filterPodcasts(List resourcesList)
filterPodcasts in interface PodcastServiceresourcesList - List of podcastspublic List filterPodcasts(List resourcesList, String siteId)
filterPodcasts in interface PodcastServiceresourcesList - List of podcastspublic ContentCollection getContentCollection(String siteId) throws IdUnusedException, PermissionException
getContentCollection in interface PodcastServiceString - The siteId to grab the correct podcastsIdUnusedExceptionPermissionExceptionpublic ContentCollectionEdit getContentCollectionEditable(String siteId) throws IdUnusedException, PermissionException, InUseException
getContentCollectionEditable in interface PodcastServiceString - The siteId to grab the correct podcastsIdUnusedExceptionPermissionExceptionInUseExceptionpublic String getPodcastsFolderRef()
getPodcastsFolderRef in interface PodcastServicepublic List filterResources(List resourcesList)
resourcesList - The list of potential podcastspublic String retrievePodcastFolderId(String siteId) throws PermissionException
retrievePodcastFolderId in interface PodcastServicesiteId - The site to searchPermissionException - Access denied or Not found so not availableIdInvalidException - Constructed Id not validIdUsedException - When attempting to create Podcast folder, id is a duplicatepublic List getPodcasts() throws PermissionException, InUseException, IdInvalidException, InconsistentException, IdUsedException
getPodcasts in interface PodcastServicePermissionExceptionInUseExceptionIdInvalidExceptionInconsistentExceptionIdUsedExceptionpublic List getPodcasts(String siteId) throws PermissionException, InUseException, IdInvalidException, InconsistentException, IdUsedException
getPodcasts in interface PodcastServiceString - The siteId the feed needs the podcasts fromPermissionExceptionInUseExceptionIdInvalidExceptionInconsistentExceptionIdUsedExceptionpublic void addPodcast(String title, Date displayDate, String description, byte[] body, String filename, String contentType) throws OverQuotaException, ServerOverloadException, InconsistentException, IdInvalidException, IdLengthException, PermissionException, IdUniquenessException
addPodcast in interface PodcastServicetitle - The title of this podcast resourcedisplayDate - The display date for this podcast resourcedescription - The description of this podcast resourcebody - The bytes of this podcastOverQuotaException - To display Over Quota Alert to userServerOverloadException - To display Internal Server Error Alert to userInconsistentException - To display Internal Server Error Alert to userIdInvalidException - To display Invalid Id Alert to userIdLengthException - To display File path too long Alert to userPermissionException - To display Permission denied Alert to userIdUniquenessException - To display Duplicate id used Alert to userpublic void removePodcast(String resourceId) throws IdUnusedException, InUseException, TypeException, PermissionException
removePodcast in interface PodcastServiceid - The podcast to be removed from ContentHostingIdUnusedExceptionInUseExceptionTypeExceptionPermissionExceptionpublic boolean checkPodcastFolder()
throws PermissionException,
InUseException
checkPodcastFolder in interface PodcastServicePermissionExceptionInUseExceptionpublic boolean checkForActualPodcasts()
checkForActualPodcasts in interface PodcastServicepublic void revisePodcast(String resourceId, String title, Date date, String description, byte[] body, String filename) throws PermissionException, InUseException, OverQuotaException, ServerOverloadException
revisePodcast in interface PodcastServiceString - The resourceIdString - The titleDate - The display/publish dateString - The descriptionbyte[] - The actual file contentsString - The filenamePermissionExceptionInUseExceptionOverQuotaExceptionServerOverloadExceptionpublic List checkDISPLAY_DATE(List resourcesList)
checkDISPLAY_DATE in interface PodcastServiceList - The list of podcast resourcespublic ContentResource setDISPLAY_DATE(String resourceId, Time releaseDate)
ResourceProperties - The ResourceProperties that need DISPLAY_DATE addedpublic ContentResource setDISPLAY_DATE(String siteId, String resourceId, Time releaseDate)
public Time getDISPLAY_DATE(ResourceProperties rp)
ResourceProperties - The ResourceProperties to get DISPLAY_DATE frompublic String getPodcastFileURL(String resourceId) throws PermissionException, IdUnusedException
getPodcastFileURL in interface PodcastServiceString - The resource IdPermissionExceptionIdUnusedExceptionpublic void init()
public void destroy()
public void reviseOptions(boolean option)
reviseOptions in interface PodcastServiceboolean - True means PUBLIC view, FALSE means privatepublic int getOptions()
getOptions in interface PodcastServicepublic void commitContentCollection(ContentCollectionEdit cce)
commitContentCollection in interface PodcastServiceContentCollectionEdit - The ContentCollection to be savedpublic void cancelContentCollection(ContentCollectionEdit cce)
cancelContentCollection in interface PodcastServicecce - The ContentCollectionEdit that is not to be changedpublic boolean isPublic(String podcastFolderId)
isPublic in interface PodcastServicepodcastFolderId - The podcast folder id to checkpublic boolean isPodcastFolderHidden(String siteId) throws IdUnusedException, PermissionException
isPodcastFolderHidden in interface PodcastServiceIdUnusedExceptionPermissionExceptionpublic Date getGMTdate(long date)
getGMTdate in interface PodcastServicedate - The date represented as a long valuepublic boolean allowAccess(String id)
allowAccess in interface PodcastServiceid - The id for the podcast collection folderprotected void enablePodcastSecurityAdvisor()
public boolean allowOptions(int option)
allowOptions in interface PodcastServiceCopyright © 2004–2017 Sakai Project. All rights reserved.