com.ontimize.util.gis.server.manager
Class GisServerManager

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by com.ontimize.util.gis.server.manager.GisServerManager
All Implemented Interfaces:
IGisServerManager, java.io.Serializable, java.rmi.Remote

public class GisServerManager
extends java.rmi.server.UnicastRemoteObject
implements IGisServerManager

See Also:
Serialized Form

Field Summary
protected  IGisDataManager dataManager
           
static boolean GIS_DEBUG
           
protected  IGisLayerConfigurationManager layersManager
           
protected  IGisLogger loggerInstance
           
protected  java.lang.Object referenceLocator
           
protected  IGisSecurityCheck securityManager
           
protected  java.lang.StringBuilder strBuilder
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
GisServerManager(int port)
           
GisServerManager(int port, com.ontimize.locator.EntityReferenceLocator locator, java.util.Hashtable hconfig)
           
GisServerManager(java.lang.Object prop, IGisDataManager dataManager, IGisSecurityCheck securityManager, int port)
           
GisServerManager(java.lang.Object prop, int port)
           
 
Method Summary
 void addLog(java.lang.Object o, int level)
           
protected  void checkGisServerLibraries()
           
 void clearProviders(java.lang.Object configurationId)
           
 void deleteLayer(java.lang.Object layerKeys, int sessionId)
          Delete the layer layerId
 void deleteLayerData(java.lang.Object layerKeys, java.lang.Object deletedKeys, int sessionId)
          Delete the data identified by deletedKeys from the layer layerId
 java.lang.Object getDataHandlerReference(java.lang.Object layerKeys, int sessionId)
          Get the reference of the data handler related to the given layer
 java.lang.Object getLayerData(java.lang.Object layerKeys, java.lang.Object appliedFilters, int sessionId)
          Request the data related to the filters appliedFilters from the layer layerId
 java.lang.Object getLayersInformation(java.lang.Object layersConfigurationId, int sessionId)
          Get the layers configuration with the identifier layersConfigurationId
protected  void initGisDataManager(java.lang.Object dataManagerParams, boolean defaultConf)
          Method for gis data manager initial configuration
protected  void initGisSecurityManager(java.lang.Object securityManagerParams, boolean defaultConf)
          Method for gis security manager initial configuration
 void initLayersConfigurationManager(java.lang.Object layersManagerParams, boolean defaultConf)
          Init the gis server layers configuration manager
protected  void initLogger(java.lang.Object propertiesNode)
          Initialize the gis logger with the specified configuration
protected  void initLogger(java.lang.String propertiesPath)
          Initialize the gis logger with the specified configuration
 void insertLayer(java.lang.Object insertParameters, int sessionId)
          Insert a new layer with the parameters insertParameters
 java.lang.Object insertLayerData(java.lang.Object layerKeys, java.lang.Object insertedValues, int sessionId)
          Insert the given data insertedValues into the layer indentified by layerId
 void setReferenceLocator(java.lang.Object referenceLocator)
          Sets the Ontimize Reference Locator is the GisServerManager class
 void updateLayer(java.lang.Object layerKeys, java.lang.Object updateParameters, int sessionId)
          Update the parameters defined at updateParameters for the layer with reference layerId
 void updateLayerData(java.lang.Object layerKeys, java.lang.Object updatedKeys, java.lang.Object newValues, int sessionId)
          Update the data identified by updatedKeys with the values newValues for the layer layerId
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GIS_DEBUG

public static boolean GIS_DEBUG

referenceLocator

protected java.lang.Object referenceLocator

dataManager

protected IGisDataManager dataManager

securityManager

protected IGisSecurityCheck securityManager

layersManager

protected IGisLayerConfigurationManager layersManager

loggerInstance

protected IGisLogger loggerInstance

strBuilder

protected final java.lang.StringBuilder strBuilder
Constructor Detail

GisServerManager

public GisServerManager(int port)
                 throws java.lang.Exception
Parameters:
port - The port number on which the remote object receives calls
Throws:
java.lang.Exception

GisServerManager

public GisServerManager(java.lang.Object prop,
                        int port)
                 throws java.lang.Exception
Parameters:
prop - Properties file with all gis server manager configuration parameters like default configuration values.
port - The port number on which the remote object receives calls
Throws:
java.lang.Exception

GisServerManager

public GisServerManager(int port,
                        com.ontimize.locator.EntityReferenceLocator locator,
                        java.util.Hashtable hconfig)
                 throws java.lang.Exception
Parameters:
port -
locator -
hconfig -
Throws:
java.lang.Exception

GisServerManager

public GisServerManager(java.lang.Object prop,
                        IGisDataManager dataManager,
                        IGisSecurityCheck securityManager,
                        int port)
                 throws java.lang.Exception
Parameters:
prop - Properties file with all gis server manager configuration parameters like default configuration values.
dataManager - Class to manage data access
securityManager - Class to check access to data and security permissions
port - the port number on which the remote object receives calls
Throws:
java.lang.Exception
Method Detail

checkGisServerLibraries

protected void checkGisServerLibraries()

initGisSecurityManager

protected void initGisSecurityManager(java.lang.Object securityManagerParams,
                                      boolean defaultConf)
Method for gis security manager initial configuration

Parameters:
securityManagerParams - Gis Server XML configuration node corresponding to GisSecurityManager
defaultConf - Set this value to true to use default configuration instead of xml configuration

initGisDataManager

protected void initGisDataManager(java.lang.Object dataManagerParams,
                                  boolean defaultConf)
Method for gis data manager initial configuration

Parameters:
dataManagerParams - Gis Server XML configuration node corresponding to GisDataManager
defaultConf - Set this value to true to use default configuration instead of xml configuration

initLayersConfigurationManager

