Jump to: navigation, search

Changes


DocumentProxy

592 bytes added, 24 June
/* DocumentBatchProxyCreator */
== DocumentBatchProxyCreator BatchDocumentProxyCreator ==The DocumentBatchProxyCreator BatchDocumentProxyCreator class provides the possibility to create multiple Document Proxies with the import status set to QuedForReadFromExternal.
The following two methods can be executed by e.g. using Who-Bert:
'''Example: Asking a DocumentBatchProxyCreator BatchDocumentProxyCreator to create Document Proxies for all documents in a folder. The import status will be set to QuedForReadFromExternal for all of them(top level only) without filters.'''
<source lang="csharp">
MetaProxy myMetaProxy = obj.Environment.UBIKDataFactory().ContentObject(new Guid("put UID of your MetaProxy here")) as MetaProxy;
// Creating a DocumentBatchProxyCreator BatchDocumentProxyCreator instanceUBIK.Interface.DocumentBatchProxyCreator BatchDocumentProxyCreator creator = new UBIK.Interface.DocumentBatchProxyCreatorBatchDocumentProxyCreator();
// Defining string for folder pathstring folderPath = @"C:\Documents"; // calling ImportBatchOfDocumentsCreateProxies() without filtering options
// Parameter 1: the path to the folder that contains the documents.
// Parameter 2: the MataProxy
creator.ImportBatchOfDocumentsCreateProxies("put path folderPath, myMetaProxy);</source> '''Example: Asking a BatchDocumentProxyCreator to create Document Proxies for all documents in a folder here(top and sub levels) with filters.''' <source lang=", csharp">// Getting your required MetaProxyMetaProxy myMetaProxy= obj.Environment.UBIKDataFactory().ContentObject(new Guid("put UID of your MetaProxy here")) as MetaProxy; // Creating a BatchDocumentProxyCreator instanceUBIK.Interface.BatchDocumentProxyCreator creator = new UBIK.Interface.BatchDocumentProxyCreator(); // Defining string for folder pathstring folderPath = @"C:\Documents"; //Define string for search patternstring searchPattern = "*pdf*";
// calling ImportBatchOfDocumentsCreateProxies() with filtering options
// Parameter 1: string of the path to the folder that contains the documents.
// Parameter 2: the MataProxy
// Parameter 3: string of the search pattern
// Parameter 4: System.IO.SearchOption
creator.ImportBatchOfDocumentsCreateProxies("put path to folder here"folderPath, myMetaProxy, "*mySearchPattern*"searchPattern, SearchOption.AllDirectories);
</source>
241
edits