EDMI: Update Service and Client to accept IDBDoctypeId instead of Business entity

This commit is contained in:
Jonathan Jenne
2022-03-09 14:08:51 +01:00
parent 8d4f327d96
commit 9e448641a0
12 changed files with 47 additions and 47 deletions

View File

@@ -183,15 +183,15 @@ Public Class Client
''' Imports a file from a filepath, creating a IDB ObjectId and Filesystem Object
''' </summary>
''' <param name="pObjectStoreName">Type of ObjectStore. Can be WORK or ARCHIVE.</param>
''' <param name="pBusinessEntity">Business entity that the new file object should belong to.</param>
''' <param name="pIDBDoctypeId">Business entity that the new file object should belong to.</param>
''' <param name="pImportOptions">Other file import options</param>
''' <exception cref="FileNotFoundException">When local filepath was not found</exception>
''' <exception cref="ApplicationException">When there was a error in the Service</exception>
''' <returns>The ObjectId of the newly generated filesystem object</returns>
Public Async Function NewFileAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pBusinessEntity As String, Optional pImportOptions As Options.NewFileOptions = Nothing) As Task(Of Long)
Public Async Function NewFileAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pIDBDoctypeId As Long, Optional pImportOptions As Options.NewFileOptions = Nothing) As Task(Of Long)
Try
Dim oNewFile As New Modules.IDB.NewFile(LogConfig, Channel)
Return Await oNewFile.RunAsync(pFilePath, pObjectStoreName, pObjectKind, pBusinessEntity, pImportOptions)
Return Await oNewFile.RunAsync(pFilePath, pObjectStoreName, pObjectKind, pIDBDoctypeId, pImportOptions)
Catch ex As Exception
Logger.Error(ex)

View File

@@ -6,8 +6,8 @@
<xs:complexType name="ImportFileRequest">
<xs:sequence>
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.IDB" minOccurs="0" name="AttributeValues" nillable="true" type="q1:ArrayOfUserAttributeValue" />
<xs:element minOccurs="0" name="BusinessEntity" nillable="true" type="xs:string" />
<xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.IDB" minOccurs="0" name="File" nillable="true" type="q2:FileProperties" />
<xs:element minOccurs="0" name="IDBDoctypeId" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="KindType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ProfileId" type="xs:int" />
<xs:element minOccurs="0" name="StoreName" nillable="true" type="xs:string" />

View File

@@ -5,8 +5,8 @@
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
<xs:complexType name="NewFileRequest">
<xs:sequence>
<xs:element minOccurs="0" name="BusinessEntity" nillable="true" type="xs:string" />
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.IDB" minOccurs="0" name="File" nillable="true" type="q1:FileProperties" />
<xs:element minOccurs="0" name="IDBDoctypeId" type="xs:long" />
<xs:element minOccurs="0" name="KindType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="StoreName" nillable="true" type="xs:string" />
<xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" minOccurs="0" name="User" nillable="true" type="q2:UserState" />

View File

@@ -1127,10 +1127,10 @@ Namespace EDMIServiceReference
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private BusinessEntityField As String
Private FileField As EDMIServiceReference.FileProperties
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileField As EDMIServiceReference.FileProperties
Private IDBDoctypeIdField As Long
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private KindTypeField As String
@@ -1151,19 +1151,6 @@ Namespace EDMIServiceReference
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property BusinessEntity() As String
Get
Return Me.BusinessEntityField
End Get
Set
If (Object.ReferenceEquals(Me.BusinessEntityField, value) <> true) Then
Me.BusinessEntityField = value
Me.RaisePropertyChanged("BusinessEntity")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property File() As EDMIServiceReference.FileProperties
Get
@@ -1177,6 +1164,19 @@ Namespace EDMIServiceReference
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property IDBDoctypeId() As Long
Get
Return Me.IDBDoctypeIdField
End Get
Set
If (Me.IDBDoctypeIdField.Equals(value) <> true) Then
Me.IDBDoctypeIdField = value
Me.RaisePropertyChanged("IDBDoctypeId")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property KindType() As String
Get
@@ -1993,10 +1993,10 @@ Namespace EDMIServiceReference
Private AttributeValuesField() As EDMIServiceReference.UserAttributeValue
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private BusinessEntityField As String
Private FileField As EDMIServiceReference.FileProperties
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileField As EDMIServiceReference.FileProperties
Private IDBDoctypeIdField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private KindTypeField As String
@@ -2033,19 +2033,6 @@ Namespace EDMIServiceReference
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property BusinessEntity() As String
Get
Return Me.BusinessEntityField
End Get
Set
If (Object.ReferenceEquals(Me.BusinessEntityField, value) <> true) Then
Me.BusinessEntityField = value
Me.RaisePropertyChanged("BusinessEntity")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property File() As EDMIServiceReference.FileProperties
Get
@@ -2059,6 +2046,19 @@ Namespace EDMIServiceReference
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property IDBDoctypeId() As String
Get
Return Me.IDBDoctypeIdField
End Get
Set
If (Object.ReferenceEquals(Me.IDBDoctypeIdField, value) <> true) Then
Me.IDBDoctypeIdField = value
Me.RaisePropertyChanged("IDBDoctypeId")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property KindType() As String
Get

View File

@@ -17,7 +17,7 @@ Namespace Modules.Globix
pAttributeValues As List(Of UserAttributeValue),
pObjectStoreName As String,
pObjectKind As String,
pBusinessEntity As String,
pIDBDoctypeId As Long,
pImportOptions As Options.ImportFileOptions) As Task(Of ImportFileResponse)
Try
' Set default options
@@ -45,7 +45,7 @@ Namespace Modules.Globix
Dim oContents = oMemoryStream.ToArray()
Dim oFileImportResponse = Await Channel.ImportFileAsync(New ImportFileRequest With {
.BusinessEntity = pBusinessEntity,
.IDBDoctypeId = pIDBDoctypeId,
.File = New FileProperties With {
.FileName = oFileInfo.Name,
.FileCreatedAt = oFileCreatedAt,

View File

@@ -10,7 +10,7 @@ Namespace Modules.IDB
MyBase.New(pLogConfig, pChannel)
End Sub
Public Async Function RunAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pBusinessEntity As String, Optional pOptions As Options.NewFileOptions = Nothing) As Task(Of Long)
Public Async Function RunAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pIDBDoctypeId As Long, Optional pOptions As Options.NewFileOptions = Nothing) As Task(Of Long)
Try
' Set default options
If pOptions Is Nothing Then
@@ -25,7 +25,7 @@ Namespace Modules.IDB
' Importing the file now
Dim oFileProperties = Helpers.GetFileProperties(pFilePath, pOptions.DateImported)
Dim oFileImportResponse = Await Channel.NewFileAsync(New NewFileRequest With {
.BusinessEntity = pBusinessEntity,
.IDBDoctypeId = pIDBDoctypeId,
.File = oFileProperties,
.KindType = pObjectKind,
.StoreName = pObjectStoreName,