Class DecisionModelDTO
Data Transfer Object proxy for a DecisionModel.
Inherited Members
Namespace: Quantellia.WMServer.DecisionModeler
Assembly: WMServer.dll
Syntax
public class DecisionModelDTO : WMAssetBaseDTO<DecisionModel>, IWMAssetBaseDTO, IWMVersionableAsset, IWMOwnableResource, IWMResource, IDbEntity, IWMEntity
Remarks
The properties of the DecisionModel are populated, but the list of elements is deferred.
Constructors
DecisionModelDTO()
Declaration
public DecisionModelDTO()
DecisionModelDTO(string)
Declaration
public DecisionModelDTO(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id |
Properties
ImageUrl
URL of image to display when decision model listed.
Declaration
public string? ImageUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Clone(WMPrincipal, WMAssetIdentifier, VersionCreateArgs?, WMAppDbContext)
Clones the specified DecisionModel with an iterated name "AssetName (1), etc... ", iterates the version number.
Declaration
public static Task<DecisionModelDTO> Clone(WMPrincipal principal, WMAssetIdentifier identifier, VersionCreateArgs? args, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The owner of the directory |
| WMAssetIdentifier | identifier | The identifier of the directory |
| VersionCreateArgs | args | Arguments for creating a version. |
| WMAppDbContext | context | The DbContext |
Returns
| Type | Description |
|---|---|
| Task<DecisionModelDTO> |
Exceptions
| Type | Condition |
|---|---|
| Exception |
Commit(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Commits the specified DecisionModel as Head.
Declaration
public static Task Commit(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The owner of the directory |
| WMAssetIdentifier | identifier | The identifier of the directory |
| WMAppDbContext | context | The DbContext |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| Exception |
Create(WMPrincipal, WMAppDbContext, DecisionModelDTO, ICollection<JObject>)
Declaration
public static Task<DecisionModelDTO> Create(WMPrincipal principal, WMAppDbContext context, DecisionModelDTO a_dto, ICollection<JObject> elements)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | |
| WMAppDbContext | context | |
| DecisionModelDTO | a_dto | |
| ICollection<JObject> | elements | The elements of the supplied DecisionModelDTO |
Returns
| Type | Description |
|---|---|
| Task<DecisionModelDTO> |
Delete(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Delete the DecisionModel 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 corresponding DecisionModel to be deleted. |
| WMAppDbContext | context | The DbContext |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| Exception |
FromModel()
Create this instance by reading properties from a DecisionModel
Declaration
public override void FromModel()
Overrides
Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Declaration
public static Task<DecisionModelDTO> Get(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | |
| WMAssetIdentifier | identifier | The identifier of the asset |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task<DecisionModelDTO> |
Exceptions
| Type | Condition |
|---|---|
| Exception |
GetAll(WMPrincipal, WMAppDbContext)
Declaration
public static Task<IEnumerable<DecisionModelDTO>> GetAll(WMPrincipal principal, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<DecisionModelDTO>> |
GetFromDirectory(WMPrincipal, WMAssetIdentifier, int, WMAppDbContext, Expression<Func<DecisionModelDTO, DecisionModelDTO>>)
Gets a listing of the specified DecisionModelDTO to the recursion depth specified with the ID/Dir of a WMAssetDirectory as input.
Declaration
public static Task<IEnumerable<DecisionModelDTO>> GetFromDirectory(WMPrincipal principal, WMAssetIdentifier identifier = null, int recursionDepth = 0, WMAppDbContext context = null, Expression<Func<DecisionModelDTO, DecisionModelDTO>> propertySelector = null)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The owner of the assets 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<DecisionModelDTO, DecisionModelDTO>> | 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<DecisionModelDTO>> |
Patch(WMPrincipal, WMAssetIdentifier, DecisionModelDTO, ICollection<JObject>?, WMAppDbContext)
Patches the specified DecisionModelDTO from the provided data.
Declaration
public static Task Patch(WMPrincipal principal, WMAssetIdentifier identifier, DecisionModelDTO a_dto, ICollection<JObject>? elements, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The owner of the directory |
| WMAssetIdentifier | identifier | The identifier of the asset |
| DecisionModelDTO | a_dto | The DecisionModelDTO to be updated. |
| ICollection<JObject> | elements | The elements of the supplied DecisionModelDTO. If null, the decision model elements will not be impacted. |
| WMAppDbContext | context | The DbContext |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| Exception |
PatchElements(WMPrincipal, WMAssetIdentifier, DecisionModelElementPatchDocument, WMAppDbContext)
Patches the specified DecisionModelDTO from the provided data.
Declaration
public static Task PatchElements(WMPrincipal principal, WMAssetIdentifier identifier, DecisionModelElementPatchDocument patchDocument, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The owner of the directory |
| WMAssetIdentifier | identifier | The identifier of the asset |
| DecisionModelElementPatchDocument | patchDocument | The patch document specifying changes to make to the set of decision model elements. |
| WMAppDbContext | context | The DbContext |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| Exception |
ResourceDefinition()
The resource operation definition for this asset.
Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
Returns
| Type | Description |
|---|---|
| WMResourceOperationsDefinition |
Update(WMPrincipal, WMAssetIdentifier, DecisionModelDTO, ICollection<JObject>, WMAppDbContext)
Updates the specified DecisionModelDTO from the provided data.
Declaration
public static Task Update(WMPrincipal principal, WMAssetIdentifier identifier, DecisionModelDTO a_dto, ICollection<JObject> elements, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The owner of the directory |
| WMAssetIdentifier | identifier | The identifier of the asset |
| DecisionModelDTO | a_dto | The DecisionModelDTO to be updated. |
| ICollection<JObject> | elements | The elements of the supplied DecisionModelDTO |
| WMAppDbContext | context | The DbContext |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| Exception |
UpdateModel(WMPrincipal, DbContext, object[]?)
Declaration
public override Task<DecisionModel> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | |
| DbContext | context | |
| object[] | data |
Returns
| Type | Description |
|---|---|
| Task<DecisionModel> |
Overrides
Versions(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Gets all versions of the specified DecisionModel.
Declaration
public static Task<IEnumerable<VersionArgs>> Versions(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The owner of the directory |
| WMAssetIdentifier | identifier | The identifier of the directory |
| WMAppDbContext | context | The DbContext |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<VersionArgs>> |
Exceptions
| Type | Condition |
|---|---|
| Exception |