Table of Contents

Class Scheduler

Namespace
ArcanaDevelopment.adTempus.Client
Assembly
ArcanaDevelopment.adTempus.Client.dll

Represents a connection to an adTempus server.

public sealed class Scheduler
Inheritance
object
Scheduler

Remarks

Use the static (shared) Connect(string, LoginAuthenticationType, string, string) methods to connect to a server and return a Scheduler object representing the connection.

Data Operations

Most object fetching an manipulation takes place within a DataContext. You should use the ReadOnlyDataContext only for fetching objects for read-only use (e.g., the list of jobs shown in the adTempus Console). For update operations you should create a new DataContext using NewDataContext() and then fetch all necessary objects within the new context.

Fields

WcfBindingSettings

Settings to adjust performance parameters for the WCF connection to the server.

public static readonly WcfBindingSettings WcfBindingSettings

Field Value

WcfBindingSettings

Properties

AutoKeepAlive

Determines whether the client will automatically ping the server periodically to keep the connection alive.

public bool AutoKeepAlive { get; set; }

Property Value

bool

Remarks

If AutoKeepAlive is True (default), the client will ping the server periodically to prevent the socket session from timing out. If AutoKeepAlive is False, there will be no automatic ping, and the session may time out if the calling application does not generate enough activity. Set this to True unless you are regularly (no more than 5 minutes apart) calling methods that generate calls to the server.

See Also

AutoKeepAliveInterval

Interval at which the Scheduler session will ping the server to keep the session alive.

public TimeSpan AutoKeepAliveInterval { get; set; }

Property Value

TimeSpan

Remarks

Cannot be less than 1 minute. The default value of 5 minutes is appropriate for most scenarios.

See Also

AvailableConsoleVersion

Gets the version of the Console that is available on the server.

public Version AvailableConsoleVersion { get; }

Property Value

Version

Remarks

May be null if the Console is not installed on the server or could not be found.

CanChangePassword

Determines whether the user can change the login password.

public bool CanChangePassword { get; }

Property Value

bool

Remarks

CanChangePassword is True if the user's login uses password security, or False if the login uses integrated Windows security.

See Also

ClientDomain

The Active Directory domain to which the ClientUser belongs.

public string ClientDomain { get; }

Property Value

string
See Also

ClientName

Returns the Windows user name that this session is authenticated under.

public string ClientName { get; }

Property Value

string

ClientUser

The user name under which the client is connected.

public string ClientUser { get; }

Property Value

string
See Also

ClientVersion

Gets the version of adTempus installed on the client.

public Version ClientVersion { get; }

Property Value

Version
See Also

ConnectionAuthenticationType

Indicates the type of authentication in use for the computer

public LoginAuthenticationType ConnectionAuthenticationType { get; }

Property Value

LoginAuthenticationType

ConnectionStatus

Gets the status of the server connection.

public ConnectionStatus ConnectionStatus { get; }

Property Value

ConnectionStatus
See Also

EngineMode

Gets the engine mode for the adTempus server.

public EngineMode EngineMode { get; }

Property Value

EngineMode
See Also

ExtensionManager

The Extension Manager to be used for this session.

public IExtensionManager ExtensionManager { get; set; }

Property Value

IExtensionManager

HostComputer

The name of the computer where the adTempus service is running.

public string HostComputer { get; }

Property Value

string

InstanceID

The unique ID for this adTempus instance

public Guid InstanceID { get; }

Property Value

Guid

Remarks

Each adTempus instance generates Guid to uniquely identify itself. This value is stored in the Registry on the server.

InstanceName

The name of the adTempus instance.

public string InstanceName { get; }

Property Value

string

Remarks

For the default instance, the InstanceName will be "Default". For a named instance, it will be the instance name assigned when the instance was created.

IsAdministrator

Indicates whether the user is an adTempus Administrator.

public bool IsAdministrator { get; }

Property Value

bool

Remarks

Returns True if the user is a member of the adTempus Administrators security group.

IsAgent

Indicates whether the server is an Agent (EngineMode is AgentOnly, MixedAgent, or LightweightAgent).

public bool IsAgent { get; }

Property Value

bool
See Also

IsAgentOnly

Indicates whether the server is Agent-Only(EngineMode is AgentOnly or LightweightAgent).

public bool IsAgentOnly { get; }

Property Value

bool
See Also

IsConnected

Indicates whether the server connection is still valid.

public bool IsConnected { get; }

Property Value

bool

Remarks

IsConnected will be False if a previous server operation has failed. If no operation has recently been performed, the information may not be accurate. Use PingServer() to test the state of the connection.

