public void Init(IServerObjectHelper pSOH)
        {
            try
            {
                _soHelper      = pSOH;
                _serverLog     = new ServerLogger();
                _restSOIHelper = new RestSOIHelper(pSOH);

                try
                {
                    IPropertySet configProps = ServerUtilities.QueryConfigurationProperties(pSOH.ServerObject.ConfigurationName, pSOH.ServerObject.TypeName);
                    _outputDirectory = configProps.GetProperty("outputDir") as string;
                }
                catch (Exception ignore)
                {
                    _outputDirectory = string.Empty;
                }

                _outputDirectory = _outputDirectory.Trim();
                if (string.IsNullOrEmpty(_outputDirectory))
                {
                    _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".init()", 500, "OutputDirectory is empty or missing. Reset to default.");
                    _outputDirectory = "C:\\arcgisserver\\directories\\arcgisoutput";
                }

                _serverLog.LogMessage(ServerLogger.msgType.infoDetailed, _soiName + ".init()", 500, "OutputDirectory is " + _outputDirectory);
                _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
            }
            catch (Exception e)
            {
                _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".HandleRESTRequest()", 500, "Exception " + e.GetType().Name + " " + e.Message + " " + e.StackTrace);
                throw;
            }
        }
 public void Shutdown()
 {
     _logger.LogMessage(ServerLogger.msgType.infoStandard, "Shutdown", 8000, "Custom message: Shutting down the SOE");
     _serverObjectHelper = null;
     _logger             = null;
     _mosaicCatalog      = null;
 }
Beispiel #3
0
        public void Init(IServerObjectHelper pSOH)
        {
////#if DEBUG
////            System.Diagnostics.Debugger.Launch();
////#endif
            _serverObjectHelper = pSOH;
        }
        /// <summary>
        /// Metodo che restituisce una Feature Class dato un Server Object e il Url del Service Layer
        /// </summary>
        /// <param name="serverObjectHelper">Server Object</param>
        /// <param name="URLServiceLayer">URL Service Layer</param>
        /// <returns></returns>
        internal static IFeatureClass RicavaFCDaURLServiceLayer(IServerObjectHelper serverObjectHelper, string URLServiceLayer)
        {
            IFeatureClass fc;

            try
            {
                // Ricavo il numero posizionale del Service Layer
                int numPosizionale = Convert.ToInt32(System.IO.Path.GetFileName(URLServiceLayer));

                IMapServer4 mapServer      = (IMapServer4)serverObjectHelper.ServerObject;
                string      nomeMapService = mapServer.DefaultMapName;

                // Use IMapServerDataAccess to get the data
                IMapServerDataAccess dataAccess = (IMapServerDataAccess)mapServer;

                // Accedo alla Feature Class sorgente
                fc = (IFeatureClass)dataAccess.GetDataSource(nomeMapService, numPosizionale);
            }
            catch (System.Exception)
            {
                throw;
            }

            return(fc);
        }
        /// <summary>
        /// Function called when the service is init.
        /// We read persmissions there.
        /// </summary>
        /// <param name="pSOH"></param>
        public void Init(IServerObjectHelper pSOH)
        {
            _soHelper  = pSOH;
            _serverLog = new ServerLogger();

            // we get the permissions (a user can see a specific set of layers)
            _permList = new PermissionsList();
            if (File.Exists(_permissonPath))
            {
                String permListString             = File.ReadAllText(_permissonPath);
                JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
                // default maxsize = 4mo of data.
                // deserialize and set a list.
                var permListJson = jsSerializer.DeserializeObject(permListString) as IDictionary <string, object>;
                var permArray    = permListJson["permissions"] as object[];
                foreach (var perm in permArray)
                {
                    var        permJson     = perm as IDictionary <string, object>;
                    Permission myPermission = new Permission();
                    myPermission.user   = permJson["user"].ToString();
                    myPermission.layers = permJson["layers"].ToString();
                    _permList.permissions.Add(myPermission);
                }
            }


            _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
        }
 public void Init(IServerObjectHelper pSOH)
 {
     ////#if DEBUG
     ////            System.Diagnostics.Debugger.Launch();
     ////#endif
     _serverObjectHelper = pSOH;
 }
