Class ScriptLibrary
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
A library of reusable script code
public sealed class ScriptLibrary : ADTIndependentObject
- Inheritance
-
objectScriptLibrary
Properties
ClassID
The Class ID for the object
[IgnoreDataMember]
public override ClassID ClassID { get; }
Property Value
ClassKeyName
The key name for the class.
public override string ClassKeyName { get; }
Property Value
- string
Remarks
This name the name used by adTempus to identify the class and is intended for programmatic use only. Use the ClassName for a user-friendly name.
IncludeLibraries
The Script Libraries referenced by this library
public ScriptLibraryCollection IncludeLibraries { get; }
Property Value
IsDefaultFunctionLibrary
Indicates whether this is the default function library
public bool IsDefaultFunctionLibrary { get; }
Property Value
- bool
Remarks
The default function library has DefaultFunctionLibrary as its OID.
Methods in the default function library are available to be called as "inline functions" using the job variable token syntax.
IsDependent
Indicates whether the object is a dependent of (owned by) another object
[IgnoreDataMember]
public override bool IsDependent { get; }
Property Value
- bool
Remarks
An independent object (IsDependent is false) is an object that can exist on its own without being part of another object. For example, Jobs, Job Groups, etc.
A dependent object (IsDependent is true) is a part of another object. For example, a JobStep cannot exist independently of a Job, so the JobStep is dependent.
Dependent objects cannot be directly fetched from the server: they are only fetched as part of the object they belong to. They also cannot be saved or deleted independently: they are automatically saved or deleted when the owning object is saved or deleted.
Name
The name of the library
public string Name { get; set; }
Property Value
- string
Remarks
The Name is required and must be unique across all script libraries that use the same language. The Name must match the name of the class/module defined in the ScriptBody and therefore must be a valid name for the language.
References
List of assemblies referenced by the script.
public string References { get; set; }
Property Value
- string
Remarks
For .NET scripts that need to reference additional assemblies, specify those assemblies here. The list should be comma-, semicolon-, or newline-delimited.
ScriptBody
The code for the library
public string ScriptBody { get; set; }
Property Value
- string
Remarks
Each ScriptLibrary contains code that will available to Scripts that reference the library.
The code must be written in the language specified by the ScriptLanguage.
ScriptLanguage
The language used for this script
public string ScriptLanguage { get; set; }
Property Value
- string
Remarks
Must be set to one of the string constants defined in ScriptLanguages.
Methods
DependsOnLibrary(OID)
Indicates whether the ScriptLibrary, or any of the libraries it references, has a reference to a given ScriptLibrary.
public bool DependsOnLibrary(OID libraryOID)
Parameters
| Name | Type | Description |
|---|---|---|
libraryOID |
OID | The OID of the library to check for. |
Returns
- bool
True if this library or any of its IncludeLibraries (or their dependencies) reference the given library, False otherwise.
Remarks
This method is used to detect circular library references
GetObjectDescription()
Gets a description of the object's key settings.
protected override string GetObjectDescription()
Returns
- string
Remarks
This method is called by GetDescription() to get a user-friendly description of the object (such as its key settings) for display to the user. The description should contain enough information to distinguish this object from others of the same class.
ValidateScript(CredentialProfile)
Validates the script by compiling it and checking for errors.
public MessageCollection ValidateScript(CredentialProfile credentials)
Parameters
| Name | Type | Description |
|---|---|---|
credentials |
CredentialProfile | Optional CredentialProfile representing the identity to validate the script under. If no profile is provided, the client identity is used. The caller must have Use permission for the profile. |
Returns
- MessageCollection
A collection of messages containing any validation warning or errors. If validation was successful, an informational message will be included.
WriteToConfigurationReport(IADTObjectConfigurationReportWriter)
Writes the object and any contained objects to a configuration report
public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)
Parameters
| Name | Type | Description |
|---|---|---|
reportBuilder |
IADTObjectConfigurationReportWriter | The report builder to write the object to. |
Inherited Members
- ADTIndependentObject.Refresh()
- ADTIndependentObject.Revert()
- ADTIndependentObject.Save()
- ADTIndependentObject.Save(out MessageCollection)
- ADTIndependentObject.SaveWithAuditOrSnapshot(ChangeLogParameters)
- ADTIndependentObject.SaveWithAuditOrSnapshot(ChangeLogParameters, out MessageCollection)
- ADTIndependentObject.Delete()
- ADTIndependentObject.DeleteWithAuditOrSnapshot(ChangeLogParameters)
- ADTIndependentObject.GetSecurityDescriptor()
- ADTIndependentObject.ReplaceObjectReferences(string[], bool, int, IEnumerable<OID>, ADTObject, bool, ChangeLogParameters)
- ADTIndependentObject.GetObjectReferences(string[], bool, int)
- ADTIndependentObject.GetObjectReferences(string[], bool, int, OID[])
- ADTObject.LastModified
- ADTObject.CreationTimestamp
- ADTObject.FromController
- ADTObject.CustomProperties
- ADTObject.Description
- ADTObject.DescriptionTextType
- ADTObject.OID
- ADTObject.BindingDescription
- ADTObject.ToString()
- ADTObject.ParentObject
- ADTObject.CanPerform(SecurityPermission)
- ADTObject.Duplicate()
- ADTObject.DataContext
- ADTObject.AccessMask
- ADTObject.Validate(MessageCollection)
- ADTObject.SupportedSecurityActions
- ADTObject.SupportedSecurityInheritanceOptions
- ADTObject.GetTopLevelOwner()
- ADTObject.GetConfigurationReport()
- ADTObject.GetConfigurationReport(bool)
- ADTObject.IsReadOnly
- ObjectBase.IsDirty
- ObjectBase.IsNew
- ObjectBase.IsStub
- ObjectBase.ClassName
- ObjectBase.GetDescriptionWithClassName()
- ObjectBase.GetDescription()
- ObjectBase.BeginEdit()
- ObjectBase.BeginEdit(UndoLevelAction)
- ObjectBase.CommitEdit(Guid)
- ObjectBase.CommitEdit()
- ObjectBase.UndoEdit()
- ObjectBase.UndoEdit(Guid)