de.unikassel.android.sdcframework.persistence
Class NotificationStrategy

Package class diagram package NotificationStrategy
java.lang.Object
  extended by de.unikassel.android.sdcframework.util.AbstractChainWorker<PersistentStorageManager>
      extended by de.unikassel.android.sdcframework.persistence.AbstractDatabaseFullStrategy
          extended by de.unikassel.android.sdcframework.persistence.NotificationStrategy
All Implemented Interfaces:
DatabaseFullStrategy, ChainWorker<PersistentStorageManager>

public final class NotificationStrategy
extends AbstractDatabaseFullStrategy

Implementation of a the database full strategy as service notification.

This strategy does only create a user notification, which whill be displayed in the OS notification area . It should be used in the beginning of a strategy chain.


Field Summary
private  Context context
          The application context
private  Class<? extends Activity> controlActivityClass
          The control activity class
static int NOTIFICATION
          The notification id
 
Constructor Summary
NotificationStrategy(Context context, Class<? extends Activity> controlActivityClass)
          Constructor
 
Method Summary
 boolean process(PersistentStorageManager storageManager)
          Processing method of the worker
 
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractChainWorker
doWork, getSuccessor, setSuccessor, withSuccessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ChainWorker
doWork, getSuccessor, setSuccessor, withSuccessor
 

Field Detail

NOTIFICATION

public static final int NOTIFICATION
The notification id


context

private final Context context
The application context


controlActivityClass

private final Class<? extends Activity> controlActivityClass
The control activity class

Constructor Detail

NotificationStrategy

public NotificationStrategy(Context context,
                            Class<? extends Activity> controlActivityClass)
Constructor

Parameters:
context - the application context
controlActivityClass -
Method Detail

process

public boolean process(PersistentStorageManager storageManager)
Description copied from class: AbstractChainWorker
Processing method of the worker

Overrides:
process in class AbstractDatabaseFullStrategy
Parameters:
storageManager - the client
Returns:
true if successful