CopaApp
Change of Plan Application
 All Classes Functions Variables Pages
Static Public Member Functions | List of all members
unicopa.copa.app.Helper Class Reference

This is a helper class which implements some methods for repeating tasks that are needed on various occasions. More...

Collaboration diagram for unicopa.copa.app.Helper:
Collaboration graph

Static Public Member Functions

static boolean subscribe (int eventID, SettingsLocal settingsLocal, Context context) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
 This method adds an Event to the subscription list and saves all necessary data in the local database. More...
 
static boolean checkSubscriptions () throws NoStorageException, ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException
 This Method checks whether all the necessary data is in the local database. More...
 
static boolean unsubscribe (int eventID, SettingsLocal settingsLocal, Context context) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException
 This method removes an Event from the subscription list and erases all unnecessary data from the local database. More...
 
static boolean setUpdate (SingleEventLocal sEventLocal, String msg, Context context) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
 This method implements the changing of a SingleEvent. More...
 
static boolean removeSingleEvent (int sEventID, String msg, Context context) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
 This method implements the removal of a SingleEvent. More...
 
static boolean getUpdate (Date date, Context context) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
 This method gets all updates since a given date and saves them to the local database. More...
 
static boolean getRights () throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException
 This method updates the database with received permissions. More...
 
static SingleEventLocal checkChanges (List< SingleEventUpdate > sEventUpdateList)
 This method checks what changes are made in a list of SingleEventUpdates and returns a SingleEventLocal. More...
 
static SingleEventLocal singleEventToSingleEventLocal (SingleEvent sEvent, String name)
 This method returns to a given SinlgeEvent a SingleEventLocal with the necessary default values. More...
 
static SettingsLocal userSettingsToSettingsLocal (UserSettings settings) throws NoStorageException
 This method converts a instance of UserSettings to SettingsLocal. More...
 

Detailed Description

This is a helper class which implements some methods for repeating tasks that are needed on various occasions.

Author
Martin Rabe

Member Function Documentation

static SingleEventLocal unicopa.copa.app.Helper.checkChanges ( List< SingleEventUpdate sEventUpdateList)
static

This method checks what changes are made in a list of SingleEventUpdates and returns a SingleEventLocal.

Parameters
sEventUpdateList
Returns
The newest version of the SingleEvents.
static boolean unicopa.copa.app.Helper.checkSubscriptions ( ) throws NoStorageException, ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException
static

This Method checks whether all the necessary data is in the local database.

Returns
True for success. / False for failure.
Exceptions
NoStorageException
ClientProtocolException
IOException
APIException
PermissionException
RequestNotPracticableException
InternalErrorException
static boolean unicopa.copa.app.Helper.getRights ( ) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException
static

This method updates the database with received permissions.

Returns
True for success. / False for failure.
Exceptions
ClientProtocolException
IOException
APIException
PermissionException
RequestNotPracticableException
InternalErrorException
static boolean unicopa.copa.app.Helper.getUpdate ( Date  date,
Context  context 
) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
static

This method gets all updates since a given date and saves them to the local database.

Parameters
Date
Returns
True for success. / False for failure.
Exceptions
ClientProtocolException
IOException
APIException
PermissionException
RequestNotPracticableException
InternalErrorException
NoStorageException
static boolean unicopa.copa.app.Helper.removeSingleEvent ( int  sEventID,
String  msg,
Context  context 
) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
static

This method implements the removal of a SingleEvent.

Parameters
sEventID
context
Returns
Exceptions
NoStorageException
InternalErrorException
RequestNotPracticableException
PermissionException
APIException
IOException
ClientProtocolException
static boolean unicopa.copa.app.Helper.setUpdate ( SingleEventLocal  sEventLocal,
String  msg,
Context  context 
) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
static

This method implements the changing of a SingleEvent.

Parameters
SingleEventLocal
Message
Context
Returns
True for success. / False for failure.
Exceptions
ClientProtocolException
IOException
APIException
PermissionException
RequestNotPracticableException
InternalErrorException
NoStorageException
static SingleEventLocal unicopa.copa.app.Helper.singleEventToSingleEventLocal ( SingleEvent  sEvent,
String  name 
)
static

This method returns to a given SinlgeEvent a SingleEventLocal with the necessary default values.

Parameters
SingleEvent
name
Returns
A SingleEventLocal.
static boolean unicopa.copa.app.Helper.subscribe ( int  eventID,
SettingsLocal  settingsLocal,
Context  context 
) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException, NoStorageException
static

This method adds an Event to the subscription list and saves all necessary data in the local database.

Parameters
EventID
SettingsLocal
Returns
True for success. / False for failure.
Exceptions
InternalErrorException
RequestNotPracticableException
PermissionException
APIException
IOException
ClientProtocolException
NoStorageException
static boolean unicopa.copa.app.Helper.unsubscribe ( int  eventID,
SettingsLocal  settingsLocal,
Context  context 
) throws ClientProtocolException, IOException, APIException, PermissionException, RequestNotPracticableException, InternalErrorException
static

This method removes an Event from the subscription list and erases all unnecessary data from the local database.

Parameters
EventID
EettingsLocal
Returns
True for success. / False for failure.
Exceptions
InternalErrorException
RequestNotPracticableException
PermissionException
APIException
IOException
ClientProtocolException
static SettingsLocal unicopa.copa.app.Helper.userSettingsToSettingsLocal ( UserSettings  settings) throws NoStorageException
static

This method converts a instance of UserSettings to SettingsLocal.

Parameters
UserSettings
Returns
SettingsLocal
Exceptions
NoStorageException

The documentation for this class was generated from the following file: