Class ADTIndependentObject
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
Base class for top-level ADTObject objects.
public abstract class ADTIndependentObject : ADTObject
- Inheritance
-
objectADTIndependentObject
- Derived
Remarks
A top-level or "independent" object is one that does not belong to a parent object. For example, Jobs, Job Groups, and Messaging Service Providers are all top-level objects.
By contrast a dependent object is one that always belongs to a parent: Job Steps, Responses, etc.
Independent objects can be saved/deleted and have security settings. Dependent objects are only saved as part of their parent object.
Methods
Delete()
Deletes the object from the database.
public virtual void Delete()
DeleteWithAuditOrSnapshot(ChangeLogParameters)
Deletes the object from the database and records an entry in the object change log.
public virtual void DeleteWithAuditOrSnapshot(ChangeLogParameters auditRecord)
Parameters
| Name | Type | Description |
|---|---|---|
auditRecord |
ChangeLogParameters | Information to record in the change log. |
GetObjectReferences(string[], bool, int)
Gets all objects that referenced this object.
public FindReferenceResults GetObjectReferences(string[] referencesToFetch, bool fetchObjects, int options)
Parameters
| Name | Type | Description |
|---|---|---|
referencesToFetch |
string[] | List of references to fetch. Null to fetch all references. |
fetchObjects |
bool | If True, the referencing objects are returned in the results. If False, only the OIDs of the referencing objects are returned. |
options |
int | Reserved for future use. Set to 0. |
Returns
- See Also
GetObjectReferences(string[], bool, int, OID[])
Gets all objects that referenced this object.
public FindReferenceResults GetObjectReferences(string[] referencesToFetch, bool fetchObjects, int options, OID[] referencesToIgnore)
Parameters
| Name | Type | Description |
|---|---|---|
referencesToFetch |
string[] | List of references to fetch. Null to fetch all references. |
fetchObjects |
bool | If True, the referencing objects are returned in the results. If False, only the OIDs of the referencing objects are returned. |
options |
int | Reserved for future use. Set to 0. |
referencesToIgnore |
OID[] | List of OIDs to ignore. If the target object is referenced by an object contained in this list, that reference will not be included in the results. Use this to specify other objects that will be deleted at the same time as the target (the server will automatically remove references among objects being deleted in the same unit of work. |
Returns
- See Also
GetSecurityDescriptor()
Gets the SecurityDescriptor containing the security information for the object.
public SecurityDescriptor GetSecurityDescriptor()
Returns
Refresh()
Refreshes the object from the server.
public void Refresh()
ReplaceObjectReferences(string[], bool, int, IEnumerable<OID>, ADTObject, bool, ChangeLogParameters)
Replaces references to this object.
public FindReferenceResults ReplaceObjectReferences(string[] referencesToFetch, bool fetchObjects, int options, IEnumerable<OID> replaceInObjects, ADTObject replacementObject, bool saveChanges, ChangeLogParameters changeLogParms)
Parameters
| Name | Type | Description |
|---|---|---|
referencesToFetch |
string[] | List of references to fetch. Null to fetch all references. |
fetchObjects |
bool | If True, the referencing objects are returned in the results. If False, only the OIDs of the referencing objects are returned. |
options |
int | Reserved for future use. Set to 0. |
replaceInObjects |
IEnumerable<OID> | The OIDs of the objects to make the replacement in. See Remarks. |
replacementObject |
ADTObject | The object to replace the reference with, or null to remove the reference. |
saveChanges |
bool | If true, adTempus attempts to save all modified objects. If false, the objects are returned but are not saved. |
changeLogParms |
ChangeLogParameters |
Returns
- FindReferenceResults
True if the operation was completed successfully, False if errors occurred.
Remarks
To replace all references to the object in all referencing objects, call with referencesToFetch
and replaceInObjects both set to null. If you only want to make the replacement in
selected objects, call GetObjectReferences(string[], bool, int, OID[]) first to get a list of all referencing objects. You
can then filter the results and pass the filtered results in replaceInObjects.
If the replacementObject is null, the reference will be removed, which
may require deleting objects. For example, if you remove a reference to a script in a ScriptCondition, the
ScriptCondition is no longer valid and will be removed from the job or step that it belongs to.
Revert()
Reverts the object (and any contained objects) to their last-saved state, discarding any in-memory changes.
public virtual void Revert()
Save()
Saves the object and throws an exception if the operation fails.
public virtual void Save()
Remarks
This method performs validation of the object (and any dependent or referenced objects) and saves it. If validation fails or other problems occur, it throws a MessageException containing error information. Generally the validation errors will be found in AdditionalMessages.
Use Save(out MessageCollection) instead to return a collection of messages directly rather than throwing an exception.
Exceptions
- MessageException
Thrown if the save operation fails
- See Also
Save(out MessageCollection)
Saves an object and returns a collection of error messages if the operation fails.
public virtual bool Save(out MessageCollection messages)
Parameters
| Name | Type | Description |
|---|---|---|
messages |
MessageCollection | On return, contains result messages from the operation. |
Returns
- bool
True if the object was saved, or False if an error occurred.
SaveWithAuditOrSnapshot(ChangeLogParameters)
Saves the object and records an entry in the object change log. Throws an exception if the operation fails
public virtual void SaveWithAuditOrSnapshot(ChangeLogParameters auditRecord)
Parameters
| Name | Type | Description |
|---|---|---|
auditRecord |
ChangeLogParameters | Information to record in the change log. |
SaveWithAuditOrSnapshot(ChangeLogParameters, out MessageCollection)
Saves the object and records an entry in the object change log. Returns a collection of error messages if the operation fails.
public virtual bool SaveWithAuditOrSnapshot(ChangeLogParameters auditRecord, out MessageCollection messages)
Parameters
| Name | Type | Description |
|---|---|---|
auditRecord |
ChangeLogParameters | Information to record in the change log. |
messages |
MessageCollection | On return, contains result messages from the operation. |
Returns
Inherited Members
- ADTObject.ClassKeyName
- ADTObject.WriteToConfigurationReport(IADTObjectConfigurationReportWriter)
- ADTObject.EffectivePermissions
- ADTObject.OnNewEntity()
- ADTObject.OnEntityReloaded()
- ADTObject.LastModified
- ADTObject.CreationTimestamp
- ADTObject.FromController
- ADTObject.CustomProperties
- ADTObject.Description
- ADTObject.DescriptionTextType
- ADTObject.OID
- ADTObject.ClassID
- ADTObject.BindingDescription
- ADTObject.ToString()
- ADTObject.ParentObject
- ADTObject.CanPerform(SecurityPermission)
- ADTObject.Duplicate()
- ADTObject.CheckForStub(string, string)
- ADTObject.DataContext
- ADTObject.AccessMask
- ADTObject.InitializeFromEntity()
- ADTObject.Validate(MessageCollection)
- ADTObject.SupportedSecurityActions
- ADTObject.SupportedSecurityInheritanceOptions
- ADTObject.AddStandardSecurityActions(Dictionary<int, string>, string)
- ADTObject.AddSupportedSecurityAction(Dictionary<int, string>, SecurityPermission, string)
- ADTObject.GetTopLevelOwner()
- ADTObject.GetConfigurationReport()
- ADTObject.GetConfigurationReport(bool)
- ADTObject.IsReadOnly
- ADTObject.SerializeCustomProperties()
- ObjectBase.IsDirty
- ObjectBase.IsNew
- ObjectBase.IsStub
- ObjectBase.IsDependent
- ObjectBase.ClassName
- ObjectBase.GetObjectDescription()
- ObjectBase.GetDescriptionWithClassName()
- ObjectBase.GetDescription()
- ObjectBase.HideFieldValueInTextOutput(string)
- ObjectBase.FindOwningObject()
- ObjectBase.BeginEdit()
- ObjectBase.BeginEdit(UndoLevelAction)
- ObjectBase.CommitEdit(Guid)
- ObjectBase.CommitEdit()
- ObjectBase.UndoEdit()
- ObjectBase.UndoEdit(Guid)