com.ontimize.util.gis.client.interfaces
Interface IGisCacheManager

All Known Implementing Classes:
DefaultGisCacheManager

public interface IGisCacheManager

Interface for the gis cache manager


Method Summary
 void clearDataCache()
          Clears the cache
 void deleteData(java.lang.Object layerId, java.lang.Object deletedKeys, java.lang.Object appliedFilters)
          Delete the data identified by deletedKeys from the data provider dataProviderId
 com.vividsolutions.jts.geom.Geometry getIntersectedArea(java.lang.Object layerId, com.vividsolutions.jts.geom.Envelope interestBoundingBox)
          Gets the area resulting from the intersection of a bounding box with the cached area
 void initCache(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
          Init the gis cache manager with the given parameters
 java.lang.Object insertData(java.lang.Object layerId, java.lang.Object insertedValues, java.lang.Object appliedFilters)
          Insert the given data insertedValues into the data provider indentified by dataProviderId
 boolean isDataInCache(java.lang.Object layerId, java.lang.Object appliedFilters)
          Check if the data according to the given filters is stored in cache
 java.lang.Object queryData(java.lang.Object layerId, java.lang.Object appliedFilters)
          Request the data related to the filters appliedFilters for the data provider dataProviderId
 void setGisClientManager(IGisClientManager clientManager)
          Set the gis client manager
 void updateData(java.lang.Object layerId, java.lang.Object updatedKeys, java.lang.Object newValues)
          Update the data identified by updatedKeys with the values newValues for the data provider dataProviderId
 

Method Detail

insertData

java.lang.Object insertData(java.lang.Object layerId,
                            java.lang.Object insertedValues,
                            java.lang.Object appliedFilters)
                            throws java.lang.Exception
Insert the given data insertedValues into the data provider indentified by dataProviderId

Parameters:
layerId - Layer identifier
appliedFilters - Previous query applied filters
insertedValues - New values to insert
Throws:
java.lang.Exception

updateData

void updateData(java.lang.Object layerId,
                java.lang.Object updatedKeys,
                java.lang.Object newValues)
                throws java.lang.Exception
Update the data identified by updatedKeys with the values newValues for the data provider dataProviderId

Parameters:
layerId - Layer identifier
updatedKeys - Identifiers of the values to update
newValues - Values to update
Throws:
java.lang.Exception

deleteData

void deleteData(java.lang.Object layerId,
                java.lang.Object deletedKeys,
                java.lang.Object appliedFilters)
                throws java.lang.Exception
Delete the data identified by deletedKeys from the data provider dataProviderId

Parameters:
layerId - Layer identifier
deletedKeys - Identifiers of the values to delete
appliedFilters - Previous query applied filters
Throws:
java.lang.Exception

queryData

java.lang.Object queryData(java.lang.Object layerId,
                           java.lang.Object appliedFilters)
                           throws java.lang.Exception
Request the data related to the filters appliedFilters for the data provider dataProviderId

Parameters:
layerId - Layer identifier
appliedFilters - Previous query applied filters
Returns:
requested layer data
Throws:
java.lang.Exception

clearDataCache

void clearDataCache()
Clears the cache


initCache

void initCache(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
Init the gis cache manager with the given parameters

Parameters:
parameters - Gis cache manager configuration parameters

isDataInCache

boolean isDataInCache(java.lang.Object layerId,
                      java.lang.Object appliedFilters)
Check if the data according to the given filters is stored in cache

Parameters:
layerId - Layer identifier
appliedFilters - Applied filters on data request
Returns:
Confirmation of data existence

getIntersectedArea

com.vividsolutions.jts.geom.Geometry getIntersectedArea(java.lang.Object layerId,
                                                        com.vividsolutions.jts.geom.Envelope interestBoundingBox)
Gets the area resulting from the intersection of a bounding box with the cached area

Parameters:
layerId - Layer identifier
interestBoundingBox - Area of interest
Returns:
Intersected area

setGisClientManager

void setGisClientManager(IGisClientManager clientManager)
Set the gis client manager

Parameters:
clientManager - Gis Client Manager