For version 5.0, the client API has changed to add support for new product features. Some other changes have been made to improve usability and consistency of the API.
Some breaking changes have been made to properties and methods of the API. Users who find it infeasible to change their code to accommodate these changes can contact us to receive a build of the client assembly that preserves backward compatibility for some of these changes.
Other notable changes are described below.
In previous versions of the API, the DataContext.CreateObject method was used to create new objects, and the returned object had to be cast to the correct type. The new DataContext.Create property exposes an ObjectFactory that has a method for each type of object. For example, to create a JobStep in previous versions would require this code:
Object Creation in V4 API |
Copy Code |
---|---|
var step = (JobStep) context.CreateObject(ClassID.JobStep); |
In the version 5 API this call can be replaced with:
Object Creation in V5 API |
Copy Code |
---|---|
var step = context.Create.JobStep(); |
The ExclusionPeriod class is added to represent Exclusion Periods. DataContext.GetExclusionPeriod and DataContext.GetExclusionPeriods are used to retrieve existing Exclusion Periods.
Job Execution Task
The JobExecutionTask class is added to represent the new Job Execution Task.
In previous versions of adTempus, selecting day 31 for a DaySpecification meant that the rule would apply to the last day of the month regardless of the number of days in the month. Version 5 allows the rule to be configured so that day 31 only applies to days that actually have 31 days (i.e., it is ignored for days with fewer than 31 days). The DaySpecification.Treat31stAsLast property determines how this rule behaves. By default this property is true and a DaySpecification with day 31 selected applies to the last day of all months, as in previous versions. If Treat31stAsLast is false, the rule only applies to months with 31 days.
New properties were added to ExecutionHistoryItem to expose new timings recorded by adTempus:
In previous versions of adTempus some objects supported user-defined description/notes fields. Starting with version 5 all objects support this. The ADTObject.Description and DescriptionTextType fields store the description and control the text format. The Description and Notes properties previously found on some other objects have been replaced with ADTObject.Description.
ADTObject now exposes a CustomProperties collection that can be used by client applications to associate application-defined data with an object. Custom properties are not exposed in the user interface.