See Also

IsController

Indicates whether the server is a Controller (EngineMode is Controller).

public bool IsController { get; }

Property Value

bool
See Also

IsMixedAgent

Indicates whether the server is a mixed agent (EngineMode is MixedAgent).

public bool IsMixedAgent { get; }

Property Value

bool
See Also

IsStandalone

Indicates whether the server is a standalone instance (EngineMode is Standalone).

public bool IsStandalone { get; }

Property Value

bool
See Also

JobServices

Returns a JobServices object, used to perform job-related operations.

public JobServices JobServices { get; }

Property Value

JobServices

LatestServerVersion

Gets the latest version of adTempus that the server can be updated to.

public Version LatestServerVersion { get; }

Property Value

Version

LicenseInfo

Gets a license summary from the server.

public string LicenseInfo { get; }

Property Value

string

LicenseStatus

Gets the licensing status of the server.

public LicenseStatus LicenseStatus { get; }

Property Value

LicenseStatus

LoginOID

Gets the OID of the SecurityLogin that the client is connected as.

public OID LoginOID { get; }

Property Value

OID

ProductVersion

Gets a descriptive version number (more user-friendly than strict version number).

public string ProductVersion { get; }

Property Value

string

Remarks

For example, may return "4.0 Maintenance Update 1" instead of 4.0.1.

ReadOnlyDataContext

Provides a default read-only DataContext.

public DataContext ReadOnlyDataContext { get; }

Property Value

DataContext

Remarks

The ReadOnlyContext can be used for fetching reference data and fetching object stubs. Objects fetched through the read-only context cannot be modified: to edit an object you must fetch it through a new context first.

Attempting to modify an object returned from the read-only context will product a ReadOnlyException.