Beispiel #7
0
        public void Init(IServerObjectHelper pSOH)
        {
            serverObjectHelper  = pSOH;
            mapService          = (MapServer)serverObjectHelper.ServerObject;
            mapServerDataAccess = (IMapServerDataAccess)serverObjectHelper.ServerObject;

            // Check if this service contains a Utility Network layer
            unLayerInfo = soeUtil.GetUNLayerInfo(mapService);
            if (unLayerInfo != null)
            {
                // Get the Utility Network dataset
                IFeatureClass fc = (IFeatureClass)mapServerDataAccess.GetDataSource(mapService.DefaultMapName, unLayerInfo.SubLayers.Element[0]);

                // Get UN dataset
                IFeatureDataset fd        = fc.FeatureDataset;
                IDataset        ds        = (IDataset)fd;
                IEnumDataset    enumSubDS = ds.Subsets;
                IDataset        subDS     = enumSubDS.Next();
                while (subDS != null)
                {
                    if (subDS.Type == esriDatasetType.esriDTUtilityNetwork)
                    {
                        unDataset = subDS;
                        break;
                    }
                    subDS = enumSubDS.Next();
                }

                logger.LogMessage(ServerLogger.msgType.infoStandard, soe_name + ".init()", 200, "UN dataset found: " + unDataset.Name);
            }
        }
Beispiel #8
0
        public void Init(IServerObjectHelper pSOH)
        {
            serverObjectHelper = pSOH;

            IMapServer ms        = (IMapServer)pSOH.ServerObject;
            String     outputDir = outputDir = ms.PhysicalOutputDirectory;
            int        len       = 0;

            if (outputDir != null)
            {
                len = outputDir.Length;
            }
            if (len > 0)
            {
                String mapservicePath  = outputDir.Substring(0, len - 1);
                int    mapServiceIndex = mapservicePath.LastIndexOf("\\");
                virtualFilePath = mapservicePath.Substring(mapServiceIndex + 1);
                localFilePath   = mapservicePath;
            }
            if (string.IsNullOrEmpty(localFilePath))
            {
                logger.LogMessage(ServerLogger.msgType.error, soe_name + ".init()", 500, "OutputDirectory is empty or missing. Reset to default.");
            }
            logger.LogMessage(ServerLogger.msgType.infoStandard, soe_name + ".init()", 200, "Initialized " + soe_name + " SOE.");
        }
        public void Init(IServerObjectHelper pSOH)
        {
            _soHelper = pSOH;
            _serverLog = new ServerLogger();
            _restSOIHelper = new RestSOIHelper(pSOH);

            _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
        }
 public void Shutdown() 
 {
     serverLog.LogMessage(ServerLogger.msgType.infoStandard, this.soeName + ".init()", 200, "Shutting down " + this.soeName + " SOE.");
     this.soHelper = null;
     this.serverLog = null;
     this.mapServerDataAccess = null;
     this.layerInfos = null;
 }
        public void Init(IServerObjectHelper pSOH)
        {
            _soHelper      = pSOH;
            _serverLog     = new ServerLogger();
            _restSOIHelper = new RestSOIHelper(pSOH);

            _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
        }
Beispiel #12
0
 public void Shutdown()
 {
     serverLog.LogMessage(ServerLogger.msgType.infoStandard, this.soeName + ".init()", 200, "Shutting down " + this.soeName + " SOE.");
     this.soHelper            = null;
     this.serverLog           = null;
     this.mapServerDataAccess = null;
     this.layerInfos          = null;
 }
Beispiel #13
0
 public void Shutdown()
 {
     logger.LogMessage(ServerLogger.msgType.infoStandard, "Shutdown", 8000, "Custom message: Shutting down the SOE");
     soe_name           = null;
     m_fcToQuery        = null;
     m_mapFieldToQuery  = null;
     serverObjectHelper = null;
     logger             = null;
 }
        public void Init(IServerObjectHelper pSOH)
        {
            System.Diagnostics.Debugger.Launch();

            _soHelper       = pSOH;
            _serverLog      = new ServerLogger();
            _restServiceSOI = new RestSOIHelper(pSOH);
            ReadConfigFile(pSOH);
            InitFiltering();
            _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
        }
        public void Init(IServerObjectHelper pSOH)
        {
            this.soHelper = pSOH;
            this.serverLog = new ServerLogger();
            this.mapServerDataAccess = (IMapServerDataAccess)this.soHelper.ServerObject;
            IMapServer3 ms = (IMapServer3)this.mapServerDataAccess;
            IMapServerInfo mapServerInfo = ms.GetServerInfo(ms.DefaultMapName);
            this.layerInfos = mapServerInfo.MapLayerInfos;

            serverLog.LogMessage(ServerLogger.msgType.infoStandard, this.soeName + ".init()", 200, "Initialized " + this.soeName + " SOE.");
        }
