EventManager
public class EventManager
EventManager class manages all activity requests and action (confirm/deny) taken by the user. Below mentioned operations can be performed,
- Get all events (sorted by response date in descending order by default)
- Get event details
- Get display claim details of an event
- Get events count
- Add Event with action Confirm / Deny
- Delete Event
- Delete All Events
-
Undocumented
Declaration
Swift
public static let shared = EventManager()
-
Get events count
Declaration
Swift
public func getEventsCount() -> Int
Return Value
Returns current event count
-
Get event history details - All the persisted events
Declaration
Swift
public func getPastRequests() -> [[String:Any]]
Return Value
Dictionary of event key/value array
-
Add event to event dictionary which is persisted in filesystem and append event data in singleton instance member field.
Declaration
Swift
public func addEvent (_ requestInfo: RequestInfo) -> Bool
Parameters
requestInfo
Request information object that holds event details
Return Value
DB Insert status
-
Get event details for the given event id.
Declaration
Swift
public func getEventDetails (_ eventId: String) -> RequestInfo?
Parameters
eventId
Event Response Date Time -> Unique Id to retrieve event details
Return Value
Request information object that holds event details
-
Get display claim details for the given event id. Display Claims object holds rich information per claim like essential/voluntary claim; claim shared/not shared.
Declaration
Swift
public func getDisplayClaims (_ eventId: String) -> [DisplayClaim]
Parameters
eventId
Event Response Date Time -> Unique Id to retrieve event details
Return Value
Event claim information transformed to DisplayClaim object to bind UI views.
-
Delete event for the given event id from Events disctionary.
Declaration
Swift
public func deleteEvent (_ eventId: String) -> Bool
Parameters
eventId
Event Response Date Time -> Unique Id to retrieve event details
Return Value
DB delete status
-
Delete all events from the persistent store.
Declaration
Swift
public func deleteAllEvents () -> Bool
Return Value
DB delete status
-
Delete all events from the persistent store and also clear the dictionary entries.
Declaration
Swift
public func clear() -> Bool
Return Value
Clear status