Наследование: IPersistableSessionObject
Пример #1
0
 public void AddParameter(MapParameter parameter)
 {
     if (parameter != null)
     {
         ParameterContainer[parameter.Id] = parameter;
     }
 }
Пример #2
0
 public void AddParameter(MapParameter parameter)
 {
     if (parameter != null)
     {
         ParameterContainer[parameter.Id] = parameter;
     }
 }
Пример #3
0
        internal MapParameter BuildResponseParameterFromGuid(Guid responseParameter)
        {
            _responseParameter        = MapObjects.Parameters.AddParameter(responseParameter, ResponseParameterType, Guid.Empty, true);
            Core.ResponseParameterUid = _responseParameter.Id;

            return(_responseParameter);
        }
Пример #4
0
        public MapParameter AddParameter(Guid parameterId, MapParameterType parameterType, Guid parameterValue, bool isDelayed)
        {
            MapParameter newParameter = new MapParameter(parameterId);
            newParameter.Value = parameterValue;
            newParameter.SessionId = MapObjects.Session.Id;
            newParameter.IsDelayed = isDelayed;
            newParameter.ParameterType = parameterType;

            AddParameter(newParameter);

            return newParameter;
        }
Пример #5
0
        public MapParameter AddParameter(Guid parameterId, MapParameterType parameterType, Guid parameterValue, bool isDelayed)
        {
            MapParameter newParameter = new MapParameter(parameterId);

            newParameter.Value         = parameterValue;
            newParameter.SessionId     = MapObjects.Session.Id;
            newParameter.IsDelayed     = isDelayed;
            newParameter.ParameterType = parameterType;

            AddParameter(newParameter);

            return(newParameter);
        }
Пример #6
0
        public void LoadParameters()
        {
            SqlParameter sqlSessionParameter = new SqlParameter("@SessionId", MapObjects.Session.Id);

            SqlCommand selectParametersFromId = new SqlCommand(SelectParametersFromSessionId, MapObjects.ParametersDbConnection.Connection);

            selectParametersFromId.Parameters.Add(sqlSessionParameter);

            MapObjects.ParametersDbConnection.Open();

            IDataReader parameters = selectParametersFromId.ExecuteReader();

            while (parameters.Read())
            {
                MapParameter parameter = new MapParameter();

                parameter.LoadSessionObject(parameters);

                AddParameter(parameter);
            }

            MapObjects.ParametersDbConnection.Close();
        }
Пример #7
0
        public MapParameter this[Guid parameterId]
        {
            get
            {
                if (ParameterContainer.ContainsKey(parameterId))
                {
                    return(ParameterContainer[parameterId]);
                }
                else
                {
                    SqlParameter parameterIdSqlParameter = new SqlParameter("@ParameterId", parameterId);

                    SqlCommand getParameter = new SqlCommand("SELECT * FROM [Parameters] WHERE [ParameterUid] = @ParameterId;", MapObjects.ParametersDbConnection.Connection);
                    getParameter.Parameters.Add(parameterIdSqlParameter);

                    MapObjects.ParametersDbConnection.Open();

                    IDataReader parameters = getParameter.ExecuteReader();

                    MapParameter parameter = null;

                    while (parameters.Read())
                    {
                        parameter = new MapParameter();

                        parameter.LoadSessionObject(parameters);

                        AddParameter(parameter);
                    }

                    MapObjects.ParametersDbConnection.Close();

                    return(parameter);
                }
            }
        }
Пример #8
0
 public MapParameter DeleteBulkRelationship(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter relationshipId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.DeleteBulkRelationship(callingUrl, sessionId, responseParameter, domainId, relationshipId));
     }
 }
        public MapParameter AddBulkMetadata(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, MapParameter node, MapParameter relationship, DescriptorType descriptorType, MetadataType metadataType, string name, string value)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, true, domainId, rootMapId, SPGlymaRightFactory.Instance.MapCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.AddBulkMetadata(configuration, sessionId, responseParameter, domainId, rootMapId, node, relationship, descriptorType, metadataType, name, value));
                }
            }
        }
Пример #10
0
        public MapParameter this[Guid parameterId]
        {
            get
            {
                if (ParameterContainer.ContainsKey(parameterId))
                {
                    return ParameterContainer[parameterId];
                }
                else
                {
                    SqlParameter parameterIdSqlParameter = new SqlParameter("@ParameterId", parameterId);

                    SqlCommand getParameter = new SqlCommand("SELECT * FROM [Parameters] WHERE [ParameterUid] = @ParameterId;", MapObjects.ParametersDbConnection.Connection);
                    getParameter.Parameters.Add(parameterIdSqlParameter);

                    MapObjects.ParametersDbConnection.Open();

                    IDataReader parameters = getParameter.ExecuteReader();

                    MapParameter parameter = null;

                    while (parameters.Read())
                    {
                        parameter = new MapParameter();

                        parameter.LoadSessionObject(parameters);

                        AddParameter(parameter);
                    }

                    MapObjects.ParametersDbConnection.Close();

                    return parameter;
                }
            }
        }
Пример #11
0
 public MapParameter NodeCreate(Guid token, MapParameter delayedDomain, Guid CompendiumQuestionNodeTypeId)
 {
     throw new NotImplementedException();
 }
Пример #12
0
 public MapParameter UpdateBulkMetadata(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter metadata, string name, string value)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.UpdateBulkMetadata(callingUrl, sessionId, responseParameter, domainId, metadata, name, value));
     }
 }
Пример #13
0
 public MapParameter UpdateBulkRelationship(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter relationshipId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.UpdateBulkRelationship(callingUrl, sessionId, responseParameter, domainId, relationshipId, nodes, relationshipType));
     }
 }
