Show / Hide Table of Contents

Class WMDataSourceBaseDTO

Data Transfer Object proxy for a WMDataSourceBase.

Inheritance
object
DataTransferObject<WMDataSourceBase>
WMAssetBaseDTO<WMDataSourceBase>
WMDataSourceBaseDTO
Implements
IWMAssetBaseDTO
IDbEntity
IWMEntity
IHasEncryptedValues
Inherited Members
WMAssetBaseDTO<WMDataSourceBase>.ID
WMAssetBaseDTO<WMDataSourceBase>.Name
WMAssetBaseDTO<WMDataSourceBase>.OwnerID
WMAssetBaseDTO<WMDataSourceBase>.OwnerType
WMAssetBaseDTO<WMDataSourceBase>.ParentID
WMAssetBaseDTO<WMDataSourceBase>.FullPathName
WMAssetBaseDTO<WMDataSourceBase>.CreatedBy
WMAssetBaseDTO<WMDataSourceBase>.CreatedDate
WMAssetBaseDTO<WMDataSourceBase>.LastUpdatedBy
WMAssetBaseDTO<WMDataSourceBase>.LastUpdatedDate
WMAssetBaseDTO<WMDataSourceBase>.Summary
WMAssetBaseDTO<WMDataSourceBase>.Documentation
WMAssetBaseDTO<WMDataSourceBase>.DocumentationMIMEType
WMAssetBaseDTO<WMDataSourceBase>.Properties
WMAssetBaseDTO<WMDataSourceBase>.PropertiesSerialized
WMAssetBaseDTO<WMDataSourceBase>.ValidateDirectory<T_Asset>(WMPrincipal, WMAssetBaseDTO<T_Asset>, WMAppDbContext)
DataTransferObject<WMDataSourceBase>.ModelObject
DataTransferObject<WMDataSourceBase>.SetID(string)
DataTransferObject<WMDataSourceBase>.CreateModel(WMPrincipal, DbContext, object[])
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.DataSource
Assembly: WMServer.dll
Syntax
public class WMDataSourceBaseDTO : WMAssetBaseDTO<WMDataSourceBase>, IWMAssetBaseDTO, IDbEntity, IWMEntity, IHasEncryptedValues

Constructors

WMDataSourceBaseDTO()

Constructor for WMDataSourceBaseDTO

Declaration
public WMDataSourceBaseDTO()

WMDataSourceBaseDTO(string)

Constructor for WMDataSourceBaseDTO, with specified ID

Declaration
public WMDataSourceBaseDTO(string ID)
Parameters
Type Name Description
string ID

Properties

ConnectionString

The connection string to the database.

Declaration
public string ConnectionString { get; set; }
Property Value
Type Description
string

RegisteredType

The string used to register this data source type in RegisterWMDataSourceType(string, Type)

Declaration
public string RegisteredType { get; set; }
Property Value
Type Description
string

Methods

CommitTransaction(WMPrincipal, string, WMAppDbContext?)

Commits a transaction

