/// <summary> /// Checkin workflow scripts. /// </summary> /// <param name="ix">IndexServer connection</param> /// <param name="CONST">IndexServer constants</param> /// <param name="ci">Client information (ticket)</param> /// <param name="scriptNames">Array of script names</param> private void internalCheckinScripts(IXConnection ix, IXServicePortC CONST, String[] scriptNames) { Logger.instance().log("internalCheckinScripts("); ConfigFile[] currentScripts = ix.Ix.checkoutConfigFiles( new String[] { myServerScriptDir + "/*" }, ConfigFileC.mbNoFileData, LockC.NO); Logger.instance().log("read script files..."); ConfigFile[] ixScripts = new ConfigFile[scriptNames.Length]; for (int i = 0; i < ixScripts.Length; i++) { ixScripts[i] = new ConfigFile(); ixScripts[i].name = scriptNames[i]; ixScripts[i].dir = myServerScriptDir; String fileName = "..\\..\\" + ixScripts[i].name; FileStream fstrm = new FileStream(fileName, FileMode.Open, FileAccess.Read); ixScripts[i].fileData = new FileData(); ixScripts[i].fileData.data = new byte[(int)fstrm.Length]; fstrm.Read(ixScripts[i].fileData.data, 0, (int)fstrm.Length); fstrm.Close(); } Logger.instance().log("read script files OK"); Logger.instance().log("checkin..."); ix.Ix.checkinConfigFiles(ixScripts, LockC.NO); Logger.instance().log("checkin OK"); currentScripts = ix.Ix.checkoutConfigFiles( new String[] { myServerScriptDir + "/*" }, ConfigFileC.mbNoFileData, LockC.NO); Logger.instance().log(")internalCheckinScripts"); }
public void run() { lockKey = "mykey"; IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // Get the current archive key int keyIdBeforeLock = ix.Ix.lockArchive(null); Logger.instance().log("key before lock=" + keyIdBeforeLock); // LOCK int keyIdBeforeLock2 = ix.Ix.lockArchive(lockKey); // Get the current archive key int keyIdAfterLock = ix.Ix.lockArchive(null); Logger.instance().log("key after lock=" + keyIdAfterLock); // UNLOCK int keyIdBeforeUnlock = ix.Ix.lockArchive("0"); } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
public void init(IXConnection ix, EditInfo ed) { this.ix = ix; this.ed = ed; this.CONST = ix.CONST; for (int i = 0; i < ed.sordTypes.Length; i++) { bool hasValidIcon = false; if (ed.sordTypes[i].icon != null) { try { System.IO.Stream strm = new System.IO.MemoryStream(ed.sordTypes[i].icon.data); System.Drawing.Image img = Image.FromStream(strm); imageListSordTypes.Images.Add(img); hasValidIcon = true; } catch (Exception) { } } if (!hasValidIcon) { System.Drawing.Image img = Image.FromFile("..\\..\\App.ico"); imageListSordTypes.Images.Add(img); } cbSordType.Items.Add(ed.sordTypes[i].name); } }
/// <summary> /// Dumps the node information of the workflow to Logger object. /// </summary> /// <param name="ix">IndexServer connection</param> /// <param name="CONST">IndexServer constants</param> /// <param name="ci">Client information (ticket)</param> /// <param name="flowId">Workflow ID</param> /// <param name="testUserId">ID of user which started the test.</param> /// <param name="wfUserIds">IDs of users which receive the workflow.</param> private void dumpWFNodes(IXConnection ix, IXServicePortC CONST, int flowId, int testUserId, String[] wfUserIds) { // add current user to userIds String[] userIds = new String[wfUserIds.Length + 1]; userIds[0] = Convert.ToString(testUserId); for (int i = 0; i < wfUserIds.Length; i++) { userIds[i + 1] = wfUserIds[i]; } // collect nodes WFCollectNode[] nodes = ix.Ix.collectWorkFlowNodes("" + flowId, WFTypeC.ACTIVE, null, WFNodeC.TYPE_NOTHING, null, null, null, userIds, false, false); // dump Logger.instance().log("Workflow Nodes, #nodes=" + nodes.Length); for (int i = 0; i < nodes.Length; i++) { Logger.instance().log(" " + (nodes[i].active ? "*" : " ") + "nodes[" + i + "]: id=" + nodes[i].nodeId + ", name=" + nodes[i].nodeName + ", userId=" + nodes[i].userId + ", inUseDate=" + nodes[i].inUseDateIso); } }
/// <summary> /// Create users with given names if they do not already exist. /// </summary> /// <param name="ix">IndexServer connection</param> /// <param name="CONST">IndexServer constants</param> /// <param name="ci">Client information (ticket)</param> /// <param name="userNames">Names of users to create</param> /// <returns>User IDs as String array</returns> private String[] internalCreateSomeUsers(IXConnection ix, IXServicePortC CONST, String[] userNames) { String[] uids = new String[userNames.Length]; // Try to create users UserInfo[] users = new UserInfo[userNames.Length]; try { for (int i = 0; i < userNames.Length; i++) { users[i] = ix.Ix.createUser("0"); users[i].name = userNames[i]; users[i].pwd = "elo"; } ix.Ix.checkinUsers(users, CheckinUsersC.WRITE_PASSWORD, LockC.NO); } catch (Exception e) { Logger.instance().log("exception=" + e); throw e; } // checkout users to get their IDs users = ix.Ix.checkoutUsers(userNames, CheckoutUsersC.BY_IDS, LockC.NO); for (int i = 0; i < users.Length; i++) { uids[i] = Convert.ToString(users[i].id); Logger.instance().log("uids[" + i + "]=" + uids[i]); } return(uids); }
/// <summary> /// This function shows how to checkout a document using encryption functionality of /// It does not set the ix.Ix.cryptDocuments session option. It assigns "&crypt=true" /// to the URL to direct IndexServer to decrypt the document. /// Using this method does not require an extra call to DM. But the file size and file extension /// in the DocVersion object comes from the encrypted document (ETF-file) rather the /// original document. /// </summary> /// <param name="ix"></param> /// <param name="CONST"></param> /// <param name="ci"></param> /// <param name="objId"></param> private void checkoutDocDecryptedUsingUrlExt(IXConnection ix, IXServicePortC CONST, string objId) { // Tell IndexServer not to encrypt/decrypt. setSessionOptionEncrypt(ix, false); // Provide external password of encryption set. string encrPwd = ix.EncryptPassword(encryptionPassword); ix.Ix.provideCryptPassword("" + encryptionSet, encrPwd); EditInfo ed = ix.Ix.checkoutDoc(objId, null, EditInfoC.mbSordDoc, LockC.NO); Logger.instance().log("encrypted.ext=" + ed.document.docs[0].ext); Logger.instance().log("encrypted.size=" + ed.document.docs[0].size); String tempName2 = internalMakeTempFileName(".tmp"); // append the special parameter to the URL String urlDecr = ed.document.docs[0].url + "&crypt=true"; Logger.instance().log("prepared download URL=" + urlDecr); // ------------------------------------------------------------------------------- // The URL to download the document should be a HTTPS URL in production environments! // IndexServer configuration option "ixUrlBase" might be helpful here. // ------------------------------------------------------------------------------- ix.Download(urlDecr, tempName2); // Show document in notepad: System.Diagnostics.Process.Start("notepad.exe", tempName2); System.Threading.Thread.Sleep(3000); System.IO.File.Delete(tempName2); }
private void internalFindBooks(IXConnection ix, IXServicePortC CONST, String parentId, String author, String price) { Logger.instance().log("find author=" + author + ", price=" + price); // select names only SordZ mbName = new SordZ(); mbName.bset = SordC.mbName; // find FindInfo findInfo = internalMakeFindInfo(parentId, author, price); Sord[] sords = ix.Ix.findFirstSords(findInfo, 1000, mbName).sords; String nameList = ""; for (int i = 0; i < sords.Length; i++) { if (i != 0) { nameList += ","; } nameList += sords[i].name; } Logger.instance().log("find OK, sords=" + nameList); }
// Helper function to find the subentries of an object private String internalFindSordIdsInParent(IXConnection ix, String parentId) { IXServicePortC CONST = ix.CONST; FindInfo findInfo = new FindInfo(); findInfo.findChildren = new EloixClient.IndexServer.FindChildren(); findInfo.findChildren.parentId = parentId; FindResult findResult = ix.Ix.findFirstSords(findInfo, 100, SordC.mbOnlyId); if (findResult.ids == null) { return(""); } if (findResult.searchId != null) { ix.Ix.findClose(findResult.searchId); } String strList = ""; for (int i = 0; i < findResult.ids.Length; i++) { if (i != 0) { strList += ","; } strList += findResult.ids[i]; } return(strList); }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // Create a root folder based on keywording form "Email". // Parent is the "imaginary" archive entry with object ID = 1. String parentId = "1"; String maskId = "email"; EditInfo ed = ix.Ix.createSord(parentId, maskId, EditInfoC.mbAll); ed.sord.name = "New Sord"; ViewAndEditSordDlg dlg = new ViewAndEditSordDlg(); dlg.init(ix, ed); dlg.ShowDialog(null); // CHECKIN int objId = ix.Ix.checkinSord(dlg.getSord(), SordC.mbAll, LockC.NO); Logger.instance().log("Created sord successfully, objId=" + objId); } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
private void dumpUserNames(String indent, IXServicePortC CONST, UserName[] uns) { for (int i = 0; i < uns.Length; i++) { String type = (uns[i].type == UserInfoC.TYPE_GROUP) ? "group" : "user"; Logger.instance().log(indent + type + ": name=" + uns[i].name + ", id=" + uns[i].id); } }
/// <summary> /// This function shows how to checkin a document using encryption functionality of /// </summary> /// <param name="ix"></param> /// <param name="CONST"></param> /// <param name="ci"></param> /// <returns></returns> private string checkinDocEncrypted(IXConnection ix, IXServicePortC CONST) { // Tell IndexServer to encrypt/decrypt. setSessionOptionEncrypt(ix, true); // Provide external password of encryption set. // This password must be encrpyted for security reasons. // Administrators should not know it! string encrPwd = ix.EncryptPassword(encryptionPassword); ix.Ix.provideCryptPassword("" + encryptionSet, encrPwd); // Create document EditInfo ed = ix.Ix.createDoc("1", "0", null, EditInfoC.mbSordDoc); ed.sord.name = "C# example CheckinOutDocEncrypted"; ed.sord.details.encryptionSet = encryptionSet; // Create file for document version String testFile = internalCreateTestFile("CheckinDocEncrypted example file", "txt"); // Supply the extension of the document ed.document.docs = new DocVersion[1]; ed.document.docs[0] = new DocVersion(); ed.document.docs[0].ext = ix.GetFileExt(testFile); ed.document.docs[0].pathId = ed.sord.path; ed.document.docs[0].encryptionSet = ed.sord.details.encryptionSet; // CheckinDocBegin: let IndexServer generate an URL to upload the document // This URL addresses always the IndexServer and not the Document Manager. ed.document = ix.Ix.checkinDocBegin(ed.document); // ------------------------------------------------------------------------------- // The URL to upload the document should be a HTTPS URL in production environments! // IndexServer configuration option "ixUrlBase" might be helpful here. // ------------------------------------------------------------------------------- Logger.instance().log("prepared upload URL=" + ed.document.docs[0].url + ", doc-guid=" + ed.document.docs[0].guid); // Upload document version. // IndexServer encrypts the document. ed.document.docs[0].uploadResult = ix.Upload(ed.document.docs[0].url, testFile); Logger.instance().log("upload document version succeeded"); // CheckinDocEnd: uploadResult contains the document information from ELODM. // Pass this information to ed.document = ix.Ix.checkinDocEnd(ed.sord, SordC.mbAll, ed.document, LockC.NO); Logger.instance().log("inserted document:"); Logger.instance().log(" objId=" + ed.document.objId); Logger.instance().log(" docId=" + ed.document.docs[0].id); Logger.instance().log(" doc-guid=" + ed.document.docs[0].guid); Logger.instance().log(" URL=" + ed.document.docs[0].url); System.IO.File.Delete(testFile); return(ed.document.objId); }
/// <summary> /// Creates a Sord object. /// </summary> /// <param name="ix">IndexServer connection</param> /// <param name="CONST">IndexServer constants</param> /// <param name="ci">Client information (ticket)</param> /// <returns>Sord GUID</returns> private String internalCreateDocument(IXConnection ix, IXServicePortC CONST) { Sord sord = ix.Ix.createSord("1", null, EditInfoC.mbSord).sord; sord.name = "C# Workflow example " + DateTime.Now; int objId = ix.Ix.checkinSord(sord, SordC.mbAll, LockC.NO); return(Convert.ToString(objId)); }
/// <summary> /// Delets the example scripts /// </summary> /// <param name="ix">IndexServer connection</param> /// <param name="CONST">IndexServer constants</param> /// <param name="ci">Client information (ticket)</param> /// <param name="scriptNames">Array of script names</param> private void internalDeleteScripts(IXConnection ix, IXServicePortC CONST, String[] scriptNames) { String[] scriptPaths = new String[scriptNames.Length]; for (int i = 0; i < scriptNames.Length; i++) { scriptPaths[i] = myServerScriptDir + "\\" + scriptNames[i]; } ix.Ix.deleteConfigFiles(scriptPaths, LockC.NO); }
private Sord internalCreateEmail(IXConnection ix, IXServicePortC CONST, String parentId, String name, String from, String to) { Sord d1 = ix.Ix.createDoc(parentId, "Email", null, EditInfoC.mbSord).sord; d1.name = name; d1.objKeys[0].data = new String[] {from}; d1.objKeys[1].data = new String[] {to}; d1.id = ix.Ix.checkinSord(d1, SordC.mbAll, LockC.NO); Logger.instance().log("name=" + name + ", from=" + from + ", to=" + to); return d1; }
public SelectKeywordDlg(IXConnection ix) { this.ix = ix; this.CONST = ix.CONST; // // Erforderlich für die Windows Form-Designerunterstützung // InitializeComponent(); // Fill list of keyword list names. fillKeywordListNames(); }
private Sord internalCreateBook(IXConnection ix, IXServicePortC CONST, String parentId, String name, String author, String price) { Sord d1 = ix.Ix.createDoc(parentId, "0", null, EditInfoC.mbSord).sord; d1.name = name; d1.objKeys = new ObjKey[2]; d1.objKeys[0] = new ObjKey(); d1.objKeys[0].id = 0; d1.objKeys[0].name = "AUTHOR"; d1.objKeys[0].data = new String[] { author }; d1.objKeys[1] = new ObjKey(); d1.objKeys[1].id = 1; d1.objKeys[1].name = "PRICE"; d1.objKeys[1].data = new String[] { price }; d1.id = ix.Ix.checkinSord(d1, SordC.mbAll, LockC.NO); Logger.instance().log("name=" + name + ", author=" + author); return(d1); }
internal virtual void getCONST(BAsyncResult <IXServicePortC> constResult) { if (constVal == null) { BAsyncResult <IXServicePortC> outerResult = (cval, ex) => { if (ex == null) { this.constVal = cval; } constResult(cval, ex); }; ixVal.getConstants(outerResult); } else { constResult(constVal, null); } }
private void internalFindEmailsFromTo(IXConnection ix, IXServicePortC CONST, String parentId, String from, String to) { Logger.instance().log("find from=" + from + ", to=" + to + "..."); // select names only SordZ mbName = new SordZ(); mbName.bset = SordC.mbName; // find FindInfo findInfo = internalMakeFindInfo(parentId, from, to); Sord[] sords = ix.Ix.findFirstSords(findInfo, 1000, mbName).sords; String nameList = ""; for (int i = 0; i < sords.Length; i++) { if (i != 0) nameList += ","; nameList += sords[i].name; } Logger.instance().log("find OK, sords=" + nameList); }
/// <summary> /// This function initializes an encryption set with a new internal and external password. /// It must be called with administrator rights. /// </summary> /// <param name="encrSet">Encryption set ID</param> /// <param name="name">Encryption set name</param> /// <param name="pwd">External password</param> private void initializeNewEncryptionSet(IXConnection ix, IXServicePortC CONST, int encrSet, String name, String pwd) { // Create new CryptInfo object that contains the parameters for an encrpytion set CryptInfo yi = new CryptInfo(); yi.id = encrSet; yi.name = name; // Encrypt the password with the public key supplied by IndexServer yi.pwd = ix.EncryptPassword(pwd); // KeyInfo can be filled with the internal ELO representation of the // internal encryption key. This information is encrypted with the // external password. To create a new internal key, set this member to "*" yi.keyInfo = "*"; // write crypt info ix.Ix.checkinCryptInfos(new CryptInfo[] { yi }, LockC.NO); }
public virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { Logout(); iXConnFactory = null; auth = null; url = null; connPropsVal = null; sessionOptionsVal = null; ixVal = null; constVal = null; eventBusApiVal = null; bclient = null; } disposed = true; }
private void internalDumpLinks(IXConnection ix, IXServicePortC CONST, String guid) { // Checkout sord to get the new links Sord sord = ix.Ix.checkoutSord(guid, EditInfoC.mbSord, LockC.NO).sord; Logger.instance().log("links of " + sord.name + " {"); for (int i = 0; i < sord.linksGoOut.Length; i++) { Sord linkToSord = ix.Ix.checkoutSord(sord.linksGoOut[i].id, EditInfoC.mbSordLean, LockC.NO).sord; Logger.instance().log(" ->" + linkToSord.name); // + ", guid=" + sord.linksGoOut[i].id + ", linkId=" + sord.linksGoOut[i].linkId); } for (int i = 0; i < sord.linksComeIn.Length; i++) { Sord linkFromSord = ix.Ix.checkoutSord(sord.linksComeIn[i].id, EditInfoC.mbSordLean, LockC.NO).sord; Logger.instance().log(" <-" + linkFromSord.name); // + ", guid=" + sord.linksComeIn[i].id + ", linkId=" + sord.linksComeIn[i].linkId); } Logger.instance().log("}"); }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // Example for initializing an encryption set with a new internal password. // If you uncomment this lines, aready encrypted documents of this encryption set // cannot be decrypted anymore since the internal key is lost! // Logger.instance().log("init encryption set ..."); //initializeNewEncryptionSet(ix, CONST, 13, "CS-TEST", encryptionPassword); // Logger.instance().log("init encryption set OK"); // checkin example document and encrypt it string objId = checkinDocEncrypted(ix, CONST); // checkout example document checkoutDocDecryptedUsingSessionOption(ix, CONST, objId); // checkout example document checkoutDocDecryptedUsingUrlExt(ix, CONST, objId); bool cleanUp = true; if (cleanUp) { // Delete Document DeleteOptions delOpts = new DeleteOptions(); delOpts.deleteFinally = true; ix.Ix.deleteSord(null, objId, LockC.NO, null); ix.Ix.deleteSord(null, objId, LockC.NO, delOpts); } } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // 1. Create archive hirarchie // root folder Sord sordRoot = ix.Ix.createSord("1", null, EditInfoC.mbSord).sord; sordRoot.name = "C# example FindFirstFindNext"; sordRoot.id = ix.Ix.checkinSord(sordRoot, SordC.mbAll, LockC.NO); // create sords Logger.instance().log("create sords..."); for (int i = 0; i < nbOfChildren; i++) { String namePrefix = "" + i; while (namePrefix.Length < 4) { namePrefix = "0" + namePrefix; } Sord sord = ix.Ix.createSord(sordRoot.guid, null, EditInfoC.mbSord).sord; sord.name = namePrefix + "-o-" + namePrefix; sord.id = ix.Ix.checkinSord(sord, SordC.mbAll, LockC.NO); } Logger.instance().log("create sords OK"); // 2. List hirarchie Logger.instance().log("find..."); // Prepare FindInfo object FindInfo findInfo = new FindInfo(); findInfo.findChildren = new EloixClient.IndexServer.FindChildren(); findInfo.findChildren.parentId = sordRoot.guid; // find FindResult findResult = ix.Ix.findFirstSords(findInfo, 1000, SordC.mbAll); Logger.instance().log("found #=" + findResult.sords.Length); for (int i = 0; i < findResult.sords.Length; i++) { Logger.instance().log("sord.id=" + findResult.sords[i].id + ", sord.name=" + findResult.sords[i].name); } ix.Ix.findClose(findResult.searchId); Logger.instance().log("find OK"); bool cleanUp = true; if (cleanUp) { Logger.instance().log("clean up..."); DeleteOptions delOpts = new DeleteOptions(); delOpts.deleteFinally = true; ix.Ix.deleteSord(null, sordRoot.guid, LockC.NO, null); ix.Ix.deleteSord(null, sordRoot.guid, LockC.NO, delOpts); Logger.instance().log("clean up OK"); } } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // 1. Create archive structure Logger.instance().log("create structure..."); // create root folder s1 EditInfo ed = ix.Ix.createSord("1", "0", EditInfoC.mbAll); Sord s1 = ed.sord; s1.name = "s1 C# example FindByIndexValues"; s1.id = ix.Ix.checkinSord(s1, SordC.mbAll, LockC.NO); /// d1, name=The Inner Circle, AUTHOR=T. Coraghessan Boyle, PRICE=039 /// d2 name=The Shifting Tide, AUTHOR=Anne Perry, PRICE=037 /// d3 name=Feel, AUTHOR=Robbie Williams, PRICE=142 /// d4 name=The Da Vinci Code, AUTHOR=Dan Brown, PRICE=032 /// Sord d1 = internalCreateBook(ix, CONST, s1.guid, "The Inner Circle", "T. Coraghessan Boyle", "039"); Sord d2 = internalCreateBook(ix, CONST, s1.guid, "The Shifting Tide", "Anne Perry", "037"); Sord d3 = internalCreateBook(ix, CONST, s1.guid, "Feel", "Robbie Williams", "142"); Sord d4 = internalCreateBook(ix, CONST, s1.guid, "The Da Vinci Code", "Dan Brown", "032"); Logger.instance().log("create structure OK"); // 2. Find books from Authors with names from "A" to "J" internalFindBooks(ix, CONST, s1.guid, "A* ... J*", ""); // Finds: The Da Vinci Code,The Shifting Tide // 3. Find books from Authors with names from "J" internalFindBooks(ix, CONST, s1.guid, "J*...*", ""); // Finds: Feel,The Inner Circle // 4. Find books from Authors with names from "J" and price higher than 100 internalFindBooks(ix, CONST, s1.guid, "J*...", "100...*"); // Finds: Feel bool cleanUp = true; if (cleanUp) { Logger.instance().log("clean up..."); ix.Ix.deleteSord(null, s1.guid, LockC.NO, null); Logger.instance().log("clean up OK"); } } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // 1. Create sord for document without version // Initialize Sord object EditInfo ed = ix.Ix.createDoc("1", "0", null, EditInfoC.mbSordDocAtt); ed.sord.name = "C# example CheckinAttachment"; // Create attachment file String attFile = internalCreateTestFile("CheckinNewAttachment attachment file", "txt"); // Supply the extension of the document ed.document.atts = new DocVersion[1]; ed.document.atts[0] = new DocVersion(); ed.document.atts[0].ext = ix.GetFileExt(attFile); ed.document.atts[0].pathId = ed.sord.path; // ed.document.atts[0].encryptionSet = ignored // CheckinDocBegin: let IndexServer generate an URL to upload the document ed.document = ix.Ix.checkinDocBegin(ed.document); Logger.instance().log("prepared upload URL=" + ed.document.atts[0].url + ", att-guid=" + ed.document.atts[0].guid); // Upload the document String uploadResult = ix.Upload(ed.document.atts[0].url, attFile); ed.document.atts[0].uploadResult = uploadResult; Logger.instance().log("upload succeeded"); System.IO.File.Delete(attFile); // CheckinDocEnd: uploadResult contains the document information from ELODM. // Pass this information to ed.document = ix.Ix.checkinDocEnd(ed.sord, SordC.mbAll, ed.document, LockC.NO); Logger.instance().log("inserted document:"); Logger.instance().log(" objId=" + ed.document.objId); Logger.instance().log(" attId=" + ed.document.atts[0].id); Logger.instance().log(" att-guid=" + ed.document.atts[0].guid); Logger.instance().log(" URL=" + ed.document.atts[0].url); // 2. Checkout and show document ed = ix.Ix.checkoutDoc(ed.sord.guid, null, EditInfoC.mbAll, LockC.NO); String tempName2 = internalMakeTempFileName(ed.document.atts[0].ext); ix.Download(ed.document.atts[0].url, tempName2); // Uncomment this to show document in notepad: // System.Diagnostics.Process.Start("notepad.exe", tempName2); // System.Threading.Thread.Sleep(3000); System.IO.File.Delete(tempName2); bool cleanUp = true; if (cleanUp) { // Delete Document DeleteOptions delOpts = new DeleteOptions(); delOpts.deleteFinally = true; ix.Ix.deleteSord(null, ed.sord.guid, LockC.NO, null); ix.Ix.deleteSord(null, ed.sord.guid, LockC.NO, delOpts); } } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { connFact = new IXConnFactory(url, "IX-Examples", "1.0"); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // Create a root folder based on keywording form "Basic entry". // Parent is the "imaginary" archive entry with object ID = 1. String parentId = "1"; String maskId = ""; EditInfo editInfo = ix.Ix.createSord(parentId, maskId, EditInfoC.mbSord); Logger.instance().log("created sord, GUID=" + editInfo.sord.guid); Logger.instance().log("name=" + editInfo.sord.name + ", #objKeys=" + editInfo.sord.objKeys.Length); // Change the storage mask to "Email" editInfo.sord.name = "C# change mask"; // to show, that attributes are not changed in changeSordMask editInfo = ix.Ix.changeSordMask(editInfo.sord, "Email", EditInfoC.mbSord); Logger.instance().log("created sord, GUID=" + editInfo.sord.guid + ", objId=" + editInfo.sord.id); Logger.instance().log("name=" + editInfo.sord.name + ", #objKeys=" + editInfo.sord.objKeys.Length); // Hint: The Sord object was not saved, neither by createSord nor changeSordMask. // You have to call checkinSord to save it to the database. } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
public override Object read(Object obj1, BInput bin1, long version) { BInputBin bin = (BInputBin)bin1; IXServicePortC obj = (IXServicePortC)(obj1 != null ? obj1 : bin.onObjectCreated(new IXServicePortC())); BBufferBin bbuf = bin.bbuf; // checkpoint byps.gen.cs.PrintContext:449 obj.ACCESS = (EloixClient.IndexServer.AccessC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.ACL_ITEM = (EloixClient.IndexServer.AclItemC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.ACTIVITY = (EloixClient.IndexServer.ActivityC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.ACTIVITY_PROJECT = (EloixClient.IndexServer.ActivityProjectC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.ALERT = (EloixClient.IndexServer.AlertC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.ARCHIVING_MODE = (EloixClient.IndexServer.ArchivingModeC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.CHECKIN_USERS = (EloixClient.IndexServer.CheckinUsersC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.CHECKOUT_USERS = (EloixClient.IndexServer.CheckoutUsersC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.COLOR = (EloixClient.IndexServer.ColorDataC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.CONFIG_FILE = (EloixClient.IndexServer.ConfigFileC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.COPY_SORD = (EloixClient.IndexServer.CopySordC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.COUNTER_INFO = (EloixClient.IndexServer.CounterInfoC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.DOC_MASK = (EloixClient.IndexServer.DocMaskC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.DOC_MASK_LINE = (EloixClient.IndexServer.DocMaskLineC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.DOC_VERSION = (EloixClient.IndexServer.DocVersionC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.EDIT_INFO = (EloixClient.IndexServer.EditInfoC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.EXPORT_OPTIONS = (EloixClient.IndexServer.ExportOptionsC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.IMPORT_OPTIONS = (EloixClient.IndexServer.ImportOptionsC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.IXEXCEPTION = (EloixClient.IndexServer.IXExceptionC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.KEYWORD = (EloixClient.IndexServer.KeywordC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.LINK_SORD = (EloixClient.IndexServer.LinkSordC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.LOCK = (EloixClient.IndexServer.LockC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.NAV_INFO = (EloixClient.IndexServer.NavigationInfoC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.NOTE = (EloixClient.IndexServer.NoteC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.OBJ_KEY = (EloixClient.IndexServer.ObjKeyC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.PROCESS_INFO = (EloixClient.IndexServer.ProcessInfoC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.REMINDER = (EloixClient.IndexServer.ReminderC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.REPL_SET_NAME = (EloixClient.IndexServer.ReplSetNameC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.REPORT = (EloixClient.IndexServer.ReportC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.REPORT_INFO = (EloixClient.IndexServer.ReportInfoC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.REPORT_MODE = (EloixClient.IndexServer.ReportModeC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.REPORT_OPTIONS = (EloixClient.IndexServer.ReportOptionsC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SEARCH_MODE = (EloixClient.IndexServer.SearchModeC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SERVER_STATE = (EloixClient.IndexServer.ServerStateC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SESSION_OPTIONS = (EloixClient.IndexServer.SessionOptionsC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SORD = (EloixClient.IndexServer.SordC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SORD_HIST = (EloixClient.IndexServer.SordHistC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SORD_HIST_KEY = (EloixClient.IndexServer.SordHistKeyC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SORD_TYPE = (EloixClient.IndexServer.SordTypeC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.SORT_ORDER = (EloixClient.IndexServer.SortOrderC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.STORE_INFO = (EloixClient.IndexServer.StoreInfoC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.TAKE_NODE = (EloixClient.IndexServer.WFTakeNodeC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.THESAURUS = (EloixClient.IndexServer.ThesaurusC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.USER_INFO = (EloixClient.IndexServer.UserInfoC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.USER_PROFILE = (EloixClient.IndexServer.UserProfileC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.USER_TASK_PRIORITY = (EloixClient.IndexServer.UserTaskPriorityC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.USER_TASK_SORT_ORDER = (EloixClient.IndexServer.UserTaskSortOrderC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.VT_DOC = (EloixClient.IndexServer.VtDocC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.WORKFLOW = (EloixClient.IndexServer.WFDiagramC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.WORKFLOW_NODE = (EloixClient.IndexServer.WFNodeC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.WORKFLOW_NODE_ASSOC_TYPE = (EloixClient.IndexServer.WFNodeMatrixC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.WORKFLOW_TYPE = (EloixClient.IndexServer.WFTypeC)bin.readObj(false, null); if (version >= 600000093000000L) { // checkpoint byps.gen.cs.PrintContext:449 obj.INVALIDATE_CACHE = (EloixClient.IndexServer.InvalidateCacheC)bin.readObj(false, null); if (version >= 700000000000008L) { // checkpoint byps.gen.cs.PrintContext:449 obj.WORKFLOW_VERSION = (EloixClient.IndexServer.WFVersionC)bin.readObj(false, null); if (version >= 700000000000024L) { // checkpoint byps.gen.cs.PrintContext:449 obj.NOTE_TEMPLATE = (EloixClient.IndexServer.NoteTemplateC)bin.readObj(false, null); if (version >= 700000000000025L) { // checkpoint byps.gen.cs.PrintContext:449 obj.NOTE_FREEHAND = (EloixClient.IndexServer.NoteFreehandC)bin.readObj(false, null); if (version >= 700000020000009L) { // checkpoint byps.gen.cs.PrintContext:449 obj.ARCHIVE_STATISTICS_OPTIONS = (EloixClient.IndexServer.ArchiveStatisticsOptionsC)bin.readObj(false, null); if (version >= 700000040000001L) { // checkpoint byps.gen.cs.PrintContext:449 obj.MAP_CONFIG = (EloixClient.IndexServer.MapDomainC)bin.readObj(false, null); if (version >= 700000040000003L) { // checkpoint byps.gen.cs.PrintContext:449 obj.ELO_IX_OPT = (EloixClient.IndexServer.EloIxOptC)bin.readObj(false, null); if (version >= 700000040000019L) { // checkpoint byps.gen.cs.PrintContext:449 obj.ANY = (EloixClient.IndexServer.AnyC)bin.readObj(false, null); if (version >= 700000040000021L) { // checkpoint byps.gen.cs.PrintContext:449 obj.SEARCH_TERMS = (EloixClient.IndexServer.SearchTermsC)bin.readObj(false, null); if (version >= 700000040000022L) { // checkpoint byps.gen.cs.PrintContext:449 obj.ADMIN_MODE = (EloixClient.IndexServer.AdminModeC)bin.readObj(false, null); if (version >= 700000040000023L) { // checkpoint byps.gen.cs.PrintContext:449 obj.FULLTEXT_CONFIG = (EloixClient.IndexServer.FulltextConfigC)bin.readObj(false, null); if (version >= 700000040000026L) { // checkpoint byps.gen.cs.PrintContext:449 obj.SERVER_INFO_DM = (EloixClient.IndexServer.ServerInfoDMC)bin.readObj(false, null); if (version >= 800000000000001L) { // checkpoint byps.gen.cs.PrintContext:449 obj.FIND_DIRECT = (EloixClient.IndexServer.FindDirectC)bin.readObj(false, null); if (version >= 800000010000000L) { // checkpoint byps.gen.cs.PrintContext:449 obj.EVENT_BUS = (EloixClient.IndexServer.EventBusC)bin.readObj(false, null); if (version >= 800000012000004L) { // checkpoint byps.gen.cs.PrintContext:449 obj.MAP_DOMAIN = (EloixClient.IndexServer.MapDomainC)bin.readObj(false, null); if (version >= 900000000000003L) { // checkpoint byps.gen.cs.PrintContext:449 obj.ACTION = (EloixClient.IndexServer.feed.ActionC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.FEED = (EloixClient.IndexServer.feed.FeedC)bin.readObj(false, null); if (version >= 900000000000007L) { // checkpoint byps.gen.cs.PrintContext:449 obj.TRANSLATE_TERM = (EloixClient.IndexServer.TranslateTermC)bin.readObj(false, null); if (version >= 900000000000015L) { // checkpoint byps.gen.cs.PrintContext:449 obj.PREVIEW_IMAGE_INFO = (EloixClient.IndexServer.PreviewImageInfoC)bin.readObj(false, null); if (version >= 900000000000020L) { // checkpoint byps.gen.cs.PrintContext:449 obj.RESOLVE_RIGHTS = (EloixClient.IndexServer.ResolveRightsResultC)bin.readObj(false, null); if (version >= 900000000000037L) { // checkpoint byps.gen.cs.PrintContext:449 obj.FIND_ACTIONS_INFO = (EloixClient.IndexServer.feed.FindActionsInfoC)bin.readObj(false, null); if (version >= 900000014000003L) { // checkpoint byps.gen.cs.PrintContext:449 obj.SUBSCRIPTION = (EloixClient.IndexServer.SubscriptionC)bin.readObj(false, null); if (version >= 900000014000009L) { // checkpoint byps.gen.cs.PrintContext:449 obj.MAP_DATA = (EloixClient.IndexServer.MapDataC)bin.readObj(false, null); if (version >= 900000018000002L) { // checkpoint byps.gen.cs.PrintContext:449 obj.MAP_HIST = (EloixClient.IndexServer.MapHistC)bin.readObj(false, null); // checkpoint byps.gen.cs.PrintContext:449 obj.WORKFLOW_EXPORT_OPTIONS = (EloixClient.IndexServer.WorkflowExportOptionsC)bin.readObj(false, null); if (version >= 900000030000018L) { // checkpoint byps.gen.cs.PrintContext:449 obj.WORKFLOW_NODE_HISTORY = (EloixClient.IndexServer.WFNodeHistoryC)bin.readObj(false, null); if (version >= 900000030000030L) { // checkpoint byps.gen.cs.PrintContext:449 obj.PUBLIC_DOWNLOAD = (EloixClient.IndexServer.PublicDownloadC)bin.readObj(false, null); if (version >= 900990009000002L) { // checkpoint byps.gen.cs.PrintContext:449 obj.DOC_MASK_LINE_TEMPLATE = (EloixClient.IndexServer.DocMaskLineTemplateC)bin.readObj(false, null); if (version >= 1000000020000006L) { // checkpoint byps.gen.cs.PrintContext:449 obj.FILE_DATA = (EloixClient.IndexServer.FileDataC)bin.readObj(false, null); if (version >= 1000170059000002L) { // checkpoint byps.gen.cs.PrintContext:449 obj.OCR_INFO = (EloixClient.IndexServer.OcrInfoC)bin.readObj(false, null); } } } } } } } } } } } } } } } } } } } } } } } } } } } } return(obj); }
public override void write(Object obj1, BOutput bout1, long version) { IXServicePortC obj = (IXServicePortC)obj1; BOutputBin bout = (BOutputBin)bout1; BBufferBin bbuf = bout.bbuf; // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ACCESS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ACL_ITEM, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ACTIVITY, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ACTIVITY_PROJECT, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ALERT, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ARCHIVING_MODE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.CHECKIN_USERS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.CHECKOUT_USERS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.COLOR, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.CONFIG_FILE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.COPY_SORD, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.COUNTER_INFO, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.DOC_MASK, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.DOC_MASK_LINE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.DOC_VERSION, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.EDIT_INFO, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.EXPORT_OPTIONS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.IMPORT_OPTIONS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.IXEXCEPTION, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.KEYWORD, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.LINK_SORD, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.LOCK, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.NAV_INFO, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.NOTE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.OBJ_KEY, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.PROCESS_INFO, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.REMINDER, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.REPL_SET_NAME, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.REPORT, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.REPORT_INFO, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.REPORT_MODE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.REPORT_OPTIONS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SEARCH_MODE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SERVER_STATE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SESSION_OPTIONS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SORD, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SORD_HIST, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SORD_HIST_KEY, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SORD_TYPE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SORT_ORDER, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.STORE_INFO, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.TAKE_NODE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.THESAURUS, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.USER_INFO, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.USER_PROFILE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.USER_TASK_PRIORITY, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.USER_TASK_SORT_ORDER, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.VT_DOC, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.WORKFLOW, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.WORKFLOW_NODE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.WORKFLOW_NODE_ASSOC_TYPE, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.WORKFLOW_TYPE, false, null); if (version >= 600000093000000L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.INVALIDATE_CACHE, false, null); if (version >= 700000000000008L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.WORKFLOW_VERSION, false, null); if (version >= 700000000000024L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.NOTE_TEMPLATE, false, null); if (version >= 700000000000025L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.NOTE_FREEHAND, false, null); if (version >= 700000020000009L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ARCHIVE_STATISTICS_OPTIONS, false, null); if (version >= 700000040000001L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.MAP_CONFIG, false, null); if (version >= 700000040000003L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ELO_IX_OPT, false, null); if (version >= 700000040000019L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ANY, false, null); if (version >= 700000040000021L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SEARCH_TERMS, false, null); if (version >= 700000040000022L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ADMIN_MODE, false, null); if (version >= 700000040000023L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.FULLTEXT_CONFIG, false, null); if (version >= 700000040000026L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SERVER_INFO_DM, false, null); if (version >= 800000000000001L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.FIND_DIRECT, false, null); if (version >= 800000010000000L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.EVENT_BUS, false, null); if (version >= 800000012000004L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.MAP_DOMAIN, false, null); if (version >= 900000000000003L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.ACTION, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.FEED, false, null); if (version >= 900000000000007L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.TRANSLATE_TERM, false, null); if (version >= 900000000000015L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.PREVIEW_IMAGE_INFO, false, null); if (version >= 900000000000020L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.RESOLVE_RIGHTS, false, null); if (version >= 900000000000037L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.FIND_ACTIONS_INFO, false, null); if (version >= 900000014000003L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.SUBSCRIPTION, false, null); if (version >= 900000014000009L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.MAP_DATA, false, null); if (version >= 900000018000002L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.MAP_HIST, false, null); // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.WORKFLOW_EXPORT_OPTIONS, false, null); if (version >= 900000030000018L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.WORKFLOW_NODE_HISTORY, false, null); if (version >= 900000030000030L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.PUBLIC_DOWNLOAD, false, null); if (version >= 900990009000002L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.DOC_MASK_LINE_TEMPLATE, false, null); if (version >= 1000000020000006L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.FILE_DATA, false, null); if (version >= 1000170059000002L) { // checkpoint byps.gen.cs.PrintContext:494 bout.writeObj(obj.OCR_INFO, false, null); } } } } } } } } } } } } } } } } } } } } } } } } } } } } }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // lock key data // This is optional since checkinKeys and // deleteKeys check the lock too. Logger.instance().log("lock key data..."); ix.Ix.checkoutKeys(null, LockC.YES); Logger.instance().log("lock key data OK"); // create key // - be aware to set KeyInfo.id = -1 to create a new key! Logger.instance().log("create key..."); KeyInfo ki = new KeyInfo(); ki.id = -1; ki.name = "C# Example Key"; ki.id = ix.Ix.checkinKeys(new KeyInfo[] { ki }, LockC.NO)[0]; Logger.instance().log("create key OK, name=" + ki.name + ", id=" + ki.id); // delete key and unlock Logger.instance().log("delete key..."); ix.Ix.deleteKeys(new String[] { ki.name }, LockC.YES); Logger.instance().log("delete key OK"); } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }
public void run() { IXConnFactory connFact = null; IXConnection ix = null; try { IXProperties connProps = IXConnFactory.CreateConnProperties(url); IXProperties sessOpts = IXConnFactory.CreateSessionOptions("IX-Examples", "1.0"); connFact = new IXConnFactory(connProps, sessOpts); Logger.instance().log("create IXConnFactory OK"); // Prepare ClientInfo object with language and country // ClientInfo ci = new ClientInfo(); // ci.language = "de"; // ci.country = "DE"; // LOGIN Logger.instance().log("login..."); ix = connFact.Create(userName, userPwd, "myComputer", null); // ci = ix.Login.ci Logger.instance().log("login OK"); // get constants Logger.instance().log("get const..."); IXServicePortC CONST = ix.CONST; Logger.instance().log("get const OK"); // get templates Logger.instance().log("get workflow templates..."); IdName[] idNames = ix.Ix.collectWorkFlows(WFTypeC.TEMPLATE); Logger.instance().log(" #workflows=" + idNames.Length); for (int i = 0; i < idNames.Length; i++) { Logger.instance().log(" id=" + idNames[i].id + ", name=" + idNames[i].name); } Logger.instance().log("get workflow templates OK"); // get active workflows Logger.instance().log("get active workflows..."); idNames = ix.Ix.collectWorkFlows(WFTypeC.ACTIVE); Logger.instance().log(" #workflows=" + idNames.Length); for (int i = 0; i < idNames.Length; i++) { Logger.instance().log(" id=" + idNames[i].id + ", name=" + idNames[i].name); } Logger.instance().log("get active workflows OK"); // get finished workflows Logger.instance().log("get finished workflows..."); idNames = ix.Ix.collectWorkFlows(WFTypeC.FINISHED); Logger.instance().log(" #workflows=" + idNames.Length); for (int i = 0; i < idNames.Length; i++) { Logger.instance().log(" id=" + idNames[i].id + ", name=" + idNames[i].name); } Logger.instance().log("get finished workflows OK"); } catch (Exception e) { throw e; } finally { // Logout // -- if (ix != null) { Logger.instance().log("IX logout..."); ix.Logout(); Logger.instance().log("IX logout OK"); } } }