public QueryResponse CreateRootMap(GlymaSessionConfiguration configuration, Guid domainId, string name, NodeType nodeType, string originalId)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.CreateRootMap(glymaSession, domainId, name, nodeType, originalId));
     }
 }
 public MapParameter UpdateBulkNode(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter nodeId, NodeType nodeType)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.UpdateBulkNode(glymaSession, sessionId, responseParameter, domainId, nodeId, nodeType));
     }
 }
 public MapParameter UpdateBulkRelationship(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter relationshipId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.UpdateBulkRelationship(glymaSession, sessionId, responseParameter, domainId, relationshipId, nodes, relationshipType));
     }
 }
 public MapParameter AddBulkMetadata(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, MapParameter node, MapParameter relationship, DescriptorType descriptorType, MetadataType metadataType, string name, string value)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.AddBulkMetadata(glymaSession, sessionId, responseParameter, domainId, rootMapId, node, relationship, descriptorType, metadataType, name, value));
     }
 }
 public MapParameter DeleteBulkMetadata(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter metadata)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.DeleteBulkMetadata(glymaSession, sessionId, responseParameter, domainId, metadata));
     }
 }
 public MapParameter AddBulkNode(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, NodeType nodeType, string originalId)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.AddBulkNode(glymaSession, sessionId, responseParameter, domainId, rootMapId, nodeType, originalId));
     }
 }
 public MapParameter AddBulkRelationship(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType, string originalId)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.AddBulkRelationship(glymaSession, sessionId, responseParameter, domainId, rootMapId, nodes, relationshipType, originalId));
     }
 }
 public QueryResponse QueryMap(GlymaSessionConfiguration configuration, Guid domainId, Guid nodeId, int maxDepth, bool isFullDomainSearch, EdgeConditions edgeConditions, FilterConditions filterConditions, int objectIndex)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.QueryMap(glymaSession, domainId, nodeId, maxDepth, isFullDomainSearch, edgeConditions, filterConditions, objectIndex));
     }
 }
 public QueryResponse QueryMapByDomain(GlymaSessionConfiguration configuration, Guid domainId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.QueryMapByDomain(glymaSession, domainId, maxDepth, edgeConditions, filterConditions));
     }
 }
 public TypeResponse GetAllMapTypes(GlymaSessionConfiguration configuration)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.GetAllMapTypes(glymaSession));
     }
 }
 public Dictionary <Guid, QueryResponse> QueryDomains(GlymaSessionConfiguration configuration)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.QueryDomains(glymaSession));
     }
 }
 public MapResponse CompleteTransaction(GlymaSessionConfiguration configuration, Guid sessionId)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId, true))
     {
         return(Base.CompleteTransaction(glymaSession, sessionId));
     }
 }
 public Guid BeginTransaction(GlymaSessionConfiguration configuration)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.BeginTransaction(glymaSession));
     }
 }
 public int DeleteRootMap(GlymaSessionConfiguration configuration, Guid domainId, Guid rootMapId)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.DeleteRootMap(glymaSession, domainId, rootMapId));
     }
 }
 public bool IsSessionCompleted(GlymaSessionConfiguration configuration, Guid sessionId)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.IsSessionCompleted(glymaSession, sessionId));
     }
 }
 public MapParameter UpdateBulkMetadata(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter metadata, string name, string value)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration, sessionId))
     {
         return(Base.UpdateBulkMetadata(glymaSession, sessionId, responseParameter, domainId, metadata, name, value));
     }
 }
 public MapResponse CreateDomain(GlymaSessionConfiguration configuration, string name)
 {
     using (IGlymaSession glymaSession = new SvcAppSPGlymaSession(configuration))
     {
         return(Base.CreateDomain(glymaSession, name));
     }
 }
Beispiel #18
0
        private void FindMapDbConnectionParameters(ref GlymaSessionConfiguration glymaSessionConfig)
        {
            string databaseServer = "";
            string databaseName   = "";

            bool  isExhausted = false;
            SPWeb web         = ElevatedWeb;

            while (!isExhausted)
            {
                try
                {
                    if (web.Properties.ContainsKey("Glyma.DatabaseServer") && web.Properties.ContainsKey("Glyma.DatabaseName"))
                    {
                        databaseServer = web.Properties["Glyma.DatabaseServer"];
                        databaseName   = web.Properties["Glyma.DatabaseName"];
                        glymaSessionConfig.MapDbServer = databaseServer;
                        glymaSessionConfig.MapDbName   = databaseName;
                        isExhausted = true;
                        break;
                    }
                    else
                    {
                        if (web.IsRootWeb)
                        {
                            isExhausted = true;
                        }
                    }
                }
                finally
                {
                    if (web != null)
                    {
                        SPWeb nextWeb = null;

                        if (!isExhausted)
                        {
                            SPSecurity.RunWithElevatedPrivileges(delegate()
                            {
                                nextWeb = web.ParentWeb;
                            });
                        }

                        /// We don't want to dispose the main Web for this bootstrapper object.
                        if (web != Web)
                        {
                            web.Dispose();
                        }

                        web = nextWeb;
                    }
                }
            }

            if (string.IsNullOrEmpty(databaseServer) || string.IsNullOrEmpty(databaseName))
            {
                throw new NullReferenceException("No database server or database name provided! Please assign the Glyma.DatabaseServer property and the Glyma.DatabaseName property on the containing SPWeb.");
            }
        }