Beispiel #16
0
        public void Init(IServerObjectHelper pSOH)
        {
            this.soHelper            = pSOH;
            this.serverLog           = new ServerLogger();
            this.mapServerDataAccess = (IMapServerDataAccess)this.soHelper.ServerObject;
            IMapServer     ms            = (IMapServer)this.mapServerDataAccess;
            IMapServerInfo mapServerInfo = ms.GetServerInfo(ms.DefaultMapName);

            this.layerInfos = mapServerInfo.MapLayerInfos;

            serverLog.LogMessage(ServerLogger.msgType.infoStandard, this.soeName + ".init()", 200, "Initialized " + this.soeName + " SOE.");
        }
        public void Init(IServerObjectHelper pSOH)
        {
            // Uncomment this line to turn on the debugger
            //System.Diagnostics.Debugger.Launch();

            _soHelper      = pSOH;
            _serverLog     = new ServerLogger();
            _restSOIHelper = new RestSOIHelper(pSOH);
            _soiUtil       = new SOIUtil();

            _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
        }
        private bool loadGeometricNetworkFromServer(IServerObjectHelper serverObjectHelper, ServerLogger logger)
        {
            bool result = false;

            if (null != serverObjectHelper)
            {
                try
                {
                    IMapServer3          mapServer  = (IMapServer3)serverObjectHelper.ServerObject;
                    IMapServerDataAccess da         = (IMapServerDataAccess)mapServer;
                    IMapLayerInfos       layerInfos = mapServer.GetServerInfo(mapServer.DefaultMapName).MapLayerInfos;
                    IFeatureDataset      ftrDataset = null;
                    for (int i = 0; i < layerInfos.Count; i++)
                    {
                        IMapLayerInfo lyrInfo = layerInfos.get_Element(i);
                        if (lyrInfo.IsFeatureLayer)
                        {
                            IFeatureClass ftrClass = (IFeatureClass)da.GetDataSource(mapServer.DefaultMapName, lyrInfo.ID);
                            if (null == ftrDataset && ftrClass.FeatureDataset.Name == this.networkName)
                            {
                                ftrDataset = ftrClass.FeatureDataset;
                            }
                            if (esriFeatureType.esriFTSimpleEdge == ftrClass.FeatureType)
                            {
                                this.addEdgeFeatureClass(ftrClass);
                            }
                            else if (esriFeatureType.esriFTSimpleJunction == ftrClass.FeatureType)
                            {
                                this.addJunctionFeatureClass(ftrClass);
                            }
                        }
                    }
                    if (this.edgeCount > 0 && this.junctionCount > 0 && null != ftrDataset)
                    {
                        INetworkCollection networkCollection = ftrDataset as INetworkCollection;
                        if (networkCollection != null && networkCollection.GeometricNetworkCount > 0)
                        {
                            this.geometricNetwork = networkCollection.GeometricNetwork[0];
                            result = true;
                        }
                    }
                }
                catch (Exception e)
                {
                    if (null != logger)
                    {
                        logger.LogMessage(ServerLogger.msgType.error, typeof(NetworkHelper).Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name, GLC.AO.AOUtilities.ErrorCode, e.Message);
                    }
                }
            }
            return(result);
        }
        private void ReadConfigFile(IServerObjectHelper pSOH)
        {
            if (!File.Exists(_configFilePath))
            {
                throw new Exception("The json file defining scale dependent definition queries is not found.");
            }

            String jsonStr          = File.ReadAllText(_configFilePath);
            JavaScriptSerializer sr = new JavaScriptSerializer {
                MaxJsonLength = int.MaxValue
            };
            var jsonConfigArray = sr.DeserializeObject(jsonStr) as object[];

            var n = string.Format("{0}.{1}", pSOH.ServerObject.ConfigurationName, pSOH.ServerObject.TypeName);

            _serverLog.LogMessage(ServerLogger.msgType.infoStandard, "", 999, "SO Name: " + n);
            foreach (var item in jsonConfigArray)
            {
                var d          = item as Dictionary <string, object>;
                var fqsnJSName = d["fqsn"].ToString();
                _serverLog.LogMessage(ServerLogger.msgType.infoStandard, "", 999, "FQSN from JSON: " + fqsnJSName);
                _serverLog.LogMessage(ServerLogger.msgType.infoStandard, "", 999, string.Format("{0} == {1} : Matched? {2}", n, fqsnJSName, n.Equals(fqsnJSName, StringComparison.CurrentCultureIgnoreCase)));
            }


            var jsonConfig = jsonConfigArray.FirstOrDefault(j =>
            {
                var d          = j as Dictionary <string, object>;
                var soFullName = string.Format("{0}.{1}", pSOH.ServerObject.ConfigurationName, pSOH.ServerObject.TypeName);
                if (d["fqsn"].ToString().Equals(soFullName, StringComparison.CurrentCultureIgnoreCase))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }) as Dictionary <string, object>;


            _queryableLayerID         = jsonConfig["redirectQueryToLayerID"].ToString();
            _timeFieldName            = jsonConfig["timeFieldName"].ToString();
            _liveTimeLayerID          = jsonConfig["liveTimeLayerID"].ToString();
            _defaultOrderBy           = jsonConfig["defaultOrderByFields"].ToString();
            _defaultResultRecordCount = jsonConfig["defaultResultRecordCount"].ToString();
            if (jsonConfig.ContainsKey("legend"))
            {
                _customLegend = jsonConfig["legend"] as object[];
            }
            sr = null;
        }
        public bool LoadGeometricNetwork(string path, IServerObjectHelper serverObjectHelper, ServerLogger logger)
        {
            if (false == this.isLoaded)
            {
                this.isLoaded = path != null?this.loadGeometricNetworkFromPath(path, logger) : this.loadGeometricNetworkFromServer(serverObjectHelper, logger);

                this.isLoaded = this.isLoaded && this.checkEdgesAndJunctions();
                return(this.isLoaded);
            }
            else
            {
                throw new ArgumentException("Can not load network on one context more than once.");
            }
        }
        public void Init(IServerObjectHelper pSOH)
        {
            serverObjectHelper = pSOH;

            mapServerDataAccess = (IMapServerDataAccess)pSOH.ServerObject;
            IMapServer3 ms = (IMapServer3)pSOH.ServerObject;

            this.mapServerInfo = ms.GetServerInfo(ms.DefaultMapName);
            this.layerInfos    = mapServerInfo.MapLayerInfos;

            if (layerId < 0)
            {
                layerId = 0;
            }
        }
        public void Init(IServerObjectHelper pSOH)
        {
            try
            {
                _soHelper  = pSOH;
                _serverLog = new ServerLogger();

                _restSOIHelper = new RestSOIHelper(pSOH);

                try
                {
                    //interop problem?
                    var se4      = _restSOIHelper.ServerEnvironment as IServerEnvironmentEx;
                    var dirInfos = se4.GetServerDirectoryInfos();
                    dirInfos.Reset();
                    object dirInfo = dirInfos.Next();
                    while (dirInfo != null)
                    {
                        var dinfo2 = dirInfo as IServerDirectoryInfo2;
                        if (null != dinfo2 && dinfo2.Type == esriServerDirectoryType.esriSDTypeOutput)
                        {
                            _outputDirectory = dinfo2.Path;
                            break;
                        }
                        dirInfo = dirInfos.Next();
                    }
                }
                catch (Exception ignore)
                {
                    _outputDirectory = string.Empty;
                }

                _outputDirectory = _outputDirectory.Trim();
                if (string.IsNullOrEmpty(_outputDirectory))
                {
                    _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".init()", 500, "OutputDirectory is empty or missing. Reset to default.");
                    _outputDirectory = "C:\\arcgisserver\\directories\\arcgisoutput";
                }

                _serverLog.LogMessage(ServerLogger.msgType.infoDetailed, _soiName + ".init()", 500, "OutputDirectory is " + _outputDirectory);
                _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
            }
            catch (Exception e)
            {
                _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".HandleRESTRequest()", 500, "Exception " + e.GetType().Name + " " + e.Message + " " + e.StackTrace);
                throw;
            }
        }
        public void Init ( IServerObjectHelper pSOH )
        {
            try
            {
                _soHelper = pSOH;
                _serverLog = new ServerLogger();

                _restSOIHelper = new RestSOIHelper(pSOH);

                try
                {
                    //interop problem?
                    var se4 = _restSOIHelper.ServerEnvironment as IServerEnvironmentEx;
                    var dirInfos = se4.GetServerDirectoryInfos();
                    dirInfos.Reset();
                    object dirInfo = dirInfos.Next();
                    while (dirInfo != null)
                    {
                        var dinfo2 = dirInfo as IServerDirectoryInfo2;
                        if (null != dinfo2 && dinfo2.Type == esriServerDirectoryType.esriSDTypeOutput)
                        {
                            _outputDirectory = dinfo2.Path;
                            break;
                        }
                        dirInfo = dirInfos.Next();
                    }
                }
                catch (Exception ignore)
                {
                    _outputDirectory = string.Empty;
                }

                _outputDirectory = _outputDirectory.Trim();
                if (string.IsNullOrEmpty(_outputDirectory))
                {
                    _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".init()", 500, "OutputDirectory is empty or missing. Reset to default.");
                    _outputDirectory = "C:\\arcgisserver\\directories\\arcgisoutput";
                }

                _serverLog.LogMessage(ServerLogger.msgType.infoDetailed, _soiName + ".init()", 500, "OutputDirectory is " + _outputDirectory);
                _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
            }
            catch (Exception e)
            {
                _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".HandleRESTRequest()", 500, "Exception " + e.GetType().Name + " " + e.Message + " " + e.StackTrace);
                throw;
            }
        }
