public TypeResponse GetAllMapTypes(string callingUrl)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.GetAllMapTypes(callingUrl);
     }
 }
Example #2
0
 /// <summary>
 /// TODO: This method needs to be moved from here as it makes calls to schema specific methods.
 /// </summary>
 /// <param name="callingUrl"></param>
 /// <param name="domainId"></param>
 /// <param name="conditions"></param>
 /// <param name="pageNumber"></param>
 /// <param name="pageSize"></param>
 /// <returns></returns>
 public SearchMapResult SearchMap(string callingUrl, Guid domainId, Guid rootMapUid, SearchConditions conditions, int pageNumber = 1, int pageSize = 5)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.SearchMap(callingUrl, domainId, rootMapUid, conditions, pageNumber, pageSize));
     }
 }
Example #3
0
 public Dictionary <Guid, QueryResponse> QueryDomains(string callingUrl)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.QueryDomains(callingUrl));
     }
 }
Example #4
0
 public QueryResponse QueryMap(string callingUrl, Guid domainId, Guid nodeId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.QueryMap(callingUrl, domainId, nodeId, maxDepth, edgeConditions, filterConditions));
     }
 }
 public MapResponse CreateDomain(string callingUrl, string name)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.CreateDomain(callingUrl, name);
     }
 }
 public QueryResponse CreateRootMap(string callingUrl, Guid domainId, string name, NodeType nodeType, string originalId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.CreateRootMap(callingUrl, domainId, name, nodeType, originalId);
     }
 }
Example #7
0
 public TypeResponse GetAllMapTypes(string callingUrl)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.GetAllMapTypes(callingUrl));
     }
 }
Example #8
0
 public bool IsSessionCompleted(string callingUrl, Guid sessionId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.IsSessionCompleted(callingUrl, sessionId));
     }
 }
Example #9
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));
     }
 }
Example #10
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));
     }
 }
 public Guid BeginTransaction(string callingUrl)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.BeginTransaction(callingUrl);
     }
 }
Example #12
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));
     }
 }
Example #13
0
 public MapResponse CompleteTransaction(string callingUrl, Guid sessionId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.CompleteTransaction(callingUrl, sessionId));
     }
 }
 public MapResponse CompleteTransaction(string callingUrl, Guid sessionId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.CompleteTransaction(callingUrl, sessionId);
     }
 }
Example #15
0
 public Guid BeginTransaction(string callingUrl)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.BeginTransaction(callingUrl));
     }
 }
Example #16
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));
     }
 }
Example #17
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));
     }
 }
Example #18
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));
     }
 }
Example #19
0
 public MapResponse CreateDomain(string callingUrl, string name)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.CreateDomain(callingUrl, name));
     }
 }
