|
||||||||||
| 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
public abstract class FeedManager
The FeedManager singleton is responsible for dealing with feed
resources.
Initial Date: Feb 11, 2009
| Field Summary | |
|---|---|
static java.lang.String |
KIND_BLOG
|
static java.lang.String |
KIND_PODCAST
|
static java.lang.String |
RESOURCE_NAME
|
static java.lang.String |
RSS_FEED_NAME
|
| Constructor Summary | |
|---|---|
FeedManager()
|
|
| Method Summary | |
|---|---|
abstract LockResult |
acquireLock(OLATResourceable feed,
Identity identity)
Acquires the lock on the specified feed |
abstract LockResult |
acquireLock(OLATResourceable feed,
Item item,
Identity identity)
Acquires the lock of an item |
abstract void |
addItem(Item item,
FileElement file,
Feed feed)
Adds the given Item to the Feed. |
abstract OLATResourceable |
copy(OLATResourceable feed)
Copies a given feed resourcable |
abstract OLATResourceable |
createBlogResource()
Creates an OLAT blog resource |
abstract MediaResource |
createFeedFile(OLATResourceable feed,
Identity identity,
java.lang.Long courseId,
java.lang.String nodeId)
Creates the RSS feed resource. |
abstract MediaResource |
createFeedMediaFile(OLATResourceable feed,
java.lang.String fileName)
Returns the media file of the feed |
abstract VFSContainer |
createItemContainer(Feed feed,
Item currentItem)
Prepare the filesystem for a new item, create the item container and all necessary sub container, e.g. |
abstract MediaResource |
createItemMediaFile(OLATResourceable feed,
java.lang.String itemId,
java.lang.String fileName)
Returns the media file of the item |
abstract OLATResourceable |
createPodcastResource()
Creates an OLAT podcast resource |
abstract void |
delete(OLATResourceable feed)
Deletes a given feed. |
abstract void |
deleteImage(Feed feed)
Delete the image of the feed |
abstract VFSLeaf |
getFeedArchive(OLATResourceable ores)
Create and returns a zip-file as VFSLeaf of the given feed resourue |
abstract MediaResource |
getFeedArchiveMediaResource(OLATResourceable resource)
Creates and returns a zip-file media resource of the given feed resource |
abstract 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. |
abstract VFSContainer |
getFeedContainer(OLATResourceable feed)
Returns the container of the feed |
java.lang.String |
getFeedKind(OLATResourceable ores)
There are different kinds of web feeds, e.g. |
abstract Feed |
getFeedLigth(OLATResourceable feed)
Returns the feed with the provided id or null. |
static FeedManager |
getInstance()
Use this method instead of any constructor to get the singelton object. |
abstract VFSContainer |
getItemContainer(Item item,
Feed feed)
Returns the container of the item which belongs to the feed |
abstract java.io.File |
getItemEnclosureFile(Item item,
Feed feed)
Returns the File of the item's enclosure if it exists or null |
abstract VFSContainer |
getItemMediaContainer(Item item,
Feed feed)
Returns the media container of the item of feed |
boolean |
isLocked(OLATResourceable feed)
|
abstract java.util.List<Item> |
loadItems(Feed feed)
Load all items of the feed (from file system or the external feed) |
abstract Feed |
readFeed(OLATResourceable ores)
Reads a feed resource by the resource id and returns the feed object. |
abstract void |
releaseLock(LockResult lock)
Releases a lock |
abstract void |
remove(Item item,
Feed feed)
Removes the given Item from the Feed. |
abstract void |
setImage(FileElement image,
Feed feed)
Set the image of the feed (update handled separately) |
abstract Feed |
updateFeedMetadata(Feed feed)
Update the feed metadata from the given feed object |
abstract Feed |
updateFeedMode(java.lang.Boolean external,
Feed feed)
Update the feed source mode |
abstract void |
updateItem(Item modifiedItem,
FileElement file,
Feed feed)
|
abstract ValidatedURL |
validateFeedUrl(java.lang.String url,
java.lang.String type)
Validates a feed url. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RSS_FEED_NAME
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String KIND_PODCAST
public static final java.lang.String KIND_BLOG
| Constructor Detail |
|---|
public FeedManager()
| Method Detail |
|---|
public static final FeedManager getInstance()
public abstract OLATResourceable createPodcastResource()
public abstract OLATResourceable createBlogResource()
public abstract Feed readFeed(OLATResourceable ores)
ores -
public abstract void delete(OLATResourceable feed)
feed - public abstract OLATResourceable copy(OLATResourceable feed)
feed -
public abstract void addItem(Item item,
FileElement file,
Feed feed)
Item to the Feed.
item - feed -
public abstract void remove(Item item,
Feed feed)
Item from the Feed. Its content
will be deleted.
item - feed -
public abstract void updateItem(Item modifiedItem,
FileElement file,
Feed feed)
modifiedItem - feed -
public abstract Feed updateFeedMode(java.lang.Boolean external,
Feed feed)
external - True: set to be an external feed; false: this is an
internal feed; null=undefinedfeed -
public abstract Feed updateFeedMetadata(Feed feed)
feed -
public abstract java.util.List<Item> loadItems(Feed feed)
feed - public abstract Feed getFeedLigth(OLATResourceable feed)
feed - The feed to be re-read
public abstract MediaResource createItemMediaFile(OLATResourceable feed,
java.lang.String itemId,
java.lang.String fileName)
id - resourceTypeName - itemId - fileName -
public abstract MediaResource createFeedMediaFile(OLATResourceable feed,
java.lang.String fileName)
id - resourceTypeName - fileName -
public abstract java.lang.String getFeedBaseUri(Feed feed,
Identity identity,
java.lang.Long courseId,
java.lang.String nodeId)
feed - idKey -
public abstract MediaResource createFeedFile(OLATResourceable feed,
Identity identity,
java.lang.Long courseId,
java.lang.String nodeId)
feedId - type - The resource type nameidentityKey -
public abstract MediaResource getFeedArchiveMediaResource(OLATResourceable resource)
resource -
public abstract VFSLeaf getFeedArchive(OLATResourceable ores)
ores - the resource
public abstract VFSContainer getItemContainer(Item item,
Feed feed)
item - feed -
public abstract VFSContainer getItemMediaContainer(Item item,
Feed feed)
item - feed -
public abstract java.io.File getItemEnclosureFile(Item item,
Feed feed)
item - feed -
public abstract VFSContainer getFeedContainer(OLATResourceable feed)
feed -
public abstract ValidatedURL validateFeedUrl(java.lang.String url,
java.lang.String type)
url -
public abstract void releaseLock(LockResult lock)
lock - The lock to be released
public abstract LockResult acquireLock(OLATResourceable feed,
Identity identity)
feed - The feed to be lockedidentity - The person who is locking the resource
public abstract LockResult acquireLock(OLATResourceable feed,
Item item,
Identity identity)
feed - The item's feeditem - The item to be lockedidentity - The person who is locking the resource
public boolean isLocked(OLATResourceable feed)
feed -
public java.lang.String getFeedKind(OLATResourceable ores)
ores -
public abstract void setImage(FileElement image,
Feed feed)
image - feed - public abstract void deleteImage(Feed feed)
feed -
public abstract VFSContainer createItemContainer(Feed feed,
Item currentItem)
feed - currentItem -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||