|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdekoh.portal.syndication.aggregator.managed.DekohSubscriptionListManager
public class DekohSubscriptionListManager
DekohSubscriptionListManager is the prefered way to create or reload PersistentSubscriptionList
instances for Dekoh applications. The workingDirectory where the files backing up the
PersistentSubscriptionList are stored is derived as the user-data directory.
DekohSubscriptionListManager.createSubscriptionList(),
DekohSubscriptionListManager.loadPersistentSubscriptionList(String)| Method Summary | |
|---|---|
PersistentSubscriptionList |
createSubscriptionList()
Creates a new instance of PersistentSubscriptionList backed by a XML file. |
PersistentSubscriptionList |
createSubscriptionList(PasswordStore passwordStore)
|
static DekohSubscriptionListManager |
getSubscriptionListManager(DesktopUser desktopUser,
PortalApplicationContext applicationContext)
|
PersistentSubscriptionList |
loadPersistentSubscriptionList(String subscriptionId)
|
PersistentSubscriptionList |
loadPersistentSubscriptionList(String subscriptionId,
PasswordStore passwordStore)
Looks up the cache if the Subscriptionlist with the given id was earlier loaded, if not it will create a new instance of Subscriptionlist and load the data from the persistent store |
List |
loadPersistentSubscriptionLists()
Loads all the saved PersistentSubscriptionLists in this user's user-data directory. |
List |
loadPersistentSubscriptionLists(PasswordStore passwordStore)
Loads all the saved PersistentSubscriptionLists in this user's user-data directory. |
void |
remove(String subscriptionId)
Removes the persistent store which is backing the subscription list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DekohSubscriptionListManager getSubscriptionListManager(DesktopUser desktopUser,
PortalApplicationContext applicationContext)
desktopUser - a desktop user instance, currently logged inapplicationContext - the caller applications context
SessionUtil.getLoggedInDesktopUser(javax.servlet.http.HttpServletRequest),
PortalApplicationContext.getCurrentContext()public PersistentSubscriptionList createSubscriptionList()
PersistentSubscriptionList backed by a XML file. Every modification like
addition of new SubscriptionItem is saved to the file.
Callers are expected to save the id of the returned SubscriptionList instance so this instance can be
recreated when Dekoh process restarts. Usually this id can be saved as a user-preference using the
PortalApplicationContext.setUserPreference method.
API to save a user preference,
API to retrive a saved user preferencepublic PersistentSubscriptionList createSubscriptionList(PasswordStore passwordStore)
public PersistentSubscriptionList loadPersistentSubscriptionList(String subscriptionId)
throws NoSuchSubscriptionListException,
PersistentSubscriptionListOperationsException
subscriptionId - id of the previously saved PersistentSubscriptionList
NoSuchSubscriptionListException - when No SubscriptionList exits in the store with given id
PersistentSubscriptionListOperationsException - irrecoverable exception when reading the persistent store to recreated the subscription list.PortalApplicationContext.getUserPreference(javax.servlet.http.HttpServletRequest, String),
PortalApplicationContext.setUserPreference(javax.servlet.http.HttpServletRequest, String,
String)
public PersistentSubscriptionList loadPersistentSubscriptionList(String subscriptionId,
PasswordStore passwordStore)
throws NoSuchSubscriptionListException,
PersistentSubscriptionListOperationsException,
InvalidKeyException
subscriptionId - id of the previously saved PersistentSubscriptionListpasswordStore, - if a password store was using when this subscription list was created, same implementation
should be passed here.
NoSuchSubscriptionListException - if no PersistentSubscriptionList with the givven id exists in the store
PersistentSubscriptionListOperationsException - if an exception occurs while loading the PersistentSubscriptionList from the store
com.pramati.bfly.das.password.exception.InvalidKeyException - subscription list file exists but caller is using wrong password store.
InvalidKeyExceptionpublic List loadPersistentSubscriptionLists()
PersistentSubscriptionLists in this user's user-data directory.
public List loadPersistentSubscriptionLists(PasswordStore passwordStore)
throws InvalidKeyException
PersistentSubscriptionLists in this user's user-data directory.
passwordStore - should the same password store, which was used to encrypt passwords in the constituent
SubscriptionItems.
InvalidKeyException - subscription list file exists but caller is using wrong password store.
public void remove(String subscriptionId)
throws PersistentSubscriptionListOperationsException
subscriptionId - id of Subscriptionlist which will be removed
PersistentSubscriptionListOperationsException - fail to remove SubscriptionList
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers