IAdgObject interface | QSYS API Reference Guide

Estimated reading time: 15 minutes

Defines the properties and methods for an ADG (ASNA DataGate) object.

Namespace: ASNA.DataGate.Client Assembly: ASNA.QSys.DataGate.Client.dll

Extends: IComparable, IConnectionHandler, IDisposable

Thread Safety

Implementations of IAdgObject are safe for multithreaded operations.

Remarks

An ADG object represents a resource in an ASNA DataGate environment, such as a file or a database object. This interface defines the common properties and methods that all ADG objects must implement, such as methods for managing authorities, locks, and XML serialization, and properties for getting object information.



Properties

Type Name Description
AdgObjectTypes AdgObjectType Gets the type of the ADG object.
AdgSubTypes AdgSubType Gets the subtype of the ADG object.
IEnumerable<AuthorityEntry> Authorities Gets the authorities of the ADG object.
String Basename Gets the base name of the ADG object.
IEnumerable<String> BaseObjects Setting this property to null assigns an empty enumerable value.
XmlDocument BasesXml Gets or sets the XML document representing the base objects of the ADG object.
IEnumerable<IAdgObject> ChildObjects Gets the child objects of the ADG object.
AdgConnection Connection Gets the connection associated with the ADG object.
DateTime DateCreated Gets the date and time when the ADG object was created.
DateTime DateModified Gets the date and time when the ADG object was last modified.
DateTime DateReferenced Gets the date and time when the ADG object was last referenced.
IEnumerable<Dependent> DependentObjects Gets the dependent objects of the ADG object.
Boolean IsSystemObject Gets a value indicating whether the ADG object is a system object.
String NameOnServer Gets the name of the ADG object on the server.
Int32 ObjectID Gets the ID of the ADG object.
String Owner Gets the owner of the ADG object.
Boolean OwnerIsGroup Gets a value indicating whether the owner of the ADG object is a group.
Int32 ParentID Gets the ID of the parent of the ADG object.
String PrimaryGroup Gets the primary group of the ADG object.
XmlSchemaSet Schema Gets the XML schema for the ADG object.
IComparer SortByName Gets the comparer for sorting ADG objects by name.
IComparer SortByNameCaseInsensitive Gets the comparer for sorting ADG objects by name, ignoring case.
String Text Setting this property to null assigns an empty string value.

Methods

Signature Description
Create() Creates the ADG object.
Duplicate(String, String, String, DuplicateOptions) Duplicates the ADG object.
GrantAuthority(String, AuthorityTypes) Grants authority to a user or group for the ADG object.
HasLock(ShareTypes) Determines whether the ADG object has a lock of the specified type.
Lock(ShareTypes, WaitOptions, Int16) Locks the ADG object with the specified share type and wait option.
MoveTo(String) Moves the ADG object to a new path.
ReadBases(XmlReader) Reads the base objects of the ADG object from an XML reader.
Remove() Removes the ADG object.
Rename(String) Renames the ADG object.
ResolvePathName() Resolves the path name of the ADG object.
RevokeAuthority(String, AuthorityTypes) Revokes a specific authority from a user for the ADG object.
ToString() Returns a string that represents the ADG object.
Unlock(ShareTypes) Unlocks the ADG object with the specified share type.
WriteBases(XmlWriter) Writes the base objects of the ADG object to an XML writer.
WriteXml(XmlWriter, XmlOptions) Writes the ADG object to an XML writer using the specified options.
WriteXml(XmlWriter, XmlOptions, XmlCancelEventHandler) Writes the ADG object to an XML writer using the specified options and event handler.
WriteXml(XmlWriter, XmlOptions, XmlCancelEventHandler, OpenFileAdapterDelegate) Writes the ADG object to an XML writer using the specified options, event handler, and file opener delegate.

void Create()

Creates the ADG object.

Remarks

This method is used to create the ADG object. It should be called after the properties of the object have been set, but before the object is used. This method may perform various initialization tasks, such as establishing a connection to the server or allocating resources.

void Create()

void Duplicate(string ScopePath, string TargetPath, string NewName, DuplicateOptions options)

Duplicates the ADG object.

Remarks

This method is used to create a duplicate of the ADG object. The ScopePath parameter specifies the path of the object to duplicate. The TargetPath parameter specifies the path where the duplicate object will be placed. The NewName parameter specifies the name for the duplicate object. The options parameter specifies the options for the duplication operation, such as whether to overwrite existing objects.

void Duplicate(string ScopePath, string TargetPath, string NewName, DuplicateOptions options)

Parameters

Type Parameter name Description
String ScopePath The scope path of the object to duplicate.
String TargetPath The target path where the duplicate object will be placed.
String NewName The new name for the duplicate object.
DuplicateOptions options The options for the duplication operation.

void GrantAuthority(string user, AuthorityTypes authority)

Grants authority to a user or group for the ADG object.

Remarks

This method is used to grant a specific authority to a user or group for the ADG object. The user parameter specifies the user or group to grant the authority to. The authority parameter specifies the authority to grant, which can be read, write, execute, or other types of authority.

void GrantAuthority(string user, AuthorityTypes authority)

Parameters

Type Parameter name Description
String user The user or group to grant authority to.
AuthorityTypes authority The authority type to grant.

bool HasLock(ShareTypes ShareType)

Determines whether the ADG object has a lock of the specified type.

Remarks

This method is used to check if the ADG object has a lock of the specified type. The ShareType parameter specifies the type of lock to check for, which can be read, write, or other types of locks. This can be useful for managing concurrent access to the object.

bool HasLock(ShareTypes ShareType)

Parameters

Type Parameter name Description
ShareTypes ShareType The type of lock to check for.

Returns

Type Description
Boolean True if the object has a lock of the specified type, false otherwise.

void Lock(ShareTypes ShareType, WaitOptions WaitOption, short WaitTime)

Locks the ADG object with the specified share type and wait option.

Remarks

This method is used to apply a lock of the specified type to the ADG object. The ShareType parameter specifies the type of lock to apply, which can be read, write, or other types of locks. The WaitOption parameter specifies what to do if the lock cannot be immediately acquired, such as waiting for the lock to become available or throwing an exception.

void Lock(ShareTypes ShareType, WaitOptions WaitOption, short WaitTime)

Parameters

Type Parameter name Description
ShareTypes ShareType The type of lock to apply.
WaitOptions WaitOption The wait option to use if the lock cannot be immediately acquired.
Int16 WaitTime The wait time to use if the lock cannot be immediately acquired.

void MoveTo(string NewPathName)

Moves the ADG object to a new path.

Remarks

This method is used to move the ADG object to a new path. The NewPathName parameter specifies the new path for the object. This can be useful for organizing objects or for changing the location of an object without changing its contents.

void MoveTo(string NewPathName)

Parameters

Type Parameter name Description
String NewPathName The new path for the object.

void ReadBases(XmlReader reader)

Reads the base objects of the ADG object from an XML reader.

Remarks

This method is used to read the base objects of the ADG object from an XML reader. The reader parameter specifies the XML reader to read from. This can be useful for deserializing the object’s state from XML.

void ReadBases(XmlReader reader)

Parameters

Type Parameter name Description
XmlReader reader The XML reader to read from.

void Remove()

Removes the ADG object.

Remarks

This method is used to remove the ADG object. This can be useful for cleaning up resources or for deleting an object that is no longer needed.

void Remove()

void Rename(string NewName)

Renames the ADG object.

Remarks

This method is used to rename the ADG object. The NewName parameter specifies the new name for the object. This can be useful for changing the name of an object without changing its contents or location.

void Rename(string NewName)

Parameters

Type Parameter name Description
String NewName The new name for the object.

string ResolvePathName()

Resolves the path name of the ADG object.

Remarks

This method is used to resolve the path name of the ADG object. The path name is resolved according to the rules of the database where the object is stored. This can be useful for obtaining the absolute path of the object, especially if the object was specified with a relative path.

string ResolvePathName()

void RevokeAuthority(string userName, AuthorityTypes authorityType)

