|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.logging.LogDelegator
org.olat.core.manager.BasicManager
org.olat.modules.webFeed.managers.FeedManager
org.olat.modules.webFeed.managers.FeedManagerImpl
public class FeedManagerImpl
This is the actual feed manager implementation. It handles all operations on the various feeds and items.
Initial Date: Feb 17, 2009
| Field Summary | |
|---|---|
static java.lang.String |
ITEMS_DIR
|
static com.thoughtworks.xstream.XStream |
xstream
|
| Fields inherited from class org.olat.modules.webFeed.managers.FeedManager |
|---|
KIND_BLOG, KIND_PODCAST, RESOURCE_NAME, RSS_FEED_NAME |
| Constructor Summary | |
|---|---|
FeedManagerImpl()
Please use FeedManager.getInstance()!!! This constructor is ONLY intended for JUnit tests. |
|
| Method Summary | |
|---|---|
LockResult |
acquireLock(OLATResourceable feed,
Identity identity)
Acquires the lock on the specified feed |
LockResult |
acquireLock(OLATResourceable feed,
Item item,
Identity identity)
Acquires the lock of an item |
void |
addItem(Item item,
FileElement file,
Feed feed)
Adds the given Item to the Feed. |
OLATResourceable |
copy(OLATResourceable feed)
Copies a given feed resourcable |
OLATResourceable |
createBlogResource()
Creates a blank feed object and writes it to the file system |
MediaResource |
createFeedFile(OLATResourceable ores,
Identity identity,
java.lang.Long courseId,
java.lang.String nodeId)
Creates the RSS feed resource. |
MediaResource |
createFeedMediaFile(OLATResourceable feed,
java.lang.String fileName)
Returns the media file of the feed |
VFSContainer |
createItemContainer(Feed feed,
Item item)
Prepare the filesystem for a new item, create the item container and all necessary sub container, e.g. |
MediaResource |
createItemMediaFile(OLATResourceable feed,
java.lang.String itemId,
java.lang.String fileName)
Returns the media file of the item |
OLATResourceable |
createPodcastResource()
Creates a blank feed object and writes it to the (virtual) file system |
void |
delete(OLATResourceable feed)
Deletes a given feed. |
void |
deleteImage(Feed feed)
Delete the image of the feed |
VFSLeaf |
getFeedArchive(OLATResourceable resource)
Create and returns a zip-file as VFSLeaf of the given feed resourue |
VFSMediaResource |
getFeedArchiveMediaResource(OLATResourceable resource)
Creates and returns a zip-file media resource of the given feed resource |
java.lang.String |
getFeedBaseUri(Feed feed,
Identity identity,
java.lang.Long courseId,
java.lang.String nodeId)
Returns the base URI of the feed including user identity key and token if necessary. |
VFSContainer |
getFeedContainer(OLATResourceable ores)
Returns the container of the feed |
Feed |
getFeedLigth(OLATResourceable ores)
Returns the feed with the provided id or null. |
VFSContainer |
getFeedMediaContainer(OLATResourceable feed)
Returns the container of media files |
VFSContainer |
getItemContainer(Item item,
Feed feed)
Returns the container of the item which belongs to the feed |
java.io.File |
getItemEnclosureFile(Item item,
Feed feed)
Returns the File of the item's enclosure if it exists or null |
VFSContainer |
getItemMediaContainer(Item item,
Feed feed)
Returns the media container of the item of feed |
static Item |
loadItem(VFSItem container)
Loads an item from file. |
java.util.List<Item> |
loadItems(Feed feed)
Load all items of the feed (from file system or the external feed) |
Feed |
readFeed(OLATResourceable ores)
Reads a feed resource by the resource id and returns the feed object. |
static Feed |
readFeedFile(VFSContainer feedContainer)
Returns the feed in the given container. |
void |
releaseLock(LockResult lock)
Releases a lock |
void |
remove(Item item,
Feed feed)
Removes the given Item from the Feed. |
void |
setEnclosure(FileElement file,
Item item,
Feed feed)
|
void |
setImage(FileElement image,
Feed feed)
Set the image of the feed (update handled separately) |
Feed |
updateFeedMetadata(Feed feed)
Update the feed metadata from the given feed object |
Feed |
updateFeedMode(java.lang.Boolean external,
Feed feed)
Update the feed source mode |
void |
updateItem(Item item,
FileElement file,
Feed feed)
|
ValidatedURL |
validateFeedUrl(java.lang.String url,
java.lang.String type)
Validates a feed url. |
| Methods inherited from class org.olat.modules.webFeed.managers.FeedManager |
|---|
getFeedKind, getInstance, isLocked |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ITEMS_DIR
public static final com.thoughtworks.xstream.XStream xstream
| Constructor Detail |
|---|
public FeedManagerImpl()
| Method Detail |
|---|
public OLATResourceable createPodcastResource()
createPodcastResource in class FeedManagerFeedManager.createPodcastResource()public OLATResourceable createBlogResource()
createBlogResource in class FeedManagerFeedManager.createPodcastResource()public void delete(OLATResourceable feed)
FeedManager
delete in class FeedManagerFeedManager.delete(org.olat.core.id.OLATResourceable)public Feed readFeed(OLATResourceable ores)
FeedManager
readFeed in class FeedManagerFeedManager.readFeed(org.olat.core.id.OLATResourceable)public Feed getFeedLigth(OLATResourceable ores)
FeedManager
getFeedLigth in class FeedManagerores - The feed to be re-read
FeedManager.getFeedLigth(org.olat.core.id.OLATResourceable)public static Feed readFeedFile(VFSContainer feedContainer)
feedContainer -
public java.util.List<Item> loadItems(Feed feed)
loadItems in class FeedManagerfeed - public static Item loadItem(VFSItem container)
container -
public void remove(Item item,
Feed feed)
FeedManagerItem from the Feed. Its content
will be deleted.
remove in class FeedManagerFeedManager.remove(org.olat.modules.webFeed.models.Item,
org.olat.modules.webFeed.models.Feed)
public void addItem(Item item,
FileElement file,
Feed feed)
FeedManagerItem to the Feed.
addItem in class FeedManagerFeedManager.addItem(org.olat.modules.webFeed.models.Item,
org.olat.core.gui.components.form.flexible.elements.FileElement,
org.olat.modules.webFeed.models.Feed)public VFSContainer getFeedContainer(OLATResourceable ores)
FeedManager
getFeedContainer in class FeedManagerFeedManager.getFeedContainer(org.olat.core.id.OLATResourceable)
public void setEnclosure(FileElement file,
Item item,
Feed feed)
file - item - feed -
public VFSContainer getItemContainer(Item item,
Feed feed)
FeedManager
getItemContainer in class FeedManagerFeedManager.getItemContainer(org.olat.modules.webFeed.models.Item,
org.olat.modules.webFeed.models.Feed)
public VFSContainer getItemMediaContainer(Item item,
Feed feed)
FeedManager
getItemMediaContainer in class FeedManagerFeedManager.getItemMediaContainer(org.olat.modules.webFeed.models.Item,
org.olat.modules.webFeed.models.Feed)
public java.io.File getItemEnclosureFile(Item item,
Feed feed)
FeedManager
getItemEnclosureFile in class FeedManagerFeedManager.getItemMediaContainer(org.olat.modules.webFeed.models.Item,
org.olat.modules.webFeed.models.Feed)public VFSContainer getFeedMediaContainer(OLATResourceable feed)
feed -
public void updateItem(Item item,
FileElement file,
Feed feed)
updateItem in class FeedManagerFeedManager.updateItem(org.olat.modules.webFeed.models.Item,
org.olat.core.gui.components.form.flexible.elements.FileElement,
org.olat.modules.webFeed.models.Feed)
public Feed updateFeedMode(java.lang.Boolean external,
Feed feed)
FeedManager
updateFeedMode in class FeedManagerexternal - True: set to be an external feed; false: this is an
internal feed; null=undefined
FeedManager.updateFeedMode(java.lang.Boolean, org.olat.modules.webFeed.models.Feed)public Feed updateFeedMetadata(Feed feed)
FeedManager
updateFeedMetadata in class FeedManagerFeedManager.updateFeedMetadata(org.olat.modules.webFeed.models.Feed)
public MediaResource createItemMediaFile(OLATResourceable feed,
java.lang.String itemId,
java.lang.String fileName)
FeedManager
createItemMediaFile in class FeedManagerorg.olat.modules.webFeed.managers.FeedManager#createMediaResource(java.lang.Long,
java.lang.String, java.lang.String, java.lang.String)
public MediaResource createFeedMediaFile(OLATResourceable feed,
java.lang.String fileName)
FeedManager
createFeedMediaFile in class FeedManagerorg.olat.modules.webFeed.managers.FeedManager#createMediaResource(java.lang.Long,
java.lang.String, java.lang.String)
public java.lang.String getFeedBaseUri(Feed feed,
Identity identity,
java.lang.Long courseId,
java.lang.String nodeId)
FeedManager
getFeedBaseUri in class FeedManagerorg.olat.modules.webFeed.managers.FeedManager#getFeedUri(org.olat.modules.webFeed.models.Feed,
java.lang.Long)
public MediaResource createFeedFile(OLATResourceable ores,
Identity identity,
java.lang.Long courseId,
java.lang.String nodeId)
FeedManager
createFeedFile in class FeedManagerorg.olat.modules.webFeed.managers.FeedManager#createFeedMediaResource(java.lang.Long,
java.lang.String, java.lang.Long)
public ValidatedURL validateFeedUrl(java.lang.String url,
java.lang.String type)
FeedManager
validateFeedUrl in class FeedManagerorg.olat.modules.webFeed.managers.FeedManager#isValidFeedUrl(java.lang.String)public OLATResourceable copy(OLATResourceable feed)
FeedManager
copy in class FeedManagerFeedManager.copy(org.olat.core.id.OLATResourceable)public VFSMediaResource getFeedArchiveMediaResource(OLATResourceable resource)
FeedManager
getFeedArchiveMediaResource in class FeedManagerFeedManager.getFeedArchiveMediaResource(org.olat.core.id.OLATResourceable)public VFSLeaf getFeedArchive(OLATResourceable resource)
FeedManager
getFeedArchive in class FeedManagerresource - the resource
FeedManager.getFeedArchive(org.olat.core.id.OLATResourceable)public void releaseLock(LockResult lock)
FeedManager
releaseLock in class FeedManagerlock - The lock to be releasedFeedManager.releaseLock(org.olat.core.util.coordinate.LockResult)
public LockResult acquireLock(OLATResourceable feed,
Identity identity)
FeedManager
acquireLock in class FeedManagerfeed - The feed to be lockedidentity - The person who is locking the resource
FeedManager.acquireLock(org.olat.core.id.OLATResourceable,
org.olat.core.id.Identity)
public LockResult acquireLock(OLATResourceable feed,
Item item,
Identity identity)
FeedManager
acquireLock in class FeedManagerfeed - The item's feeditem - The item to be lockedidentity - The person who is locking the resource
FeedManager.acquireLock(org.olat.core.id.OLATResourceable,
org.olat.modules.webFeed.models.Item, org.olat.core.id.Identity)
public void setImage(FileElement image,
Feed feed)
FeedManager
setImage in class FeedManagerFeedManager.setImage(org.olat.core.gui.components.form.flexible.elements.FileElement,
org.olat.modules.webFeed.models.Feed)public void deleteImage(Feed feed)
FeedManager
deleteImage in class FeedManagerFeedManager.deleteImage(org.olat.modules.webFeed.models.Feed)
public VFSContainer createItemContainer(Feed feed,
Item item)
FeedManager
createItemContainer in class FeedManagerFeedManager.createItemContainer(org.olat.modules.webFeed.models.Feed, org.olat.modules.webFeed.models.Item)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||