Declaration
public static Task CommitTransaction(WMPrincipal principal, string transactionID, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string transactionID
WMAppDbContext context
Returns
Type Description
Task

Create(WMPrincipal, WMDataSourceBaseDTO, WMAppDbContext, string, string)

Create a new WMDataSourceBaseDTO from the provided data.

Declaration
public static Task<WMDataSourceBase> Create(WMPrincipal principal, WMDataSourceBaseDTO a_dto, WMAppDbContext context, string assetOwnerType, string assetOwnerID)
Parameters
Type Name Description
WMPrincipal principal

The owner of the data source

WMDataSourceBaseDTO a_dto

The WMDataSourceBaseDTO to be created.

WMAppDbContext context

The DbContext

string assetOwnerType

TYpe of the WMPrincipal that owns the Asset.

string assetOwnerID

ID of the WMPrincipal that owns the Asset.

Returns
Type Description
Task<WMDataSourceBase>
Exceptions
Type Condition
Exception

Delete(WMPrincipal, string, WMAppDbContext)

Create a new WMDataSourceBaseDTO from the provided data.

Declaration
public static Task Delete(WMPrincipal principal, string dir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

string dir

The Id or FullPathName of the corresponding WMDataSourceBaseDTO to be deleted.

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

DeleteData(WMPrincipal, string, List<InsertUpdateDeleteArgs>, WMAppDbContext?)

Updates data in the data source.

Declaration
public static Task<ElementValue> DeleteData(WMPrincipal principal, string dir, List<InsertUpdateDeleteArgs> args, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir
List<InsertUpdateDeleteArgs> args
WMAppDbContext context
Returns
Type Description
Task<ElementValue>

Evaluate(WMPrincipal, string, DataSourceArgs, WMAppDbContext, string?)

Performs an evaluation on a temporary dataReader one created from the arguments of the body DataSourceArgs, and a supplied data source ID.

Declaration
public static Task<ElementValue> Evaluate(WMPrincipal principal, string dir, DataSourceArgs args, WMAppDbContext context, string? transactionID = null)
Parameters
Type Name Description
WMPrincipal principal
string dir

The directory or ID of the data source to use.

DataSourceArgs args

Arguments for the evaluation

WMAppDbContext context
string transactionID
Returns
Type Description
Task<ElementValue>

FromModel()

Create this instance by reading properties from a WMDataReader

Declaration
public override void FromModel()
Overrides
DataTransferObject<WMDataSourceBase>.FromModel()

Get(WMPrincipal, string, WMAppDbContext?)

Gets the WMDataSourceBase instance with the specified id. Ensures ownership.

Declaration
public static Task<WMDataSourceBaseDTO> Get(WMPrincipal principal, string dir, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir

ID of the data source

WMAppDbContext context
Returns
Type Description
Task<WMDataSourceBaseDTO>

Get(WMPrincipal, string, int, WMAppDbContext)

Gets a listing of the specified WMDataSourceBaseDTO to the recursion depth specified.

Declaration
public static Task<IEnumerable<WMDataSourceBaseDTO>> Get(WMPrincipal principal, string dir = null, int recursionDepth = 0, WMAppDbContext context = null)
Parameters
Type Name Description
WMPrincipal principal

The owner of the Asset Directory being requested.

string dir

Specification of the directory under which to retrieve WMDataSourceBaseDTO

int recursionDepth

Depth to which the directory subtrees under the specified directory should be traversed.

WMAppDbContext context

Optional reference to a WMAppDbContext instance.

Returns
Type Description
Task<IEnumerable<WMDataSourceBaseDTO>>

GetAccessorString(WMPrincipal, string, WMAppDbContext)

Returns the AccessorString belonging to the data source with this ID/dir, otherwise an exception.

Declaration
public static Task<string> GetAccessorString(WMPrincipal principal, string dir = null, WMAppDbContext context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir

The ID or fullPathName of the data source to get.

WMAppDbContext context
Returns
Type Description
Task<string>

GetFromDirectory(WMPrincipal, string, int, WMAppDbContext)

Gets a listing of the specified WMDataSourceBaseDTO to the recursion depth specified with the ID/Dir of a WMAssetDirectory as input.

Declaration
public static Task<IEnumerable<WMDataSourceBaseDTO>> GetFromDirectory(WMPrincipal principal, string dir = null, int recursionDepth = 0, WMAppDbContext context = null)
Parameters
Type Name Description
WMPrincipal principal

The owner of the data sources being requested.

string dir

Specification of the directory under which to retrieve WMDataSourceBaseDTO

int recursionDepth

Depth to which the directory subtrees under the specified directory should be traversed.

WMAppDbContext context

Optional reference to a WMAppDbContext instance.

Returns
Type Description
Task<IEnumerable<WMDataSourceBaseDTO>>

InsertData(WMPrincipal, string, List<InsertUpdateDeleteArgs>, WMAppDbContext?)

Inserts data into the data source.

Declaration
public static Task<ElementValue> InsertData(WMPrincipal principal, string dir, List<InsertUpdateDeleteArgs> args, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir
List<InsertUpdateDeleteArgs> args
WMAppDbContext context
Returns
Type Description
Task<ElementValue>

OpenTransaction(WMPrincipal, string, WMAppDbContext?)

Opens a transaction on the data source.

Declaration
public static Task<string> OpenTransaction(WMPrincipal principal, string dir, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir
WMAppDbContext context
Returns
Type Description
Task<string>

RollbackTransaction(WMPrincipal, string, WMAppDbContext?)

Rolls back a transaction

Declaration
public static Task RollbackTransaction(WMPrincipal principal, string transactionID, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string transactionID
WMAppDbContext context
Returns
Type Description
Task

SetAccessorString(WMPrincipal, string, string, WMAppDbContext)

Sets the AccessorString belonging to the data source with this ID/dir, otherwise an exception.

Declaration
public static Task SetAccessorString(WMPrincipal principal, string accessorString, string dir = null, WMAppDbContext context = null)
Parameters
Type Name Description
WMPrincipal principal
string accessorString

The plain-text representation of this data source's accessor string.

string dir

The ID or fullPathName of the data source to get.

WMAppDbContext context
Returns
Type Description
Task

Update(WMPrincipal, string, WMDataSourceBaseDTO, WMAppDbContext)

Updates the specified WMDataSourceBaseDTO from the provided data.

Declaration
public static Task Update(WMPrincipal principal, string id, WMDataSourceBaseDTO a_dto, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

string id

The id or fullpath of the directory

WMDataSourceBaseDTO a_dto

The WMDataSourceBaseDTO to be updated.

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

UpdateData(WMPrincipal, string, List<InsertUpdateDeleteArgs>, WMAppDbContext?)

Updates data in the data source.

Declaration
public static Task<ElementValue> UpdateData(WMPrincipal principal, string dir, List<InsertUpdateDeleteArgs> args, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir
List<InsertUpdateDeleteArgs> args
WMAppDbContext context
Returns
Type Description
Task<ElementValue>

UpdateModel(WMPrincipal, DbContext, object[]?)

Updates and returns the contained WMDataReader.

Declaration
public override Task<WMDataSourceBase> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type Name Description
WMPrincipal principal
DbContext context
object[] data
Returns
Type Description
Task<WMDataSourceBase>
Overrides
WMAssetBaseDTO<WMDataSourceBase>.UpdateModel(WMPrincipal, DbContext, object[])

Implements

IWMAssetBaseDTO
IDbEntity
IWMEntity
IHasEncryptedValues
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE