getting started with the laserfiche sdk
DESCRIPTION
Getting Started with the Laserfiche SDK. Agenda. SDK overview Demo What you need to know to get started Where to go from here. Prerequisites. Knowledge of Laserfiche architecture Some programming experience. What is the SDK?. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/1.jpg)
Getting Started with the Laserfiche SDK
![Page 2: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/2.jpg)
Agenda
‣ SDK overview‣ Demo‣ What you need to know to get started‣ Where to go from here
![Page 3: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/3.jpg)
Prerequisites
‣ Knowledge of Laserfiche architecture‣ Some programming experience
![Page 4: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/4.jpg)
What is the SDK?
‣ Tools you can use to create custom applications that access Laserfiche• Libraries• Distribution tools• Documentation
![Page 5: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/5.jpg)
What Can You Do with the SDK?
‣ Create applications that work with…• The repository• Documents• The Laserfiche Client user interface
![Page 6: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/6.jpg)
SDK Libraries
![Page 7: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/7.jpg)
SDK Libraries
‣ .NET • Repository Access• Document Services• Client Automation Tools
‣ COM, Java libraries available
![Page 8: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/8.jpg)
Repository Access
‣ Connections‣ Metadata‣ Entries‣ Administration
![Page 9: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/9.jpg)
Document Services
‣ Import/Export documents‣ Generate text
![Page 10: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/10.jpg)
Client Automation Tools
‣ Control UI‣ Scan‣ Integrate Laserfiche and other applications
![Page 11: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/11.jpg)
Quick Demo!
![Page 12: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/12.jpg)
Demo Overview
‣ Logging in and out‣ Working with entries‣ Modifying field values‣ Locking and saving‣ Searching
![Page 13: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/13.jpg)
Basic Demo Recap
‣ Returned name and field values for an entry
![Page 14: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/14.jpg)
Behind the Scenes
‣ Logged in‣ Found an entry
• Found its field information
‣ Logged out
![Page 15: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/15.jpg)
Demo CodeRepositoryRegistration myRepoReg = new RepositoryRegistration(“localhost", “LaserInvestigators");Session mySess = new Session();mySess.LogIn(myRepoReg);
Console.WriteLine("Entry ID:"); //asks for entry ID int entryId = int.Parse(Console.ReadLine());
EntryInfo myEntry = Entry.GetEntryInfo(entryId, mySess); // get an entryConsole.WriteLine(myEntry.Name);
FieldValueCollection myFields = myEntry.GetFieldValues();
for (int i = 0; i < myFields.Count; i++){
Console.WriteLine(myFields.PositionToName(i) + ": " + myFields[i]);}
myEntry.Dispose(); //disposes of the objectmySess.Close(); //logs out and disconnects from Laserfiche
![Page 16: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/16.jpg)
Common SDK Tasks
![Page 17: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/17.jpg)
SDK Building 101
‣ Log in‣ Lock the documents to be worked on‣ Perform the actions‣ Save the changes‣ Release the locks‣ Log out
![Page 18: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/18.jpg)
Logging In
‣ Create a Session() object• Windows or Laserfiche authentication• Can use SSL• You’ll use this frequently
![Page 19: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/19.jpg)
Logging In
RepositoryRegistration myRepoReg = new RepositoryRegistration("Server", "Repository"); Session mySess = new Session();mySess.LogIn("username","password", myRepoReg);
‣ To use Windows authentication, do not pass username/password to the .LogIn() method
![Page 20: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/20.jpg)
After Logging In…
‣ Work with• Templates• Users• Entries• And more
![Page 21: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/21.jpg)
Working with Entries
‣ Use a static class to create an info object• Many methods available
‣ Use Entry class to get EntryInfo object, use Document class to get DocumentInfo object, etc.
![Page 22: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/22.jpg)
Working with an Entry Object
EntryInfo myEntry = Entry.GetEntryInfo(entryId, mySess);Console.WriteLine(myEntry.Name);
Other properties include:‣ .Id, .Owner, .Path, .TemplateName
![Page 23: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/23.jpg)
Getting Field Values
‣ Just like entries, there are objects that represent metadata
FieldValueCollection myFields = myEntry.GetFieldValues();for (int i = 0; i < myFields.Count; i++){Console.WriteLine(myFields.PositionToName(i) + ": " + myFields[i]);}
![Page 24: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/24.jpg)
SummaryRepositoryRegistration myRepoReg = new RepositoryRegistration(“localhost", “LaserInvestigators");Session mySess = new Session();mySess.LogIn(myRepoReg);
Console.WriteLine("Entry ID:"); //asks for entry ID int entryId = int.Parse(Console.ReadLine());
EntryInfo myEntry = Entry.GetEntryInfo(entryId, mySess); // get an entryConsole.WriteLine(myEntry.Name);
FieldValueCollection myFields = myEntry.GetFieldValues();
for (int i = 0; i < myFields.Count; i++){
Console.WriteLine(myFields.PositionToName(i) + ": " + myFields[i]);}
myEntry.Dispose(); //disposes of the objectmySess.Close(); //logs out and disconnects from Laserfiche
![Page 25: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/25.jpg)
Searching Demo Overview
![Page 26: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/26.jpg)
Searching Demo Overview
‣ Searched for an entry by its name‣ For each result, updated a field with a
value we specified
![Page 27: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/27.jpg)
Behind the Scenes
‣ Logged in‣ Searched for entries by name‣ For each entry found
• Locked the entry• Added a value for the name field• Saved the changes• Unlocked the entry
‣ Logged out
![Page 28: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/28.jpg)
Searching
‣ Create a Search object‣ Use advanced search syntax with
the .Command property ‣ Use the .Run method to begin the search
![Page 29: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/29.jpg)
Searching Code Example
Search mySearch = new Search(mySess);mySearch.Command = "{[]:[Investigator Assigned]=\"" + oldInvestigator +"\"}";mySearch.Run();
![Page 30: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/30.jpg)
Search Statistics
‣ Create a SearchStatistics object to find useful information about your search• Document/folder/page/shortcut count• Text/image file size
![Page 31: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/31.jpg)
Search Statistics Code Example
SearchStatistics searchStatistics = mySearch.GetSummaryStats();Console.WriteLine("Entries Found: " + searchStatistics.DocumentCount);
![Page 32: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/32.jpg)
Working with Search Results
‣ Create a SearchListingSettings object to specify the result data you want
‣ Use .GetResultListing to create a SearchResultListing object
![Page 33: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/33.jpg)
Search Results Code Example
SearchListingSettings settings = new SearchListingSettings();SearchResultListing results = mySearch.GetResultListing(settings);
![Page 34: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/34.jpg)
Working with Search Results
‣ Use SearchResultListing to find the information you want
‣ Sample app iterated through each result and modified the entry
![Page 35: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/35.jpg)
Working with Search Results Code
for (int k = 1; k <= results.RowsCount; k++){int entryId = (int)results.GetDatum(k, SystemColumn.Id);
Console.WriteLine(entryId + " " + results.GetDatumAsString(k, SystemColumn.Name));EntryInfo myEntry = Entry.GetEntryInfo(entryId, mySess); FieldValueCollection myFields = myEntry.GetFieldValues();myFields["Investigator Assigned"] = newInvestigator;myEntry.Lock(LockType.Exclusive);myEntry.SetFieldValues(myFields);myEntry.Save();myEntry.Unlock(); myEntry.Dispose();}
![Page 36: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/36.jpg)
Working with Search Results Codefor (int k = 1; k <= results.RowsCount; k++){int entryId = (int)results.GetDatum(k, SystemColumn.Id);
Console.WriteLine(entryId + " " + results.GetDatumAsString(k, SystemColumn.Name));EntryInfo myEntry = Entry.GetEntryInfo(entryId, mySess); FieldValueCollection myFields = myEntry.GetFieldValues();myFields["Name"] = name;myEntry.Lock(LockType.Exclusive);myEntry.SetFieldValues(myFields);myEntry.Save();myEntry.Unlock(); myEntry.Dispose();}
![Page 37: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/37.jpg)
Locking and Saving Entries
‣ You must lock an entry before you modify it‣ Save your changes
![Page 38: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/38.jpg)
Locking and Saving Code Example
myEntry.Lock(LockType.Exclusive); //lock the entrymyEntry.SetFieldValues(myFields); //modify itmyEntry.Save(); //save your changesmyEntry.Unlock(); //unlock the entrymyEntry.Dispose(); //get rid of the entry object
![Page 39: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/39.jpg)
Summary
![Page 40: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/40.jpg)
Write Robust Code
‣ These sample apps work in a perfect environment
‣ Use try-catch statements to handle the unexpected
![Page 41: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/41.jpg)
Deployment!
![Page 42: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/42.jpg)
Distribution Tools
‣ Run-time installer ‣ Merge modules
![Page 43: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/43.jpg)
Run-Time Installer
‣ Use the installer that comes with the SDK, then copy your application over
![Page 44: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/44.jpg)
Merge Modules
‣ Used with your installer to deliver only the components you need
![Page 45: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/45.jpg)
Resources!
![Page 46: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/46.jpg)
Resources
‣ SDK Documentation• Tutorials• Sample projects• Object references
‣ Legacy SDK libraries
![Page 47: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/47.jpg)
More Resources
‣ Solution Exchange‣ Support Site
• Code Library• Answers Site
![Page 48: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/48.jpg)
Solution Exchange
![Page 49: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/49.jpg)
Support Site
![Page 50: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/50.jpg)
Code Library
![Page 51: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/51.jpg)
Answers
![Page 52: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/52.jpg)
Further Learning
‣ EDM203: Effective Integration Strategies‣ CD251: Using the Laserfiche UI in Your
Integration‣ CC302: Capture and Classification with
the SDK‣ EDM351: Advanced Applied SDK
![Page 53: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/53.jpg)
Questions?
![Page 54: Getting Started with the Laserfiche SDK](https://reader033.vdocuments.net/reader033/viewer/2022061404/568139d6550346895da18a4a/html5/thumbnails/54.jpg)
Further Learning
‣ EDM203: Effective Integration Strategies‣ CD251: Using the Laserfiche UI in Your
Integration‣ CC302: Capture and Classification with
the SDK‣ EDM351: Advanced Applied SDK