public class GeoFenceManager extends java.lang.Object implements GeoFenceComponent.GeoFenceListener, MapEventDispatcher.MapEventDispatchListener, MapItem.OnGroupChangedListener
Modifier and Type | Class and Description |
---|---|
static interface |
GeoFenceManager.MonitorListener |
Constructor and Description |
---|
GeoFenceManager(GeoFenceComponent component,
MapView view) |
Modifier and Type | Method and Description |
---|---|
void |
addMonitorListener(GeoFenceManager.MonitorListener l) |
void |
deleteAll() |
void |
deleteMonitor(java.lang.String mapItemUid) |
void |
dismiss(GeoFenceMonitor monitor,
boolean bStopMonitoring) |
void |
dismiss(GeoFenceMonitor monitor,
GeoFenceAlerting.Alert alert,
boolean bStopMonitoring)
Dismisses a specific alert for a monitor
|
void |
dismiss(GeoFenceMonitor monitor,
PointMapItem item,
boolean bStopMonitoring)
Dismisses the last alert for a given map item
|
void |
dismissAll() |
void |
dispose() |
GeoFenceAlerting |
getAlerting() |
int |
getCount() |
GeoFenceMonitor |
getMonitor(java.lang.String uid)
Look up monitor
|
boolean |
isTracking(GeoFence geofence)
Check if we currently tracking this Geo Fence
|
boolean |
isTracking(java.lang.String mapItemUid)
Check if we currently tracking this Geo Fence
If the monitor is set to custom, but has no tracked items, then ignore tracking
|
void |
onFenceAdded(GeoFence fence,
MapItem item) |
void |
onFenceChanged(GeoFence fence,
MapItem item) |
void |
onFenceRemoved(java.lang.String mapItemUid) |
void |
onItemAdded(MapItem item,
MapGroup group) |
void |
onItemRemoved(MapItem item,
MapGroup group) |
void |
onItemsSelected(java.lang.String monitorUid,
java.util.List<java.lang.String> uidsToTrack)
User has selected which map items to monitor via HierarchyListUserGeoFence
(may be a subset of the map items which passed the filter check of the geofence's MonitoredTypes
|
void |
onMapEvent(MapEvent event) |
void |
removeMonitorListener(GeoFenceManager.MonitorListener l) |
public GeoFenceManager(GeoFenceComponent component, MapView view)
public void dispose()
public GeoFenceAlerting getAlerting()
public void onFenceAdded(GeoFence fence, MapItem item)
onFenceAdded
in interface GeoFenceComponent.GeoFenceListener
public void onMapEvent(MapEvent event)
onMapEvent
in interface MapEventDispatcher.MapEventDispatchListener
public void onFenceChanged(GeoFence fence, MapItem item)
onFenceChanged
in interface GeoFenceComponent.GeoFenceListener
public void onFenceRemoved(java.lang.String mapItemUid)
onFenceRemoved
in interface GeoFenceComponent.GeoFenceListener
public boolean isTracking(java.lang.String mapItemUid)
mapItemUid
- the uid for the map itempublic boolean isTracking(GeoFence geofence)
geofence
- the geofence to be consideredpublic GeoFenceMonitor getMonitor(java.lang.String uid)
uid
- UID of the fence reference map itempublic void onItemAdded(MapItem item, MapGroup group)
onItemAdded
in interface MapItem.OnGroupChangedListener
public void onItemRemoved(MapItem item, MapGroup group)
onItemRemoved
in interface MapItem.OnGroupChangedListener
public void deleteMonitor(java.lang.String mapItemUid)
public void onItemsSelected(java.lang.String monitorUid, java.util.List<java.lang.String> uidsToTrack)
monitorUid
- uidsToTrack
- public void dismiss(GeoFenceMonitor monitor, boolean bStopMonitoring)
public void dismiss(GeoFenceMonitor monitor, GeoFenceAlerting.Alert alert, boolean bStopMonitoring)
monitor
- Monitoralert
- AlertbStopMonitoring
- True to stop monitoring the alert item
False to just dismiss the alertpublic void dismiss(GeoFenceMonitor monitor, PointMapItem item, boolean bStopMonitoring)
monitor
- Monitoritem
- if null, dismiss all current alertsbStopMonitoring
- if item is not null, this specifies whether to stop monitoring item
XXX - This is either misleading or not coded properly
It actually turns the entire monitor off, for some reasonpublic void deleteAll()
public void dismissAll()
public int getCount()
public final void addMonitorListener(GeoFenceManager.MonitorListener l)
public final void removeMonitorListener(GeoFenceManager.MonitorListener l)