| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.nava.informa.utils.manager.memory.PersistenceManager
public class PersistenceManager
In-memory implementation of persistence manager. Uses local memory to store data.
| Constructor Summary | |
|---|---|
| PersistenceManager()Creates persistence manager. | |
| Method Summary | |
|---|---|
|  void | addChannelToGroup(ChannelIF channel,
                  ChannelGroupIF group)Adds channelto thegroup. | 
|  ChannelIF | createChannel(String title,
              URL location)Creates new channel object and persists it into storage. | 
|  ChannelGroupIF | createGroup(String title)Creates new group of channels in persistent storage. | 
|  ItemIF | createItem(ChannelIF channel,
           ItemIF ethalon)Creates new item using specified object as ethalon. | 
|  ItemIF | createItem(ChannelIF channel,
           String title)Creates new item in the channel. | 
|  void | deleteChannel(ChannelIF channel)Deletes channel from persistent storage. | 
|  void | deleteGroup(ChannelGroupIF group)Deletes group from persistent storage. | 
|  void | deleteItem(ItemIF item)Deletes the item from the persistent storage. | 
|  ChannelGroupIF[] | getGroups()Returns the list of groups available in database. | 
|  void | mergeGroups(ChannelGroupIF first,
            ChannelGroupIF second)Takes channels from the secondgroup and put them all infirstgroup. | 
| (package private)  void | moveChannels(ChannelGroupIF src,
             ChannelGroupIF dest)Moves channels from source to destination group. | 
|  void | removeChannelFromGroup(ChannelIF channel,
                       ChannelGroupIF group)Deletes channelfrom thegroup. | 
|  void | updateChannel(ChannelIF channel)Updates data in database with data from channel object. | 
|  void | updateGroup(ChannelGroupIF group)Updates data in storage with data from the group object. | 
|  void | updateItem(ItemIF item)Updates data in database with data from item object. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public PersistenceManager()
| Method Detail | 
|---|
public final ChannelGroupIF createGroup(String title)
createGroup in interface PersistenceManagerIFtitle - title of the group.
public void updateGroup(ChannelGroupIF group)
updateGroup in interface PersistenceManagerIFgroup - group objectpublic final void deleteGroup(ChannelGroupIF group)
deleteGroup in interface PersistenceManagerIFgroup - group to delete.
public final void mergeGroups(ChannelGroupIF first,
                              ChannelGroupIF second)
second group and put them all in first
 group. Then second group is deleted.
mergeGroups in interface PersistenceManagerIFfirst - first group of channels.second - second group of channels.public final ChannelGroupIF[] getGroups()
getGroups in interface PersistenceManagerIF
public final ChannelIF createChannel(String title,
                                     URL location)
createChannel in interface PersistenceManagerIFtitle - title of the channel.location - location of channel data resource.
public void updateChannel(ChannelIF channel)
updateChannel in interface PersistenceManagerIFchannel - channel object.
public final void addChannelToGroup(ChannelIF channel,
                                    ChannelGroupIF group)
channel to the group.
addChannelToGroup in interface PersistenceManagerIFchannel - channel to add.group - group to use.
public final void removeChannelFromGroup(ChannelIF channel,
                                         ChannelGroupIF group)
channel from the group.
 This method doesn't delete channel from persistent storage. It only
 breaks the association between channel and group.
removeChannelFromGroup in interface PersistenceManagerIFchannel - channel to delete.group - group to use.public final void deleteChannel(ChannelIF channel)
deleteChannel in interface PersistenceManagerIFchannel - channel to delete.
public final ItemIF createItem(ChannelIF channel,
                               String title)
createItem in interface PersistenceManagerIFchannel - channel to put new item into.title - title of new item.
public final ItemIF createItem(ChannelIF channel,
                               ItemIF ethalon)
createItem in interface PersistenceManagerIFchannel - channel to put new item into.ethalon - object to copy properties values from.
public void updateItem(ItemIF item)
updateItem in interface PersistenceManagerIFitem - item object.public final void deleteItem(ItemIF item)
deleteItem in interface PersistenceManagerIFitem - item to delete.
final void moveChannels(ChannelGroupIF src,
                        ChannelGroupIF dest)
src - source group to take channels from.dest - destination group to put channel into.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||