diff --git a/Modules.EDMIAPI/Client.vb b/Modules.EDMIAPI/Client.vb index abb329c8..6b02d018 100644 --- a/Modules.EDMIAPI/Client.vb +++ b/Modules.EDMIAPI/Client.vb @@ -183,15 +183,15 @@ Public Class Client ''' Imports a file from a filepath, creating a IDB ObjectId and Filesystem Object ''' ''' Type of ObjectStore. Can be WORK or ARCHIVE. - ''' Business entity that the new file object should belong to. + ''' Business entity that the new file object should belong to. ''' Other file import options ''' When local filepath was not found ''' When there was a error in the Service ''' The ObjectId of the newly generated filesystem object - 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) diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd index e8a6215e..4c37d8f8 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd @@ -6,8 +6,8 @@ - + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd index b12f9392..bc77b760 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd @@ -5,8 +5,8 @@ - + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb index 4533aa09..eaaa60f0 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb @@ -1127,10 +1127,10 @@ Namespace EDMIServiceReference Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject _ - Private BusinessEntityField As String + Private FileField As EDMIServiceReference.FileProperties _ - Private FileField As EDMIServiceReference.FileProperties + Private IDBDoctypeIdField As Long _ Private KindTypeField As String @@ -1151,19 +1151,6 @@ Namespace EDMIServiceReference End Set End Property - _ - 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 - _ Public Property File() As EDMIServiceReference.FileProperties Get @@ -1177,6 +1164,19 @@ Namespace EDMIServiceReference End Set End Property + _ + 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 + _ Public Property KindType() As String Get @@ -1993,10 +1993,10 @@ Namespace EDMIServiceReference Private AttributeValuesField() As EDMIServiceReference.UserAttributeValue _ - Private BusinessEntityField As String + Private FileField As EDMIServiceReference.FileProperties _ - Private FileField As EDMIServiceReference.FileProperties + Private IDBDoctypeIdField As String _ Private KindTypeField As String @@ -2033,19 +2033,6 @@ Namespace EDMIServiceReference End Set End Property - _ - 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 - _ Public Property File() As EDMIServiceReference.FileProperties Get @@ -2059,6 +2046,19 @@ Namespace EDMIServiceReference End Set End Property + _ + 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 + _ Public Property KindType() As String Get diff --git a/Modules.EDMIAPI/Modules/Globix/ImportFile.vb b/Modules.EDMIAPI/Modules/Globix/ImportFile.vb index ca2e979b..74fe6529 100644 --- a/Modules.EDMIAPI/Modules/Globix/ImportFile.vb +++ b/Modules.EDMIAPI/Modules/Globix/ImportFile.vb @@ -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, diff --git a/Modules.EDMIAPI/Modules/IDB/NewFile.vb b/Modules.EDMIAPI/Modules/IDB/NewFile.vb index f938f46c..0908415e 100644 --- a/Modules.EDMIAPI/Modules/IDB/NewFile.vb +++ b/Modules.EDMIAPI/Modules/IDB/NewFile.vb @@ -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, diff --git a/Service.EDMIService/IDB/Helpers.vb b/Service.EDMIService/IDB/Helpers.vb index 97475029..d529624f 100644 --- a/Service.EDMIService/IDB/Helpers.vb +++ b/Service.EDMIService/IDB/Helpers.vb @@ -113,10 +113,10 @@ Namespace IDB End Try End Function - Public Function NewObjectIdWithTransaction(pKindType As String, pBusinessEntity As String, pWho As String, pConnection As SqlConnection, pTransaction As SqlTransaction) As Long + Public Function NewObjectIdWithTransaction(pKindType As String, pIDBDoctypeId As Long, pWho As String, pConnection As SqlConnection, pTransaction As SqlTransaction) As Long Try Dim oNewObjectIdSQL = $"DECLARE @NEW_IDB_OBJ_ID BIGINT - EXEC PRIDB_NEW_OBJECT '{pKindType}','{pWho}','{pBusinessEntity}',0, @IDB_OBJ_ID = @NEW_IDB_OBJ_ID OUTPUT; + EXEC PRIDB_NEW_OBJECT '{pKindType}','{pWho}',{pIDBDoctypeId},0, @IDB_OBJ_ID = @NEW_IDB_OBJ_ID OUTPUT; SELECT @NEW_IDB_OBJ_ID" Dim oObjectId As Long = Database.GetScalarValueWithConnectionObject(oNewObjectIdSQL, pConnection, diff --git a/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb b/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb index ae764150..857f807a 100644 --- a/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb +++ b/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb @@ -64,7 +64,7 @@ Namespace Methods.GlobalIndexer.ImportFile Dim oNewFile As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState) Dim oResponse = oNewFile.Run(New NewFile.NewFileRequest With { .File = pData.File, - .BusinessEntity = pData.BusinessEntity, + .IDBDoctypeId = pData.IDBDoctypeId, .KindType = pData.KindType, .StoreName = pData.StoreName, .User = User diff --git a/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileRequest.vb b/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileRequest.vb index b4880430..f8a7d756 100644 --- a/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileRequest.vb +++ b/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileRequest.vb @@ -19,10 +19,10 @@ Namespace Methods.GlobalIndexer.ImportFile Public Property ProfileId As Integer ''' - ''' The business entity of the file, ex DEFAULT + ''' The Document Type of the file, ex. IncomingInvoice ''' - Public Property BusinessEntity As String + Public Property IDBDoctypeId As String ''' ''' The kind of object to be created, ex. DOC diff --git a/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb b/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb index 43a37ab1..2a1e8bc7 100644 --- a/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb +++ b/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb @@ -28,7 +28,7 @@ Namespace Methods.IDB.NewFile Try - Dim oObjectId = Helpers.NewObjectIdWithTransaction(pData.KindType, pData.BusinessEntity, pData.User.UserName, Connection, Transaction) + Dim oObjectId = Helpers.NewObjectIdWithTransaction(pData.KindType, pData.IDBDoctypeId, pData.User.UserName, Connection, Transaction) If oObjectId = 0 Then LogAndThrow("Could not create new ObjectId!") End If diff --git a/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb b/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb index 3c9cadfb..d3ea4733 100644 --- a/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb +++ b/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb @@ -18,7 +18,7 @@ Namespace Methods.IDB.NewFile ''' The business entity of the file, ex DEFAULT ''' - Public Property BusinessEntity As String + Public Property IDBDoctypeId As Long ''' ''' The kind of object to be created, ex. DOC diff --git a/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb b/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb index f927d80d..d1edfd2b 100644 --- a/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb +++ b/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb @@ -83,7 +83,7 @@ Namespace Methods.IDB.UpdateFile Dim oNewFileMethod As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState) Dim oNewFileRequest As New NewFile.NewFileRequest With { .File = pData.File, - .BusinessEntity = oBusinessEntity, + .IDBDoctypeId = oBusinessEntity, .KindType = oKind, .StoreName = oStore, .User = pData.User