void ISoapTransactionLinkExecutor.ExecuteTransaction(Guid sessionId, Service.TransactionalMappingToolServiceClient serviceProxy)
        {
            SessionId    = sessionId;
            ServiceProxy = serviceProxy;

            ServiceProxy.MACompleted += OnAddMetadataCompleted;
            ServiceProxy.MAAsync(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString(), SessionId, DomainParameter.GetParameterValue(sessionId), RootMapParameter.GetParameterValue(sessionId), NodeParameter.GetParameterValue(sessionId), RelationshipParameter.GetParameterValue(sessionId), MapManager.ConnectionTypes.ConvertProxyToService(ConnectionType), MapManager.MetadataTypes.ConvertProxyToService(MetadataType), Name, Value, this);
        }
Ejemplo n.º 2
0
        void ISoapTransactionLinkExecutor.ExecuteTransaction(Guid sessionId, Service.TransactionalMappingToolServiceClient serviceProxy)
        {
            TransactionStatus = ServerStatus.SendingTransaction;
            SessionId         = sessionId;
            ServiceProxy      = serviceProxy;

            ServiceProxy.NACompleted += OnAddNodeCompleted;
            ServiceProxy.NAAsync(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString(), SessionId, DomainParameter.GetParameterValue(sessionId), RootMapParameter.GetParameterValue(sessionId), MapManager.NodeTypes.ConvertProxyToService(NodeType), OriginalId, this);
        }
Ejemplo n.º 3
0
        public CompendiumMapDepthMap()
        {
            InitializeComponent();

            NodeRelationshipHelper nrh = new NodeRelationshipHelper();

            IoC.IoCContainer.GetInjectionInstance().RegisterComponent <NodeRelationshipHelper>(nrh);
            nrh.NodesConnected += new EventHandler(OnNodesConnected);

            this.MouseMove            += new MouseEventHandler(CompendiumMapDepthMap_MouseMove);
            this.KeyDown              += new KeyEventHandler(CompendiumMapDepthMap_KeyDown);
            this.MouseRightButtonDown += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseRightButtonDown);
            this.MouseRightButtonUp   += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseRightButtonUp);
            this.MouseLeftButtonDown  += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonDown);
            this.MouseLeftButtonUp    += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonUp);

            if (!IsInDesignMode)
            {
                // TODO: The following code has been superceded;
                #region Obsolete
                if (string.IsNullOrEmpty(MappingToolSvcUrl))
                {
                    _nodeService = new DatabaseMappingService();
                }
                else
                {
                    _nodeService = new DatabaseMappingService(MappingToolSvcUrl);
                }
                IoC.IoCContainer.GetInjectionInstance().RegisterComponent <INodeService>(_nodeService);

                _typeManager = new TypeManager(_nodeService);
                IoC.IoCContainer.GetInjectionInstance().RegisterComponent <TypeManager>(_typeManager);

                _typeManager.InitialiseNodeTypeManagerCompleted += new EventHandler(InitialiseNodeTypeManagerCompleted);
                _typeManager.InitialiseNodeTypeManager();
                #endregion

                // TODO: Need to change this to pull from the params in the HTML declaration itself.
                TransactionalMappingToolSvcUrl = "http://glyma-dev/_vti_bin/SevenSigma/TransactionalMappingToolService.svc";

                System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
                binding.Security.Mode          = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
                binding.MaxReceivedMessageSize = 2147483647;

                System.ServiceModel.EndpointAddress address = new System.ServiceModel.EndpointAddress(new Uri(TransactionalMappingToolSvcUrl));

                Service.TransactionalMappingToolServiceClient client = new Service.TransactionalMappingToolServiceClient(binding, address);

                _mapManager = new SoapMapManager(client);

                IoC.IoCContainer.GetInjectionInstance().RegisterComponent <IMapManager>(_mapManager);

                _mapManager.InitialiseMapManagerCompleted += new EventHandler <InitialiseMapManagerEventArgs>(OnInitialiseMapManagerCompleted);
                _mapManager.InitialiseMapManagerAsync();
            }
        }
