diff --git a/EDMI.File/Path.vb b/EDMI.File/Path.vb
index de043ed8..ce701e4f 100644
--- a/EDMI.File/Path.vb
+++ b/EDMI.File/Path.vb
@@ -16,26 +16,42 @@ Public Class Path
_BasePath = DatastoreBasePath
End Sub
- Public Function GetActivePath(DocumentType As String, Optional FileName As String = "")
- Dim oPathParts As New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE}
- oPathParts.AddRange(GetRelativePath(DocumentType, FileName))
+ Public Function GetActivePath(DocumentType As String, Optional FileName As String = "") As String
+ Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE}
+ oParts.AddRange(Do_GetRelativePath(DocumentType, FileName))
- Return IO.Path.Combine(oPathParts.ToArray())
+ Return IO.Path.Combine(oParts.ToArray())
End Function
- Public Function GetArchivePath(DocumentType As String, Optional FileName As String = "")
- Dim oPathParts As New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE}
- oPathParts.AddRange(GetRelativePath(DocumentType, FileName))
-
- Return IO.Path.Combine(oPathParts.ToArray())
+ Public Function GetActivePathFromRelativePath(RelativePath As String) As String
+ Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE}
+ oParts.Add(RelativePath)
+ Return IO.Path.Combine(oParts.ToArray)
End Function
- Public Function GetRelativePath(DocumentType As String, Optional FileName As String = "")
+ Public Function GetArchivePath(DocumentType As String, Optional FileName As String = "") As String
+ Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE}
+ oParts.AddRange(Do_GetRelativePath(DocumentType, FileName))
+
+ Return IO.Path.Combine(oParts.ToArray())
+ End Function
+
+ Public Function GetArchivePathFromRelativePath(RelativePath As String) As String
+ Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE}
+ oParts.Add(RelativePath)
+ Return IO.Path.Combine(oParts.ToArray)
+ End Function
+
+ Public Function GetRelativePath(DocumentType As String, Optional FileName As String = "") As String
+ Return IO.Path.Combine(Do_GetRelativePath(DocumentType, FileName).ToArray)
+ End Function
+
+ Private Function Do_GetRelativePath(DocumentType As String, Optional FileName As String = "") As List(Of String)
Dim oPathParts As New List(Of String) From {DocumentType}
oPathParts.AddRange(GetDatePath())
oPathParts.Add(FileName)
- Return IO.Path.Combine(oPathParts.ToArray())
+ Return oPathParts
End Function
Private Function GetDatePath() As List(Of String)
diff --git a/GUIs.Test.EDMIBenchmark/Form1.Designer.vb b/GUIs.Test.EDMIBenchmark/Form1.Designer.vb
index c05e79ed..ac9e125c 100644
--- a/GUIs.Test.EDMIBenchmark/Form1.Designer.vb
+++ b/GUIs.Test.EDMIBenchmark/Form1.Designer.vb
@@ -29,9 +29,12 @@ Partial Class Form1
Me.ButtonImportFiles = New DevExpress.XtraBars.BarButtonItem()
Me.buttonClearLog = New DevExpress.XtraBars.BarButtonItem()
Me.buttonClearFiles = New DevExpress.XtraBars.BarButtonItem()
+ Me.TextboxObejctId = New DevExpress.XtraBars.BarEditItem()
+ Me.RepositoryItemTextEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit()
+ Me.ButtonLoadFile = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
- Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
+ Me.RibbonPageGroup4 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
@@ -40,9 +43,10 @@ Partial Class Form1
Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl()
Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage()
- Me.listboxFileids = New DevExpress.XtraEditors.ListBoxControl()
+ Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer()
CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.SuspendLayout()
CType(Me.listboxLog, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -50,7 +54,6 @@ Partial Class Form1
Me.XtraTabControl1.SuspendLayout()
Me.XtraTabPage1.SuspendLayout()
Me.XtraTabPage2.SuspendLayout()
- CType(Me.listboxFileids, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'listboxFiles
@@ -64,11 +67,12 @@ Partial Class Form1
'RibbonControl1
'
Me.RibbonControl1.ExpandCollapseItem.Id = 0
- Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles})
+ Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles, Me.TextboxObejctId, Me.ButtonLoadFile})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
- Me.RibbonControl1.MaxItemId = 5
+ Me.RibbonControl1.MaxItemId = 7
Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
+ Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1})
Me.RibbonControl1.Size = New System.Drawing.Size(1145, 158)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
'
@@ -100,30 +104,51 @@ Partial Class Form1
Me.buttonClearFiles.ImageOptions.SvgImage = CType(resources.GetObject("buttonClearFiles.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.buttonClearFiles.Name = "buttonClearFiles"
'
+ 'TextboxObejctId
+ '
+ Me.TextboxObejctId.Caption = "Document Id"
+ Me.TextboxObejctId.Edit = Me.RepositoryItemTextEdit1
+ Me.TextboxObejctId.EditWidth = 100
+ Me.TextboxObejctId.Id = 5
+ Me.TextboxObejctId.Name = "TextboxObejctId"
+ '
+ 'RepositoryItemTextEdit1
+ '
+ Me.RepositoryItemTextEdit1.AutoHeight = False
+ Me.RepositoryItemTextEdit1.Name = "RepositoryItemTextEdit1"
+ '
+ 'ButtonLoadFile
+ '
+ Me.ButtonLoadFile.Caption = "Load File"
+ Me.ButtonLoadFile.Id = 6
+ Me.ButtonLoadFile.Name = "ButtonLoadFile"
+ '
'RibbonPage1
'
- Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroup3})
+ Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup4, Me.RibbonPageGroup3})
Me.RibbonPage1.Name = "RibbonPage1"
- Me.RibbonPage1.Text = "Import Files"
+ Me.RibbonPage1.Text = "Start"
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.ItemLinks.Add(Me.ButtonSelectFiles)
+ Me.RibbonPageGroup1.ItemLinks.Add(Me.ButtonImportFiles)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
- Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
+ Me.RibbonPageGroup1.Text = "Import"
'
- 'RibbonPageGroup2
+ 'RibbonPageGroup4
'
- Me.RibbonPageGroup2.ItemLinks.Add(Me.ButtonImportFiles)
- Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
- Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
+ Me.RibbonPageGroup4.ItemLinks.Add(Me.TextboxObejctId)
+ Me.RibbonPageGroup4.ItemLinks.Add(Me.ButtonLoadFile)
+ Me.RibbonPageGroup4.Name = "RibbonPageGroup4"
+ Me.RibbonPageGroup4.Text = "Retrieve"
'
'RibbonPageGroup3
'
- Me.RibbonPageGroup3.ItemLinks.Add(Me.buttonClearLog)
+ Me.RibbonPageGroup3.ItemLinks.Add(Me.buttonClearLog, True)
Me.RibbonPageGroup3.ItemLinks.Add(Me.buttonClearFiles)
Me.RibbonPageGroup3.Name = "RibbonPageGroup3"
- Me.RibbonPageGroup3.Text = "RibbonPageGroup3"
+ Me.RibbonPageGroup3.Text = "Utils"
'
'RibbonStatusBar1
'
@@ -173,22 +198,22 @@ Partial Class Form1
Me.XtraTabPage1.Controls.Add(Me.SplitContainerControl1)
Me.XtraTabPage1.Name = "XtraTabPage1"
Me.XtraTabPage1.Size = New System.Drawing.Size(1143, 270)
- Me.XtraTabPage1.Text = "XtraTabPage1"
+ Me.XtraTabPage1.Text = "Information"
'
'XtraTabPage2
'
- Me.XtraTabPage2.Controls.Add(Me.listboxFileids)
+ Me.XtraTabPage2.Controls.Add(Me.DocumentViewer1)
Me.XtraTabPage2.Name = "XtraTabPage2"
Me.XtraTabPage2.Size = New System.Drawing.Size(1143, 270)
- Me.XtraTabPage2.Text = "XtraTabPage2"
+ Me.XtraTabPage2.Text = "DocumentViewer"
'
- 'listboxFileids
+ 'DocumentViewer1
'
- Me.listboxFileids.Dock = System.Windows.Forms.DockStyle.Left
- Me.listboxFileids.Location = New System.Drawing.Point(0, 0)
- Me.listboxFileids.Name = "listboxFileids"
- Me.listboxFileids.Size = New System.Drawing.Size(278, 270)
- Me.listboxFileids.TabIndex = 0
+ Me.DocumentViewer1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0)
+ Me.DocumentViewer1.Name = "DocumentViewer1"
+ Me.DocumentViewer1.Size = New System.Drawing.Size(1143, 270)
+ Me.DocumentViewer1.TabIndex = 0
'
'Form1
'
@@ -204,6 +229,7 @@ Partial Class Form1
Me.Text = "Form1"
CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl1.ResumeLayout(False)
CType(Me.listboxLog, System.ComponentModel.ISupportInitialize).EndInit()
@@ -211,7 +237,6 @@ Partial Class Form1
Me.XtraTabControl1.ResumeLayout(False)
Me.XtraTabPage1.ResumeLayout(False)
Me.XtraTabPage2.ResumeLayout(False)
- CType(Me.listboxFileids, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -220,7 +245,6 @@ Partial Class Form1
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
- Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents ButtonSelectFiles As DevExpress.XtraBars.BarButtonItem
@@ -232,6 +256,10 @@ Partial Class Form1
Friend WithEvents buttonClearFiles As DevExpress.XtraBars.BarButtonItem
Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl
Friend WithEvents XtraTabPage1 As DevExpress.XtraTab.XtraTabPage
+ Friend WithEvents TextboxObejctId As DevExpress.XtraBars.BarEditItem
+ Friend WithEvents RepositoryItemTextEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
+ Friend WithEvents ButtonLoadFile As DevExpress.XtraBars.BarButtonItem
+ Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage
- Friend WithEvents listboxFileids As DevExpress.XtraEditors.ListBoxControl
+ Friend WithEvents DocumentViewer1 As DigitalData.Controls.DocumentViewer.DocumentViewer
End Class
diff --git a/GUIs.Test.EDMIBenchmark/Form1.vb b/GUIs.Test.EDMIBenchmark/Form1.vb
index f6df2a78..2e95f562 100644
--- a/GUIs.Test.EDMIBenchmark/Form1.vb
+++ b/GUIs.Test.EDMIBenchmark/Form1.vb
@@ -15,6 +15,8 @@ Public Class Form1
"net.tcp://172.24.12.39:9000/DigitalData/Services/Main")
_Channel = oChannelFactory.CreateChannel()
_Channel.Open()
+
+ DocumentViewer1.Init(oLogConfig, "21182889975216572111813147150675976632")
End Sub
Private Sub ButtonSelectFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonSelectFiles.ItemClick
@@ -53,7 +55,6 @@ Public Class Form1
Dim oResult As EDMIServiceReference.DocumentResult2 = Await _Channel.ImportFileAsync(oFileInfo.Name, oContents, Environment.UserName)
If oResult.OK Then
listboxLog.Items.Add($"File [{oFileInfo.Name}] with Id [{oResult.Document.FileId}] imported!")
- listboxFileids.Items.Add(oResult.Document.FileId)
Else
listboxLog.Items.Add($"Import Error: {oResult.ErrorMessage}")
End If
@@ -111,4 +112,25 @@ Public Class Form1
End Try
End Function
+
+ Private Async Sub ButtonLoadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonLoadFile.ItemClick
+ Try
+ If TextboxObejctId.EditValue = "" Then
+ MsgBox("Please enter an object id!", MsgBoxStyle.Exclamation, "Uh oh!")
+ End If
+
+ Dim oObjectId As Integer = TextboxObejctId.EditValue
+
+ Dim oStream = Await _Channel.GetFileByObjectIdAsync(oObjectId)
+ Dim oMemoryStream As New MemoryStream()
+ oStream.CopyTo(oMemoryStream)
+ oMemoryStream.Position = 0
+
+ listboxLog.Items.Add("Stream read!")
+
+ DocumentViewer1.LoadFile("textfile.png", oMemoryStream)
+ Catch ex As Exception
+ MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!")
+ End Try
+ End Sub
End Class
diff --git a/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj b/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj
index 7b567b30..f94cc8cb 100644
--- a/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj
+++ b/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj
@@ -57,6 +57,12 @@
..\Controls.DocumentViewer\obj\Debug\DigitalData.Controls.DocumentViewer.dll
+
+ D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll
+
+
+ P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\22_11_19\Independentsoft.Msg.dll
+
..\packages\NLog.4.7.0\lib\net45\NLog.dll
@@ -142,6 +148,10 @@
+
+ {0958cddf-4a16-41f6-8837-8335f71d599c}
+ DocumentViewer
+
{25017513-0d97-49d3-98d7-ba76d9b251b0}
EDMI.API
diff --git a/GUIs.Test.EDMIBenchmark/My Project/licenses.licx b/GUIs.Test.EDMIBenchmark/My Project/licenses.licx
index 3f51afe8..e29ff0b5 100644
--- a/GUIs.Test.EDMIBenchmark/My Project/licenses.licx
+++ b/GUIs.Test.EDMIBenchmark/My Project/licenses.licx
@@ -1 +1,2 @@
+DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
diff --git a/Modules.EDMIAPI/Channel.vb b/Modules.EDMIAPI/Channel.vb
index 21022dcd..8520bc60 100644
--- a/Modules.EDMIAPI/Channel.vb
+++ b/Modules.EDMIAPI/Channel.vb
@@ -8,7 +8,7 @@ Public Class Channel
.MaxBufferSize = Constants.MAX_BUFFER_SIZE,
.MaxBufferPoolSize = Constants.MAX_BUFFER_POOL_SIZE,
.MaxConnections = Constants.MAX_CONNECTIONS,
- .TransferMode = TransferMode.Buffered,
+ .TransferMode = TransferMode.Streamed,
.Security = New NetTcpSecurity() With {
.Mode = SecurityMode.Transport,
.Transport = New TcpTransportSecurity() With {
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl
index 60584846..86e0dafe 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl
@@ -8,6 +8,7 @@
+
@@ -88,6 +89,12 @@
+
+
+
+
+
+
@@ -147,6 +154,10 @@
+
+
+
+
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd
index a6517bc3..c0472c46 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd
@@ -2,6 +2,7 @@
+
@@ -183,10 +184,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -196,7 +211,7 @@
-
+
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd
new file mode 100644
index 00000000..6a19fc3f
--- /dev/null
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap
index 3b8b7529..19190ce7 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap
@@ -30,6 +30,7 @@
+
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
index 9fea810d..c53993cf 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
@@ -507,6 +507,12 @@ Namespace EDMIServiceReference
_
Function ImportFileAsync(ByVal FileName As String, ByVal Contents() As Byte, ByVal AddedWho As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult2)
+ _
+ Function GetFileByObjectId(ByVal ObjectId As Long) As System.IO.Stream
+
+ _
+ Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of System.IO.Stream)
+
_
Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult
@@ -649,6 +655,14 @@ Namespace EDMIServiceReference
Return MyBase.Channel.ImportFileAsync(FileName, Contents, AddedWho)
End Function
+ Public Function GetFileByObjectId(ByVal ObjectId As Long) As System.IO.Stream Implements EDMIServiceReference.IEDMIService.GetFileByObjectId
+ Return MyBase.Channel.GetFileByObjectId(ObjectId)
+ End Function
+
+ Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of System.IO.Stream) Implements EDMIServiceReference.IEDMIService.GetFileByObjectIdAsync
+ Return MyBase.Channel.GetFileByObjectIdAsync(ObjectId)
+ End Function
+
Public Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult Implements EDMIServiceReference.IEDMIService.NewFileIndex
Return MyBase.Channel.NewFileIndex(DocObject, Syskey, LanguageCode, Value)
End Function
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo
index 7ea472c2..4dc839d7 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo
@@ -2,7 +2,7 @@
-
+
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo
index 84310bc2..12c40947 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo
@@ -1,5 +1,5 @@
-
+
@@ -21,8 +21,8 @@
False
-
- Buffered
+
+ Streamed
OleTransactions
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl
index 1c267d7c..4129ded6 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl
@@ -28,6 +28,8 @@
+
+
@@ -156,6 +158,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/Modules.EDMIAPI/EDMI.API.vbproj b/Modules.EDMIAPI/EDMI.API.vbproj
index 0f340797..6c44daa7 100644
--- a/Modules.EDMIAPI/EDMI.API.vbproj
+++ b/Modules.EDMIAPI/EDMI.API.vbproj
@@ -134,6 +134,9 @@
Designer
+
+ Designer
+
Designer
diff --git a/Modules.EDMIAPI/app.config b/Modules.EDMIAPI/app.config
index 8da9bc40..9de6fa5b 100644
--- a/Modules.EDMIAPI/app.config
+++ b/Modules.EDMIAPI/app.config
@@ -25,7 +25,7 @@
-
+
diff --git a/Service.EDMIService/App.config b/Service.EDMIService/App.config
index 85cbdc9f..8c1bd90e 100644
--- a/Service.EDMIService/App.config
+++ b/Service.EDMIService/App.config
@@ -50,7 +50,7 @@
diff --git a/Service.EDMIService/EDMIService.vb b/Service.EDMIService/EDMIService.vb
index 7d13f7bf..d1e10899 100644
--- a/Service.EDMIService/EDMIService.vb
+++ b/Service.EDMIService/EDMIService.vb
@@ -304,7 +304,7 @@ Public Class EDMIService
Public Function ImportFile(FileName As String, Contents() As Byte, AddedWho As String) As DocumentResult2 Implements IEDMIService.ImportFile
Dim oDocumentType As String = "DummyDocumentType"
Dim oRelativePath As String = EDMIPath.GetRelativePath(oDocumentType, FileName)
- Dim oAbsolutePath As String = EDMIPath.GetActivePath(oDocumentType)
+ Dim oAbsolutePath As String = EDMIPath.GetActivePath(oDocumentType, FileName)
Dim oDirectoryPath = EDMIPath.GetActivePath(oDocumentType)
Dim oDocument = New DocumentResult2.DocumentObject With {.FileName = FileName}
@@ -318,7 +318,7 @@ Public Class EDMIService
Try
Dim oVersionedFileName As String = Filesystem.GetVersionedFilename(oAbsolutePath)
- _logger.Info("Saving file [{0}] to path [{1}]", FileName, oVersionedFileName)
+ _logger.Info("ImportFile: Saving file [{0}] to path [{1}]", FileName, oVersionedFileName)
Using oStream = New FileStream(oVersionedFileName, FileMode.CreateNew)
oStream.Write(Contents, 0, Contents.Length)
oStream.Flush(True)
@@ -344,6 +344,27 @@ Public Class EDMIService
End Try
End Function
+ Public Function GetFileByObjectId(ObjectId As Int64) As Stream Implements IEDMIService.GetFileByObjectId
+ Try
+ Dim oSQL As String = $"SELECT DocRelativePath FROM VWIDB_DOC_DATA WHERE IDB_OBJ_ID = {ObjectId}"
+ Dim oPath As String = MSSQL.GetScalarValue(oSQL)
+
+ If IsNothing(oPath) Then
+ Return Nothing
+ End If
+
+ Dim oFullPath = EDMIPath.GetActivePathFromRelativePath(oPath)
+
+ _logger.Debug("GetFileByObjectId: Loading file [{0}]", oFullPath)
+
+ Dim oSource As FileStream = IO.File.Open(oFullPath, FileMode.Open)
+ Return oSource
+ Catch ex As Exception
+ _logger.Error(ex)
+ Return Nothing
+ End Try
+ End Function
+
#End Region
#Region "Index"
diff --git a/Service.EDMIService/IEDMIService.vb b/Service.EDMIService/IEDMIService.vb
index 6a2d43d3..4a5bfd94 100644
--- a/Service.EDMIService/IEDMIService.vb
+++ b/Service.EDMIService/IEDMIService.vb
@@ -50,6 +50,9 @@ Interface IEDMIService
#Region "Document (New)"
Function ImportFile(FileName As String, Contents As Byte(), AddedWho As String) As DocumentResult2
+
+
+ Function GetFileByObjectId(ObjectId As Int64) As Stream
#End Region
#Region "Index"