Example #20
0
 public QueryResponse CreateRootMap(string callingUrl, Guid domainId, string name, NodeType nodeType, string originalId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return(nodeServiceClient.CreateRootMap(callingUrl, domainId, name, nodeType, originalId));
     }
 }
        public int DeleteRootMap(string callingUrl, Guid domainId, Guid rootMapId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, domainId, null, SPGlymaRightFactory.Instance.RootMapCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.DeleteRootMap(configuration, domainId, rootMapId));
                }
            }
        }
        public bool IsSessionCompleted(string callingUrl, Guid sessionId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.TransactionRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.IsSessionCompleted(configuration, sessionId));
                }
            }
        }
        public QueryResponse CreateRootMap(string callingUrl, Guid domainId, string name, NodeType nodeType, string originalId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, domainId, null, SPGlymaRightFactory.Instance.RootMapCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.CreateRootMap(configuration, domainId, name, nodeType, originalId));
                }
            }
        }
        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 MapResponse CreateDomain(string callingUrl, string name)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.ProjectCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.CreateDomain(configuration, name));
                }
            }
        }
        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));
                }
            }
        }
        public TypeResponse GetAllMapTypes(string callingUrl)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.BenignAccessRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.GetAllMapTypes(configuration));
                }
            }
        }
        public int DeleteRootMap(string callingUrl, Guid domainId, Guid rootMapId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, domainId, null, SPGlymaRightFactory.Instance.RootMapCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return nodeServiceClient.DeleteRootMap(configuration, domainId, rootMapId);
                }
            }
        }
        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));
                }
            }
        }
        public QueryResponse CreateRootMap(string callingUrl, Guid domainId, string name, NodeType nodeType, string originalId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, domainId, null, SPGlymaRightFactory.Instance.RootMapCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return nodeServiceClient.CreateRootMap(configuration, domainId, name, nodeType, originalId);
                }
            }
        }
        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));
                }
            }
        }
        public MapResponse CreateDomain(string callingUrl, string name)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.ProjectCreateRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return nodeServiceClient.CreateDomain(configuration, name);
                }
            }
        }
        public Guid BeginTransaction(string callingUrl)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.TransactionRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.BeginTransaction(configuration));
                }
            }
        }
        public Dictionary <Guid, QueryResponse> QueryDomains(string callingUrl)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                /// This method requires security trimming so there is no need to check authentication here.
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    Dictionary <Guid, QueryResponse> allDomains = nodeServiceClient.QueryDomains(configuration);

                    GlymaSecurityTrimmer securityTrimmer = new GlymaSecurityTrimmer(glymaSession.Web, glymaSession);

                    Dictionary <Guid, QueryResponse> authorisedDomains = securityTrimmer.TrimResponse(allDomains, SPGlymaRightFactory.Instance.ProjectReadRight);

                    return(authorisedDomains);
                }
            }
        }
        public QueryResponse QueryMapPaged(string callingUrl, Guid domainId, Guid nodeId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions, int objectIndex)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                /// This method requires security trimming so there is no need to check authentication here.
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    /// This method doesn't traverse rootmap boundaries.
                    GlymaSecurityTrimmer securityTrimmer = new GlymaSecurityTrimmer(glymaSession.Web, glymaSession);

                    securityTrimmer.CheckRootMapAuthorisationBaseOnNode(domainId, nodeId, SPGlymaRightFactory.Instance.MapReadRight);

                    QueryResponse response = nodeServiceClient.QueryMapPaged(configuration, domainId, nodeId, maxDepth, edgeConditions, filterConditions, objectIndex);
                    response.CompressResponse();

                    return(response);
                }
            }
        }
        public QueryResponse QueryMapByDomain(string callingUrl, Guid domainId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                /// This method requires security trimming so there is no need to check authentication here.
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    QueryResponse allRootMaps = nodeServiceClient.QueryMapByDomain(configuration, domainId, maxDepth, edgeConditions, filterConditions);

                    /// This method DOES traverse rootmap boundaries.
                    GlymaSecurityTrimmer securityTrimmer = new GlymaSecurityTrimmer(glymaSession.Web, glymaSession);

                    QueryResponse trimmedRootMaps = securityTrimmer.TrimResponse(allRootMaps, SPGlymaRightFactory.Instance.RootMapReadRight);
                    trimmedRootMaps.CompressResponse();

                    return(trimmedRootMaps);
                }
            }
        }
        /// <summary>
        /// TODO: This method needs to be moved from here as it makes calls to schema specific methods.
        /// </summary>
        /// <param name="callingUrl"></param>
        /// <param name="domainId"></param>
        /// <param name="conditions"></param>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public SearchMapResult SearchMap(string callingUrl, Guid domainId, Guid rootMapUid, SearchConditions conditions, int pageNumber, int pageSize)
        {
            if (pageNumber == 0)
            {
                pageNumber = 1;
            }

            if (pageSize == 0)
            {
                pageSize = 5;
            }

            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, domainId, rootMapUid, SPGlymaRightFactory.Instance.MapReadRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return(nodeServiceClient.SearchMap(configuration, domainId, rootMapUid, conditions, pageNumber, pageSize));
                }
            }
        }
 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);
     }
 }
 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))
     {
         return nodeServiceClient.AddBulkMetadata(callingUrl, sessionId, responseParameter, 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))
     {
         return nodeServiceClient.AddBulkNode(callingUrl, sessionId, responseParameter, domainId, rootMapId, nodeType, originalId);
     }
 }
        /// <summary>
        /// TODO: This method needs to be moved from here as it makes calls to schema specific methods.
        /// </summary>
        /// <param name="callingUrl"></param>
        /// <param name="domainId"></param>
        /// <param name="conditions"></param>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public SearchMapResult SearchMap(string callingUrl, Guid domainId, Guid rootMapUid, SearchConditions conditions, int pageNumber, int pageSize)
        {
            if (pageNumber == 0)
            {
                pageNumber = 1;
            }

            if (pageSize == 0)
            {
                pageSize = 5;
            }

            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, domainId, rootMapUid, SPGlymaRightFactory.Instance.MapReadRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return nodeServiceClient.SearchMap(configuration, domainId, rootMapUid, conditions, pageNumber, pageSize);
                }
            }
        }
 public bool IsSessionCompleted(string callingUrl, Guid sessionId)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.IsSessionCompleted(callingUrl, sessionId);
     }
 }
        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 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 bool IsSessionCompleted(string callingUrl, Guid sessionId)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.TransactionRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return nodeServiceClient.IsSessionCompleted(configuration, sessionId);
                }
            }
        }
        public Guid BeginTransaction(string callingUrl)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.TransactionRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return nodeServiceClient.BeginTransaction(configuration);
                }
            }
        }
 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);
     }
 }
        public MapParameter DeleteBulkRelationship(string callingUrl, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter relationshipId)
        {
            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.DeleteBulkRelationship(configuration, sessionId, responseParameter, domainId, relationshipId);
                }
            }
        }
 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);
     }
 }
        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);
                }
            }
        }
        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);
                }
            }
        }
 /// <summary>
 /// TODO: This method needs to be moved from here as it makes calls to schema specific methods.
 /// </summary>
 /// <param name="callingUrl"></param>
 /// <param name="domainId"></param>
 /// <param name="conditions"></param>
 /// <param name="pageNumber"></param>
 /// <param name="pageSize"></param>
 /// <returns></returns>
 public SearchMapResult SearchMap(string callingUrl, Guid domainId, Guid rootMapUid, SearchConditions conditions, int pageNumber = 1, int pageSize = 5)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.SearchMap(callingUrl, domainId, rootMapUid, conditions, pageNumber, pageSize);
     }
 }
 public Dictionary<Guid, QueryResponse> QueryDomains(string callingUrl)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.QueryDomains(callingUrl);
     }
 }
        public QueryResponse QueryMapByDomain(string callingUrl, Guid domainId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                /// This method requires security trimming so there is no need to check authentication here.
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    QueryResponse allRootMaps = nodeServiceClient.QueryMapByDomain(configuration, domainId, maxDepth, edgeConditions, filterConditions);

                    /// This method DOES traverse rootmap boundaries.
                    GlymaSecurityTrimmer securityTrimmer = new GlymaSecurityTrimmer(glymaSession.Web, glymaSession);

                    QueryResponse trimmedRootMaps = securityTrimmer.TrimResponse(allRootMaps, SPGlymaRightFactory.Instance.RootMapReadRight);
                    trimmedRootMaps.CompressResponse();

                    return trimmedRootMaps;
                }
            }
        }
        public Dictionary<Guid, QueryResponse> QueryDomains(string callingUrl)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                /// This method requires security trimming so there is no need to check authentication here.
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    Dictionary<Guid, QueryResponse> allDomains = nodeServiceClient.QueryDomains(configuration);

                    GlymaSecurityTrimmer securityTrimmer = new GlymaSecurityTrimmer(glymaSession.Web, glymaSession);

                    Dictionary<Guid, QueryResponse> authorisedDomains = securityTrimmer.TrimResponse(allDomains, SPGlymaRightFactory.Instance.ProjectReadRight);

                    return authorisedDomains;
                }
            }
        }
        public QueryResponse QueryMapPaged(string callingUrl, Guid domainId, Guid nodeId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions, int objectIndex)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                /// This method requires security trimming so there is no need to check authentication here.
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    /// This method doesn't traverse rootmap boundaries.
                    GlymaSecurityTrimmer securityTrimmer = new GlymaSecurityTrimmer(glymaSession.Web, glymaSession);

                    securityTrimmer.CheckRootMapAuthorisationBaseOnNode(domainId, nodeId, SPGlymaRightFactory.Instance.MapReadRight);

                    QueryResponse response = nodeServiceClient.QueryMapPaged(configuration, domainId, nodeId, maxDepth, edgeConditions, filterConditions, objectIndex);
                    response.CompressResponse();

                    return response;
                }
            }
        }
 public QueryResponse QueryMap(string callingUrl, Guid domainId, Guid nodeId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions)
 {
     using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
     {
         return nodeServiceClient.QueryMap(callingUrl, domainId, nodeId, maxDepth, edgeConditions, filterConditions);
     }
 }
        public TypeResponse GetAllMapTypes(string callingUrl)
        {
            using (GlymaNSApp.NodeServiceClient nodeServiceClient = new GlymaNSApp.NodeServiceClient(callingUrl))
            {
                using (WebAppSPGlymaSession glymaSession = new WebAppSPGlymaSession(callingUrl, null, null, SPGlymaRightFactory.Instance.BenignAccessRight))
                {
                    GlymaSessionConfiguration configuration = glymaSession.ExportGlymaSession();

                    return nodeServiceClient.GetAllMapTypes(configuration);
                }
            }
        }