public IRepositoryInfo GetRepositoryInfo(string repositoryId, IExtensionsData extension) { IRepositoryInfo result = null; bool hasExtension = (extension != null) && (extension.Extensions != null) && (extension.Extensions.Count > 0); RepositoryInfoCache cache = session.GetRepositoryInfoCache(); // if extension is not set, check the cache first if (!hasExtension) { result = cache.Get(repositoryId); if (result != null) { return(result); } } // it was not in the cache -> get the SPI and fetch the repository info ICmisSpi spi = session.GetSpi(); result = spi.GetRepositoryService().GetRepositoryInfo(repositoryId, extension); // put it into the cache if (!hasExtension) { cache.Put(result); } return(result); }
public ITypeDefinition GetTypeDefinition(string repositoryId, string typeId, IExtensionsData extension) { ITypeDefinition result = null; bool hasExtension = (extension != null) && (extension.Extensions != null) && (extension.Extensions.Count > 0); TypeDefinitionCache cache = session.GetTypeDefinitionCache(); // if extension is not set, check the cache first if (!hasExtension) { result = cache.Get(repositoryId, typeId); if (result != null) { return(result); } } // it was not in the cache -> get the SPI and fetch the type definition ICmisSpi spi = session.GetSpi(); result = spi.GetRepositoryService().GetTypeDefinition(repositoryId, typeId, extension); // put it into the cache if (!hasExtension && (result != null)) { cache.Put(repositoryId, result); } return(result); }
public IList <ITypeDefinitionContainer> GetTypeDescendants(string repositoryId, string typeId, long?depth, bool?includePropertyDefinitions, IExtensionsData extension) { IList <ITypeDefinitionContainer> result = null; bool hasExtension = (extension != null) && (extension.Extensions != null) && (extension.Extensions.Count > 0); // get the SPI and fetch the type definitions ICmisSpi spi = session.GetSpi(); result = spi.GetRepositoryService().GetTypeDescendants(repositoryId, typeId, depth, includePropertyDefinitions, extension); // put it into the cache if (!hasExtension && (includePropertyDefinitions ?? false) && (result != null)) { TypeDefinitionCache cache = session.GetTypeDefinitionCache(); AddToTypeCache(cache, repositoryId, result); } return(result); }
public IList <IRepositoryInfo> GetRepositoryInfos(IExtensionsData extension) { IList <IRepositoryInfo> result = null; bool hasExtension = (extension != null) && (extension.Extensions != null) && (extension.Extensions.Count > 0); // get the SPI and fetch the repository infos ICmisSpi spi = session.GetSpi(); result = spi.GetRepositoryService().GetRepositoryInfos(extension); // put it into the cache if (!hasExtension && (result != null)) { RepositoryInfoCache cache = session.GetRepositoryInfoCache(); foreach (IRepositoryInfo rid in result) { cache.Put(rid); } } return(result); }
public ITypeDefinitionList GetTypeChildren(string repositoryId, string typeId, bool?includePropertyDefinitions, long?maxItems, long?skipCount, IExtensionsData extension) { ITypeDefinitionList result = null; bool hasExtension = (extension != null) && (extension.Extensions != null) && (extension.Extensions.Count > 0); // get the SPI and fetch the type definitions ICmisSpi spi = session.GetSpi(); result = spi.GetRepositoryService().GetTypeChildren(repositoryId, typeId, includePropertyDefinitions, maxItems, skipCount, extension); // put it into the cache if (!hasExtension && (includePropertyDefinitions ?? false) && (result != null) && (result.List != null)) { TypeDefinitionCache cache = session.GetTypeDefinitionCache(); foreach (ITypeDefinition tdd in result.List) { cache.Put(repositoryId, tdd); } } return(result); }
public void DeleteType(string repositoryId, string typeId, IExtensionsData extension) { ICmisSpi spi = session.GetSpi(); spi.GetRepositoryService().DeleteType(repositoryId, typeId, extension); }
public ITypeDefinition UpdateType(string repositoryId, ITypeDefinition type, IExtensionsData extension) { ICmisSpi spi = session.GetSpi(); return(spi.GetRepositoryService().UpdateType(repositoryId, type, extension)); }