Revokes a specific authority from a user for the ADG object.

Remarks

This method is used to revoke a specific authority from a user for the ADG object. The userName parameter specifies the user to revoke the authority from. The authorityType parameter specifies the type of authority to revoke, which can be read, write, execute, or other types of authority.

void RevokeAuthority(string userName, AuthorityTypes authorityType)

Parameters

Type Parameter name Description
String userName The user to revoke the authority from.
AuthorityTypes authorityType The type of authority to revoke.

string ToString()

Returns a string that represents the ADG object.

Remarks

This method is used to obtain a string that represents the ADG object. The string typically includes information about the object, such as its name or type. This can be useful for debugging or for displaying information about the object to a user.

string ToString()

void Unlock(ShareTypes ShareType)

Unlocks the ADG object with the specified share type.

Remarks

This method is used to remove a lock of the specified type from the ADG object. The ShareType parameter specifies the type of lock to remove, which can be read, write, or other types of locks. This can be useful for managing concurrent access to the object.

void Unlock(ShareTypes ShareType)

Parameters

Type Parameter name Description
ShareTypes ShareType The type of lock to remove.

void WriteBases(XmlWriter writer)

Writes the base objects of the ADG object to an XML writer.

Remarks

This method is used to write the base objects of the ADG object to an XML writer. The writer parameter specifies the XML writer to write to. This can be useful for serializing the object’s state to XML.

void WriteBases(XmlWriter writer)

Parameters

Type Parameter name Description
XmlWriter writer The XML writer to write to.

void WriteXml(XmlWriter writer, XmlOptions options)

Writes the ADG object to an XML writer using the specified options.

Remarks

This method is used to write the ADG object to an XML writer using the specified options. The writer parameter specifies the XML writer to write to. The options parameter specifies the options to use when writing the XML, such as whether to include schema information or whether to indent the XML.This can be useful for serializing the object’s state to XML.

void WriteXml(XmlWriter writer, XmlOptions options)

Parameters

Type Parameter name Description
XmlWriter writer The XML writer to write to.
XmlOptions options The options to use when writing the XML.

void WriteXml(XmlWriter writer, XmlOptions options, XmlCancelEventHandler hndlr)

Writes the ADG object to an XML writer using the specified options and event handler.

Remarks

This method is used to write the ADG object to an XML writer using the specified options and event handler. The writer parameter specifies the XML writer to write to. The options parameter specifies the options to use when writing the XML, such as whether to include schema information or whether to indent the XML.The hndlr parameter specifies the event handler for handling cancel events during the write operation. This can be useful for interrupting the write operation based on custom logic.

void WriteXml(XmlWriter writer, XmlOptions options, XmlCancelEventHandler hndlr)

Parameters

Type Parameter name Description
XmlWriter writer The XML writer to write to.
XmlOptions options The options to use when writing the XML.
XmlCancelEventHandler hndlr The event handler for handling cancel events during the write operation.

void WriteXml(XmlWriter writer, XmlOptions options, XmlCancelEventHandler hndlr, OpenFileAdapterDelegate fileOpener)

Writes the ADG object to an XML writer using the specified options, event handler, and file opener delegate.

Remarks

This method is used to write the ADG object to an XML writer using the specified options, event handler, and file opener delegate. The writer parameter specifies the XML writer to write to. The options parameter specifies the options to use when writing the XML, such as whether to include schema information or whether to indent the XML.The hndlr parameter specifies the event handler for handling cancel events during the write operation. This can be useful for interrupting the write operation based on custom logic.The fileOpener parameter specifies the delegate for opening a file during the write operation. This can be useful for writing the XML to a specific file or stream.

void WriteXml(XmlWriter writer, XmlOptions options, XmlCancelEventHandler hndlr, OpenFileAdapterDelegate fileOpener)

Parameters

Type Parameter name Description
XmlWriter writer The XML writer to write to.
XmlOptions options The options to use when writing the XML.
XmlCancelEventHandler hndlr The event handler for handling cancel events during the write operation.
OpenFileAdapterDelegate fileOpener The delegate for opening a file during the write operation.