Show / Hide Table of Contents

Class WMAssetDirectoryDTO

Data Transfer Object proxy for a WMAssetDirectory.

Inheritance
object
DataTransferObject<WMAssetDirectory>
WMAssetBaseDTO<WMAssetDirectory>
WMAssetDirectoryDTO
Implements
IWMAssetBaseDTO
IWMVersionableAsset
IWMOwnableResource
IWMResource
IDbEntity
IWMEntity
Inherited Members
WMAssetBaseDTO<WMAssetDirectory>.ID
WMAssetBaseDTO<WMAssetDirectory>.Name
WMAssetBaseDTO<WMAssetDirectory>.OwnerID
WMAssetBaseDTO<WMAssetDirectory>.OwnerType
WMAssetBaseDTO<WMAssetDirectory>.ParentID
WMAssetBaseDTO<WMAssetDirectory>.FullPathName
WMAssetBaseDTO<WMAssetDirectory>.CreatedBy
WMAssetBaseDTO<WMAssetDirectory>.CreatedDate
WMAssetBaseDTO<WMAssetDirectory>.LastUpdatedBy
WMAssetBaseDTO<WMAssetDirectory>.LastUpdatedDate
WMAssetBaseDTO<WMAssetDirectory>.Summary
WMAssetBaseDTO<WMAssetDirectory>.Documentation
WMAssetBaseDTO<WMAssetDirectory>.DocumentationMIMEType
WMAssetBaseDTO<WMAssetDirectory>.Properties
WMAssetBaseDTO<WMAssetDirectory>.Version
WMAssetBaseDTO<WMAssetDirectory>.VersionName
WMAssetBaseDTO<WMAssetDirectory>.Status
WMAssetBaseDTO<WMAssetDirectory>.IsDeleted
WMAssetBaseDTO<WMAssetDirectory>.PropertiesSerialized
WMAssetBaseDTO<WMAssetDirectory>.UpdateDTO<A, B>(WMPrincipal, WMAssetIdentifier, A, DbSet<A>, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMAssetDirectory>.CreateDTO<A, B>(WMPrincipal, A, DbSet<A>, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMAssetDirectory>.DeleteDTO<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMAssetDirectory>.ValidateDirectory<T_Asset>(WMPrincipal, WMAssetBaseDTO<T_Asset>, WMAssetBaseDTO<T_Asset>, WMAppDbContext)
WMAssetBaseDTO<WMAssetDirectory>.CloneDTO<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, VersionCreateArgs, WMAppDbContext, Func<A, Task>)
WMAssetBaseDTO<WMAssetDirectory>.CommitDTO<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, WMAppDbContext)
WMAssetBaseDTO<WMAssetDirectory>.DTOVersions<A, B>(WMPrincipal, WMAssetIdentifier, DbSet<A>, WMAppDbContext)
WMAssetBaseDTO<WMAssetDirectory>.GetDTO<A>(WMPrincipal, WMAssetIdentifier, IQueryable<A>, WMAppDbContext, Expression<Func<A, A>>)
WMAssetBaseDTO<WMAssetDirectory>.GetDTOFromDirectory<A>(WMPrincipal, WMAssetIdentifier, int, DbSet<A>, WMAppDbContext, Expression<Func<A, A>>)
WMAssetBaseDTO<WMAssetDirectory>.GetAuthorizedAssetIQueryable<A>(WMPrincipal, IQueryable<A>, WMAppDbContext)
WMAssetBaseDTO<WMAssetDirectory>.GetEveryAuthorizedAssetIQueryable(WMPrincipal, WMAppDbContext)
WMAssetBaseDTO<WMAssetDirectory>.GetIdentifier(bool)
DataTransferObject<WMAssetDirectory>.ModelObject
DataTransferObject<WMAssetDirectory>.SetID(string)
DataTransferObject<WMAssetDirectory>.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.Directory
Assembly: WMServer.dll
Syntax
[PrimaryKey("ID", new string[] { "Version" })]
public class WMAssetDirectoryDTO : WMAssetBaseDTO<WMAssetDirectory>, IWMAssetBaseDTO, IWMVersionableAsset, IWMOwnableResource, IWMResource, IDbEntity, IWMEntity

Constructors

WMAssetDirectoryDTO()

Constructor for WMAssetDirectoryDTO

Declaration
public WMAssetDirectoryDTO()

WMAssetDirectoryDTO(string)

Constructor for WMAssetDirectoryDTO specifying ID

Declaration
public WMAssetDirectoryDTO(string id)
Parameters
Type Name Description
string id

Properties

RootDirectoryDTO

Provisional Root WMAssetDirectoryDTO

