public SPServiceApplicationProxy CreateProxy(string name, SPServiceApplication serviceApplication, SPServiceProvisioningContext provisioningContext) { if (serviceApplication.GetType() != typeof(NodeServiceApplication)) { throw new NotSupportedException(); } if (serviceApplication == null) { throw new ArgumentNullException("serviceApplication"); } // Verify the service proxy exists. NodeServiceProxy serviceProxy = (NodeServiceProxy)this.Farm.GetObject(name, this.Farm.Id, typeof(NodeServiceProxy)); if (serviceProxy == null) { throw new InvalidOperationException("NodeServiceProxy does not exist in the farm."); } // If the application proxy doesn't exist, create it. NodeServiceApplicationProxy applicationProxy = serviceProxy.ApplicationProxies.GetValue <NodeServiceApplicationProxy>(name); if (applicationProxy == null) { Uri serviceAppAddress = ((NodeServiceApplication)serviceApplication).Uri; applicationProxy = new NodeServiceApplicationProxy(name, serviceProxy, serviceAppAddress); } return(applicationProxy); }
public QueryResponse QueryMapByDomain(GlymaSessionConfiguration configuration, Guid domainId, int maxDepth, EdgeConditions edgeConditions, FilterConditions filterConditions) { QueryResponse result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.QueryMapByDomain(configuration, domainId, maxDepth, edgeConditions, filterConditions)); return(result); }
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) { MapParameter result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.AddBulkMetadata(configuration, sessionId, responseParameter, domainId, rootMapId, node, relationship, descriptorType, metadataType, name, value)); return(result); }
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); }
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); }
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); }
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); }
public MapParameter AddBulkNode(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter rootMapId, NodeType nodeType, string originalId) { MapParameter result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.AddBulkNode(configuration, sessionId, responseParameter, domainId, rootMapId, nodeType, originalId)); return(result); }
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); }
public Dictionary <Guid, QueryResponse> QueryDomains(GlymaSessionConfiguration configuration) { Dictionary <Guid, QueryResponse> result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.QueryDomains(configuration)); return(result); }
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); }
public MapParameter DeleteBulkRelationship(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter relationshipId) { MapParameter result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.DeleteBulkRelationship(configuration, sessionId, responseParameter, domainId, relationshipId)); return(result); }
public MapParameter UpdateBulkRelationship(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter relationshipId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType) { MapParameter result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.UpdateBulkRelationship(configuration, sessionId, responseParameter, domainId, relationshipId, nodes, relationshipType)); return(result); }
public GlymaVersion GetApplicationVersion() { GlymaVersion result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.GetApplicationVersion()); return(result); }
public MapParameter AddRelationship(GlymaSessionConfiguration configuration, Guid sessionId, MapParameter domainId, MapParameter rootMapId, Dictionary <DescriptorType, MapParameter> nodes, RelationshipType relationshipType, string originalId) { MapParameter result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.AddRelationship(configuration, sessionId, domainId, rootMapId, nodes, relationshipType, originalId)); return(result); }
public MapParameter UpdateBulkNode(GlymaSessionConfiguration configuration, Guid sessionId, Guid responseParameter, MapParameter domainId, MapParameter nodeId, NodeType nodeType) { MapParameter result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.UpdateBulkNode(configuration, sessionId, responseParameter, domainId, nodeId, nodeType)); return(result); }
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); }
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); }
public TypeResponse GetAllMapTypes(GlymaSessionConfiguration configuration) { TypeResponse result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.GetAllMapTypes(configuration)); return(result); }
public SearchMapResult SearchMap(GlymaSessionConfiguration configuration, Guid domainId, Guid rootMapUid, SearchConditions conditions, int pageNumber, int pageSize) { if (pageNumber == 0) { pageNumber = 1; } if (pageSize == 0) { pageSize = 5; } SearchMapResult result = null; // run the call against the application proxy NodeServiceApplicationProxy.Invoke(_serviceContext, proxy => result = proxy.SearchMap(configuration, domainId, rootMapUid, conditions, pageNumber, pageSize)); return(result); }
internal static void Invoke(SPServiceContext serviceContext, CodeToRunOnApplicationProxy codeBlock) { if (serviceContext == null) { throw new ArgumentNullException("serviceContext"); } // Get service app proxy from the context. NodeServiceApplicationProxy proxy = (NodeServiceApplicationProxy)serviceContext.GetDefaultProxy(typeof(NodeServiceApplicationProxy)); if (proxy == null) { throw new InvalidOperationException("Unable to obtain object reference to node service proxy."); } // Run the code block on the proxy. using (new SPServiceContextScope(serviceContext)) { codeBlock(proxy); } }