Class WMAssetBase
Provides a base class for the Quantellia.WMServer.Asset namespace that implements the common properties used by all other instantiable classes.
Inheritance
Implements
Inherited Members
Namespace: Quantellia.WMServer.Asset.Base
Assembly: WMServer.dll
Syntax
public class WMAssetBase : IWMAsset, IDbEntity, IWMEntity, IDocumentedEntity, INamedEntity, IWMAssetDirectoryMember, IWMPrincipalOwned, IWMVersionableAsset, IWMOwnableResource, IWMResource
Constructors
WMAssetBase()
Parameterless Constructor. Will populate a random GUID as ID
Declaration
public WMAssetBase()
WMAssetBase(string)
Constructor that specifies ID
Declaration
public WMAssetBase(string ID)
Parameters
Type | Name | Description |
---|---|---|
string | ID |
Properties
CreatedBy
ID of user that created this object.
Declaration
public string CreatedBy { get; set; }
Property Value
Type | Description |
---|---|
string |
CreatedDate
Date on which this object was created.
Declaration
public DateTime CreatedDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Documentation
Long-form documentation of this object, which may include format encoding (e.g. Markdown, HTML, etc.)
Declaration
public string? Documentation { get; set; }
Property Value
Type | Description |
---|---|
string |
DocumentationMIMEType
MIME type of the Documentation property.
Declaration
public string? DocumentationMIMEType { get; set; }
Property Value
Type | Description |
---|---|
string |
FullPathName
Fully qualified name of the Asset.
Declaration
public string FullPathName { get; }
Property Value
Type | Description |
---|---|
string |
ID
Unique, primary key ID for this object.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
string |
IsDeleted
A flag on whether the asset is deleted (recoverable, but not found in searches)
Declaration
public int IsDeleted { get; set; }
Property Value
Type | Description |
---|---|
int |
LastUpdatedBy
ID of the user that last updated this object.
Declaration
public string LastUpdatedBy { get; set; }
Property Value
Type | Description |
---|---|
string |
LastUpdatedDate
Date on which this object was last updated.
Declaration
public DateTime LastUpdatedDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Name
Human-readable name of the object instance.
Declaration
public string? Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Owner
Principal that owns this asset
Declaration
[NotMapped]
public WMPrincipal? Owner { get; set; }
Property Value
Type | Description |
---|---|
WMPrincipal |
OwnerID
ID of the Owner of this asset.
Declaration
public string? OwnerID { get; set; }
Property Value
Type | Description |
---|---|
string |
OwnerType
ID of the Owner of this asset.
Declaration
public string? OwnerType { get; set; }
Property Value
Type | Description |
---|---|
string |
ParentDirectory
Reference to the asset's parent in the model.
Declaration
public WMAssetDirectory ParentDirectory { get; set; }
Property Value
Type | Description |
---|---|
WMAssetDirectory |
Properties
Custom properties defined by the user
Declaration
public Dictionary<string, string> Properties { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> |
Status
The status of this version.
Declaration
public IWMVersionableAsset.StatusType Status { get; set; }
Property Value
Type | Description |
---|---|
IWMVersionableAsset.StatusType |
Summary
Short summary describing this object.
Declaration
public string? Summary { get; set; }
Property Value
Type | Description |
---|---|
string |
Version
The version number of this asset.
Declaration
public int Version { get; set; }
Property Value
Type | Description |
---|---|
int |
VersionName
The name of this version.
Declaration
public string? VersionName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
CreateFullPathName(WMAssetDirectory, string)
Returns a FullPathName calculated from a Name
and parentDir
Declaration
public static string CreateFullPathName(WMAssetDirectory parentDir, string Name)
Parameters
Type | Name | Description |
---|---|---|
WMAssetDirectory | parentDir | |
string | Name |
Returns
Type | Description |
---|---|
string |
GetFullPath(WMPrincipal, WMAssetIdentifier, string, WMAppDbContext)
Returns a FullPathName calculated from a name
and parentIdentifier
Declaration
public static Task<string> GetFullPath(WMPrincipal principal, WMAssetIdentifier parentIdentifier, string name, WMAppDbContext dbContext)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAssetIdentifier | parentIdentifier | The identifier of the parent |
string | name | The name to use for this asset directory in the FullPathName |
WMAppDbContext | dbContext |
Returns
Type | Description |
---|---|
Task<string> |
GetIdentifier(bool)
Returns this asset model's identifier. (i.e. Root/A/B/C/D;Ver# or abcde-12345-.....;ver#)
Declaration
public WMAssetIdentifier GetIdentifier(bool UseFullPathName = false)
Parameters
Type | Name | Description |
---|---|---|
bool | UseFullPathName | If true, uses the asset's fullPathName, otherwise uses the ID. |
Returns
Type | Description |
---|---|
WMAssetIdentifier |