Beispiel #24
0
        // TODO: make routeIdFieldName configurable instead of hard-coded.

        public static IRouteLocator2 GetRouteLocator(this IServerObjectHelper serverObjectHelper, long layerId, string routeIdFieldName)
        {
            var server           = (IMapServer4)serverObjectHelper.ServerObject;
            var serverDataAccess = (IMapServerDataAccess)server;
            var dataSet          = (IDataset)serverDataAccess.GetDataSource(server.DefaultMapName, Convert.ToInt32(layerId));
            var name             = dataSet.FullName;
            IRouteLocatorName routeLocatorName = new RouteMeasureLocatorNameClass
            {
                RouteFeatureClassName = name,
                RouteIDFieldName      = routeIdFieldName,
                RouteMeasureUnit      = esriUnits.esriMiles
            };

            name = (IName)routeLocatorName;
            var routeLocator = (IRouteLocator2)name.Open();

            return(routeLocator);
        }
        public void Init(IServerObjectHelper pSOH)
        {
            IMapServer           mapServer           = pSOH.ServerObject as IMapServer;
            IMapServerDataAccess mapServerDataAccess = mapServer as IMapServerDataAccess;
            IMapServerInfo       mapServerInfo       = mapServer.GetServerInfo(mapServer.DefaultMapName);
            IMapLayerInfos       layerInfos          = mapServerInfo.MapLayerInfos;
            IMapLayerInfo        ndLayerInfo         = null;

            // Get the network dataset layer from current service
            for (var i = 0; i < layerInfos.Count; i++)
            {
                IMapLayerInfo layerInfo = layerInfos.Element[i];
                if (layerInfo.Type.Equals("Network Dataset Layer", StringComparison.InvariantCultureIgnoreCase))
                {
                    ndLayerInfo = layerInfo;
                    break;
                }
            }

            // Get the network dataset
            if (ndLayerInfo != null)
            {
                var dt = mapServerDataAccess.GetDataSource(mapServer.DefaultMapName, ndLayerInfo.ID);
                // Cast the dataset to required network dataset interface
                networkDataset = dt as INetworkDataset;
            }

            if (networkDataset != null)
            {
                // Open the streets feature class
                IDataset          dataSet    = networkDataset as IDataset;
                IFeatureWorkspace fWorkspace = dataSet.Workspace as IFeatureWorkspace;
                streetFC = fWorkspace.OpenFeatureClass(streetsName);

                // Get the Streets source ID
                INetworkSource streetNetworkSource = networkDataset.SourceByName[streetsName];
                streetsSourceID = streetNetworkSource.ID;

                // Get the TraveTime attribute ID
                INetworkAttribute travelTimeAttribute = networkDataset.AttributeByName[costAttributeName];
                travelTimeAttributeID = travelTimeAttribute.ID;
            }
        }
        public void Init(IServerObjectHelper pSOH)
        {
            serverObjectHelper = pSOH;
            string _outputDirectory = null;

            try
            {
                IPropertySet configProps = ServerUtilities.QueryConfigurationProperties(pSOH.ServerObject.ConfigurationName, pSOH.ServerObject.TypeName);
                _outputDirectory = configProps.GetProperty("outputDir") as string;
            }
            catch (Exception ignore)
            {
                _outputDirectory = string.Empty;
            }

            _outputDirectory = _outputDirectory.Trim();
            if (string.IsNullOrEmpty(_outputDirectory))
            {
                logger.LogMessage(ServerLogger.msgType.error, soe_name + ".init()", 500, "OutputDirectory is empty or missing. Reset to default.");
                _outputDirectory = "C:\\arcgisserver\\directories\\arcgisoutput";
            }
            localFilePath   = _outputDirectory + "\\" + pSOH.ServerObject.ConfigurationName.Replace('/', '\\') + "_" + pSOH.ServerObject.TypeName;
            virtualFilePath = pSOH.ServerObject.ConfigurationName + "_" + pSOH.ServerObject.TypeName;
        }