Ejemplo n.º 4
0
        void ISoapTransactionLinkExecutor.ExecuteBulkTransactions(Guid sessionId, Service.TransactionalMappingToolServiceClient serviceProxy, ref Service.OPS bulkOperations)
        {
            TransactionStatus = ServerStatus.SendingTransaction;
            SessionId         = sessionId;
            ServiceProxy      = serviceProxy;

            ResponseParameter   = new Service.MP();
            ResponseParameter.I = Guid.NewGuid();
            ResponseParameter.S = sessionId;
            ResponseParameter.V = Guid.Empty;
            ResponseParameter.D = true;
            ResponseParameter.T = Service.MapParameterType.Node;

            Service.BNA nodeBulkOperation = new Service.BNA();
            nodeBulkOperation.I  = TransactionLinkId;
            nodeBulkOperation.D  = DomainParameter.GetParameterValue(sessionId);
            nodeBulkOperation.RM = RootMapParameter.GetParameterValue(sessionId);
            nodeBulkOperation.T  = MapManager.NodeTypes.ConvertProxyToService(NodeType);
            nodeBulkOperation.O  = OriginalId;
            nodeBulkOperation.RI = ResponseParameter.I;

            bulkOperations.O.Add(nodeBulkOperation);

            ISoapTransactionLinkExecutor executor = _firstLink as ISoapTransactionLinkExecutor;

            if (executor == null)
            {
                DebugLogger.Instance.LogMsg("Exception: This is not a supported type of link. This link does not implement ISoapTransactionLinkExecutor.");
                throw new NotSupportedException("This is not a supported type of link. This link does not implement ISoapTransactionLinkExecutor.");
            }

            if (bulkOperations.O.Count < 200)
            {
                TransactionStatus = ServerStatus.TransactionReceived;

                if (!_onCompletedBound)
                {
                    executor.TransactionFailed    += OnTransactionFailed;
                    executor.TransactionCompleted += OnTransactionCompleted;

                    _onCompletedBound = true;
                }

                TransactionStatus = ServerStatus.TransactionExecuting;

                DebugLogger.Instance.LogMsg("Executing add node transaction. ClientId - '{0}';", _inProcessResponse.ClientId);
                executor.ExecuteBulkTransactions(SessionId, ServiceProxy, ref bulkOperations);
            }
            else
            {
                ServiceProxy.BOCCompleted += new EventHandler <Service.BOCCompletedEventArgs>(OnSubmitBulkOperationCompleted);
                ServiceProxy.SubmitBulkOperationsAsync(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString(), SessionId, bulkOperations, this);
            }
        }
        void ISoapTransactionLinkExecutor.ExecuteBulkTransactions(Guid sessionId, Service.TransactionalMappingToolServiceClient serviceProxy, ref Service.OPS bulkOperations)
        {
            SessionId    = sessionId;
            ServiceProxy = serviceProxy;

            ResponseParameter   = new Service.MP();
            ResponseParameter.I = Guid.NewGuid();
            ResponseParameter.S = sessionId;
            ResponseParameter.V = Guid.Empty;
            ResponseParameter.D = true;
            ResponseParameter.T = Service.MapParameterType.Node;

            Service.BMA metadataBulkOperation = new Service.BMA();
            metadataBulkOperation.I  = TransactionLinkId;
            metadataBulkOperation.D  = DomainParameter.GetParameterValue(sessionId);
            metadataBulkOperation.RM = RootMapParameter.GetParameterValue(sessionId);
            metadataBulkOperation.N  = NodeParameter.GetParameterValue(sessionId);
            metadataBulkOperation.R  = RelationshipParameter.GetParameterValue(sessionId);
            metadataBulkOperation.DT = MapManager.ConnectionTypes.ConvertProxyToService(ConnectionType);
            metadataBulkOperation.T  = MapManager.MetadataTypes.ConvertProxyToService(MetadataType);
            metadataBulkOperation.MN = Name;
            metadataBulkOperation.MV = Value;
            metadataBulkOperation.RI = ResponseParameter.I;

            bulkOperations.O.Add(metadataBulkOperation);

            ISoapTransactionLinkExecutor executor = _firstLink as ISoapTransactionLinkExecutor;

            if (executor == null)
            {
                DebugLogger.Instance.LogMsg("Exception: This is not a supported type of link. This link does not implement ISoapTransactionLinkExecutor.");
                throw new NotSupportedException("This is not a supported type of link. This link does not implement ISoapTransactionLinkExecutor.");
            }

            if (bulkOperations.O.Count < 200)
            {
                if (!_onCompletedBound)
                {
                    executor.TransactionFailed    += OnTransactionFailed;
                    executor.TransactionCompleted += OnTransactionCompleted;

                    _onCompletedBound = true;
                }

                DebugLogger.Instance.LogMsg("Executing add metadata transaction. Name - '{0}'; Value - '{1}';", Name, Value);
                executor.ExecuteBulkTransactions(SessionId, ServiceProxy, ref bulkOperations);
            }
            else
            {
                ServiceProxy.BOCCompleted += new EventHandler <Service.BOCCompletedEventArgs>(OnSubmitBulkOperationCompleted);
                ServiceProxy.SubmitBulkOperationsAsync(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString(), SessionId, bulkOperations, this);
            }
        }
Ejemplo n.º 6
0
        public Service.TransactionalMappingToolServiceClient Create()
        {
            var binding = new BasicHttpBinding();

            binding.Security.Mode          = BasicHttpSecurityMode.TransportCredentialOnly;
            binding.MaxReceivedMessageSize = 2147483647;

            var address = new EndpointAddress(ServiceUrl);
            var client  = new Service.TransactionalMappingToolServiceClient(binding, address);

            return(client);
        }
        void ISoapTransactionLinkExecutor.ExecuteTransaction(Guid sessionId, Service.TransactionalMappingToolServiceClient serviceProxy)
        {
            TransactionStatus = ServerStatus.SendingTransaction;
            SessionId         = sessionId;
            ServiceProxy      = serviceProxy;

            Dictionary <Service.DT, Service.MP> nodeConnections = new Dictionary <Service.DT, Service.MP>();

            foreach (KeyValuePair <Service.DT, SoapTransactionLinkParameter> keyValuePair in TransactionLinkConnections)
            {
                Service.DT descriptorType = keyValuePair.Key;
                Service.MP parameter      = keyValuePair.Value.GetParameterValue(sessionId);

                nodeConnections[descriptorType] = parameter;
            }

            ServiceProxy.RACompleted += OnAddRelationshipCompleted;
            ServiceProxy.RAAsync(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString(), SessionId, DomainParameter.GetParameterValue(sessionId), RootMapParameter.GetParameterValue(sessionId), nodeConnections, MapManager.RelationshipTypes.ConvertProxyToService(RelationshipType), OriginalId, this);
        }
        public CompendiumMapDepthMap()
        {
            InitializeComponent();
            
            NodeRelationshipHelper nrh = new NodeRelationshipHelper();
            IoC.IoCContainer.GetInjectionInstance().RegisterComponent<NodeRelationshipHelper>(nrh);
            nrh.NodesConnected += new EventHandler(OnNodesConnected);

            this.MouseMove += new MouseEventHandler(CompendiumMapDepthMap_MouseMove);
            this.KeyDown += new KeyEventHandler(CompendiumMapDepthMap_KeyDown);
            this.MouseRightButtonDown += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseRightButtonDown);
            this.MouseRightButtonUp += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseRightButtonUp);
            this.MouseWheel += new MouseWheelEventHandler(CompendiumMapDepthMap_MouseWheel);
            this.MouseLeftButtonDown += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonDown);
            this.MouseLeftButtonUp += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonUp);
            
            this.Loaded += new RoutedEventHandler(CompendiumMapDepthMap_Loaded);

            if (!IsInDesignMode)
            {
                // TODO: The following code has been superceded;
                #region Obsolete
                if (string.IsNullOrEmpty(MappingToolSvcUrl))
                {
                    _nodeService = new DatabaseMappingService();
                }
                else
                {
                    _nodeService = new DatabaseMappingService(MappingToolSvcUrl);
                }
                IoC.IoCContainer.GetInjectionInstance().RegisterComponent<INodeService>(_nodeService);

                _typeManager = new TypeManager(_nodeService);
                IoC.IoCContainer.GetInjectionInstance().RegisterComponent<TypeManager>(_typeManager);

                _typeManager.InitialiseNodeTypeManagerCompleted += new EventHandler(InitialiseNodeTypeManagerCompleted);
                _typeManager.InitialiseNodeTypeManager();
                #endregion

                // TODO: Need to change this to pull from the params in the HTML declaration itself.
                TransactionalMappingToolSvcUrl = "http://glyma-dev/_vti_bin/sevensigma/transactionalmappingtoolservice.svc";

                System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
                binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
                binding.MaxReceivedMessageSize = 2147483647;

                System.ServiceModel.EndpointAddress address = new System.ServiceModel.EndpointAddress(new Uri(TransactionalMappingToolSvcUrl));

                Service.TransactionalMappingToolServiceClient client = new Service.TransactionalMappingToolServiceClient(binding, address);

                //_mapManager = new SoapMapManager(client);

                IoC.IoCContainer.GetInjectionInstance().RegisterComponent<IMapManager>(_mapManager);

                _mapManager.InitialiseMapManagerCompleted += new EventHandler<InitialiseMapManagerEventArgs>(OnInitialiseMapManagerCompleted);
                _mapManager.InitialiseMapManagerAsync();
            }
        }