UpdateCatalog Object

From HotDocs Wiki

Jump to: navigation, search

The UpdateCatalog object represents a single HotDocs update catalog file. You may use this object to create new or edit existing catalog files.

Contents

General Information

ProgID: HDNET.UpdateCatalog.1
HDNET.UpdateCatalog (version-independent)
CLSID: {6B1A8184-5B1A-478E-9360-74F90A9EB899}

Members

Methods
Method.gifLoad() Opens an existing update catalog file. To specify the file to load, use the fileName property.
Method.gifReconcileWithUpdateDocument(doc) Compares the update catalog with an update document (RSS feed) and updates the catalog file as needed. [For internal HotDocs use only.]
doc: The UpdateDocument object to compare with the UpdateCatalog.
Method.gifSave() Saves the update catalog (.HCAT) file. To specify the file name, use the fileName property.
Method.gifUpdateLastCheckDate() Updates the catalog file to show the last date it was checked for updates. [For internal HotDocs use only.]
Properties
Property.gifcheckInterval Indicates the number of days HotDocs should wait between each update check. If the interval is 0, HotDocs will check for updates every time it starts. It corresponds to the checkinterval element of the catalog file. [Read/Write]
Property.gifDiscardedItems Returns an UpdateItems collection, which represents all of the items in the catalog file that have been discarded (ignored). It corresponds to the discardeditems element of the catalog file. [Read-only]
Property.giffeedUrl A URL for the update document (RSS feed). For example, http://www.yourcompany.com/update.rss. It corresponds to the feedurl element of the catalog file. [Read/Write]
Property.giffileFormatVersion A number that indicates the catalog file format. Currently, the only recognized value is 1, but future versions of HotDocs may support additional values. It corresponds to the formatversion element of the catalog file. [Read-only]
Property.giffileName The file name and path of the update catalog file. [Read/Write]
Property.gifInstalledItems Returns an UpdateItems collection, which represents all of the items in the catalog file that have been installed. It corresponds to the installeditems element of the catalog file. [Read-only]
Property.giflastCheckDate The last date on which HotDocs checked for updates to the template set. [Read-only]
Property.gifnextCheckDate The next date on which HotDocs will check for updates. This is calculated by adding a number of days (checkInterval) to the last date on which updates were checked (lastCheckDate). [Read-only]
Property.gifNotInstalledItems Returns an UpdateItems collection, which represents all of the items in the catalog file that have not yet been installed. It corresponds to the notinstalleditems element of the catalog file. [Read-only]
Property.gifpublishDate The date on which the template set was published. When HotDocs reads the RSS feed, it ignores any updates published prior to this date. It corresponds to the publishdate element of the catalog file. [Read/Write]
Property.gifsetTitle The title of the template set. For example, Hobble Creek Real Estate Forms. It corresponds to the title element of the catalog file. [Read/Write]
Property.gifshouldUpdate Indicates whether HotDocs should check for updates for this template set (true) or not (false). It corresponds to the enabled element of the catalog file. [For internal HotDocs use only.] [Read/Write]
Property.giftimeToCheck Indicates whether it is time for HotDocs to check for updates or not. [Read-only]
Property.giftplPassword The password (if required) to install HotDocs Auto-Install (.HDI) files for your template set. When HotDocs installs an update that requires a password, it uses the password found in this property. It corresponds to the password element of the catalog file. [Read/Write]
Note:

If you set this property, you should use the same password each time you create an .HDI file to update your template set.

Example Code

Example for Creating a New HotDocs Update Catalog File (Visual Basic)
Dim hcat As New HDNETLib.UpdateCatalogClass
'Specify the information for the catalog file hcat.fileName = "C:\Example.hcat" hcat.setTitle = "Hobble Creek Real Estate Forms" hcat.feedUrl = "http://www.HobbleCreek.com/update.rss" hcat.checkInterval = 7 hcat.publishDate = System.DateTime.Now hcat.tplPassword = "password" hcat.shouldUpdate = True
'Save the catalog file hcat.Save()
Example for Creating a new HotDocs Update Catalog File (Visual C#)
//This example creates a catalog file and saves it on disk.
HDNETLib.UpdateCatalogClass hcat = new HDNETLib.UpdateCatalogClass();
//Specify the information for the catalog file hcat.fileName = "C:\\Example.hcat"; hcat.setTitle = "Hobble Creek Real Estate Forms"; //title hcat.feedUrl = "http://www.HobbleCreek.com/update.rss"; //feedurl hcat.checkInterval = 7; //checkinterval hcat.publishDate = System.DateTime.Now; //publishdate hcat.tplPassword = "password"; //tplPassword hcat.shouldUpdate = true; //enabled
//Save the catalog file hcat.Save();
Example for Opening an Existing HotDocs Update Catalog File (Visual C#)
//This example loads an existing catalog file and displays the template set title,
//the last date on which HotDocs checked for updates, and a list of all items
//in the DiscardedItems collection.
HDNETLib.UpdateCatalogClass hcat = new HDNETLib.UpdateCatalogClass(); hcat.fileName = "C:\\Example.hcat"; hcat.Load();
System.Console.WriteLine(hcat.setTitle); System.Console.WriteLine("HotDocs last checked for updates on " + hcat.lastCheckDate. ToShortDateString() + "."); System.Console.WriteLine("The following items have been discarded:"); for (int i = 0;i < hcat.DiscardedItems.Count;i++) { System.Console.WriteLine(hcat.DiscardedItems.Item(i).title); }