Beispiel #27
0
        public void Init(IServerObjectHelper pSOH)
        {
            _soHelper  = pSOH;
            _serverLog = new ServerLogger();

            // set the name of the point layer in the mapservice
            string mapLayerToFind = "points";

            //System.Diagnostics.Debugger.Launch();
            //Access the map service and its layer infos
            ESRI.ArcGIS.Carto.IMapServer3 mapServer = (ESRI.ArcGIS.Carto.IMapServer3)_soHelper.ServerObject;
            string         mapName    = mapServer.DefaultMapName;
            IMapLayerInfos layerInfos = mapServer.GetServerInfo(mapName).MapLayerInfos;
            IMapLayerInfo  layerInfo;

            // Find the index of the layer of interest
            int c          = layerInfos.Count;
            int layerIndex = 0;

            for (int i = 0; i < c; i++)
            {
                layerInfo = layerInfos.get_Element(i);
                if (layerInfo.Name == mapLayerToFind)
                {
                    layerIndex = i;
                    break;
                }
            }

            // Access the source feature class of the layer data source (to request it on map export :-))
            IMapServerDataAccess dataAccess = (IMapServerDataAccess)mapServer;

            myPointsClass = (IFeatureClass)dataAccess.GetDataSource(mapName, layerIndex);

            _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
        }
 public void Shutdown()
 {
     serverObjectHelper = null;
 }
 public virtual void Init(IServerObjectHelper pSOH)
 {
     m_serverObjectHelper = pSOH;
 }
