diff --git a/GUIs.Common/frmDocumentResultList.Designer.vb b/GUIs.Common/frmDocumentResultList.Designer.vb
index 49456117..9a3c3852 100644
--- a/GUIs.Common/frmDocumentResultList.Designer.vb
+++ b/GUIs.Common/frmDocumentResultList.Designer.vb
@@ -759,7 +759,7 @@ Partial Class frmDocumentResultList
resources.ApplyResources(Me.DockPanelStatus, "DockPanelStatus")
Me.DockPanelStatus.Name = "DockPanelStatus"
Me.DockPanelStatus.Options.ShowCloseButton = False
- Me.DockPanelStatus.OriginalSize = New System.Drawing.Size(273, 97)
+ Me.DockPanelStatus.OriginalSize = New System.Drawing.Size(268, 434)
'
'ControlContainer1
'
@@ -789,8 +789,8 @@ Partial Class frmDocumentResultList
resources.ApplyResources(Me.dateCheckedOutWhen, "dateCheckedOutWhen")
Me.dateCheckedOutWhen.MenuManager = Me.RibbonControl
Me.dateCheckedOutWhen.Name = "dateCheckedOutWhen"
- Me.dateCheckedOutWhen.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("DateEdit1.Properties.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))})
- Me.dateCheckedOutWhen.Properties.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("DateEdit1.Properties.CalendarTimeProperties.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))})
+ Me.dateCheckedOutWhen.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("dateCheckedOutWhen.Properties.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))})
+ Me.dateCheckedOutWhen.Properties.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("dateCheckedOutWhen.Properties.CalendarTimeProperties.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))})
Me.dateCheckedOutWhen.Properties.ReadOnly = True
Me.dateCheckedOutWhen.StyleController = Me.LayoutControl1
'
@@ -800,7 +800,7 @@ Partial Class frmDocumentResultList
Me.Root.GroupBordersVisible = False
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroup1, Me.EmptySpaceItem1})
Me.Root.Name = "Root"
- Me.Root.Size = New System.Drawing.Size(268, 434)
+ Me.Root.Size = New System.Drawing.Size(268, 413)
Me.Root.TextVisible = False
'
'LayoutControlGroup1
@@ -834,7 +834,7 @@ Partial Class frmDocumentResultList
Me.EmptySpaceItem1.AllowHotTrack = False
Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 93)
Me.EmptySpaceItem1.Name = "EmptySpaceItem1"
- Me.EmptySpaceItem1.Size = New System.Drawing.Size(248, 321)
+ Me.EmptySpaceItem1.Size = New System.Drawing.Size(248, 300)
Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0)
'
'DockPanelMetadata
@@ -845,7 +845,7 @@ Partial Class frmDocumentResultList
resources.ApplyResources(Me.DockPanelMetadata, "DockPanelMetadata")
Me.DockPanelMetadata.Name = "DockPanelMetadata"
Me.DockPanelMetadata.Options.ShowCloseButton = False
- Me.DockPanelMetadata.OriginalSize = New System.Drawing.Size(280, 200)
+ Me.DockPanelMetadata.OriginalSize = New System.Drawing.Size(268, 434)
'
'DockPanel3_Container
'
@@ -883,9 +883,9 @@ Partial Class frmDocumentResultList
Me.AllowFormGlass = DevExpress.Utils.DefaultBoolean.[True]
resources.ApplyResources(Me, "$this")
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.Controls.Add(Me.DockPanelFileList)
Me.Controls.Add(Me.DockPanelDocViewer)
Me.Controls.Add(Me.panelContainer1)
- Me.Controls.Add(Me.DockPanelFileList)
Me.Controls.Add(Me.RibbonStatusBar)
Me.Controls.Add(Me.RibbonControl)
Me.IconOptions.Icon = CType(resources.GetObject("frmDocumentResultList.IconOptions.Icon"), System.Drawing.Icon)
diff --git a/GUIs.Common/frmDocumentResultList.resx b/GUIs.Common/frmDocumentResultList.resx
index fa4484e5..f7aaa212 100644
--- a/GUIs.Common/frmDocumentResultList.resx
+++ b/GUIs.Common/frmDocumentResultList.resx
@@ -489,6 +489,49 @@
1189, 671
+
+ 3, 46
+
+
+ 578, 442
+
+
+
+ 0
+
+
+ DockPanel2_Container
+
+
+ DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+
+ DockPanelFileList
+
+
+ 0
+
+
+ 0, 158
+
+
+ 585, 491
+
+
+ Ergebnisse
+
+
+ DockPanelFileList
+
+
+ DevExpress.XtraBars.Docking.DockPanel, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+
+ $this
+
+
+ 0
+
Fill
@@ -496,9 +539,8 @@
0, 0
- 323, 459
+ 323, 441
-
0
@@ -515,10 +557,10 @@
0
- 3, 26
+ 3, 46
- 323, 459
+ 323, 441
0
@@ -539,7 +581,7 @@
585, 158
- 329, 489
+ 329, 491
Vorschau
@@ -554,7 +596,7 @@
$this
- 0
+ 1
162, 45
@@ -584,10 +626,10 @@
162, 69
-
+
Combo
-
+
Combo
@@ -624,7 +666,7 @@
In Bearbeitung
- 268, 434
+ 268, 413
0
@@ -648,7 +690,7 @@
0, 0
- 268, 434
+ 268, 413
0
@@ -666,10 +708,10 @@
0
- 4, 26
+ 4, 46
- 268, 434
+ 268, 413
Status
@@ -693,7 +735,7 @@
0, 0
- 268, 434
+ 268, 413
0
@@ -714,7 +756,7 @@
0, 0
- 268, 434
+ 268, 413
0
@@ -732,10 +774,10 @@
0
- 4, 26
+ 4, 46
- 268, 434
+ 268, 413
Eigenschaften
@@ -756,7 +798,7 @@
914, 158
- 275, 489
+ 275, 491
panelContainer1
@@ -771,55 +813,13 @@
$this
- 1
-
-
- 3, 26
-
-
- 578, 460
-
-
- 0
-
-
- DockPanel2_Container
-
-
- DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-
-
- DockPanelFileList
-
-
- 0
-
-
- 0, 158
-
-
- 585, 489
-
-
- Ergebnisse
-
-
- DockPanelFileList
-
-
- DevExpress.XtraBars.Docking.DockPanel, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-
-
- $this
-
-
2
- 0, 647
+ 0, 649
- 1189, 24
+ 1189, 22
RibbonStatusBar
@@ -1421,7 +1421,7 @@
4
- 568, 460
+ 568, 442
0
@@ -1592,7 +1592,7 @@
1
- 578, 460
+ 578, 442
2
diff --git a/GUIs.Test.EDMIBenchmark/My Project/licenses.licx b/GUIs.Test.EDMIBenchmark/My Project/licenses.licx
index e69de29b..bed065c1 100644
--- a/GUIs.Test.EDMIBenchmark/My Project/licenses.licx
+++ b/GUIs.Test.EDMIBenchmark/My Project/licenses.licx
@@ -0,0 +1,5 @@
+DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraBars.Docking2010.DocumentManager, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
diff --git a/GUIs.Test.GUI_EDMI/My Project/licenses.licx b/GUIs.Test.GUI_EDMI/My Project/licenses.licx
index e69de29b..773d16c2 100644
--- a/GUIs.Test.GUI_EDMI/My Project/licenses.licx
+++ b/GUIs.Test.GUI_EDMI/My Project/licenses.licx
@@ -0,0 +1 @@
+DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
diff --git a/GUIs.ZooFlow/frmtest.Designer.vb b/GUIs.ZooFlow/frmtest.Designer.vb
index cdfb0c7a..7c2d4d63 100644
--- a/GUIs.ZooFlow/frmtest.Designer.vb
+++ b/GUIs.ZooFlow/frmtest.Designer.vb
@@ -75,7 +75,7 @@ Partial Class frmtest
Me.btnNewFile.Name = "btnNewFile"
Me.btnNewFile.Size = New System.Drawing.Size(187, 23)
Me.btnNewFile.TabIndex = 17
- Me.btnNewFile.Text = "NewFile"
+ Me.btnNewFile.Text = "ImportFile (IDB/FileImporter)"
Me.btnNewFile.UseVisualStyleBackColor = True
'
'Label4
diff --git a/GUIs.ZooFlow/frmtest.vb b/GUIs.ZooFlow/frmtest.vb
index 8eac2c6a..1a30aee0 100644
--- a/GUIs.ZooFlow/frmtest.vb
+++ b/GUIs.ZooFlow/frmtest.vb
@@ -2,8 +2,6 @@
Imports DigitalData.Modules.Base.IDB.FileStore
Public Class frmtest
-
-
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
cmbObjectStoreType.SelectedIndex = 0
End Sub
@@ -15,23 +13,33 @@ Public Class frmtest
End Sub
Private Async Sub btnNewFile_Click(sender As Object, e As EventArgs) Handles btnNewFile.Click
- Dim oObjectId As Long = Await My.Application.Service.Client.NewFileAsync(
+ Dim oResponse As ImportFileResponse = Await My.Application.Service.Client.ImportFileAsync(
txtFile2Import.Text,
- "WORK",
+ New List(Of UserAttributeValue) From {
+ New UserAttributeValue With {
+ .Name = "Attribut String1",
+ .Values = New List(Of String) From {"Harry"}.ToArray
+ },
+ New UserAttributeValue With {
+ .Name = "DisplayFileName",
+ .Values = New List(Of String) From {"DN Textdokument"}.ToArray
+ }
+ },
+ "Work",
"DOC",
- "DEFAULT"
+ txtDoctypeID.Text
)
- If oObjectId <> FILE_STORE_INVALID_OBEJCT_ID Then
+ If oResponse.OK Then
MsgBox("File Imported!", MsgBoxStyle.Information, Text)
+ txtIDB_OBJ_ID.Text = oResponse.ObjectId
Else
- MsgBox("File was not imported. Check the server logs!")
+ MsgBox("File was not imported. Check the server logs!", MsgBoxStyle.Critical, Text)
End If
- txtIDB_OBJ_ID.Text = oObjectId
End Sub
Private Async Sub btnImportFile_Click_(sender As Object, e As EventArgs) Handles btnImportFile.Click
- Dim oResponse As ImportFileResponse = Await My.Application.Service.Client.Globix_ImportFileAsync(
+ Dim oResponse As Globix_ImportFileResponse = Await My.Application.Service.Client.Globix_ImportFileAsync(
txtFile2Import.Text,
txtProfileId.Text,
New List(Of UserAttributeValue) From {
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 1ca263ef..e1de3685 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
@@ -7,7 +7,7 @@
-
+
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd
index 69dc834c..d602e42f 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd
@@ -7,7 +7,7 @@
-
+
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
index 92d8bf53..0dd8738a 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
@@ -2372,7 +2372,7 @@ Namespace EDMIServiceReference
Private FileField As EDMIServiceReference.FileProperties
_
- Private IDBDoctypeIdField As String
+ Private IDBDoctypeIdField As Long
_
Private KindTypeField As String
@@ -2423,12 +2423,12 @@ Namespace EDMIServiceReference
End Property
_
- Public Property IDBDoctypeId() As String
+ Public Property IDBDoctypeId() As Long
Get
Return Me.IDBDoctypeIdField
End Get
Set
- If (Object.ReferenceEquals(Me.IDBDoctypeIdField, value) <> true) Then
+ If (Me.IDBDoctypeIdField.Equals(value) <> true) Then
Me.IDBDoctypeIdField = value
Me.RaisePropertyChanged("IDBDoctypeId")
End If
@@ -2516,7 +2516,7 @@ Namespace EDMIServiceReference
Private FileField As EDMIServiceReference.FileProperties
_
- Private IDBDoctypeIdField As String
+ Private IDBDoctypeIdField As Long
_
Private KindTypeField As String
@@ -2567,12 +2567,12 @@ Namespace EDMIServiceReference
End Property
_
- Public Property IDBDoctypeId() As String
+ Public Property IDBDoctypeId() As Long
Get
Return Me.IDBDoctypeIdField
End Get
Set
- If (Object.ReferenceEquals(Me.IDBDoctypeIdField, value) <> true) Then
+ If (Me.IDBDoctypeIdField.Equals(value) <> true) Then
Me.IDBDoctypeIdField = value
Me.RaisePropertyChanged("IDBDoctypeId")
End If
diff --git a/Modules.EDMIAPI/Helpers.vb b/Modules.EDMIAPI/Helpers.vb
index 6e503014..65ce1b6d 100644
--- a/Modules.EDMIAPI/Helpers.vb
+++ b/Modules.EDMIAPI/Helpers.vb
@@ -3,17 +3,18 @@ Imports DigitalData.Modules.Logging
Public Class Helpers
- Private ReadOnly LogConfig As LogConfig
- Private ReadOnly Logger As Logger
- Private ReadOnly FileEx As Filesystem.File
+ Private ReadOnly LogConfig As LogConfig
+ Private ReadOnly Logger As Logger
+ Private ReadOnly FileEx As Filesystem.File
- Public Sub New(pLogConfig As LogConfig)
- LogConfig = pLogConfig
- Logger = pLogConfig.GetLogger()
- FileEx = New Filesystem.File(pLogConfig)
- End Sub
+ Public Sub New(pLogConfig As LogConfig)
+ LogConfig = pLogConfig
+ Logger = pLogConfig.GetLogger()
+ FileEx = New Filesystem.File(pLogConfig)
+ End Sub
- Public Function GetFileProperties(pFilePath As String, pDateImportedAt As Date) As FileProperties
+ Public Function GetFileProperties(pFilePath As String, pDateImportedAt As Date) As FileProperties
+ Try
Using oFileStream As New IO.FileStream(pFilePath, IO.FileMode.Open, IO.FileAccess.Read)
Using oMemoryStream As New IO.MemoryStream()
oFileStream.CopyTo(oMemoryStream)
@@ -27,16 +28,21 @@ Public Class Helpers
Dim oFileModifiedAt As Date = oFileInfo?.LastWriteTime
Dim oFileHash As String = FileEx.GetChecksum(oFileInfo.FullName)
- Return New FileProperties With {
- .FileName = oFileInfo.Name,
- .FileCreatedAt = oFileCreatedAt,
- .FileChangedAt = oFileModifiedAt,
- .FileContents = oContents,
- .FileImportedAt = pDateImportedAt,
- .FileChecksum = oFileHash,
- .FileInfoRaw = oFileInfo
+ Return New FileProperties With {
+ .FileName = oFileInfo.Name,
+ .FileCreatedAt = oFileCreatedAt,
+ .FileChangedAt = oFileModifiedAt,
+ .FileContents = oContents,
+ .FileImportedAt = pDateImportedAt,
+ .FileChecksum = oFileHash,
+ .FileInfoRaw = oFileInfo
}
+ End Using
End Using
- End Using
- End Function
- End Class
+ Catch ex As Exception
+ Logger.Error(ex)
+ Return Nothing
+ End Try
+ End Function
+End Class
+
diff --git a/Modules.EDMIAPI/Modules/Globix/ImportFile.vb b/Modules.EDMIAPI/Modules/Globix/ImportFile.vb
index 1af79d5c..d5f60477 100644
--- a/Modules.EDMIAPI/Modules/Globix/ImportFile.vb
+++ b/Modules.EDMIAPI/Modules/Globix/ImportFile.vb
@@ -28,47 +28,32 @@ Namespace Modules.Globix
Throw New FileNotFoundException("Path does not exist")
End If
- Dim oFileInfo As New FileInfo(pFilePath)
- Dim oExtension As String = oFileInfo.Extension
-
- Dim oFileName As String = oFileInfo.Name
- Dim oFileCreatedAt As Date = oFileInfo?.CreationTime
- Dim oFileModifiedAt As Date = oFileInfo?.LastWriteTime
- Dim oFileHash As String = FileEx.GetChecksum(oFileInfo.FullName)
+ ' Try to load file properties
+ Dim oFileProperties = Helpers.GetFileProperties(pFilePath, pImportOptions.DateImported)
+ If oFileProperties Is Nothing Then
+ Throw New IOException("File could not be read!")
+ End If
' Importing the file now
- Using oFileStream As New FileStream(pFilePath, FileMode.Open, FileAccess.Read)
- Using oMemoryStream As New MemoryStream()
- oFileStream.CopyTo(oMemoryStream)
- Dim oContents = oMemoryStream.ToArray()
+ Dim oFileImportResponse = Await Channel.Globix_ImportFileAsync(New Globix_ImportFileRequest With {
+ .IDBDoctypeId = pIDBDoctypeId,
+ .File = oFileProperties,
+ .KindType = pObjectKind,
+ .StoreName = pObjectStoreName,
+ .User = New UserState() With {
+ .UserName = pImportOptions.Username,
+ .Language = pImportOptions.Language
+ },
+ .ProfileId = pProfileId,
+ .AttributeValues = pAttributeValues.ToArray
+ })
- Dim oFileImportResponse = Await Channel.Globix_ImportFileAsync(New Globix_ImportFileRequest With {
- .IDBDoctypeId = pIDBDoctypeId,
- .File = New FileProperties With {
- .FileName = oFileInfo.Name,
- .FileCreatedAt = oFileCreatedAt,
- .FileChangedAt = oFileModifiedAt,
- .FileContents = oContents,
- .FileImportedAt = pImportOptions.DateImported,
- .FileChecksum = oFileHash,
- .FileInfoRaw = oFileInfo
- },
- .KindType = pObjectKind,
- .StoreName = pObjectStoreName,
- .User = New UserState() With {
- .UserName = pImportOptions.Username,
- .Language = pImportOptions.Language
- },
- .ProfileId = pProfileId,
- .AttributeValues = pAttributeValues.ToArray
- })
+ Return oFileImportResponse
- Return oFileImportResponse
- End Using
- End Using
Catch ex As Exception
Logger.Error(ex)
Return Nothing
+
End Try
End Function
End Class
diff --git a/Modules.EDMIAPI/Modules/IDB/ImportFile.vb b/Modules.EDMIAPI/Modules/IDB/ImportFile.vb
index 60921fe0..b7891e59 100644
--- a/Modules.EDMIAPI/Modules/IDB/ImportFile.vb
+++ b/Modules.EDMIAPI/Modules/IDB/ImportFile.vb
@@ -27,47 +27,32 @@ Namespace Modules.IDB
Throw New FileNotFoundException("Path does not exist")
End If
- Dim oFileInfo As New FileInfo(pFilePath)
- Dim oExtension As String = oFileInfo.Extension
-
- Dim oFileName As String = oFileInfo.Name
- Dim oFileCreatedAt As Date = oFileInfo?.CreationTime
- Dim oFileModifiedAt As Date = oFileInfo?.LastWriteTime
- Dim oFileHash As String = FileEx.GetChecksum(oFileInfo.FullName)
+ ' Try to load file properties
+ Dim oFileProperties = Helpers.GetFileProperties(pFilePath, pImportOptions.DateImported)
+ If oFileProperties Is Nothing Then
+ Throw New IOException("File could not be read!")
+ End If
' Importing the file now
- Using oFileStream As New FileStream(pFilePath, FileMode.Open, FileAccess.Read)
- Using oMemoryStream As New MemoryStream()
- oFileStream.CopyTo(oMemoryStream)
- Dim oContents = oMemoryStream.ToArray()
+ Dim oFileImportResponse = Await Channel.ImportFileAsync(New ImportFileRequest With {
+ .IDBDoctypeId = pIDBDoctypeId,
+ .File = oFileProperties,
+ .KindType = pObjectKind,
+ .StoreName = pObjectStoreName,
+ .User = New UserState() With {
+ .UserName = pImportOptions.Username,
+ .Language = pImportOptions.Language
+ },
+ .ProfileId = -1,
+ .AttributeValues = pAttributeValues.ToArray
+ })
- Dim oFileImportResponse = Await Channel.ImportFileAsync(New ImportFileRequest With {
- .IDBDoctypeId = pIDBDoctypeId,
- .File = New FileProperties With {
- .FileName = oFileInfo.Name,
- .FileCreatedAt = oFileCreatedAt,
- .FileChangedAt = oFileModifiedAt,
- .FileContents = oContents,
- .FileImportedAt = pImportOptions.DateImported,
- .FileChecksum = oFileHash,
- .FileInfoRaw = oFileInfo
- },
- .KindType = pObjectKind,
- .StoreName = pObjectStoreName,
- .User = New UserState() With {
- .UserName = pImportOptions.Username,
- .Language = pImportOptions.Language
- },
- .ProfileId = -1,
- .AttributeValues = pAttributeValues.ToArray
- })
+ Return oFileImportResponse
- Return oFileImportResponse
- End Using
- End Using
Catch ex As Exception
Logger.Error(ex)
Return Nothing
+
End Try
End Function
End Class
diff --git a/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileRequest.vb b/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileRequest.vb
index 47eddc81..42197374 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 Document Type of the file, ex. IncomingInvoice
+ ''' The Document Type, ex. 1
'''
- Public Property IDBDoctypeId As String
+ Public Property IDBDoctypeId As Long
'''
''' The kind of object to be created, ex. DOC
diff --git a/Service.EDMIService/Methods/IDB/ImportFile/ImportFileRequest.vb b/Service.EDMIService/Methods/IDB/ImportFile/ImportFileRequest.vb
index 8cfbe243..3d52115e 100644
--- a/Service.EDMIService/Methods/IDB/ImportFile/ImportFileRequest.vb
+++ b/Service.EDMIService/Methods/IDB/ImportFile/ImportFileRequest.vb
@@ -22,7 +22,7 @@ Namespace Methods.IDB.ImportFile
''' The Document Type of the file, ex. IncomingInvoice
'''
- Public Property IDBDoctypeId As String
+ Public Property IDBDoctypeId As Long
'''
''' 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 394ff7c9..6d2f924a 100644
--- a/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb
+++ b/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb
@@ -18,12 +18,12 @@ Namespace Methods.IDB.NewFile
Transaction = Connection.BeginTransaction()
End Sub
- Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse
+ Public Function Run(pData As NewFileRequest) As NewFileResponse
Dim oFilePath As String = Nothing
Dim oExistingObjectId = Helpers.TestFileChecksumExists(pData.File.FileChecksum)
If oExistingObjectId > 0 Then
- Return New NewFile.NewFileResponse(oExistingObjectId)
+ Return New NewFileResponse(oExistingObjectId)
End If
Try
@@ -134,7 +134,8 @@ Namespace Methods.IDB.NewFile
' Finally, commit the transaction
Transaction?.Commit()
- Return New NewFile.NewFileResponse(oObjectId)
+ Return New NewFileResponse(oObjectId)
+
Catch ex As Exception
Logger.Warn("Error occurred while creating file!")
Logger.Error(ex)
@@ -152,7 +153,7 @@ Namespace Methods.IDB.NewFile
Logger.Info("Rolling back transaction.")
Transaction?.Rollback()
- Return New NewFile.NewFileResponse(ex)
+ Return New NewFileResponse(ex)
End Try
End Function
diff --git a/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb b/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb
index d3ea4733..0ec871ec 100644
--- a/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb
+++ b/Service.EDMIService/Methods/IDB/NewFile/NewFileRequest.vb
@@ -15,7 +15,7 @@ Namespace Methods.IDB.NewFile
Public Property StoreName As String
'''
- ''' The business entity of the file, ex DEFAULT
+ ''' The Document Id of the file, ex. 1
'''
Public Property IDBDoctypeId As Long
diff --git a/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb b/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb
index d1edfd2b..bdea2b2d 100644
--- a/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb
+++ b/Service.EDMIService/Methods/IDB/UpdateFile/UpdateFileMethod.vb
@@ -72,18 +72,18 @@ Namespace Methods.IDB.UpdateFile
Dim oObjectTable = DatabaseIDB.GetDatatable($"Select * FROM VWIDB_OBJECT WHERE IDB_OBJ_ID = {pData.ObjectId}")
Dim oObjectRow As DataRow = oObjectTable.Rows.Item(0)
Dim oKind As String = oObjectRow.Item("KIND_NAME")
- Dim oBusinessEntity As String = oObjectRow.Item("BE_NAME")
+ Dim oDocumentTypeId As String = oObjectRow.Item("Doctype_ID")
Dim oStore As String = oObjectRow.Item("STORE_NAME")
Logger.Debug("Getting information for ObjectId [{0}]", pData.ObjectId)
+ Logger.Debug("DocumentType: [{0}]", oDocumentTypeId)
Logger.Debug("Kind: [{0}]", oKind)
- Logger.Debug("BE: [{0}]", oBusinessEntity)
Logger.Debug("Store: [{0}]", oStore)
Dim oNewFileMethod As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState)
Dim oNewFileRequest As New NewFile.NewFileRequest With {
.File = pData.File,
- .IDBDoctypeId = oBusinessEntity,
+ .IDBDoctypeId = oDocumentTypeId,
.KindType = oKind,
.StoreName = oStore,
.User = pData.User