Beispiel #19
0
        public SvcAppSPGlymaSession(GlymaSessionConfiguration configuration)
        {
            _configuration = configuration;
            _sessionId     = Guid.Empty;

            _session    = new MapSession(this);
            _parameters = new MapParameters(this);
        }
Beispiel #20
0
 public SvcAppSPGlymaSession(GlymaSessionConfiguration configuration, Guid sessionId, bool preload)
     : this(configuration, sessionId)
 {
     if (preload)
     {
         _session.LoadTransactions();
         _parameters.LoadParameters();
     }
 }
Beispiel #21
0
        public SvcAppSPGlymaSession(GlymaSessionConfiguration configuration, Guid sessionId)
        {
            _configuration = configuration;
            _sessionId     = sessionId;

            _session = new MapSession(this, _sessionId);

            _parameters = new MapParameters(this);
        }
        private void FindSecurityDbConnectionParameters(ref GlymaSessionConfiguration glymaSessionConfig)
        {
            string securityDatabaseServer = "";
            string securityDatabaseName   = "";

            bool  isExhausted = false;
            SPWeb web         = Web;

            while (!isExhausted)
            {
                try
                {
                    if (web.Properties.ContainsKey("Glyma.SecurityDatabaseServer") && web.Properties.ContainsKey("Glyma.SecurityDatabaseName"))
                    {
                        securityDatabaseServer = web.Properties["Glyma.SecurityDatabaseServer"];
                        securityDatabaseName   = web.Properties["Glyma.SecurityDatabaseName"];
                        glymaSessionConfig.SecurityDbServer = securityDatabaseServer;
                        glymaSessionConfig.SecurityDbName   = securityDatabaseName;
                        isExhausted = true;
                        break;
                    }
                    else
                    {
                        if (web.IsRootWeb)
                        {
                            isExhausted = true;
                        }
                    }
                }
                finally
                {
                    if (web != null)
                    {
                        SPWeb nextWeb = null;

                        if (!isExhausted)
                        {
                            nextWeb = web.ParentWeb;
                        }

                        /// We don't want to dispose the main Web for this bootstrapper object.
                        if (web != Web)
                        {
                            web.Dispose();
                        }

                        web = nextWeb;
                    }
                }
            }

            if (string.IsNullOrEmpty(securityDatabaseServer) || string.IsNullOrEmpty(securityDatabaseName))
            {
                /// TODO: When the security service is finished this must be uncommented.
                //throw new NullReferenceException("No security database server or security database name provided! Please assign the Glyma.SecurityDatabaseServer property and the Glyma.SecurityDatabaseName property on the containing SPWeb.");
            }
        }
Beispiel #23
0
        public MapResponse CompleteTransaction(GlymaSessionConfiguration configuration, Guid sessionId)
        {
            MapResponse result = null;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.CompleteTransaction(configuration, sessionId));

            return(result);
        }
Beispiel #24
0
        public int DeleteRootMap(GlymaSessionConfiguration configuration, Guid domainId, Guid rootMapId)
        {
            int result = 0;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.DeleteRootMap(configuration, domainId, rootMapId));

            return(result);
        }
Beispiel #25
0
        public Guid BeginTransaction(GlymaSessionConfiguration configuration)
        {
            Guid result = Guid.Empty;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.BeginTransaction(configuration));

            return(result);
        }
Beispiel #26
0
        public QueryResponse CreateRootMap(GlymaSessionConfiguration configuration, Guid domainId, string name, NodeType nodeType, string originalId)
        {
            QueryResponse result = null;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.CreateRootMap(configuration, domainId, name, nodeType, originalId));

            return(result);
        }
Beispiel #27
0
        public bool IsSessionCompleted(GlymaSessionConfiguration configuration, Guid sessionId)
        {
            bool result = false;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.IsSessionCompleted(configuration, sessionId));

            return(result);
        }
Beispiel #28
0
        public MapResponse CreateDomain(GlymaSessionConfiguration configuration, string name)
        {
            MapResponse result = null;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.CreateDomain(configuration, name));

            return(result);
        }
Beispiel #29
0
        public MapParameter UpdateBulkMetadata(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter metadata, string name, string value)
        {
            MapParameter result = null;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.UpdateBulkMetadata(configuration, sessionId, responseParameter, domainId, metadata, name, value));

            return(result);
        }
Beispiel #30
0
        public MapParameter DeleteMetadata(GlymaSessionConfiguration configuration, Guid sessionId, MapParameter domainId, MapParameter metadata)
        {
            MapParameter result = null;

            // run the call against the application proxy
            NodeServiceApplicationProxy.Invoke(_serviceContext,
                                               proxy => result = proxy.DeleteMetadata(configuration, sessionId, domainId, metadata));

            return(result);
        }