/// <inheritdoc/> public async Task <TreeNodeInfo> GetNodeInfoVersionAsync(EntityId idVersion) { var gop = GdidOrPath.OfGVersion(idVersion); //Working with versions is a part of tree setup functionality App.Authorize(new TreePermission(TreeAccessLevel.Setup, idVersion)); var qry = new Query <TreeNodeInfo>("Tree.GetNodeInfoVersionByGdid") { new Query.Param("gop", gop) }; var result = await m_Data.TreeLoadDocAsync(gop.Tree, qry); return(result); }
/// <inheritdoc/> public async Task <IEnumerable <VersionInfo> > GetNodeVersionListAsync(EntityId id) { var gop = GdidOrPath.OfGNode(id); //Working with versions is a part of tree setup functionality App.Authorize(new TreePermission(TreeAccessLevel.Setup, id)); var qry = new Query <VersionInfo>("Tree.GetNodeVersionList") { new Query.Param("gnode", gop.GdidAddress) }; var result = await m_Data.TreeLoadEnumerableAsync(gop.Tree, qry); return(result); }
/// <inheritdoc/> public async Task <IEnumerable <TreeNodeHeader> > GetChildNodeListAsync(EntityId idParent, DateTime?asOfUtc = null, ICacheParams cache = null) { //permission checks are performed in the child traverse loop down below var gop = GdidOrPath.OfGNodeOrPath(idParent); var asof = DefaultAndAlignOnPolicyBoundary(asOfUtc, idParent); if (cache == null) { cache = CacheParams.DefaultCache; } IEnumerable <TreeNodeHeader> result; if (gop.PathAddress != null) { result = await getChildNodeListByTreePath(gop.Tree, gop.PathAddress, asof, cache).ConfigureAwait(false); } else { result = await getChildNodeListByGdid(gop.Tree, gop.GdidAddress, asof, cache).ConfigureAwait(false); } return(result); }
/// <inheritdoc/> public async Task <TreeNodeInfo> GetNodeInfoAsync(EntityId id, DateTime?asOfUtc = null, ICacheParams cache = null) { //permission checks are performed in the child traverse loop down below if (cache == null) { cache = CacheParams.DefaultCache; } var asof = DefaultAndAlignOnPolicyBoundary(asOfUtc, id); var gop = GdidOrPath.OfGNodeOrPath(id); TreeNodeInfo result; if (gop.PathAddress != null) { result = await getNodeByTreePath(gop.Tree, gop.PathAddress, asof, cache).ConfigureAwait(false); } else { var graph = new HashSet <GDID>(); result = await getNodeByGdid(graph, gop.Tree, gop.GdidAddress, asof, cache).ConfigureAwait(false); } return(result); }