Beispiel #30
0
 public void Init(IServerObjectHelper pSOH)
 {
     serverObjectHelper = pSOH;
 }
 public virtual void Shutdown()
 {
     LogInfo(m_soeName + " shutting down");
     m_soeName = null;
     m_serverObjectHelper = null;
     m_logger = null;
     m_reqHandler = null;
 }
 public void Shutdown()
 {
     logger.LogMessage(ServerLogger.msgType.infoStandard, "Shutdown", 8000, "Custom message: Shutting down the SOE");
     soe_name = null;
     m_fcToQuery = null;
     m_mapFieldToQuery = null;
     serverObjectHelper = null;
     logger = null;
 }
 public void Shutdown()
 {
     _logger.LogMessage(ServerLogger.msgType.infoStandard, "Shutdown", 8000, "Custom message: Shutting down the SOE");
     _serverObjectHelper = null;
     _logger = null;
     _mosaicCatalog = null;
 }
Beispiel #34
0
 public void Init(IServerObjectHelper pSOH)
 {
     //System.Diagnostics.Debugger.Launch();
     serverObjectHelper = pSOH;
 }
Beispiel #35
0
 public void Init(IServerObjectHelper pSOH)
 {
     //System.Diagnostics.Debugger.Launch();
     serverObjectHelper = pSOH;
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="CreateLayerMapCommand" /> class.
 /// </summary>
 /// <param name="serverObjectHelper">The server object helper.</param>
 public CreateLayerMapCommand(IServerObjectHelper serverObjectHelper)
 {
     _serverObjectHelper = serverObjectHelper;
     _logger = new ServerLogger();
 }
Beispiel #37
0
 /// <summary>
 ///   stops the server object specified by the IServerObjectHelper reference. Cleans up after itself before shutting down its parent mapservice etc.
 /// </summary>
 public virtual void Shutdown()
 {
     ServerObjectHelper = null;
 }
 public void Init(IServerObjectHelper pSOH)
 {
     _serverObjectHelper = pSOH;
     _logger.LogMessage(ServerLogger.msgType.infoStandard, _soename + ".Init", 200, "Initialized " + _soename + " SOE.");
 }
 public void Shutdown()
 {
     serverObjectHelper = null;
 }
 public void Shutdown()
 {
     logger.LogMessage(ServerLogger.msgType.infoStandard,"Shutdown",8000,"Shutting down the watershed SOE");
     soe_name=null;
     serverObjectHelper=null;
 }
 public void Init(IServerObjectHelper pSOH)
 {
     _serverObjectHelper = pSOH;
     pImageSever = _serverObjectHelper.ServerObject as ImageServer;
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pSOH"></param>
        public void Init ( IServerObjectHelper pSOH )
        {
            try
            {
                _soHelper = pSOH;
                _serverLog = new ServerLogger();
                _serverObject = pSOH.ServerObject;

                _restServiceSOI = new RestSOIHelper(_soHelper);
                _SoapSOIHelper = new SoapSOIHelper(_soHelper, _wsdlFilePath);

                if (File.Exists(_permissionFilePath))
                {
                    //TODO REMOVE
                    _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Reading permissions from " + _permissionFilePath);

                    _servicePermissionMap = ReadPermissionFile(_permissionFilePath);

                    //TODO REMOVE
                    _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Total permission entries: " + _servicePermissionMap.Count());
                }
                else
                {
                    _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".init()", 500, "Permission file does not exist at " + _permissionFilePath);
                }

                InitFiltering();

                _serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".init()", 200, "Initialized " + _soiName + " SOI.");
            }
            catch (Exception e)
            {
                _serverLog.LogMessage(ServerLogger.msgType.error, _soiName + ".init()", 500, "Exception: " + e.Message + " in " + e.StackTrace);
            }
        }
 public void Init(IServerObjectHelper pSOH)
 {
     Debugger.Launch();
     serverObjectHelper = pSOH;
 }
        public void Init(IServerObjectHelper pSOH)
        {
            serverObjectHelper = pSOH;

            mapServerDataAccess = (IMapServerDataAccess)pSOH.ServerObject;
            IMapServer3 ms = (IMapServer3)pSOH.ServerObject;
            this.mapServerInfo = ms.GetServerInfo(ms.DefaultMapName);
            this.layerInfos = mapServerInfo.MapLayerInfos;

            if (layerId < 0)
                layerId = 0;
        }
 public void Init(IServerObjectHelper pSOH)
 {
     _serverObjectHelper = pSOH;
     _logger.LogMessage(ServerLogger.msgType.infoStandard, _soename + ".Init", 200, "Initialized " + _soename + " SOE.");
 }
