Represents the personal settings of a user. More...

Public Member Functions | |
| UserSettings (Set< String > gcmKeys, boolean emailNotification, String language, Map< Integer, UserEventSettings > eventSettings) | |
| The constructor for UserSettings that is used by the Mapper.  | |
| UserSettings () | |
| The default constructor for class UserSettings.  | |
| boolean | addGCMKey (String key) | 
| Enable notifications for a Google Cloud Messaging key.  More... | |
| boolean | removeGCMKey (String key) | 
| Disable notifications for a Google Cloud Messaging key.  More... | |
| Set< String > | getGCMKeys () | 
| Get the set of GCM keys.  More... | |
| void | enableEmailNotification () | 
| Enable notification by email.  | |
| void | disableEmailNotification () | 
| Disable notification by email.  | |
| boolean | isEmailNotificationEnabled () | 
| Check if email notification is enabled.  More... | |
| String | getLanguage () | 
| Get the user interface language that is currently set.  More... | |
| void | setLanguage (String language) | 
| Set the user interface language.  More... | |
| UserEventSettings | putEventSettings (int eventID, UserEventSettings settings) | 
| Associate the specified settings with the specified event.  More... | |
| UserEventSettings | removeEventSettings (int eventID) | 
| Remove the settings that are associated with the specified event if it is present.  More... | |
| UserEventSettings | getEventSettings (int eventID) | 
| Get the settings associated with the specified event.  More... | |
| boolean | addSubscription (int eventID) | 
| Add a subscription for an event.  More... | |
| boolean | removeSubscription (int eventID) | 
| Remove a subscribtion for an event.  More... | |
| boolean | hasSubscribed (int eventID) | 
| Check if the user has subscribed to an event.  More... | |
| Set< Integer > | getSubscriptions () | 
| Returns the Set of the subscribed EventIDs.  More... | |
Represents the personal settings of a user.
| boolean unicopa.copa.base.UserSettings.addGCMKey | ( | String | key) | 
Enable notifications for a Google Cloud Messaging key.
The key is added to the set of GCM keys. As long as a key resides in the user settings notifications will be sent over the Google Cloud Messaging for Android (GCM) service to the corresponding Android device.
| key | the GCM key to add | 
| boolean unicopa.copa.base.UserSettings.addSubscription | ( | int | eventID) | 
Add a subscription for an event.
The ID is added to the eventSettings map and a new UserEventSettings Object for that eventID is created
| eventID | the ID of the event to subscribe to | 
| UserEventSettings unicopa.copa.base.UserSettings.getEventSettings | ( | int | eventID) | 
Get the settings associated with the specified event.
| eventID | the ID of the event to get the settings for | 
| Set<String> unicopa.copa.base.UserSettings.getGCMKeys | ( | ) | 
Get the set of GCM keys.
Note that changes on the returned set are backed by this UserSettings object.
| String unicopa.copa.base.UserSettings.getLanguage | ( | ) | 
Get the user interface language that is currently set.
The default setting is "default".
| Set<Integer> unicopa.copa.base.UserSettings.getSubscriptions | ( | ) | 
Returns the Set of the subscribed EventIDs.
| boolean unicopa.copa.base.UserSettings.hasSubscribed | ( | int | eventID) | 
Check if the user has subscribed to an event.
| eventID | the ID of the event to check for | 
| boolean unicopa.copa.base.UserSettings.isEmailNotificationEnabled | ( | ) | 
Check if email notification is enabled.
The default setting is false.
| UserEventSettings unicopa.copa.base.UserSettings.putEventSettings | ( | int | eventID, | 
| UserEventSettings | settings | ||
| ) | 
Associate the specified settings with the specified event.
| eventID | the ID of the event with which the specified settings will be associated | 
| settings | the settings that will be associated with the specified event | 
| UserEventSettings unicopa.copa.base.UserSettings.removeEventSettings | ( | int | eventID) | 
Remove the settings that are associated with the specified event if it is present.
| eventID | the ID of the event to remove the settings from | 
| boolean unicopa.copa.base.UserSettings.removeGCMKey | ( | String | key) | 
Disable notifications for a Google Cloud Messaging key.
The key is removed from the set of GCM keys.
| key | the GCM key to be removed | 
| boolean unicopa.copa.base.UserSettings.removeSubscription | ( | int | eventID) | 
Remove a subscribtion for an event.
The ID is removed from eventSettings map. The UserEventSettings for that event are removed as well
| eventID | the event to unsubscribe | 
| void unicopa.copa.base.UserSettings.setLanguage | ( | String | language) | 
Set the user interface language.
| language | 
 1.8.4