Class ADTObject
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
Base class for all adTempus data objects.
public abstract class ADTObject : ObjectBase
- Inheritance
-
objectADTObject
- Derived
Remarks
Data objects cannot be created directly. Use CreateObject(ClassID) to create objects.
Fields
EffectivePermissions
protected ReadOnlyCollection<int> EffectivePermissions
Field Value
- ReadOnlyCollection<int>
Properties
AccessMask
List of permissions that the caller has for this object
public ReadOnlyCollection<int> AccessMask { get; }
Property Value
- ReadOnlyCollection<int>
- See Also
BindingDescription
Description property used for binding.
public virtual string BindingDescription { get; }
Property Value
- string
Remarks
Returns GetDescription but is exposed as a property for scenarios when a property is needed instead of a method.
ClassID
The Class ID for the object
public abstract 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.
CreationTimestamp
The date/time the object was first saved (in UTC).
[ComVisible(false)]
public DateTime CreationTimestamp { get; }
Property Value
- DateTime
CustomProperties
Custom properties set for this object.
[RequiredVersion(5, 0, 0, 0)]
public virtual ICustomProperties CustomProperties { get; }
Property Value
DataContext
The DataContext to which this object belongs.
public DataContext DataContext { get; }
Property Value
Remarks
An object cannot be used within a DataContext other than the one it belongs to
Description
Optional description or notes for the object.
public string Description { get; set; }
Property Value
- string
Remarks
The text must use valid formatting for the specified DescriptionTextType.
Note that the description is not shown in the user interface for all objects.
- See Also
DescriptionTextType
Specifies the format for the text in the Description
public TextType DescriptionTextType { get; set; }
Property Value
Remarks
- See Also
FromController
Indicates whether the object came from a Controller.
public bool FromController { get; }
Property Value
- bool
IsReadOnly
Indicates whether this object is read-only.
public override sealed bool IsReadOnly { get; }
Property Value
- bool
Remarks
IsReadOnly is True if the DataContext to which the object belongs is read-only. Attempting to modify or delete an object marked read-only will produce a ReadOnlyException.
LastModified
The date/time the object was last saved (in UTC).
[ComVisible(false)]
public DateTime LastModified { get; }
Property Value
- DateTime
OID
The Object Identifier that uniquely identifies the object.
[ComVisible(false)]
public OID OID { get; }
Property Value
Remarks
Each ADTObject instance has an OID that is used by adTempus to identify the object. This is also used as the primary key in the database tables. Because the OID is the identity for the object, changing other properties of the object (such as a name) does not affect references to the object.
ParentObject
The object that owns or contains this object, if IsDependent is true.
public override ADTObject ParentObject { get; }
Property Value
SupportedSecurityActions
List of security actions supported by this object.
public virtual Dictionary<int, string> SupportedSecurityActions { get; }
Property Value
- Dictionary<int, string>
A dictionary of the supported actions. The key is one of the SecurityPermission values and the value is the name of the permission (from GetSecurityPermissionName(SecurityPermission, string); a given SecurityPermission may use different names in different contexts).
SupportedSecurityInheritanceOptions
List of SecurityInheritanceOptions supported by the object
public virtual Dictionary<SecurityInheritanceOptions, string> SupportedSecurityInheritanceOptions { get; }
Property Value
- Dictionary<SecurityInheritanceOptions, string>
Methods
AddStandardSecurityActions(Dictionary<int, string>, string)
Adds all the standard security actions to a dictionary.
protected static void AddStandardSecurityActions(Dictionary<int, string> collection, string className)
Parameters
| Name | Type | Description |
|---|---|---|
collection |
Dictionary<int, string> | |
className |
string |
AddSupportedSecurityAction(Dictionary<int, string>, SecurityPermission, string)
protected static void AddSupportedSecurityAction(Dictionary<int, string> collection, SecurityPermission action, string className)
Parameters
| Name | Type | Description |
|---|---|---|
collection |
Dictionary<int, string> | |
action |
SecurityPermission | |
className |
string |
CanPerform(SecurityPermission)
Determines whether the user has the necessary permission to perform a specified action on the object
public virtual bool CanPerform(SecurityPermission action)
Parameters
| Name | Type | Description |
|---|---|---|
action |
SecurityPermission | The operation to check permission for. |
Returns
- bool
true if the caller has the requested permission or if the object is not secured
Remarks
This method uses cached permission information returned by the server on the last refresh of the object. It is therefore possible for CanPerform to report outdated information if permissions have changed since then.
The permission check considers both inherited and explicit permissions.
For a "child" object (such as a JobStep this method checks the permission on the owning object.
- See Also
CheckForStub(string, string)
Checks to see if the facade is a stub, and attempts to fetch the full object if so.
protected override void CheckForStub(string className, string location)
Parameters
| Name | Type | Description |
|---|---|---|
className |
string | |
location |
string |
Remarks
CheckForStub checks to see if IsStub is true. If not (IsStub==false), it returns immediately. If IsStub==true, CheckForStub checks to see if the client has View permission. If not, it throws a permission exception. If the client has permission, it calls DataManager.FetchDTO to fetch a full copy of the object from the server.
Duplicate()
Creates a new object that is a copy of the source object.
public ADTObject Duplicate()
Returns
- ADTObject
Returns an ADTObject that is a duplicate of the source object.
Remarks
Use the Duplicate method when you want to create a new object based on an existing object. For example, if you want to create a new job that is similar to an existing one, you would use the Duplicate method.
The new object generally is a complete copy of the source object (including all properties and collections), with a new OID. For some classes the copy is not exact. For example, when you duplicate a job, the new copy does not get the old job's history, log messages, or status.
GetConfigurationReport()
Generates a configuration report for the object
public string GetConfigurationReport()
Returns
- string
Remarks
The configuration report is an HTML table listing the values for all properties of the object and its children. This is the same report that is generated in the Console through the "Configuration Report" context menu command.
Use ConfigurationReportGenerator to generate a report for multiple objects.
- See Also
GetConfigurationReport(bool)
Generates a configuration report for the object
public string GetConfigurationReport(bool fullDocument)
Parameters
| Name | Type | Description |
|---|---|---|
fullDocument |
bool | If true, returns a full HTML document containing the report for this object. If false, returns only an HTML fragment. |
Returns
- string
Remarks
The configuration report is an HTML table listing the values for all properties of the object and its children. This is the same report that is generated in the Console through the "Configuration Report" context menu command.
Use ConfigurationReportGenerator to generate a report for multiple objects.
- See Also
GetTopLevelOwner()
Gets the Independent object to which this object ultimately belongs.
public ADTObject GetTopLevelOwner()
Returns
- ADTObject
The Independent object at the top of the ownership chain for this object, or Null if the object is independent or if the owner cannot be found.
InitializeFromEntity()
protected virtual void InitializeFromEntity()
OnEntityReloaded()
Called when the entity is reloaded from the server
protected override void OnEntityReloaded()
OnNewEntity()
Called when the entity is created
protected override void OnNewEntity()
SerializeCustomProperties()
protected void SerializeCustomProperties()
ToString()
Returns a description of the object.
public override string ToString()
Returns
- string
Remarks
Returns GetDescription.
Validate(MessageCollection)
Performs server-side validation of the object
public virtual MessageType Validate(MessageCollection errors)
Parameters
| Name | Type | Description |
|---|---|---|
errors |
MessageCollection | Collection of messages to add validation errors to. Can be null if you don't need the messages, though why validate if you don't? |
Returns
- MessageType
A MessageType value indicating the highest severity error encountered during validation. If no problems were found, the result is Informational and no messages are added to
errors.
Remarks
Validate sends the object to the server for validation and returns the results. It is not necessary to explicitly call Validate before saving an object: the Save methods all perform validation as part of the save operation and the save fails if errors are found. Validate can be used to validate objects that are not directly saveable (such as a JobStep) when the user closes the editor for that object.
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
- 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)