public void initLayersConfigurationManager(java.lang.Object layersManagerParams,
                                           boolean defaultConf)
Init the gis server layers configuration manager

Parameters:
layersManagerParams - Parameters related to layers configuration manager
defaultConf - Set if the server will use the default layers configuration manager or a new one

setReferenceLocator

public void setReferenceLocator(java.lang.Object referenceLocator)
                         throws java.lang.Exception
Description copied from interface: IGisServerManager
Sets the Ontimize Reference Locator is the GisServerManager class

Specified by:
setReferenceLocator in interface IGisServerManager
Parameters:
referenceLocator - Ontimize reference locator
Throws:
java.lang.Exception

initLogger

protected void initLogger(java.lang.String propertiesPath)
Initialize the gis logger with the specified configuration

Parameters:
propertiesPath - Properties file path with logger configuration

initLogger

protected void initLogger(java.lang.Object propertiesNode)
Initialize the gis logger with the specified configuration

Parameters:
propertiesNode - xml node with logger configuration

deleteLayer

public void deleteLayer(java.lang.Object layerKeys,
                        int sessionId)
                 throws java.lang.Exception
Description copied from interface: IGisServerManager
Delete the layer layerId

Specified by:
deleteLayer in interface IGisServerManager
Parameters:
layerKeys - Identifiers for the layer to delete
sessionId - Session Id for this user
Throws:
java.lang.Exception

deleteLayerData

public void deleteLayerData(java.lang.Object layerKeys,
                            java.lang.Object deletedKeys,
                            int sessionId)
                     throws java.lang.Exception
Description copied from interface: IGisServerManager
Delete the data identified by deletedKeys from the layer layerId

Specified by:
deleteLayerData in interface IGisServerManager
Parameters:
layerKeys - Identifiers for the layer to delete
deletedKeys - Identifiers of the values to delete
sessionId - Session Id for this user
Throws:
java.lang.Exception

getDataHandlerReference

public java.lang.Object getDataHandlerReference(java.lang.Object layerKeys,
                                                int sessionId)
                                         throws java.lang.Exception
Description copied from interface: IGisServerManager
Get the reference of the data handler related to the given layer

Specified by:
getDataHandlerReference in interface IGisServerManager
Parameters:
layerKeys - Identifiers for the layer to delete
sessionId - Session Id for this user
Returns:
reference of the requested data handler
Throws:
java.lang.Exception

getLayerData

public java.lang.Object getLayerData(java.lang.Object layerKeys,
                                     java.lang.Object appliedFilters,
                                     int sessionId)
                              throws java.lang.Exception
Description copied from interface: IGisServerManager
Request the data related to the filters appliedFilters from the layer layerId

Specified by:
getLayerData in interface IGisServerManager
Parameters:
layerKeys - Identifiers for the layer to delete
appliedFilters - Defined filters for the data request
sessionId - Session Id for this user
Returns:
requested layer data
Throws:
java.lang.Exception

getLayersInformation

public java.lang.Object getLayersInformation(java.lang.Object layersConfigurationId,
                                             int sessionId)
                                      throws java.lang.Exception
Description copied from interface: IGisServerManager
Get the layers configuration with the identifier layersConfigurationId

Specified by:
getLayersInformation in interface IGisServerManager
Parameters:
layersConfigurationId - Identifier for the layers configuration data
sessionId - Session Id for this user
Returns:
requested layers configuration data
Throws:
java.lang.Exception

insertLayer

public void insertLayer(java.lang.Object insertParameters,
                        int sessionId)
                 throws java.lang.Exception
Description copied from interface: IGisServerManager
Insert a new layer with the parameters insertParameters

Specified by:
insertLayer in interface IGisServerManager
Parameters:
insertParameters - New layer configuration parameters
sessionId - Session Id for this user
Throws:
java.lang.Exception

insertLayerData

public java.lang.Object insertLayerData(java.lang.Object layerKeys,
                                        java.lang.Object insertedValues,
                                        int sessionId)
                                 throws java.lang.Exception
Description copied from interface: IGisServerManager
Insert the given data insertedValues into the layer indentified by layerId

Specified by:
insertLayerData in interface IGisServerManager
Parameters:
layerKeys - Identifiers for the layer to delete
insertedValues - New values to insert
sessionId - Session Id for this user
Throws:
java.lang.Exception

updateLayer

public void updateLayer(java.lang.Object layerKeys,
                        java.lang.Object updateParameters,
                        int sessionId)
                 throws java.lang.Exception
Description copied from interface: IGisServerManager
Update the parameters defined at updateParameters for the layer with reference layerId

Specified by:
updateLayer in interface IGisServerManager
Parameters:
layerKeys - Identifiers for the layer to delete
updateParameters - Parameters to update
sessionId - Session Id for this user
Throws:
java.lang.Exception

updateLayerData

public void updateLayerData(java.lang.Object layerKeys,
                            java.lang.Object updatedKeys,
                            java.lang.Object newValues,
                            int sessionId)
                     throws java.lang.Exception
Description copied from interface: IGisServerManager
Update the data identified by updatedKeys with the values newValues for the layer layerId

Specified by:
updateLayerData in interface IGisServerManager
Parameters:
layerKeys - Identifiers for the layer to delete
updatedKeys - Identifiers of the values to update
newValues - Values to update
sessionId - Session Id for this user
Throws:
java.lang.Exception

addLog

public void addLog(java.lang.Object o,
                   int level)
            throws java.lang.Exception
Specified by:
addLog in interface IGisServerManager
Throws:
java.lang.Exception

clearProviders

public void clearProviders(java.lang.Object configurationId)
                    throws java.lang.Exception
Specified by:
clearProviders in interface IGisServerManager
Throws:
java.lang.Exception