org.eclipse.ecf.datashare.mergeable
Interface IMergeableChannel

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IIdentifiable

public interface IMergeableChannel
extends IIdentifiable, org.eclipse.core.runtime.IAdaptable

Mergeable channel for merging and publishing items. This interface is an abstraction of the RSS SSE protocol for sharing item information via RSS. See Simple Sharing Extensions for RSS and OPML for a description of the RSS SSE protocol.


Method Summary
 boolean addItem(IItem item)
          Add item to set managed by this channel
 boolean changeItem(ID itemID, java.lang.String description)
          Change the description of the item identified by the given itemID
 IChannelHeader getHeaderInfo()
          Get the channel header info (title, link, description) for this channel
 IItemFactory getItemFactory()
          Get the item factory for this channel for creating new items
 java.util.List getItems()
          Get list of IItems
 void merge()
          Merget the currrent set of items with changes made remotely
 void publish()
          Publish local item changes (add, change, remove) previously made to this channel
 boolean removeItem(IItem item)
          Remove item from channel
 
Methods inherited from interface org.eclipse.ecf.core.identity.IIdentifiable
getID
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getItems

java.util.List getItems()
Get list of IItems

Returns:
List of items. Will not return null. List contents will be of type IItem.

merge

void merge()
           throws MergeException
Merget the currrent set of items with changes made remotely

Throws:
MergeException - thrown if local copy cannot be merged with remote changes

addItem

boolean addItem(IItem item)
Add item to set managed by this channel

Parameters:
item - the IItem to add. Should not be null.
Returns:
true if added successfully, false if item already exists in set known to this channel

changeItem

boolean changeItem(ID itemID,
                   java.lang.String description)
Change the description of the item identified by the given itemID

Parameters:
itemID - the itemID of the IItem to change. Should not be null.
description - the new description to change in the IItem. May be null.
Returns:
true if item found and description changes, false if item not found

removeItem

boolean removeItem(IItem item)
Remove item from channel

Parameters:
item - the item to remove. Should not be null.
Returns:
true if item removed, false if item not found.

publish

void publish()
             throws PublishException
Publish local item changes (add, change, remove) previously made to this channel

Throws:
PublishException - if problem with publishing

getItemFactory

IItemFactory getItemFactory()
Get the item factory for this channel for creating new items

Returns:
IItemFactory for this channel. Will not be null.

getHeaderInfo

IChannelHeader getHeaderInfo()
Get the channel header info (title, link, description) for this channel

Returns:
IChannelHeader that contains this info. Will not be null.