Beispiel #46
0
 /// <summary>
 ///   Initializes and starts the server object specified by the IServerObjectHelper reference. If you have business logic that you want to run when the SOE first becomes enabled, don’t put it in Init() or in your SOE class’s constructor; instead, use the following IObjectConstruct.Construct() method
 /// </summary>
 /// <param name="serverObjectHelper"> The server object helper. </param>
 public virtual void Init(IServerObjectHelper serverObjectHelper)
 {
     ServerObjectHelper = serverObjectHelper;
 }
 public void Init(IServerObjectHelper pSOH) { }
Beispiel #48
0
 /// <summary>
 ///   stops the server object specified by the IServerObjectHelper reference. Cleans up after itself before shutting down its parent mapservice etc.
 /// </summary>
 public virtual void Shutdown()
 {
     ServerObjectHelper = null;
 }
Beispiel #49
0
 public void Init(IServerObjectHelper pSOH)
 {
     _soHelper      = pSOH;
     _restSOIHelper = new RestSOIHelper(pSOH);
 }
Beispiel #50
0
 public void Init(IServerObjectHelper pSoh)
 {
 }
Beispiel #51
0
 public void Init(IServerObjectHelper pSOH)
 {
     _serverObjectHelper = pSOH;
 }
Beispiel #52
0
 /// <summary>
 ///   Initializes and starts the server object specified by the IServerObjectHelper reference. If you have business logic that you want to run when the SOE first becomes enabled, don’t put it in Init() or in your SOE class’s constructor; instead, use the following IObjectConstruct.Construct() method
 /// </summary>
 /// <param name="serverObjectHelper"> The server object helper. </param>
 public virtual void Init(IServerObjectHelper serverObjectHelper)
 {
     ServerObjectHelper = serverObjectHelper;
 }