Declaration
public static WMAssetDirectoryDTO RootDirectoryDTO { get; set; }
Property Value
Type Description
WMAssetDirectoryDTO

Methods

Create(WMPrincipal, WMAssetDirectoryDTO, WMAppDbContext)

Create a new WMAssetDirectoryDTO from the provided data.

Declaration
public static Task<WMAssetDirectory> Create(WMPrincipal principal, WMAssetDirectoryDTO a_dto, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

WMAssetDirectoryDTO a_dto

The WMAssetDirectoryDTO to be created.

WMAppDbContext context

The DbContext

Returns
Type Description
Task<WMAssetDirectory>
Exceptions
Type Condition
Exception

Delete(WMPrincipal, WMAssetIdentifier, WMAppDbContext)

Delete the WMAssetDirectoryDTO with the corresponding ID or FullPathName

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

The owner of the directory

WMAssetIdentifier identifier

The identifier of the asset

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

DeleteDirectoryTree(WMPrincipal, WMAssetDirectoryDTO, WMAppDbContext)

Deletes all assets whose parent was deleted.

Declaration
public static Task DeleteDirectoryTree(WMPrincipal principal, WMAssetDirectoryDTO ad_dto, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The principal of the asset

WMAssetDirectoryDTO ad_dto

The directory to be deleted.

WMAppDbContext context
Returns
Type Description
Task

FromModel()

Create this instance by reading properties from a WMAssetDirectory

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

Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext, Expression<Func<WMAssetDirectoryDTO, WMAssetDirectoryDTO>>)

Returns the identified WMAssetDirectoryDTO, throws exception if does not exist.

Declaration
public static Task<WMAssetDirectoryDTO> Get(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context, Expression<Func<WMAssetDirectoryDTO, WMAssetDirectoryDTO>> propertySelector = null)
Parameters
Type Name Description
WMPrincipal principal
WMAssetIdentifier identifier

The identifier of the asset

WMAppDbContext context
Expression<Func<WMAssetDirectoryDTO, WMAssetDirectoryDTO>> propertySelector

An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>))

Returns
Type Description
Task<WMAssetDirectoryDTO>
Exceptions
Type Condition
Exception

GetFromDirectory(WMPrincipal, WMAssetIdentifier, int, WMAppDbContext, Expression<Func<WMAssetDirectoryDTO, WMAssetDirectoryDTO>>)

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

Declaration
public static Task<IEnumerable<WMAssetDirectoryDTO>> GetFromDirectory(WMPrincipal principal, WMAssetIdentifier identifier = null, int recursionDepth = 0, WMAppDbContext context = null, Expression<Func<WMAssetDirectoryDTO, WMAssetDirectoryDTO>> propertySelector = null)
Parameters
Type Name Description
WMPrincipal principal

The owner of the Asset Directory being requested.

WMAssetIdentifier identifier

The identifier of the asset

int recursionDepth

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

WMAppDbContext context

Optional reference to a WMAppDbContext instance.

Expression<Func<WMAssetDirectoryDTO, WMAssetDirectoryDTO>> propertySelector

An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>))

Returns
Type Description
Task<IEnumerable<WMAssetDirectoryDTO>>

ResourceDefinition()

The resource operation definition for this asset.

Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
Returns
Type Description
WMResourceOperationsDefinition

Update(WMPrincipal, WMAssetIdentifier, WMAssetDirectoryDTO, WMAppDbContext)

Updates the specified WMAssetDirectoryDTO from the provided data.

Declaration
public static Task Update(WMPrincipal principal, WMAssetIdentifier identifier, WMAssetDirectoryDTO a_dto, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

WMAssetIdentifier identifier

The identifier of the asset

WMAssetDirectoryDTO a_dto

The WMAssetDirectoryDTO to be updated.

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

UpdateDirectoryTreePaths(WMPrincipal, WMAssetDirectoryDTO, WMAppDbContext)

Updates the FullPathName of all assets whose parent directory was moved.

Declaration
public static Task UpdateDirectoryTreePaths(WMPrincipal principal, WMAssetDirectoryDTO a_dto_new, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The principal of the asset directory located at

WMAssetDirectoryDTO a_dto_new

The new asset. The old asset will be retrieved from the database with this asset's ID, and directories will be updated depending on the difference in FullPath

WMAppDbContext context
Returns
Type Description
Task

UpdateModel(WMPrincipal, DbContext, object[]?)

Updates and returns the contained WMAssetDirectory.

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

Implements

IWMAssetBaseDTO
IWMVersionableAsset
IWMOwnableResource
IWMResource
IDbEntity
IWMEntity
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