Пример #14
0
 public MapParameter UpdateBulkNode(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter nodeId, NodeType nodeType)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.UpdateBulkNode(callingUrl, sessionId, responseParameter, domainId, nodeId, nodeType));
     }
 }
Пример #15
0
 public MapParameter AddNode(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter rootMapId, NodeType nodeType, string originalId)
 {
     return(AddBulkNode(callingUrl, sessionId, Guid.Empty, domainId, rootMapId, nodeType, originalId));
 }
Пример #16
0
 public MapParameter RelationshipCreate(Guid token, MapParameter delayedDomain, Guid FromToRelationshipTypeId, IDictionary<Guid, MapParameter> nodes)
 {
     throw new NotImplementedException();
 }
Пример #17
0
 public MapParameter NodeCreate(Guid token, MapParameter delayedDomain, Guid CompendiumQuestionNodeTypeId)
 {
     throw new NotImplementedException();
 }
        public MapParameter UpdateBulkMetadata(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter metadata, string name, string value)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, true, domainId, null, SPGlymaRightFactory.Instance.MapUpdateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.UpdateBulkMetadata(configuration, sessionId, responseParameter, domainId, metadata, name, value));
                }
            }
        }
        public MapParameter UpdateBulkRelationship(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter relationshipId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, true, domainId, null, SPGlymaRightFactory.Instance.MapUpdateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.UpdateBulkRelationship(configuration, sessionId, responseParameter, domainId, relationshipId, nodes, relationshipType));
                }
            }
        }
        public MapParameter DeleteBulkNode(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter nodeId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, true, domainId, null, SPGlymaRightFactory.Instance.MapDeleteRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.DeleteBulkNode(configuration, sessionId, responseParameter, domainId, nodeId));
                }
            }
        }
Пример #21
0
 public MapParameter DeleteMetadata(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter metadata)
 {
     return(DeleteBulkMetadata(callingUrl, sessionId, Guid.Empty, domainId, metadata));
 }
Пример #22
0
 public MapParameter UpdateNode(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter nodeId, NodeType nodeType)
 {
     return(UpdateBulkNode(callingUrl, sessionId, Guid.Empty, domainId, nodeId, nodeType));
 }
Пример #23
0
 public MapParameter AddBulkNode(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, NodeType nodeType, string originalId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.AddBulkNode(callingUrl, sessionId, responseParameter, domainId, rootMapId, nodeType, originalId));
     }
 }
Пример #24
0
 public MapParameter UpdateRelationship(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter relationshipId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType)
 {
     return(UpdateBulkRelationship(callingUrl, sessionId, Guid.Empty, domainId, relationshipId, nodes, relationshipType));
 }
Пример #25
0
 public MapParameter AddRelationship(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter rootMapId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType, string originalId)
 {
     return(AddBulkRelationship(callingUrl, sessionId, Guid.Empty, domainId, rootMapId, nodes, relationshipType, originalId));
 }
Пример #26
0
 public MapParameter UpdateMetadata(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter metadata, string name, string value)
 {
     return(UpdateBulkMetadata(callingUrl, sessionId, Guid.Empty, domainId, metadata, name, value));
 }
Пример #27
0
 public MapParameter RelationshipCreate(Guid token, MapParameter delayedDomain, Guid FromToRelationshipTypeId, IDictionary <Guid, MapParameter> nodes)
 {
     throw new NotImplementedException();
 }
Пример #28
0
        public void LoadParameters()
        {
            SqlParameter sqlSessionParameter = new SqlParameter("@SessionId", MapObjects.Session.Id);

            SqlCommand selectParametersFromId = new SqlCommand(SelectParametersFromSessionId, MapObjects.ParametersDbConnection.Connection);
            selectParametersFromId.Parameters.Add(sqlSessionParameter);

            MapObjects.ParametersDbConnection.Open();

            IDataReader parameters = selectParametersFromId.ExecuteReader();

            while (parameters.Read())
            {
                MapParameter parameter = new MapParameter();

                parameter.LoadSessionObject(parameters);

                AddParameter(parameter);
            }

            MapObjects.ParametersDbConnection.Close();
        }
Пример #29
0
 public MapParameter AddBulkMetadata(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, MapParameter node, MapParameter relationship, DescriptorType descriptorType, MetadataType metadataType, string name, string value)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.AddBulkMetadata(callingUrl, sessionId, responseParameter, domainId, rootMapId, node, relationship, descriptorType, metadataType, name, value));
     }
 }
Пример #30
0
 public MapParameter DeleteNode(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter nodeId)
 {
     return(DeleteBulkNode(callingUrl, sessionId, Guid.Empty, domainId, nodeId));
 }
Пример #31
0
 public MapParameter DeleteRelationship(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter relationshipId)
 {
     return(DeleteBulkRelationship(callingUrl, sessionId, Guid.Empty, domainId, relationshipId));
 }
Пример #32
0
 public MapParameter AddMetadata(string callingUrl, Guid sessionId, MapParameter domainId, MapParameter rootMapId, MapParameter node, MapParameter relationship, DescriptorType descriptorType, MetadataType metadataType, string name, string value)
 {
     return(AddBulkMetadata(callingUrl, sessionId, Guid.Empty, domainId, rootMapId, node, relationship, descriptorType, metadataType, name, value));
 }
        public MapParameter AddBulkNode(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, NodeType nodeType, string originalId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, true, domainId, rootMapId, SPGlymaRightFactory.Instance.MapCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.AddBulkNode(configuration, sessionId, responseParameter, domainId, rootMapId, nodeType, originalId));
                }
            }
        }