Objects fetched through the read-only context can be referenced by objects in other DataContexts (e.g., the Job.Group property can be set to a group fetched from the read-only context, even though cross-context references are normally not allowed.

SchemaVersion

public int SchemaVersion { get; }

Property Value

int

ServerAddress

The name or address of the server.

public string ServerAddress { get; }

Property Value

string

Remarks

The returned value includes the instance name and port number if specified in the call to Connect(string, LoginAuthenticationType, string, string), and can be passed as the serverName parameter in a call to Connect(string, LoginAuthenticationType, string, string) to open another connection to the same server.

See Also

ServerAndInstanceName

Gets the server name and instance name, if any

public string ServerAndInstanceName { get; }

Property Value

string

Remarks

If this is the default instance, this property returns the HostComputer. If this is not the default instance, it returns HostComputer<xref href="ArcanaDevelopment.adTempus.Client.Scheduler.InstanceName" data-throw-if-not-resolved="false">.

ServerCertificate

Gets the server security certificate.

public string ServerCertificate { get; }

Property Value

string

Remarks

This property returns the server's public encryption key, which can be used to encrypt data for the server or verify a signature from the server.

ServerOperatingSystemVersion

Gets the Windows operating system version for the server.

public int ServerOperatingSystemVersion { get; }

Property Value

int

Remarks

The version number is: System.Environment.OSVersion.Version.Major << 8 + System.Environment.OSVersion.Version.Minor

ServerTime

Gets the current date/time on the adTempus server.

public DateTimeOffset ServerTime { get; }

Property Value

DateTimeOffset

ServerTimeZone

Gets the System.TimeZoneInfo for the server.

public TimeZoneInfo ServerTimeZone { get; }

Property Value

TimeZoneInfo

ServerVersion

Gets the version of adTempus installed on the server.

public Version ServerVersion { get; }

Property Value

Version
See Also

SoftwareUpdateMessages

Gets a collection containing software update messages.

public ReadOnlyCollection<SoftwareUpdateMessage> SoftwareUpdateMessages { get; }

Property Value

ReadOnlyCollection<SoftwareUpdateMessage>

X509Certificate

The X.509 certificate, if any, returned by the server.

public X509Certificate2 X509Certificate { get; }

Property Value

X509Certificate2

Methods

AddOrUpdateLinkedServer(Scheduler, LinkedServer, out MessageCollection)

Adds a server trust relationship with another server.

public bool AddOrUpdateLinkedServer(Scheduler otherServer, LinkedServer serverSettings, out MessageCollection messages)

Parameters

NameTypeDescription
otherServer Scheduler

A Scheduler connection to the other server.

serverSettings LinkedServer

The settings to use for the relationship. Specify null to use the default settings.

messages MessageCollection

Error messages if the relationship cannot be created.

Returns

bool

True if the update succeeds, or False if it fails.

Remarks

The caller must be an adTempus Administrator on the target server.

The relationship is added only to the target server. To create a reciprocal relationship you must also call AddOrUpdateLinkedServer on otherServer.

BuildConnectionDescriptor(string, int?, string)

Returns a connection descriptor to use with Connect(string, LoginAuthenticationType, string, string) methods when connecting to a non-standard port or named instance.

public static string BuildConnectionDescriptor(string computerName, int? portNumber, string instanceName)

Parameters

NameTypeDescription
computerName string

The name or IP address of the target computer.

portNumber int?

The port number, or null for the default adTempus port (3760).

instanceName string

The name of the adTempus instance, or an empty string for the default instance.

Returns

string

A string with the connection descriptor suitable for use with the Connect(string, LoginAuthenticationType, string, string) methods.

Remarks

A connection descriptor uses the following format:

<pre><code class="lang-csharp">computerName,portNumber\instanceName</code></pre>

CanPerform(SecurityPermission)

Tests whether the user has the specified permission on the root security template.

public bool CanPerform(SecurityPermission action)

Parameters

NameTypeDescription
action SecurityPermission

The action to check permission for

Returns

bool

ChangePassword(string, string)

Changes the user's login password.

public void ChangePassword(string currentPassword, string newPassword)

Parameters

NameTypeDescription
currentPassword string

The current password

newPassword string

The new password

Exceptions

InvalidOperationException

Thrown if the login does not use password security (CanChangePassword is False).

See Also

CompareObjectCurrentVersionToSnapshot(OID, Guid, out MessageCollection)

Compares the current version of the object to the version of the object contained in the specified snapshot.

public ReadOnlyCollection<ObjectComparison> CompareObjectCurrentVersionToSnapshot(OID objectOID, Guid snapshotID, out MessageCollection messages)

Parameters

NameTypeDescription
objectOID OID

The OID of the object to generate the report for.

snapshotID Guid

The RecordID of the ObjectChangeLog record that represents the snapshot.

messages MessageCollection

Returns any error messages reported by the comparison.

Returns

ReadOnlyCollection<ObjectComparison>

A collection containing a single ArcanaDevelopment.adTempus.Shared.ObjectComparison object with the results of the comparison.

Remarks

This method compares based on the current state of the target object as saved in the database. Use CompareObjectToSnapshot(ADTIndependentObject, Guid, out MessageCollection) to compare an unsaved object to a snapshot version.

CompareObjectSnapshotToSnapshot(OID, Guid, Guid, out MessageCollection)

Compares two snapshots for an object.

public ReadOnlyCollection<ObjectComparison> CompareObjectSnapshotToSnapshot(OID objectToCompare, Guid sourceSnapshotID, Guid targetSnapshotID, out MessageCollection messages)

Parameters

NameTypeDescription
objectToCompare OID

The OID of the object to produce the report for.

sourceSnapshotID Guid

The RecordID of the ObjectChangeLog record that represents the "source" snapshot.

targetSnapshotID Guid

The RecordID of the ObjectChangeLog record that represents the "target" snapshot.

messages MessageCollection

Returns any error messages reported by the comparison.

Returns

ReadOnlyCollection<ObjectComparison>

A collection containing a single ArcanaDevelopment.adTempus.Shared.ObjectComparison object with the results of the comparison.

CompareObjectToObject(ADTIndependentObject, ADTIndependentObject, out MessageCollection)

Compares two versions of an object.

public ReadOnlyCollection<ObjectComparison> CompareObjectToObject(ADTIndependentObject sourceVersion, ADTIndependentObject targetVersion, out MessageCollection messages)

Parameters

NameTypeDescription
sourceVersion ADTIndependentObject

The source version of the object.

targetVersion ADTIndependentObject

The target version of the object.

messages MessageCollection

Returns any error messages reported by the comparison.

Returns

ReadOnlyCollection<ObjectComparison>

A collection containing a single ArcanaDevelopment.adTempus.Shared.ObjectComparison object with the results of the comparison.

Remarks

This method compares two in-memory versions of an object passed to the method. For example, it could be used to compare a version modified by the user (before being saved) to the version stored in the database. The sourceVersion and targetVersion objects must be fetched using different DataContexts, since there cannot be two versions of an object in the same DataContext.

CompareObjectToSnapshot(ADTIndependentObject, Guid, out MessageCollection)

Compares an unsaved object to the version of the object contained in the specified snapshot.

public ReadOnlyCollection<ObjectComparison> CompareObjectToSnapshot(ADTIndependentObject objectToCompare, Guid snapshotID, out MessageCollection messages)

Parameters

NameTypeDescription
objectToCompare ADTIndependentObject

The object to generate the report for.

snapshotID Guid

The RecordID of the ObjectChangeLog record that represents the snapshot.

messages MessageCollection

Returns any error messages reported by the comparison.

Returns

ReadOnlyCollection<ObjectComparison>

A collection containing a single ArcanaDevelopment.adTempus.Shared.ObjectComparison object with the results of the comparison.

Remarks

This method compares based on the in-memory version of the target object passed to the method. Use CompareObjectCurrentVersionToSnapshot(OID, Guid, out MessageCollection) to compare the current saved version of an object to a snapshot version.

Connect()

Connects to the adTempus server on the local machine using the identity of the caller.

public static Scheduler Connect()

Returns

Scheduler

Remarks

The user is authenticated using Windows authentication (the identity of the calling process). There must be a login defined for the user that is configured to use integrated Windows security.

Connect(string, LoginAuthenticationType, string, SecureString)

Connects to the adTempus server on the specified machine, using the specified identity.

public static Scheduler Connect(string connectionDescriptor, LoginAuthenticationType authenticationType, string userID, SecureString password)

Parameters

NameTypeDescription
connectionDescriptor string

The name or address of the adTempus server to connect to. Optionally include the instance name and port number, if necessary. Use BuildConnectionDescriptor(string, int?, string) to generate the connectionDescriptor in the correct syntax if the adTempus server is a named instance or is using a non-standard port. You can use BuildConnectionDescriptor(string, int?, string) to construct the descriptor in the correct format.

authenticationType LoginAuthenticationType

The type of authentication to use.

userID string

The user ID to use for authentication.

password SecureString

The password to use for authentication.

Returns

Scheduler

Remarks

If authenticationType is adTempus, the userID and password are required and the corresponding Security Login must be configured to use user ID/password security

If authenticationType is Windows, the Security Login must be configured to use Windows integrated security.

  • If the userID and password are specified, the connection will be made using the identity of the specified user.
  • If the userID and password are not specified, the connection will be made using the identity that the calling process is running under.

Connect(string, LoginAuthenticationType, string, SecureString, X509Certificate2)

Connects to the adTempus server on the specified machine, using the specified identity.

public static Scheduler Connect(string connectionDescriptor, LoginAuthenticationType authenticationType, string userID, SecureString password, X509Certificate2 expectedCertificate)

Parameters

NameTypeDescription
connectionDescriptor string

The name or address of the adTempus server to connect to. Optionally include the instance name and port number, if necessary. Use BuildConnectionDescriptor(string, int?, string) to generate the connectionDescriptor in the correct syntax if the adTempus server is a named instance or is using a non-standard port. You can use BuildConnectionDescriptor(string, int?, string) to construct the descriptor in the correct format.

authenticationType LoginAuthenticationType

The type of authentication to use.

userID string

The user ID to use for authentication.

password SecureString

The password to use for authentication.

expectedCertificate X509Certificate2

The expected server security certificate. If the certificate returned by the target server does not match, the connection fails

Returns

Scheduler

Remarks

If authenticationType is adTempus, the userID and password are required and the corresponding Security Login must be configured to use user ID/password security

If authenticationType is Windows, the Security Login must be configured to use Windows integrated security.

  • If the userID and password are specified, the connection will be made using the identity of the specified user.
  • If the userID and password are not specified, the connection will be made using the identity that the calling process is running under.

Connect(string, LoginAuthenticationType, string, string)

Connects to the adTempus server on the specified machine, using the specified identity.

public static Scheduler Connect(string connectionDescriptor, LoginAuthenticationType authenticationType, string userID, string password)

Parameters

NameTypeDescription
connectionDescriptor string

The name or address of the adTempus server to connect to. Optionally include the instance name and port number, if necessary. Use BuildConnectionDescriptor(string, int?, string) to generate the connectionDescriptor in the correct syntax if the adTempus server is a named instance or is using a non-standard port. You can use BuildConnectionDescriptor(string, int?, string) to construct the descriptor in the correct format.

authenticationType LoginAuthenticationType

The type of authentication to use.

userID string

The user ID to use for authentication.

password string

The password to use for authentication.

Returns

Scheduler

Remarks

If authenticationType is adTempus, the userID and password are required and the corresponding Security Login must be configured to use user ID/password security

If authenticationType is Windows, the Security Login must be configured to use Windows integrated security.

  • If the userID and password are specified, the connection will be made using the identity of the specified user.
  • If the userID and password are not specified, the connection will be made using the identity that the calling process is running under.

If there is no trust relationship between the client and server computers, the connection is secured using a server certificate. If the certificate returned by the server is invalid or untrusted, a CertificateValidationException is thrown. The exception contains the certificate returned by the server. After verifying that the certificate should be trusted, call Connect(string, LoginAuthenticationType, string, string, X509Certificate2) to indicate that the certificate should be trusted.

Exceptions

CertificateValidationException

Thrown if the server's security certificate is invalid or untrusted. See Remarks.

Connect(string, LoginAuthenticationType, string, string, X509Certificate2)

Connects to the adTempus server on the specified machine, using the specified identity.

public static Scheduler Connect(string connectionDescriptor, LoginAuthenticationType authenticationType, string userID, string password, X509Certificate2 expectedCertificate)

Parameters

NameTypeDescription
connectionDescriptor string

The name or address of the adTempus server to connect to. Optionally include the instance name and port number, if necessary. Use BuildConnectionDescriptor(string, int?, string) to generate the connectionDescriptor in the correct syntax if the adTempus server is a named instance or is using a non-standard port. You can use BuildConnectionDescriptor(string, int?, string) to construct the descriptor in the correct format.

authenticationType LoginAuthenticationType

The type of authentication to use.

userID string

The user ID to use for authentication.

password string

The password to use for authentication.

expectedCertificate X509Certificate2

The expected/trusted certificate for the server. See Remarks.

Returns

Scheduler

Remarks

If authenticationType is adTempus, the userID and password are required and the corresponding Security Login must be configured to use user ID/password security

If authenticationType is Windows, the Security Login must be configured to use Windows integrated security.

  • If the userID and password are specified, the connection will be made using the identity of the specified user.
  • If the userID and password are not specified, the connection will be made using the identity that the calling process is running under.

The expectedCertificate is needed when the security certificate used by the server is not trusted by the client computer (e.g., it is self-signed, or issued by an unrecognized issuing authority). In this case, calling Connect without an expectedCertificate results in a CertificateValidationException, and the exception contains the certificate returned by the server. If the client decides to accept the certificate, it can be persisted locally on the client and then passed in subsequent calls to Connect to indicate that it should be trusted.

CreateCustomObject(string)

Creates an instance of the custom object with the specified typeID.

public ICustomObjectSettings CreateCustomObject(string extensionID)

Parameters

NameTypeDescription
extensionID string

The ExtensionID of the desired custom object type.

Returns

ICustomObjectSettings

An instance of the requested custom object type.

Exceptions

ExtensionTypeNotFoundException

Thrown if the requested extension type is not registered on the client computer.

CreateDataSnapshot(List<OID>, string, string, out MessageCollection)

Creates a snapshot of the current state of all or selected objects.

public bool CreateDataSnapshot(List<OID> objectsToSnapshot, string label, string comments, out MessageCollection messages)

Parameters

NameTypeDescription
objectsToSnapshot List<OID>

List of the OIDs of the objects to snapshot. Specify null or an empty list to create a full-system snapshot.

label string

The label to apply to the snapshot.

comments string

Any additional comments to save with the snapshot.

messages MessageCollection

Returns messages if the operation failed.

Returns

bool

True if the snapshot succeeds, or False if it fails.

Remarks

The caller must be an adTempus Administrator to perform a full-system snapshot.

DeleteLinkedServer(Guid, bool, out MessageCollection)

Removes a linked server (server trust relationship).

public bool DeleteLinkedServer(Guid machineID, bool forceDelete, out MessageCollection messages)

Parameters

NameTypeDescription
machineID Guid

The ID of the machine to delete the relationship with (from InstanceID).

forceDelete bool

Forces deletion of the relationship. Currently this parameter has no effect.

messages MessageCollection

Error messages if deletion failed.

Returns

bool

Remarks

The caller must be an adTempus Administrator.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

FeatureAvailable(string)

Determines whether the specified feature is available on the server.

public bool FeatureAvailable(string featureKey)

Parameters

NameTypeDescription
featureKey string

Returns

bool
See Also

FileBrowse(string, FileBrowseOptions, int, string)

Returns file or directory listing information from the server.

public ReadOnlyCollection<DirectoryInfo> FileBrowse(string root, FileBrowseOptions options, int maximumDepth, string fileFilters)

Parameters

NameTypeDescription
root string

The directory from which to browse. For example, "c:" or "c:\some directory\subdirectory". Specify an empty string ("") to return a list of all available drives on the server.

options FileBrowseOptions

Options determining what information is returned.

maximumDepth int

The maximum number of directory levels to return.

fileFilters string

Specify a filter for selecting files to list. Multiple filters can be separated with commas. For example, ".exe,.bat,.cmd". Specify ".*" or an empty string to return all files/directories.

Returns

ReadOnlyCollection<DirectoryInfo>

~Scheduler()

protected ~Scheduler()

GetAuditAndSnapshotSettings(ClassID, ObjectChangeType)

Gets the audit and snapshot settings for a class and change type.

public AuditAndSnapshotSettings GetAuditAndSnapshotSettings(ClassID classID, ObjectChangeType changeType)

Parameters

NameTypeDescription
classID ClassID

The class of object to get settings for.

changeType ObjectChangeType

The change type to get settings for.

Returns

AuditAndSnapshotSettings

GetClientDiagnostics(DiagnosticReportFormat)

Gets diagnostic information (such as component versions) for the client.

public string GetClientDiagnostics(DiagnosticReportFormat format)

Parameters

NameTypeDescription
format DiagnosticReportFormat

The format to use for the report

Returns

string

GetClientUpdatePackage(Stream)

Gets the client auto-update package from the server and writes it to a stream.

public void GetClientUpdatePackage(Stream stream)

Parameters

NameTypeDescription
stream Stream

The stream to write to

Remarks

Throws an exception if the update package cannot be retrieved.

GetEventLogs()

Gets information about the Event Logs configured on the adTempus server.

public ReadOnlyCollection<EventLog> GetEventLogs()

Returns

ReadOnlyCollection<EventLog>

Remarks

This method returns information to be used in the user interface for EventLogMonitors.

GetFeatureInformation(string)

Gets information about the feature with the specified key.

public FeatureInformation GetFeatureInformation(string featureKey)

Parameters

NameTypeDescription
featureKey string

Returns

FeatureInformation

A FeatureInformation object with information about the feature, or null if the requested feature is not available.

See Also

GetImportExportFacility()

Returns an ImportExportFacility for performing exports and imports.

public ImportExportFacility GetImportExportFacility()

Returns

ImportExportFacility

Remarks

The ImportExportFacility uses an isolated DataContext so it is not affected by data changes in other contexts, and does not affect other contexts.

GetLinkedServer(Scheduler)

Gets the LinkedServer object representing the trust relationship with another adTempus server.

public LinkedServer GetLinkedServer(Scheduler otherServer)

Parameters

NameTypeDescription
otherServer Scheduler

A Scheduler connection to the other server.

Returns

LinkedServer

A LinkedServer object representing the trust relationship with the otherServer or null if no trust relationship exists.

GetLinkedServers(Guid?, string, TrustedServerType?)

Gets information on trust relationships that the server has with one or more other servers.

public ReadOnlyCollection<LinkedServer> GetLinkedServers(Guid? machineID, string computerName, TrustedServerType? serverType)

Parameters

NameTypeDescription
machineID Guid?

The InstanceID of the machine to get the trust relationship for, or true to not filter by machine ID.

computerName string

The name of the other server to get trust relationships for, or true to not filter by name.

serverType TrustedServerType?

The type of trust relationships to return, or true to not filter by type.

Returns

ReadOnlyCollection<LinkedServer>

A collection of LinkedServer objects that meet the selection criteria.

Remarks

Use GetLinkedServers(null,null,null) to get a list of all Linked Servers.

GetObjectTags(ClassID)

Gets a list of tags that have been used for objects of the specified class.

public ReadOnlyCollection<TagInformation> GetObjectTags(ClassID classID)

Parameters

NameTypeDescription
classID ClassID

Returns

ReadOnlyCollection<TagInformation>

Remarks

Currently only Jobs support tagging (see Tags).

GetPermissionReport(OID, OID, int)

Gets a user-friendly (text) report showing the effective permissions for an object/user combination

[RequiredVersion(4, 1, 14350, 1426)]
public string GetPermissionReport(OID objectOID, OID loginOID, int options)

Parameters

NameTypeDescription
objectOID OID

The object to get permissions for

loginOID OID

The OID of the SecurityEntity to get permission for

options int

Reserved. Set to 0.

Returns

string

GetSecurityCertificates(OID, int)

Gets a collection of the X.509 server certificates installed on the adTempus server.

public ReadOnlyCollection<SecurityCertificate> GetSecurityCertificates(OID credentialProfileOID, int options)

Parameters

NameTypeDescription
credentialProfileOID OID

The OID of the credential profile representing the Windows user account for which certificates should be fetched.

options int

Options for fetching the certificate. The options are a bitmask. The following values are defined:

<table><tbody><tr><td class="term">1</td><td class="description">The certificate data is returned in the <xref href="ArcanaDevelopment.adTempus.Shared.SecurityCertificate" data-throw-if-not-resolved="false"></xref>. If this
        option is omitted, only metadata about the certificate is returned.</td></tr></tbody></table>

Set to 0 if not options are required.

Returns

ReadOnlyCollection<SecurityCertificate>

The requested certificates.

Remarks

This method gets X.509 ("SSL certificates," "server certificates," etc.) from the certificate store on the adTempus server.

If a credentialProfileOID is specified, the certificates from that user's certificate store will be returned.

If no credentialProfileOID is specified, the certificates from the machine store will be returned.

GetServerDiagnostics(DiagnosticReportSegments, DiagnosticReportFormat)

Gets diagnostic information (such as component versions) from the server.

public string GetServerDiagnostics(DiagnosticReportSegments segments, DiagnosticReportFormat format)

Parameters

NameTypeDescription
segments DiagnosticReportSegments

Specifies which blocks of data to include in the report

format DiagnosticReportFormat

The format to use for the report

Returns

string

GetServerLoadInfo(bool, bool, OID[])

Gets information about the current load on the server and/or its Agents.

public ReadOnlyCollection<ServerLoadInfo> GetServerLoadInfo(bool includeController, bool includeAgents, OID[] agentOIDs)

Parameters

NameTypeDescription
includeController bool

Includes load information for the current server.

includeAgents bool

Includes load information for all or selected Remote Agents.

agentOIDs OID[]

List of the OIDs of the Agents to return load information for, or null for all Agents.

Returns

ReadOnlyCollection<ServerLoadInfo>

The most recent load information.

GetServerPropertyBool(string)

Returns the server property with the specified key.

public bool? GetServerPropertyBool(string key)

Parameters

NameTypeDescription
key string

The name of the property to return. See Remarks.

Returns

bool?

The value of the requested property, or null if the property does not exist.

Remarks

The following key values are defined:

databaseislocalIndicates whether the adTempus database is on the same computer as the adTempus server.
allowinteractivejobsIndicates whether interactive jobs are allowed on the server..
See Also

GetServerPropertyDateTime(string)

Returns the server property with the specified key.

public DateTime? GetServerPropertyDateTime(string key)

Parameters

NameTypeDescription
key string

The name of the property to return. See Remarks.

Returns

DateTime?

The value of the requested property, or null if the property does not exist.

Remarks

No DateTime properties are currently defined.

See Also

GetServerPropertyInt(string)

Returns the server property with the specified key.

public int? GetServerPropertyInt(string key)

Parameters

NameTypeDescription
key string

The name of the property to return. See Remarks.

Returns

int?

The value of the requested property, or null if the property does not exist.

Remarks

The following key values are defined:

databasetypeThe type of database that adTempus is using. This will be a value from DatabaseType.
See Also

GetServerPropertyString(string)

Returns the server property with the specified key.

public string GetServerPropertyString(string key)

Parameters

NameTypeDescription
key string

The name of the property to return. See Remarks.

Returns

string

The value of the requested property, or null if the property does not exist.

Remarks

No string properties are currently defined.

See Also

GetServices()

Gets a collection containing information about all services installed on the adTempus server.

public ReadOnlyCollection<ServiceInfo> GetServices()

Returns

ReadOnlyCollection<ServiceInfo>

Remarks

This method is used to get service information for use in the user interface for ServiceControlTasks.

GetSnapshotChanges(OID, Guid, out MessageCollection, out ObjectChangeLog)

Determines the changes made to an object as part of a change that produced a snapshot.

public ReadOnlyCollection<ObjectComparison> GetSnapshotChanges(OID objectToCompare, Guid snapshotID, out MessageCollection messages, out ObjectChangeLog targetChangeLog)

Parameters

NameTypeDescription
objectToCompare OID

The OID of the object to produce the report for.

snapshotID Guid

The RecordID of the ObjectChangeLog record that represents the snapshot.

messages MessageCollection

Returns any error messages reported by the comparison.

targetChangeLog ObjectChangeLog

On return, contains the ObjectChangeLog representing the newer state of the object, if a newer snapshot was found. See Remarks.

Returns

ReadOnlyCollection<ObjectComparison>

A collection containing a single ObjectComparison object with the results of the comparison.

Remarks

This method locates the snapshot identified by the snapshotID. It then looks for the next (more recent) snapshot that contains the objectToCompare and compares the object between the two snapshots. The more recent snapshot is returned in the targetChangeLog.

If no more recent snapshot is found for the object, the comparison is made to the current version of the object saved in the database, and the targetChangeLog is null on return.

HasServerTrust(Scheduler, TrustedServerType)

Determines whether the server has the specified kind of trust relationship with another server.

public bool HasServerTrust(Scheduler otherServer, TrustedServerType trustType)

Parameters

NameTypeDescription
otherServer Scheduler

A Scheduler connection to the other server.

trustType TrustedServerType

The type of trust to check for.

Returns

bool

True if the connected server has the specified trust relationship with the otherServer, or False otherwise.

NewDataContext()

Creates a new DataContext in which to perform data operations.

public DataContext NewDataContext()

Returns

DataContext

PingServer()

Pings the server to test the state of the connection and to keep the connection alive.

public void PingServer()
See Also

QueryChangeLog(ChangeLogQueryParameters)

Gets records from the Object Change Log for one or more objects.

public ObjectChangeLogCollection QueryChangeLog(ChangeLogQueryParameters parameters)

Parameters

NameTypeDescription
parameters ChangeLogQueryParameters

Parameters specifying which records to return.

Returns

ObjectChangeLogCollection

A collection containing the requested change log records.

ResolveSecurityName(string)

Attempts to resolve a Windows principal name and returns the corresponding SecurityIdentifier.

public SecurityIdentifier ResolveSecurityName(string name)

Parameters

NameTypeDescription
name string

Returns

SecurityIdentifier

The SecurityIdentifier for the name, or null if the name could not be resolved.

See Also

ResolveSecurityNames(string[])

Attempts to resolve one or more Windows principal names and returns the corresponding SecurityIdentifiers.

public ReadOnlyCollection<SecurityIdentifier> ResolveSecurityNames(string[] names)

Parameters

NameTypeDescription
names string[]

List of names to resolve.

Returns

ReadOnlyCollection<SecurityIdentifier>

A list of SecurityIdentifiers corresponding to the names. See Remarks.

Remarks

The returned collection of SecurityIdentifiers is ordered the same as the names collection, with a null value for any name that could not be resolved. For example, the SecurityIdentifier for names[0] can be found at index 0 in the returned collection.

See Also

ServerVersionIsAtLeast(int, int, int, int)

Determines whether the ServerVersion is greater than or equal to the specified version.

public bool ServerVersionIsAtLeast(int major, int minor = 0, int build = 0, int revision = 0)

Parameters

NameTypeDescription
major int
minor int
build int
revision int

Returns

bool

Remarks

This method is a shorthand for constructing a System.Version and comparing it to the ServerVersion. Use it to determine whether a feature is available on the connected server.

See Also

SignDelegationToken(string, Guid?, Guid?, string)

Signs a delegating token.

public string SignDelegationToken(string action, Guid? sourceInstanceID, Guid? targetObject, string additionalData)

Parameters

NameTypeDescription
action string

The action to sign for

sourceInstanceID Guid?

The instance ID of the source server

targetObject Guid?

The ObjectID of the target object

additionalData string

Additional data for the signature

Returns

string

TestDatabaseConnection(DatabaseConnectionSettings)

Tests a database connection defined for a DatabaseOperationTask

public MessageCollection TestDatabaseConnection(DatabaseConnectionSettings settings)

Parameters

NameTypeDescription
settings DatabaseConnectionSettings

The DatabaseConnectionSettings defining the connection to test.

Returns

MessageCollection

A collection of messages indicating the results of the test.

Remarks

This method tests whether adTempus can connect to the database using the settings given.

UpdateAgents(OID[], AgentUpdateOptions, out MessageCollection)

Instructs the server to send software updates to the specified Remote Agents.

public bool UpdateAgents(OID[] agentOIDs, AgentUpdateOptions options, out MessageCollection messages)

Parameters

NameTypeDescription
agentOIDs OID[]

List of the OIDs of the RemoteAgents to update.

options AgentUpdateOptions

Options for applying the software update.

messages MessageCollection

Returns messages about the outcome of the operation.

Returns

bool

ValidateLoginCredentials(string, string, out MessageCollection)

Validates Windows login credentials.

public bool ValidateLoginCredentials(string UserID, string Password, out MessageCollection messages)

Parameters

NameTypeDescription
UserID string

The Windows account user ID (including domain if appropriate).

Password string

The Windows account password.

messages MessageCollection

On return, contains error message(s) if validation failed.

Returns

bool

True if the credentials are valid; False otherwise.

Events

ConnectionFailed

Raised if the connection to the server fails.

public event EventHandler ConnectionFailed

Event Type

EventHandler