This commit is contained in:
SchreiberM 2021-12-07 12:04:37 +01:00
commit 6be8b1bdb5
76 changed files with 2213 additions and 524 deletions

View File

@ -127,7 +127,7 @@ Partial Class Form1
Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarMdiChildrenListItem1) Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarMdiChildrenListItem1)
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2, Me.RepositoryItemTextEdit3, Me.RepositoryItemTextEdit4}) Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2, Me.RepositoryItemTextEdit3, Me.RepositoryItemTextEdit4})
Me.RibbonControl1.Size = New System.Drawing.Size(1093, 157) Me.RibbonControl1.Size = New System.Drawing.Size(1093, 159)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
' '
'ButtonSelectFiles 'ButtonSelectFiles
@ -175,6 +175,7 @@ Partial Class Form1
'ButtonLoadFile 'ButtonLoadFile
' '
Me.ButtonLoadFile.Caption = "Load File" Me.ButtonLoadFile.Caption = "Load File"
Me.ButtonLoadFile.Enabled = False
Me.ButtonLoadFile.Id = 6 Me.ButtonLoadFile.Id = 6
Me.ButtonLoadFile.ImageOptions.SvgImage = CType(resources.GetObject("ButtonLoadFile.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.ButtonLoadFile.ImageOptions.SvgImage = CType(resources.GetObject("ButtonLoadFile.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.ButtonLoadFile.Name = "ButtonLoadFile" Me.ButtonLoadFile.Name = "ButtonLoadFile"
@ -190,6 +191,7 @@ Partial Class Form1
'BarButtonItem2 'BarButtonItem2
' '
Me.BarButtonItem2.Caption = "List Files" Me.BarButtonItem2.Caption = "List Files"
Me.BarButtonItem2.Enabled = False
Me.BarButtonItem2.Id = 9 Me.BarButtonItem2.Id = 9
Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem2.Name = "BarButtonItem2" Me.BarButtonItem2.Name = "BarButtonItem2"
@ -383,11 +385,11 @@ Partial Class Form1
Me.DockPanel1.Controls.Add(Me.DockPanel1_Container) Me.DockPanel1.Controls.Add(Me.DockPanel1_Container)
Me.DockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left Me.DockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left
Me.DockPanel1.ID = New System.Guid("12b5eead-07cc-48c6-93a4-85cd0b4b82ce") Me.DockPanel1.ID = New System.Guid("12b5eead-07cc-48c6-93a4-85cd0b4b82ce")
Me.DockPanel1.Location = New System.Drawing.Point(0, 157) Me.DockPanel1.Location = New System.Drawing.Point(0, 159)
Me.DockPanel1.Name = "DockPanel1" Me.DockPanel1.Name = "DockPanel1"
Me.DockPanel1.Options.ShowCloseButton = False Me.DockPanel1.Options.ShowCloseButton = False
Me.DockPanel1.OriginalSize = New System.Drawing.Size(297, 200) Me.DockPanel1.OriginalSize = New System.Drawing.Size(297, 200)
Me.DockPanel1.Size = New System.Drawing.Size(297, 458) Me.DockPanel1.Size = New System.Drawing.Size(297, 456)
Me.DockPanel1.Text = "Files to Upload" Me.DockPanel1.Text = "Files to Upload"
' '
'DockPanel1_Container 'DockPanel1_Container
@ -395,31 +397,27 @@ Partial Class Form1
Me.DockPanel1_Container.Controls.Add(Me.listboxFiles) Me.DockPanel1_Container.Controls.Add(Me.listboxFiles)
Me.DockPanel1_Container.Location = New System.Drawing.Point(3, 46) Me.DockPanel1_Container.Location = New System.Drawing.Point(3, 46)
Me.DockPanel1_Container.Name = "DockPanel1_Container" Me.DockPanel1_Container.Name = "DockPanel1_Container"
Me.DockPanel1_Container.Size = New System.Drawing.Size(290, 409) Me.DockPanel1_Container.Size = New System.Drawing.Size(290, 407)
Me.DockPanel1_Container.TabIndex = 0 Me.DockPanel1_Container.TabIndex = 0
' '
'listboxFiles 'listboxFiles
' '
Me.listboxFiles.DataSource = Me.BindingSource1
Me.listboxFiles.Dock = System.Windows.Forms.DockStyle.Fill Me.listboxFiles.Dock = System.Windows.Forms.DockStyle.Fill
Me.listboxFiles.Location = New System.Drawing.Point(0, 0) Me.listboxFiles.Location = New System.Drawing.Point(0, 0)
Me.listboxFiles.Name = "listboxFiles" Me.listboxFiles.Name = "listboxFiles"
Me.listboxFiles.Size = New System.Drawing.Size(290, 409) Me.listboxFiles.Size = New System.Drawing.Size(290, 407)
Me.listboxFiles.TabIndex = 1 Me.listboxFiles.TabIndex = 1
' '
'BindingSource1
'
'
'DockPanel2 'DockPanel2
' '
Me.DockPanel2.Controls.Add(Me.DockPanel2_Container) Me.DockPanel2.Controls.Add(Me.DockPanel2_Container)
Me.DockPanel2.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right Me.DockPanel2.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right
Me.DockPanel2.ID = New System.Guid("e82850af-b594-49e9-ae83-36d4bf007da5") Me.DockPanel2.ID = New System.Guid("e82850af-b594-49e9-ae83-36d4bf007da5")
Me.DockPanel2.Location = New System.Drawing.Point(893, 157) Me.DockPanel2.Location = New System.Drawing.Point(893, 159)
Me.DockPanel2.Name = "DockPanel2" Me.DockPanel2.Name = "DockPanel2"
Me.DockPanel2.Options.ShowCloseButton = False Me.DockPanel2.Options.ShowCloseButton = False
Me.DockPanel2.OriginalSize = New System.Drawing.Size(200, 200) Me.DockPanel2.OriginalSize = New System.Drawing.Size(200, 200)
Me.DockPanel2.Size = New System.Drawing.Size(200, 458) Me.DockPanel2.Size = New System.Drawing.Size(200, 456)
Me.DockPanel2.Text = "Document Viewer" Me.DockPanel2.Text = "Document Viewer"
' '
'DockPanel2_Container 'DockPanel2_Container
@ -427,7 +425,7 @@ Partial Class Form1
Me.DockPanel2_Container.Controls.Add(Me.DocumentViewer1) Me.DockPanel2_Container.Controls.Add(Me.DocumentViewer1)
Me.DockPanel2_Container.Location = New System.Drawing.Point(4, 46) Me.DockPanel2_Container.Location = New System.Drawing.Point(4, 46)
Me.DockPanel2_Container.Name = "DockPanel2_Container" Me.DockPanel2_Container.Name = "DockPanel2_Container"
Me.DockPanel2_Container.Size = New System.Drawing.Size(193, 409) Me.DockPanel2_Container.Size = New System.Drawing.Size(193, 407)
Me.DockPanel2_Container.TabIndex = 0 Me.DockPanel2_Container.TabIndex = 0
' '
'DocumentViewer1 'DocumentViewer1
@ -436,7 +434,7 @@ Partial Class Form1
Me.DocumentViewer1.FileLoaded = False Me.DocumentViewer1.FileLoaded = False
Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0) Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0)
Me.DocumentViewer1.Name = "DocumentViewer1" Me.DocumentViewer1.Name = "DocumentViewer1"
Me.DocumentViewer1.Size = New System.Drawing.Size(193, 409) Me.DocumentViewer1.Size = New System.Drawing.Size(193, 407)
Me.DocumentViewer1.TabIndex = 0 Me.DocumentViewer1.TabIndex = 0
' '
'DockPanel4 'DockPanel4
@ -458,7 +456,7 @@ Partial Class Form1
Me.DockPanel4_Container.Controls.Add(Me.GridControl1) Me.DockPanel4_Container.Controls.Add(Me.GridControl1)
Me.DockPanel4_Container.Location = New System.Drawing.Point(0, 0) Me.DockPanel4_Container.Location = New System.Drawing.Point(0, 0)
Me.DockPanel4_Container.Name = "DockPanel4_Container" Me.DockPanel4_Container.Name = "DockPanel4_Container"
Me.DockPanel4_Container.Size = New System.Drawing.Size(590, 426) Me.DockPanel4_Container.Size = New System.Drawing.Size(590, 424)
Me.DockPanel4_Container.TabIndex = 0 Me.DockPanel4_Container.TabIndex = 0
' '
'GridControl1 'GridControl1
@ -469,7 +467,7 @@ Partial Class Form1
Me.GridControl1.MainView = Me.GridView1 Me.GridControl1.MainView = Me.GridView1
Me.GridControl1.MenuManager = Me.RibbonControl1 Me.GridControl1.MenuManager = Me.RibbonControl1
Me.GridControl1.Name = "GridControl1" Me.GridControl1.Name = "GridControl1"
Me.GridControl1.Size = New System.Drawing.Size(590, 426) Me.GridControl1.Size = New System.Drawing.Size(590, 424)
Me.GridControl1.TabIndex = 5 Me.GridControl1.TabIndex = 5
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
' '
@ -507,8 +505,8 @@ Partial Class Form1
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1093, 664) Me.ClientSize = New System.Drawing.Size(1093, 664)
Me.Controls.Add(Me.DockPanel1)
Me.Controls.Add(Me.DockPanel2) Me.Controls.Add(Me.DockPanel2)
Me.Controls.Add(Me.DockPanel1)
Me.Controls.Add(Me.hideContainerBottom) Me.Controls.Add(Me.hideContainerBottom)
Me.Controls.Add(Me.RibbonStatusBar1) Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1) Me.Controls.Add(Me.RibbonControl1)

View File

@ -335,12 +335,12 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>159</value> <value>159</value>
</metadata> </metadata>
<metadata name="BindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>316, 17</value>
</metadata>
<metadata name="DockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="DockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>176, 18</value> <value>176, 18</value>
</metadata> </metadata>
<metadata name="BindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>316, 17</value>
</metadata>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>453, 17</value> <value>453, 17</value>
</metadata> </metadata>

View File

@ -61,8 +61,9 @@ Public Class Form1
AddLogMessage($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})") AddLogMessage($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})")
'Dim oObjectId As Long = Await _Client.ImportFileAsync(oFileInfo.FullName, "WichtigesDokument", 1, 0) Dim oObjectId As Long = Await _Client.NewFileAsync(oFileInfo.FullName, "Work", "DOC", "DEFAULT",
'AddLogMessage($"File with Id [{oObjectId}] imported!") New Client.NewFileOptions With {.Username = Environment.UserName})
AddLogMessage($"File with Id [{oObjectId}] imported!")
oCountFiles += 1 oCountFiles += 1
oSW.Stop() oSW.Stop()
AddLogMessage($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}") AddLogMessage($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}")
@ -145,81 +146,79 @@ Public Class Form1
End Try End Try
End Sub End Sub
Private Async Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick 'Private Async Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
Try ' Try
Dim oResult As Client.FileList = Await _Client.ListFilesForUserAsync() ' Dim oResult As Client.FileList = Await _Client.ListFilesForUserAsync()
Dim oParams As New DocumentResultParams() With { ' Dim oParams As New DocumentResultParams() With {
.Results = New List(Of DocumentResult) From { ' .Results = New List(Of DocumentResult) From {
New DocumentResult() With {.Title = "lol", .Datatable = oResult.Datatable} ' New DocumentResult() With {.Title = "lol", .Datatable = oResult.Datatable}
}, ' },
.WindowGuid = "1", ' .WindowGuid = "1",
.ColumnNames = New ColumnNames() With { ' .ColumnNames = New ColumnNames() With {
.FilenameColumn = "FILENAME_EXT", ' .FilenameColumn = "FILENAME_EXT",
.FullPathColumn = "FULL_PATH", ' .FullPathColumn = "FULL_PATH",
.ObjectIdColumn = "IDB_OBJ_ID" ' .ObjectIdColumn = "IDB_OBJ_ID"
} ' }
} ' }
Dim oEnv As New DigitalData.Modules.ZooFlow.Environment() With { ' Dim oEnv As New DigitalData.Modules.ZooFlow.Environment() With {
.Service = New ServiceState() With { ' .Service = New ServiceState() With {
.IsActive = True, ' .IsActive = True,
.Address = "172.24.12.39:9000" ' .Address = "172.24.12.39:9000"
}, ' },
.Settings = New SettingsState With { ' .Settings = New SettingsState With {
.GdPictureKey = "21182889975216572111813147150675976632" ' .GdPictureKey = "21182889975216572111813147150675976632"
}, ' },
.User = New UserState() With { ' .User = New UserState(2)
.UserId = 2 ' }
} ' Dim oForm As New frmDocumentResultList(_LogConfig, oEnv, oParams)
} ' oForm.Show()
Dim oForm As New frmDocumentResultList(_LogConfig, oEnv, oParams) ' Catch ex As Exception
oForm.Show() ' MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!")
Catch ex As Exception ' End Try
MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!") 'End Sub
End Try
End Sub
Private Async Sub BindingSource1_CurrentChanged(sender As Object, e As EventArgs) Handles BindingSource1.CurrentChanged 'Private Async Sub BindingSource1_CurrentChanged(sender As Object, e As EventArgs) Handles BindingSource1.CurrentChanged
Dim oRow As DataRow = GridView1.GetFocusedDataRow() ' Dim oRow As DataRow = GridView1.GetFocusedDataRow()
If oRow Is Nothing Then ' If oRow Is Nothing Then
Exit Sub ' Exit Sub
End If ' End If
Try ' Try
Dim oSWTotal As New Stopwatch() ' Dim oSWTotal As New Stopwatch()
oSWTotal.Start() ' oSWTotal.Start()
Dim oObjectId As Long = oRow.Item("IDB_OBJ_ID") ' Dim oObjectId As Long = oRow.Item("IDB_OBJ_ID")
Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId) ' Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId)
DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream) ' DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream)
oSWTotal.Stop() ' oSWTotal.Stop()
AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]") ' AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
Catch ex As FaultException ' Catch ex As FaultException
MsgBox(ex.Reason.ToString, MsgBoxStyle.Critical, "Error from Service") ' MsgBox(ex.Reason.ToString, MsgBoxStyle.Critical, "Error from Service")
Catch ex As Exception ' Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!") ' MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!")
End Try ' End Try
End Sub 'End Sub
Private Async Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick 'Private Async Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Try ' Try
Dim oSWTotal As New Stopwatch() ' Dim oSWTotal As New Stopwatch()
oSWTotal.Start() ' oSWTotal.Start()
Dim oObjectId As Integer = TextboxObjectId.EditValue ' Dim oObjectId As Integer = TextboxObjectId.EditValue
Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId) ' Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId)
DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream) ' DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream)
oSWTotal.Stop() ' oSWTotal.Stop()
AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]") ' AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
Catch ex As Exception ' Catch ex As Exception
AddLogMessage($"Error while getting file: [{ex.Message}]") ' AddLogMessage($"Error while getting file: [{ex.Message}]")
End Try ' End Try
End Sub 'End Sub
Private Sub BarToggleSwitchItem1_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarToggleSwitchItem1.CheckedChanged Private Sub BarToggleSwitchItem1_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarToggleSwitchItem1.CheckedChanged
If BarToggleSwitchItem1.Checked Then If BarToggleSwitchItem1.Checked Then

View File

@ -64,9 +64,11 @@ Public Class ClassDetailForm
Case PAGE_IDB_BUSINESS_ENTITIES Case PAGE_IDB_BUSINESS_ENTITIES
Load_IDBEntity(PrimaryKey, IsInsert) Load_IDBEntity(PrimaryKey, IsInsert)
Return True Return True
Case PAGE_IDB_OBJECT_STORES Case PAGE_IDB_OBJECT_STORES
Load_IDBObjectstore(PrimaryKey, IsInsert) Load_IDBObjectstore(PrimaryKey, IsInsert)
Return True Return True
Case PAGE_CW_PROFILES Case PAGE_CW_PROFILES
Load_CWProfile(PrimaryKey, IsInsert) Load_CWProfile(PrimaryKey, IsInsert)
Return True Return True

View File

@ -57,7 +57,7 @@ Public Class ClassDataASorDB
My.Application.User.ShortName = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_SHORTNAME")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_SHORTNAME")) My.Application.User.ShortName = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_SHORTNAME")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_SHORTNAME"))
My.Application.User.Email = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL")) My.Application.User.Email = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL"))
My.Application.User.Language = DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE") My.Application.User.Language = DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE")
My.Application.User.LanguageID = DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE_ID") My.Application.User.LanguageId = DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE_ID")
My.Application.User.DateFormat = DT_CHECKUSER_MODULE.Rows(0).Item("USER_DATE_FORMAT") My.Application.User.DateFormat = DT_CHECKUSER_MODULE.Rows(0).Item("USER_DATE_FORMAT")
My.Application.User.IsAdmin = DT_CHECKUSER_MODULE.Rows(0).Item("IS_ADMIN") My.Application.User.IsAdmin = DT_CHECKUSER_MODULE.Rows(0).Item("IS_ADMIN")

View File

@ -18,9 +18,9 @@ Public Class ClassIDBData
_Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB) _Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
_DataASorDB = New ClassDataASorDB(LogConfig) _DataASorDB = New ClassDataASorDB(LogConfig)
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE LANG_ID = {My.Application.User.LanguageID}" Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE LANG_ID = {My.Application.User.LanguageId}"
DTVWIDB_BE_ATTRIBUTE = _Database.GetDatatable("VWIDB_BE_ATTRIBUTE", oSQL, DatabaseType.IDB, $"LANG_ID = {My.Application.User.LanguageID}") DTVWIDB_BE_ATTRIBUTE = _Database.GetDatatable("VWIDB_BE_ATTRIBUTE", oSQL, DatabaseType.IDB, $"LANG_ID = {My.Application.User.LanguageId}")
'DTVWIDB_BE_ATTRIBUTE = _DataASorDB.GetDatatable("IDB", oSQL, "VWIDB_BE_ATTRIBUTE", $"LANG_ID = {My.Application.User.LanguageID}") 'DTVWIDB_BE_ATTRIBUTE = _DataASorDB.GetDatatable("IDB", oSQL, "VWIDB_BE_ATTRIBUTE", $"LANG_ID = {My.Application.User.LanguageID}")
End Sub End Sub
Public IDBSystemIndices As List(Of String) Public IDBSystemIndices As List(Of String)

View File

@ -306,7 +306,7 @@ Public Class ClassInit
Case "USER_LANGUAGE" Case "USER_LANGUAGE"
MyApplication.User.Language = NotNull(oValue.ToString, "de-DE") MyApplication.User.Language = NotNull(oValue.ToString, "de-DE")
Case "USER_LANGUAGEID" Case "USER_LANGUAGEID"
MyApplication.User.LanguageID = CShort(oValue) MyApplication.User.LanguageId = CShort(oValue)
End Select End Select
End Sub End Sub
Private Sub HandleModuleInfo(MyApplication As My.MyApplication, ModuleName As String, Row As DataRow) Private Sub HandleModuleInfo(MyApplication As My.MyApplication, ModuleName As String, Row As DataRow)

View File

@ -240,29 +240,29 @@ Public Class ClassFilehandle
End Try End Try
End Function End Function
'' <summary> ''' <summary>
''' Ersetzt alle nicht zulässigen Zeichen im angegebenen Dateinamen '''' Ersetzt alle nicht zulässigen Zeichen im angegebenen Dateinamen
''' </summary> '''' </summary>
''' <param name="sFilename">Dateiname ohne Pfadangabe</param> '''' <param name="sFilename">Dateiname ohne Pfadangabe</param>
''' <param name="sChar">Ersatzzeichen für alle unzulässigen Zeichen '''' <param name="sChar">Ersatzzeichen für alle unzulässigen Zeichen
''' im Dateinamen</param> '''' im Dateinamen</param>
Public Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String 'Public Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String
_LOGGER.Info(" Filename before CleanFilename: '" & sFilename & "'") ' _LOGGER.Info(" Filename before CleanFilename: '" & sFilename & "'")
If sFilename.Contains(".\") Then ' If sFilename.Contains(".\") Then
sFilename = sFilename.Replace(".\", "\") ' sFilename = sFilename.Replace(".\", "\")
End If ' End If
'If sFilename.Contains("'") Then ' 'If sFilename.Contains("'") Then
' sFilename = sFilename.Replace("'", "") ' ' sFilename = sFilename.Replace("'", "")
'End If ' 'End If
'If sFilename.Contains("..") Then ' 'If sFilename.Contains("..") Then
' sFilename = sFilename.Replace("..", ".") ' ' sFilename = sFilename.Replace("..", ".")
'End If ' 'End If
' alle nicht zulässigen Zeichen ersetzen ' ' alle nicht zulässigen Zeichen ersetzen
sFilename = System.Text.RegularExpressions.Regex.Replace(sFilename, My.Application.Globix.REGEX_CLEAN_FILENAME, REPLACEChar) ' sFilename = System.Text.RegularExpressions.Regex.Replace(sFilename, My.Application.Globix.REGEX_CLEAN_FILENAME, REPLACEChar)
sFilename = System.Text.RegularExpressions.Regex.Replace(sFilename, "[\\/:*?""<>|\r\n]", "", System.Text.RegularExpressions.RegexOptions.Singleline) ' sFilename = System.Text.RegularExpressions.Regex.Replace(sFilename, "[\\/:*?""<>|\r\n]", "", System.Text.RegularExpressions.RegexOptions.Singleline)
'Dim oCleanFileName As String = String.Join(REPLACEChar, sFilename.Split(Path.GetInvalidFileNameChars())) ' 'Dim oCleanFileName As String = String.Join(REPLACEChar, sFilename.Split(Path.GetInvalidFileNameChars()))
Dim oCleanFileName As New System.IO.FileInfo(System.Text.RegularExpressions.Regex.Replace(sFilename, String.Format("[{0}]", String.Join(String.Empty, Path.GetInvalidFileNameChars)), REPLACEChar)) ' Dim oCleanFileName As New System.IO.FileInfo(System.Text.RegularExpressions.Regex.Replace(sFilename, String.Format("[{0}]", String.Join(String.Empty, Path.GetInvalidFileNameChars)), REPLACEChar))
_LOGGER.Info("Filename after CleanFilename: '" & sFilename & "'") ' _LOGGER.Info("Filename after CleanFilename: '" & sFilename & "'")
Return sFilename ' Return sFilename
End Function 'End Function
End Class End Class

View File

@ -247,7 +247,7 @@ Partial Class frmGlobix_Index
Me.SplitContainerControl1.Panel2.Controls.Add(Me.DocumentViewer1) Me.SplitContainerControl1.Panel2.Controls.Add(Me.DocumentViewer1)
Me.SplitContainerControl1.Panel2.Text = "Panel2" Me.SplitContainerControl1.Panel2.Text = "Panel2"
Me.SplitContainerControl1.Size = New System.Drawing.Size(1005, 508) Me.SplitContainerControl1.Size = New System.Drawing.Size(1005, 508)
Me.SplitContainerControl1.SplitterPosition = 591 Me.SplitContainerControl1.SplitterPosition = 522
Me.SplitContainerControl1.TabIndex = 2 Me.SplitContainerControl1.TabIndex = 2
' '
'pnlIndex 'pnlIndex
@ -258,7 +258,7 @@ Partial Class frmGlobix_Index
Me.pnlIndex.ForeColor = System.Drawing.SystemColors.ControlText Me.pnlIndex.ForeColor = System.Drawing.SystemColors.ControlText
Me.pnlIndex.Location = New System.Drawing.Point(0, 33) Me.pnlIndex.Location = New System.Drawing.Point(0, 33)
Me.pnlIndex.Name = "pnlIndex" Me.pnlIndex.Name = "pnlIndex"
Me.pnlIndex.Size = New System.Drawing.Size(591, 400) Me.pnlIndex.Size = New System.Drawing.Size(522, 400)
Me.pnlIndex.TabIndex = 3 Me.pnlIndex.TabIndex = 3
' '
'Panel3 'Panel3
@ -267,7 +267,7 @@ Partial Class frmGlobix_Index
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel3.Location = New System.Drawing.Point(0, 433) Me.Panel3.Location = New System.Drawing.Point(0, 433)
Me.Panel3.Name = "Panel3" Me.Panel3.Name = "Panel3"
Me.Panel3.Size = New System.Drawing.Size(591, 75) Me.Panel3.Size = New System.Drawing.Size(522, 75)
Me.Panel3.TabIndex = 2 Me.Panel3.TabIndex = 2
' '
'btnAblageFlow 'btnAblageFlow
@ -278,7 +278,7 @@ Partial Class frmGlobix_Index
Me.btnAblageFlow.ImageAlign = System.Drawing.ContentAlignment.MiddleRight Me.btnAblageFlow.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnAblageFlow.Location = New System.Drawing.Point(0, 0) Me.btnAblageFlow.Location = New System.Drawing.Point(0, 0)
Me.btnAblageFlow.Name = "btnAblageFlow" Me.btnAblageFlow.Name = "btnAblageFlow"
Me.btnAblageFlow.Size = New System.Drawing.Size(591, 75) Me.btnAblageFlow.Size = New System.Drawing.Size(522, 75)
Me.btnAblageFlow.TabIndex = 1 Me.btnAblageFlow.TabIndex = 1
Me.btnAblageFlow.Text = "Starte Ablage" Me.btnAblageFlow.Text = "Starte Ablage"
Me.btnAblageFlow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.btnAblageFlow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
@ -291,7 +291,7 @@ Partial Class frmGlobix_Index
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 0) Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1" Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(591, 33) Me.Panel1.Size = New System.Drawing.Size(522, 33)
Me.Panel1.TabIndex = 0 Me.Panel1.TabIndex = 0
' '
'ComboBoxEdit1 'ComboBoxEdit1
@ -306,7 +306,7 @@ Partial Class frmGlobix_Index
Me.ComboBoxEdit1.Properties.ButtonsStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat Me.ComboBoxEdit1.Properties.ButtonsStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat
Me.ComboBoxEdit1.Properties.NullText = "Bitte wählen Sie ein Profil" Me.ComboBoxEdit1.Properties.NullText = "Bitte wählen Sie ein Profil"
Me.ComboBoxEdit1.Properties.Padding = New System.Windows.Forms.Padding(5) Me.ComboBoxEdit1.Properties.Padding = New System.Windows.Forms.Padding(5)
Me.ComboBoxEdit1.Size = New System.Drawing.Size(591, 30) Me.ComboBoxEdit1.Size = New System.Drawing.Size(522, 30)
Me.ComboBoxEdit1.TabIndex = 4 Me.ComboBoxEdit1.TabIndex = 4
' '
'DocumentViewer1 'DocumentViewer1
@ -315,7 +315,7 @@ Partial Class frmGlobix_Index
Me.DocumentViewer1.FileLoaded = False Me.DocumentViewer1.FileLoaded = False
Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0) Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0)
Me.DocumentViewer1.Name = "DocumentViewer1" Me.DocumentViewer1.Name = "DocumentViewer1"
Me.DocumentViewer1.Size = New System.Drawing.Size(404, 508) Me.DocumentViewer1.Size = New System.Drawing.Size(473, 508)
Me.DocumentViewer1.TabIndex = 0 Me.DocumentViewer1.TabIndex = 0
' '
'GlobixDataset 'GlobixDataset

View File

@ -60,7 +60,7 @@ Public Class frmFlowSearch
cmbAttributeDate.Items.Add(IDB_ADDED_WHEN_String_Englisch) cmbAttributeDate.Items.Add(IDB_ADDED_WHEN_String_Englisch)
End If End If
'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}") 'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}")
Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", DatabaseType.IDB, $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}") Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageId}", DatabaseType.IDB, $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageId}")
For Each oRow As DataRow In oDT.Rows For Each oRow As DataRow In oDT.Rows
cmbAttributeDate.Items.Add(oRow.Item("ATTR_TITLE")) cmbAttributeDate.Items.Add(oRow.Item("ATTR_TITLE"))
@ -191,7 +191,7 @@ Public Class frmFlowSearch
Try Try
oHandle = SplashScreenManager.ShowOverlayForm(Me) oHandle = SplashScreenManager.ShowOverlayForm(Me)
Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT '{pSearchValue}','{SEARCH_FACT_DATE}', {My.Application.User.UserId},'{oSearchData.SelectInStringAttributeIds}','{oSearchData.SelectInIntegerAttributeIds}',{My.Application.User.LanguageID},'{pOptAttribute}'" Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT '{pSearchValue}','{SEARCH_FACT_DATE}', {My.Application.User.UserId},'{oSearchData.SelectInStringAttributeIds}','{oSearchData.SelectInIntegerAttributeIds}',{My.Application.User.LanguageId},'{pOptAttribute}'"
Dim oDTOBJECT_RESULT As DataTable = My.DatabaseIDB.GetDatatable(oEXECSQL) Dim oDTOBJECT_RESULT As DataTable = My.DatabaseIDB.GetDatatable(oEXECSQL)
If Not IsNothing(oDTOBJECT_RESULT) Then If Not IsNothing(oDTOBJECT_RESULT) Then
If oDTOBJECT_RESULT.Rows.Count = 0 Then If oDTOBJECT_RESULT.Rows.Count = 0 Then
@ -375,7 +375,7 @@ Public Class frmFlowSearch
oHandle = SplashScreenManager.ShowOverlayForm(Me) oHandle = SplashScreenManager.ShowOverlayForm(Me)
'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}") 'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}")
Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", DatabaseType.IDB, $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}") Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageId}", DatabaseType.IDB, $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageId}")
Dim oType = oDT.Rows(0).Item("TYPE_NAME") Dim oType = oDT.Rows(0).Item("TYPE_NAME")
Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT_PER_TILE {oSplit(0)},{My.Application.User.UserId},'{oType}',{oSplit(1)},'{My.Application.User.Language}'" Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT_PER_TILE {oSplit(0)},{My.Application.User.UserId},'{oType}',{oSplit(1)},'{My.Application.User.Language}'"

View File

@ -419,7 +419,7 @@ Public Class frmFlowForm
Next Next
If oSQLFlowSearch <> String.Empty Then If oSQLFlowSearch <> String.Empty Then
oSQLFlowSearch = oSQLFlowSearch.Replace("@USER_ID", My.Application.User.UserId) oSQLFlowSearch = oSQLFlowSearch.Replace("@USER_ID", My.Application.User.UserId)
oSQLFlowSearch = oSQLFlowSearch.Replace("@LANGUAGE_ID", My.Application.User.LanguageID) oSQLFlowSearch = oSQLFlowSearch.Replace("@LANGUAGE_ID", My.Application.User.LanguageId)
oSQLFlowSearch = oSQLFlowSearch.Replace("@LANGUAGE", My.Application.User.Language) oSQLFlowSearch = oSQLFlowSearch.Replace("@LANGUAGE", My.Application.User.Language)
Dim oForm As New frmFlowSearch(oSQLFlowSearch) Dim oForm As New frmFlowSearch(oSQLFlowSearch)
oForm.Show() oForm.Show()

View File

@ -100,11 +100,7 @@ Public Class frmtest
txtFile2Import.Text, txtFile2Import.Text,
"WORK", "WORK",
"DOC", "DOC",
"DEFAULT", "DEFAULT"
New NewFileOptions With {
.Username = Environment.UserName,
.DateImported = DateTimePicker1.Value
}
) )
If oObjectId <> INVALID_OBEJCT_ID Then If oObjectId <> INVALID_OBEJCT_ID Then

View File

@ -17,7 +17,7 @@ Public Class Client
Private _dummy_table_attributes As DataTable Private _dummy_table_attributes As DataTable
Private _channel As IEDMIServiceChannel Private _channel As IEDMIServiceChannel
Private _FileEx As FileSystem.File Private _FileEx As Filesystem.File
''' <summary> ''' <summary>
@ -122,11 +122,11 @@ Public Class Client
''' <exception cref="FileNotFoundException">When local filepath was not found</exception> ''' <exception cref="FileNotFoundException">When local filepath was not found</exception>
''' <exception cref="ApplicationException">When there was a error in the Service</exception> ''' <exception cref="ApplicationException">When there was a error in the Service</exception>
''' <returns>The ObjectId of the newly generated filesystem object</returns> ''' <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 NewFileOptions = Nothing) As Task(Of Long) 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)
Try Try
' Set default options ' Set default options
If pImportOptions Is Nothing Then If pImportOptions Is Nothing Then
pImportOptions = New NewFileOptions() pImportOptions = New Options.NewFileOptions()
End If End If
' Check if file exists ' Check if file exists
@ -150,15 +150,20 @@ Public Class Client
Dim oFileImportResponse = Await _channel.NewFileAsync(New NewFileRequest With { Dim oFileImportResponse = Await _channel.NewFileAsync(New NewFileRequest With {
.BusinessEntity = pBusinessEntity, .BusinessEntity = pBusinessEntity,
.FileName = oFileInfo.Name, .File = New FileProperties With {
.FileCreatedAt = oFileCreatedAt, .FileName = oFileInfo.Name,
.FileChangedAt = oFileModifiedAt, .FileCreatedAt = oFileCreatedAt,
.FileContents = oContents, .FileChangedAt = oFileModifiedAt,
.FileImportedAt = pImportOptions.DateImported, .FileContents = oContents,
.FileChecksum = oFileHash, .FileImportedAt = pImportOptions.DateImported,
.FileChecksum = oFileHash
},
.KindType = pObjectKind, .KindType = pObjectKind,
.StoreName = pObjectStoreName, .StoreName = pObjectStoreName,
.Who = pImportOptions.Username .User = New UserState With {
.Language = pImportOptions.Language,
.UserName = pImportOptions.Username
}
}) })
If oFileImportResponse.OK = False Then If oFileImportResponse.OK = False Then
@ -174,6 +179,63 @@ Public Class Client
End Try End Try
End Function End Function
Public Async Function ImportFileAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pBusinessEntity As String, Optional pImportOptions As Options.NewFileOptions = Nothing) As Task(Of Long)
Try
' Set default options
If pImportOptions Is Nothing Then
pImportOptions = New Options.NewFileOptions()
End If
' Check if file exists
If File.Exists(pFilePath) = False Then
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)
' 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 {
.BusinessEntity = pBusinessEntity,
.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
}
})
If oFileImportResponse.OK = False Then
Throw New ApplicationException("Could not Import File Contents!")
End If
Return oFileImportResponse.ObjectId
End Using
End Using
Catch ex As Exception
_logger.Error(ex)
Return INVALID_OBEJCT_ID
End Try
End Function
''' <summary> ''' <summary>
''' Sets a value to an attribute ''' Sets a value to an attribute
''' </summary> ''' </summary>
@ -182,18 +244,16 @@ Public Class Client
''' <param name="pValue"></param> ''' <param name="pValue"></param>
''' <param name="pOptions"></param> ''' <param name="pOptions"></param>
''' <returns></returns> ''' <returns></returns>
Public Function SetVariableValue(pObjectId As Long, pAttributeName As String, pValue As Object, Optional pOptions As SetVariableValueOptions = Nothing) As Boolean Public Function SetVariableValue(pObjectId As Long, pAttributeName As String, pValue As Object, Optional pOptions As Options.SetVariableValueOptions = Nothing) As Boolean
Try Try
' Set default options ' Set default options
If pOptions Is Nothing Then If pOptions Is Nothing Then
pOptions = New SetVariableValueOptions() pOptions = New Options.SetVariableValueOptions()
End If End If
Dim oLanguage = GetUserLanguage(pOptions.UserLanguage) Dim oOptions As New Options.GetVariableValueOptions With {
Dim oUsername = GetUserName(pOptions.UserName) .Language = pOptions.Language,
Dim oOptions As New GetVariableValueOptions With { .Username = pOptions.Username
.UserLanguage = oLanguage,
.UserName = oUsername
} }
Try Try
@ -271,9 +331,9 @@ Public Class Client
End If End If
For Each oNewValueRow As DataRow In oValueTable.Rows For Each oNewValueRow As DataRow In oValueTable.Rows
Dim oResult As Boolean = NewObjectData(pObjectId, pAttributeName, pValue, New NewObjectOptions With { Dim oResult As Boolean = NewObjectData(pObjectId, pAttributeName, pValue, New Options.NewObjectOptions With {
.UserLanguage = oLanguage, .Language = pOptions.Language,
.UserName = oUsername .Username = pOptions.Username
}) })
If oResult = False Then If oResult = False Then
@ -282,9 +342,9 @@ Public Class Client
Next Next
Return True Return True
Else Else
Return NewObjectData(pObjectId, pAttributeName, pValue, New NewObjectOptions With { Return NewObjectData(pObjectId, pAttributeName, pValue, New Options.NewObjectOptions With {
.UserLanguage = oLanguage, .Language = pOptions.Language,
.UserName = oUsername .Username = pOptions.Username
}) })
End If End If
@ -301,14 +361,11 @@ Public Class Client
''' <param name="pAttributeName"></param> ''' <param name="pAttributeName"></param>
''' <param name="pOptions"></param> ''' <param name="pOptions"></param>
''' <returns></returns> ''' <returns></returns>
Public Function GetVariableValue(pObjectId As Long, pAttributeName As String, Optional pOptions As GetVariableValueOptions = Nothing) As VariableValue Public Function GetVariableValue(pObjectId As Long, pAttributeName As String, Optional pOptions As Options.GetVariableValueOptions = Nothing) As VariableValue
If pOptions Is Nothing Then If pOptions Is Nothing Then
pOptions = New GetVariableValueOptions() pOptions = New Options.GetVariableValueOptions()
End If End If
pOptions.UserLanguage = GetUserLanguage(pOptions.UserLanguage)
pOptions.UserName = GetUserName(pOptions.UserName)
' Check if ObjectId exists ' Check if ObjectId exists
Try Try
Dim oResponse = _channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId}) Dim oResponse = _channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId})
@ -325,7 +382,7 @@ Public Class Client
Try Try
' Get Attributes and Values from Database ' Get Attributes and Values from Database
Dim oAttributes As List(Of ObjectAttribute) = GetAttributesForObject(pObjectId, pOptions.UserLanguage) Dim oAttributes As List(Of ObjectAttribute) = GetAttributesForObject(pObjectId, pOptions.Language)
If oAttributes Is Nothing Then If oAttributes Is Nothing Then
Return New VariableValue() Return New VariableValue()
@ -438,13 +495,13 @@ Public Class Client
End Try End Try
End Function End Function
Private Function NewObjectData(pObjectId As Long, pAttributeName As String, pValue As Object, pOptions As NewObjectOptions) Private Function NewObjectData(pObjectId As Long, pAttributeName As String, pValue As Object, pOptions As Options.NewObjectOptions)
If pOptions Is Nothing Then If pOptions Is Nothing Then
pOptions = New NewObjectOptions() pOptions = New Options.NewObjectOptions()
End If End If
Dim oLanguage = GetUserLanguage(pOptions.UserLanguage) Dim oLanguage = GetUserLanguage(pOptions.Language)
Dim oUsername = GetUserName(pOptions.UserName) Dim oUsername = GetUserName(pOptions.Username)
Dim oSql = $"DECLARE @NEW_OBJ_MD_ID BIGINT Dim oSql = $"DECLARE @NEW_OBJ_MD_ID BIGINT
EXEC PRIDB_NEW_OBJ_DATA({pObjectId}, '{pAttributeName}', '{oUsername}', '{pValue}', '{oLanguage}', 0, @OMD_ID = @NEW_OBJ_MD_ID OUTPUT)" EXEC PRIDB_NEW_OBJ_DATA({pObjectId}, '{pAttributeName}', '{oUsername}', '{pValue}', '{oLanguage}', 0, @OMD_ID = @NEW_OBJ_MD_ID OUTPUT)"
@ -529,6 +586,16 @@ Public Class Client
End Try End Try
End Function End Function
Public Async Function GetDatatableByNameAsync(DatatableName As String, Optional FilterExpression As String = "", Optional SortByColumn As String = "") As Task(Of TableResult)
Try
Dim oResponse = _channel.ReturnDatatableFromCache(DatatableName, FilterExpression, SortByColumn)
Return oResponse
Catch ex As Exception
_logger.Error(ex)
Throw ex
End Try
End Function
''' <summary> ''' <summary>
''' Return infos about a file object ''' Return infos about a file object
''' </summary> ''' </summary>
@ -622,39 +689,6 @@ Public Class Client
End Function End Function
#Region "Option & Parameter Classes"
''' <summary>
''' Import options for NewFileAsync.
''' </summary>
Public Class NewFileOptions
''' <summary>
''' Windows username of the user responsible for the import. Defaults to the currently logged in user.
''' </summary>
Public Property Username As String = Environment.UserName
''' <summary>
''' Date when the file was imported. Can be in the past. Defaults to now.
''' </summary>
Public Property DateImported As Date = Date.Now
End Class
Public Class NewObjectOptions
Public UserName As String
Public UserLanguage As String
End Class
Public Class VariableValueOptions
Public UserName As String
Public UserLanguage As String
End Class
Public Class GetVariableValueOptions
Inherits VariableValueOptions
End Class
Public Class SetVariableValueOptions
Inherits VariableValueOptions
End Class
#End Region
#Region "Response Classes" #Region "Response Classes"
Public Class StreamedFile Public Class StreamedFile

View File

@ -0,0 +1,39 @@
Public Class Options
Public MustInherit Class BaseOptions
''' <summary>
''' Windows username of the user responsible for the request. Defaults to the currently logged in user.
''' </summary>
Public Property Username As String = Environment.UserName
''' <summary>
''' Language code of the client responsible for the request. Defaults to the language of the current client.
''' </summary>
''' <returns></returns>
Public Property Language As String = Threading.Thread.CurrentThread.CurrentUICulture.Name
End Class
''' <summary>
''' Import options for NewFileAsync.
''' </summary>
Public Class NewFileOptions
Inherits BaseOptions
''' <summary>
''' Date when the file was imported. Can be in the past. Defaults to now.
''' </summary>
Public Property DateImported As Date = Date.Now
End Class
Public Class GetVariableValueOptions
Inherits BaseOptions
End Class
Public Class SetVariableValueOptions
Inherits BaseOptions
End Class
Public Class NewObjectOptions
Inherits BaseOptions
End Class
End Class

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="ArrayOfstring">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfstring" nillable="true" type="tns:ArrayOfstring" />
</xs:schema>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="ImportFileResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="UserState">
<xs:sequence>
<xs:element minOccurs="0" name="DateFormat" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Email" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="GivenName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="HideBasicConfig" type="xs:boolean" />
<xs:element minOccurs="0" name="IsAdmin" type="xs:boolean" />
<xs:element minOccurs="0" name="Language" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="LanguageId" type="xs:int" />
<xs:element minOccurs="0" name="MachineName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ShortName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Surname" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="UserId" type="xs:int" />
<xs:element minOccurs="0" name="UserName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="UserState" nillable="true" type="tns:UserState" />
</xs:schema>

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<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 minOccurs="0" name="FileChangedAt" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FileChecksum" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FileContents" nillable="true" type="xs:base64Binary" />
<xs:element minOccurs="0" name="FileCreatedAt" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FileImportedAt" type="xs:dateTime" />
<xs:element minOccurs="0" name="FileName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="KindType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Language" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="StoreName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Who" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="NewFileRequest" nillable="true" type="tns:NewFileRequest" />
<xs:complexType name="NewFileResponse">
<xs:complexContent mixed="false">
<xs:extension xmlns:q1="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" base="q1:BaseResponse">
<xs:sequence>
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="NewFileResponse" nillable="true" type="tns:NewFileResponse" />
</xs:schema>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
<xs:complexType name="ImportFileRequest">
<xs:sequence>
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods" 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" minOccurs="0" name="File" nillable="true" type="q2:FileProperties" />
<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" />
<xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" minOccurs="0" name="User" nillable="true" type="q3:UserState" />
</xs:sequence>
</xs:complexType>
<xs:element name="ImportFileRequest" nillable="true" type="tns:ImportFileRequest" />
<xs:complexType name="ImportFileResponse">
<xs:complexContent mixed="false">
<xs:extension xmlns:q4="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" base="q4:BaseResponse">
<xs:sequence>
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="ImportFileResponse" nillable="true" type="tns:ImportFileResponse" />
</xs:schema>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" />
<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" minOccurs="0" name="File" nillable="true" type="q1:FileProperties" />
<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" />
</xs:sequence>
</xs:complexType>
<xs:element name="NewFileRequest" nillable="true" type="tns:NewFileRequest" />
<xs:complexType name="NewFileResponse">
<xs:complexContent mixed="false">
<xs:extension xmlns:q3="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" base="q3:BaseResponse">
<xs:sequence>
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="NewFileResponse" nillable="true" type="tns:NewFileResponse" />
</xs:schema>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" /> <xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
<xs:complexType name="SetAttributeValueRequest"> <xs:complexType name="SetAttributeValueRequest">
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" name="AttributeName" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="AttributeName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="AttributeValue" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="AttributeValue" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Language" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ObjectId" type="xs:long" /> <xs:element minOccurs="0" name="ObjectId" type="xs:long" />
<xs:element minOccurs="0" name="Who" type="xs:long" /> <xs:element minOccurs="0" name="Who" type="xs:long" />
</xs:sequence> </xs:sequence>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.datacontract.org/2004/07/System.IO" />
<xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<xs:complexType name="FileProperties">
<xs:sequence>
<xs:element minOccurs="0" name="FileChangedAt" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FileChecksum" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FileContents" nillable="true" type="xs:base64Binary" />
<xs:element minOccurs="0" name="FileCreatedAt" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FileImportedAt" type="xs:dateTime" />
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/System.IO" minOccurs="0" name="FileInfoRaw" nillable="true" type="q1:FileInfo" />
<xs:element minOccurs="0" name="FileName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="FileProperties" nillable="true" type="tns:FileProperties" />
<xs:complexType name="ArrayOfUserAttributeValue">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="UserAttributeValue" nillable="true" type="tns:UserAttributeValue" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfUserAttributeValue" nillable="true" type="tns:ArrayOfUserAttributeValue" />
<xs:complexType name="UserAttributeValue">
<xs:sequence>
<xs:element minOccurs="0" name="AttributeId" type="xs:int" />
<xs:element minOccurs="0" name="AttributeName" nillable="true" type="xs:string" />
<xs:element xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="AttributeValues" nillable="true" type="q2:ArrayOfstring" />
<xs:element minOccurs="0" name="ControlName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="UserAttributeValue" nillable="true" type="tns:UserAttributeValue" />
</xs:schema>

View File

@ -8,8 +8,13 @@
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" /> <xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System" /> <xsd:import namespace="http://schemas.datacontract.org/2004/07/System" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System.Data" /> <xsd:import namespace="http://schemas.datacontract.org/2004/07/System.Data" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" /> <xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" /> <xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System.IO" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" />
<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<xsd:import namespace="http://schemas.microsoft.com/Message" /> <xsd:import namespace="http://schemas.microsoft.com/Message" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" /> <xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
</xsd:schema> </xsd:schema>
@ -125,6 +130,12 @@
<wsdl:message name="IEDMIService_SetAttributeValue_OutputMessage"> <wsdl:message name="IEDMIService_SetAttributeValue_OutputMessage">
<wsdl:part name="parameters" element="tns:SetAttributeValueResponse" /> <wsdl:part name="parameters" element="tns:SetAttributeValueResponse" />
</wsdl:message> </wsdl:message>
<wsdl:message name="IEDMIService_ImportFile_InputMessage">
<wsdl:part name="parameters" element="tns:ImportFile" />
</wsdl:message>
<wsdl:message name="IEDMIService_ImportFile_OutputMessage">
<wsdl:part name="parameters" element="tns:ImportFileResponse" />
</wsdl:message>
<wsdl:message name="DocumentStreamRequest"> <wsdl:message name="DocumentStreamRequest">
<wsdl:part name="parameters" element="tns:DocumentStreamRequest" /> <wsdl:part name="parameters" element="tns:DocumentStreamRequest" />
</wsdl:message> </wsdl:message>
@ -229,6 +240,10 @@
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue" message="tns:IEDMIService_SetAttributeValue_InputMessage" /> <wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue" message="tns:IEDMIService_SetAttributeValue_InputMessage" />
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValueResponse" message="tns:IEDMIService_SetAttributeValue_OutputMessage" /> <wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValueResponse" message="tns:IEDMIService_SetAttributeValue_OutputMessage" />
</wsdl:operation> </wsdl:operation>
<wsdl:operation name="ImportFile">
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile" message="tns:IEDMIService_ImportFile_InputMessage" />
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse" message="tns:IEDMIService_ImportFile_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="GetFileByObjectId"> <wsdl:operation name="GetFileByObjectId">
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" name="DocumentStreamRequest" message="tns:DocumentStreamRequest" /> <wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" name="DocumentStreamRequest" message="tns:DocumentStreamRequest" />
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse" name="DocumentStreamResponse" message="tns:DocumentStreamResponse" /> <wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse" name="DocumentStreamResponse" message="tns:DocumentStreamResponse" />

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://DigitalData.Services.EDMIService" elementFormDefault="qualified" targetNamespace="http://DigitalData.Services.EDMIService" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:schema xmlns:tns="http://DigitalData.Services.EDMIService" elementFormDefault="qualified" targetNamespace="http://DigitalData.Services.EDMIService" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" /> <xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" /> <xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" /> <xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" />
<xs:import namespace="http://schemas.microsoft.com/Message" /> <xs:import namespace="http://schemas.microsoft.com/Message" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" /> <xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
<xs:element name="Heartbeat"> <xs:element name="Heartbeat">
@ -162,28 +163,42 @@
<xs:element name="NewFile"> <xs:element name="NewFile">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" minOccurs="0" name="Data" nillable="true" type="q11:NewFileRequest" /> <xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" minOccurs="0" name="Data" nillable="true" type="q11:NewFileRequest" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="NewFileResponse"> <xs:element name="NewFileResponse">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" minOccurs="0" name="NewFileResult" nillable="true" type="q12:NewFileResponse" /> <xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" minOccurs="0" name="NewFileResult" nillable="true" type="q12:NewFileResponse" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="SetAttributeValue"> <xs:element name="SetAttributeValue">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" minOccurs="0" name="Data" nillable="true" type="q13:SetAttributeValueRequest" /> <xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" minOccurs="0" name="Data" nillable="true" type="q13:SetAttributeValueRequest" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="SetAttributeValueResponse"> <xs:element name="SetAttributeValueResponse">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" minOccurs="0" name="SetAttributeValueResult" nillable="true" type="q14:SetAttributeValueResponse" /> <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" minOccurs="0" name="SetAttributeValueResult" nillable="true" type="q14:SetAttributeValueResponse" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ImportFile">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" minOccurs="0" name="Data" nillable="true" type="q15:ImportFileRequest" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ImportFileResponse">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" minOccurs="0" name="ImportFileResult" nillable="true" type="q16:ImportFileResponse" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
@ -197,7 +212,7 @@
<xs:element name="DocumentStreamResponse"> <xs:element name="DocumentStreamResponse">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element xmlns:q15="http://schemas.microsoft.com/Message" name="FileContents" type="q15:StreamBody" /> <xs:element xmlns:q17="http://schemas.microsoft.com/Message" name="FileContents" type="q17:StreamBody" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
@ -213,7 +228,7 @@
<xs:element name="DocumentInfoResponse"> <xs:element name="DocumentInfoResponse">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" minOccurs="0" name="FileRight" type="q16:Rights.AccessRight" /> <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" minOccurs="0" name="FileRight" type="q18:Rights.AccessRight" />
<xs:element minOccurs="0" name="FullPath" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="FullPath" nillable="true" type="xs:string" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>

View File

@ -30,8 +30,13 @@
<MetadataFile FileName="System.xsd" MetadataType="Schema" ID="e0db7004-6943-4cf8-b88f-4811ed14a341" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" /> <MetadataFile FileName="System.xsd" MetadataType="Schema" ID="e0db7004-6943-4cf8-b88f-4811ed14a341" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="System.Data.xsd" MetadataType="Schema" ID="6c7bdb47-eea4-4d03-bc52-9747c865bbf0" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" /> <MetadataFile FileName="System.Data.xsd" MetadataType="Schema" ID="6c7bdb47-eea4-4d03-bc52-9747c865bbf0" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="DigitalData.Services.EDMIService.Exceptions.xsd" MetadataType="Schema" ID="57cf2e83-7c36-485a-90c3-0bc4a1748882" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" /> <MetadataFile FileName="DigitalData.Services.EDMIService.Exceptions.xsd" MetadataType="Schema" ID="57cf2e83-7c36-485a-90c3-0bc4a1748882" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="DigitalData.Services.EDMIService.FileStorage.NewFile.xsd" MetadataType="Schema" ID="bbb83dae-4701-48e2-9c2f-747660d3bd68" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" /> <MetadataFile FileName="DigitalData.Services.EDMIService.Methods.NewFile.xsd" MetadataType="Schema" ID="4904e1c4-87d9-4aae-81a8-71fa8354ae1e" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="DigitalData.Services.EDMIService.FileStorage.SetAttributeValue.xsd" MetadataType="Schema" ID="ca9178c8-9102-4e7a-81e9-920543646114" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" /> <MetadataFile FileName="DigitalData.Services.EDMIService.Methods.xsd" MetadataType="Schema" ID="e00601d3-b9d7-40f2-b8be-337df13c7172" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="System.IO.xsd" MetadataType="Schema" ID="88cf8e31-2b3d-4d1a-9172-e7b0ea930e93" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="DigitalData.Modules.ZooFlow.State.xsd" MetadataType="Schema" ID="c9ca2958-d16e-444e-ac34-40fc3c6a86cb" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="DigitalData.Services.EDMIService.Methods.SetAttributeValue.xsd" MetadataType="Schema" ID="a34a2b84-4efd-4be1-83ee-bcb340176a49" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd" MetadataType="Schema" ID="4c9227ac-82b3-4aff-bcb3-eab453dc69c5" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="Arrays.xsd" MetadataType="Schema" ID="74eac9b3-9049-499b-bf42-5e443530645c" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="Message.xsd" MetadataType="Schema" ID="2589e82f-d68f-4843-b153-a80edf895f82" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" /> <MetadataFile FileName="Message.xsd" MetadataType="Schema" ID="2589e82f-d68f-4843-b153-a80edf895f82" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
<MetadataFile FileName="DigitalData.Modules.EDMI.API.xsd" MetadataType="Schema" ID="4eca5a54-795a-4e5b-a3b1-10c24930efec" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" /> <MetadataFile FileName="DigitalData.Modules.EDMI.API.xsd" MetadataType="Schema" ID="4eca5a54-795a-4e5b-a3b1-10c24930efec" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
</Metadata> </Metadata>

View File

@ -25,6 +25,7 @@ Namespace EDMIServiceReference
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ImportFileResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult))> _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult))> _
Partial Public Class BaseResponse Partial Public Class BaseResponse
Inherits Object Inherits Object
@ -117,8 +118,17 @@ Namespace EDMIServiceReference
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileRequest)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileRequest)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.FileProperties)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.UserAttributeValue())), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.UserAttributeValue)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(System.IO.FileInfo)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(System.IO.FileSystemInfo)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.UserState)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueRequest)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueRequest)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ImportFileRequest)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ImportFileResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(String())), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.RightsAccessRight))> _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.RightsAccessRight))> _
Partial Public Class ScalarResult Partial Public Class ScalarResult
Inherits EDMIServiceReference.BaseResponse Inherits EDMIServiceReference.BaseResponse
@ -151,8 +161,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _ <System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _ System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="NewFileResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStor"& _ System.Runtime.Serialization.DataContractAttribute(Name:="NewFileResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"age.NewFile"), _ "NewFile"), _
System.SerializableAttribute()> _ System.SerializableAttribute()> _
Partial Public Class NewFileResponse Partial Public Class NewFileResponse
Inherits EDMIServiceReference.BaseResponse Inherits EDMIServiceReference.BaseResponse
@ -176,8 +186,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _ <System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _ System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStor"& _ System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"age.SetAttributeValue"), _ "SetAttributeValue"), _
System.SerializableAttribute()> _ System.SerializableAttribute()> _
Partial Public Class SetAttributeValueResponse Partial Public Class SetAttributeValueResponse
Inherits EDMIServiceReference.BaseResponse Inherits EDMIServiceReference.BaseResponse
@ -199,6 +209,31 @@ Namespace EDMIServiceReference
End Property End Property
End Class End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="ImportFileResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"GlobalIndexer.ImportFile"), _
System.SerializableAttribute()> _
Partial Public Class ImportFileResponse
Inherits EDMIServiceReference.BaseResponse
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private ObjectIdField As Long
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property ObjectId() As Long
Get
Return Me.ObjectIdField
End Get
Set
If (Me.ObjectIdField.Equals(value) <> true) Then
Me.ObjectIdField = value
Me.RaisePropertyChanged("ObjectId")
End If
End Set
End Property
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _ <System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _ System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="TableResult", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages"& _ System.Runtime.Serialization.DataContractAttribute(Name:="TableResult", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages"& _
@ -336,8 +371,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _ <System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _ System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="NewFileRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStor"& _ System.Runtime.Serialization.DataContractAttribute(Name:="NewFileRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"age.NewFile"), _ "NewFile"), _
System.SerializableAttribute()> _ System.SerializableAttribute()> _
Partial Public Class NewFileRequest Partial Public Class NewFileRequest
Inherits Object Inherits Object
@ -350,34 +385,16 @@ Namespace EDMIServiceReference
Private BusinessEntityField As String Private BusinessEntityField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _ <System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileChangedAtField As String Private FileField As EDMIServiceReference.FileProperties
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileChecksumField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileContentsField() As Byte
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileCreatedAtField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileImportedAtField As Date
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileNameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _ <System.Runtime.Serialization.OptionalFieldAttribute()> _
Private KindTypeField As String Private KindTypeField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private LanguageField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _ <System.Runtime.Serialization.OptionalFieldAttribute()> _
Private StoreNameField As String Private StoreNameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _ <System.Runtime.Serialization.OptionalFieldAttribute()> _
Private WhoField As String Private UserField As EDMIServiceReference.UserState
<Global.System.ComponentModel.BrowsableAttribute(false)> _ <Global.System.ComponentModel.BrowsableAttribute(false)> _
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
@ -402,6 +419,110 @@ Namespace EDMIServiceReference
End Set End Set
End Property End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property File() As EDMIServiceReference.FileProperties
Get
Return Me.FileField
End Get
Set
If (Object.ReferenceEquals(Me.FileField, value) <> true) Then
Me.FileField = value
Me.RaisePropertyChanged("File")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property KindType() As String
Get
Return Me.KindTypeField
End Get
Set
If (Object.ReferenceEquals(Me.KindTypeField, value) <> true) Then
Me.KindTypeField = value
Me.RaisePropertyChanged("KindType")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property StoreName() As String
Get
Return Me.StoreNameField
End Get
Set
If (Object.ReferenceEquals(Me.StoreNameField, value) <> true) Then
Me.StoreNameField = value
Me.RaisePropertyChanged("StoreName")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property User() As EDMIServiceReference.UserState
Get
Return Me.UserField
End Get
Set
If (Object.ReferenceEquals(Me.UserField, value) <> true) Then
Me.UserField = value
Me.RaisePropertyChanged("User")
End If
End Set
End Property
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
If (Not (propertyChanged) Is Nothing) Then
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
End If
End Sub
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="FileProperties", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods"), _
System.SerializableAttribute()> _
Partial Public Class FileProperties
Inherits Object
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
<System.NonSerializedAttribute()> _
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileChangedAtField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileChecksumField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileContentsField() As Byte
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileCreatedAtField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileImportedAtField As Date
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileInfoRawField As System.IO.FileInfo
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileNameField As String
<Global.System.ComponentModel.BrowsableAttribute(false)> _
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
Get
Return Me.extensionDataField
End Get
Set
Me.extensionDataField = value
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _ <System.Runtime.Serialization.DataMemberAttribute()> _
Public Property FileChangedAt() As String Public Property FileChangedAt() As String
Get Get
@ -467,6 +588,19 @@ Namespace EDMIServiceReference
End Set End Set
End Property End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property FileInfoRaw() As System.IO.FileInfo
Get
Return Me.FileInfoRawField
End Get
Set
If (Object.ReferenceEquals(Me.FileInfoRawField, value) <> true) Then
Me.FileInfoRawField = value
Me.RaisePropertyChanged("FileInfoRaw")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _ <System.Runtime.Serialization.DataMemberAttribute()> _
Public Property FileName() As String Public Property FileName() As String
Get Get
@ -480,15 +614,229 @@ Namespace EDMIServiceReference
End Set End Set
End Property End Property
<System.Runtime.Serialization.DataMemberAttribute()> _ Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Public Property KindType() As String
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
If (Not (propertyChanged) Is Nothing) Then
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
End If
End Sub
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="UserAttributeValue", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods"), _
System.SerializableAttribute()> _
Partial Public Class UserAttributeValue
Inherits Object
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
<System.NonSerializedAttribute()> _
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private AttributeIdField As Integer
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private AttributeNameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private AttributeValuesField() As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private ControlNameField As String
<Global.System.ComponentModel.BrowsableAttribute(false)> _
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
Get Get
Return Me.KindTypeField Return Me.extensionDataField
End Get End Get
Set Set
If (Object.ReferenceEquals(Me.KindTypeField, value) <> true) Then Me.extensionDataField = value
Me.KindTypeField = value End Set
Me.RaisePropertyChanged("KindType") End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property AttributeId() As Integer
Get
Return Me.AttributeIdField
End Get
Set
If (Me.AttributeIdField.Equals(value) <> true) Then
Me.AttributeIdField = value
Me.RaisePropertyChanged("AttributeId")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property AttributeName() As String
Get
Return Me.AttributeNameField
End Get
Set
If (Object.ReferenceEquals(Me.AttributeNameField, value) <> true) Then
Me.AttributeNameField = value
Me.RaisePropertyChanged("AttributeName")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property AttributeValues() As String()
Get
Return Me.AttributeValuesField
End Get
Set
If (Object.ReferenceEquals(Me.AttributeValuesField, value) <> true) Then
Me.AttributeValuesField = value
Me.RaisePropertyChanged("AttributeValues")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property ControlName() As String
Get
Return Me.ControlNameField
End Get
Set
If (Object.ReferenceEquals(Me.ControlNameField, value) <> true) Then
Me.ControlNameField = value
Me.RaisePropertyChanged("ControlName")
End If
End Set
End Property
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
If (Not (propertyChanged) Is Nothing) Then
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
End If
End Sub
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="UserState", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State"), _
System.SerializableAttribute()> _
Partial Public Class UserState
Inherits Object
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
<System.NonSerializedAttribute()> _
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private DateFormatField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private EmailField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private GivenNameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private HideBasicConfigField As Boolean
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private IsAdminField As Boolean
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private LanguageField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private LanguageIdField As Integer
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private MachineNameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private ShortNameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private SurnameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private UserIdField As Integer
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private UserNameField As String
<Global.System.ComponentModel.BrowsableAttribute(false)> _
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
Get
Return Me.extensionDataField
End Get
Set
Me.extensionDataField = value
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property DateFormat() As String
Get
Return Me.DateFormatField
End Get
Set
If (Object.ReferenceEquals(Me.DateFormatField, value) <> true) Then
Me.DateFormatField = value
Me.RaisePropertyChanged("DateFormat")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property Email() As String
Get
Return Me.EmailField
End Get
Set
If (Object.ReferenceEquals(Me.EmailField, value) <> true) Then
Me.EmailField = value
Me.RaisePropertyChanged("Email")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property GivenName() As String
Get
Return Me.GivenNameField
End Get
Set
If (Object.ReferenceEquals(Me.GivenNameField, value) <> true) Then
Me.GivenNameField = value
Me.RaisePropertyChanged("GivenName")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property HideBasicConfig() As Boolean
Get
Return Me.HideBasicConfigField
End Get
Set
If (Me.HideBasicConfigField.Equals(value) <> true) Then
Me.HideBasicConfigField = value
Me.RaisePropertyChanged("HideBasicConfig")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property IsAdmin() As Boolean
Get
Return Me.IsAdminField
End Get
Set
If (Me.IsAdminField.Equals(value) <> true) Then
Me.IsAdminField = value
Me.RaisePropertyChanged("IsAdmin")
End If End If
End Set End Set
End Property End Property
@ -507,27 +855,79 @@ Namespace EDMIServiceReference
End Property End Property
<System.Runtime.Serialization.DataMemberAttribute()> _ <System.Runtime.Serialization.DataMemberAttribute()> _
Public Property StoreName() As String Public Property LanguageId() As Integer
Get Get
Return Me.StoreNameField Return Me.LanguageIdField
End Get End Get
Set Set
If (Object.ReferenceEquals(Me.StoreNameField, value) <> true) Then If (Me.LanguageIdField.Equals(value) <> true) Then
Me.StoreNameField = value Me.LanguageIdField = value
Me.RaisePropertyChanged("StoreName") Me.RaisePropertyChanged("LanguageId")
End If End If
End Set End Set
End Property End Property
<System.Runtime.Serialization.DataMemberAttribute()> _ <System.Runtime.Serialization.DataMemberAttribute()> _
Public Property Who() As String Public Property MachineName() As String
Get Get
Return Me.WhoField Return Me.MachineNameField
End Get End Get
Set Set
If (Object.ReferenceEquals(Me.WhoField, value) <> true) Then If (Object.ReferenceEquals(Me.MachineNameField, value) <> true) Then
Me.WhoField = value Me.MachineNameField = value
Me.RaisePropertyChanged("Who") Me.RaisePropertyChanged("MachineName")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property ShortName() As String
Get
Return Me.ShortNameField
End Get
Set
If (Object.ReferenceEquals(Me.ShortNameField, value) <> true) Then
Me.ShortNameField = value
Me.RaisePropertyChanged("ShortName")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property Surname() As String
Get
Return Me.SurnameField
End Get
Set
If (Object.ReferenceEquals(Me.SurnameField, value) <> true) Then
Me.SurnameField = value
Me.RaisePropertyChanged("Surname")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property UserId() As Integer
Get
Return Me.UserIdField
End Get
Set
If (Me.UserIdField.Equals(value) <> true) Then
Me.UserIdField = value
Me.RaisePropertyChanged("UserId")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property UserName() As String
Get
Return Me.UserNameField
End Get
Set
If (Object.ReferenceEquals(Me.UserNameField, value) <> true) Then
Me.UserNameField = value
Me.RaisePropertyChanged("UserName")
End If End If
End Set End Set
End Property End Property
@ -544,8 +944,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _ <System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _ System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStor"& _ System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"age.SetAttributeValue"), _ "SetAttributeValue"), _
System.SerializableAttribute()> _ System.SerializableAttribute()> _
Partial Public Class SetAttributeValueRequest Partial Public Class SetAttributeValueRequest
Inherits Object Inherits Object
@ -560,6 +960,9 @@ Namespace EDMIServiceReference
<System.Runtime.Serialization.OptionalFieldAttribute()> _ <System.Runtime.Serialization.OptionalFieldAttribute()> _
Private AttributeValueField As String Private AttributeValueField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private LanguageField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _ <System.Runtime.Serialization.OptionalFieldAttribute()> _
Private ObjectIdField As Long Private ObjectIdField As Long
@ -602,6 +1005,19 @@ Namespace EDMIServiceReference
End Set End Set
End Property End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property Language() As String
Get
Return Me.LanguageField
End Get
Set
If (Object.ReferenceEquals(Me.LanguageField, value) <> true) Then
Me.LanguageField = value
Me.RaisePropertyChanged("Language")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _ <System.Runtime.Serialization.DataMemberAttribute()> _
Public Property ObjectId() As Long Public Property ObjectId() As Long
Get Get
@ -638,6 +1054,150 @@ Namespace EDMIServiceReference
End Sub End Sub
End Class End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="ImportFileRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"GlobalIndexer.ImportFile"), _
System.SerializableAttribute()> _
Partial Public Class ImportFileRequest
Inherits Object
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
<System.NonSerializedAttribute()> _
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private AttributeValuesField() As EDMIServiceReference.UserAttributeValue
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private BusinessEntityField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private FileField As EDMIServiceReference.FileProperties
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private KindTypeField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private ProfileIdField As Integer
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private StoreNameField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private UserField As EDMIServiceReference.UserState
<Global.System.ComponentModel.BrowsableAttribute(false)> _
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
Get
Return Me.extensionDataField
End Get
Set
Me.extensionDataField = value
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property AttributeValues() As EDMIServiceReference.UserAttributeValue()
Get
Return Me.AttributeValuesField
End Get
Set
If (Object.ReferenceEquals(Me.AttributeValuesField, value) <> true) Then
Me.AttributeValuesField = value
Me.RaisePropertyChanged("AttributeValues")
End If
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
Return Me.FileField
End Get
Set
If (Object.ReferenceEquals(Me.FileField, value) <> true) Then
Me.FileField = value
Me.RaisePropertyChanged("File")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property KindType() As String
Get
Return Me.KindTypeField
End Get
Set
If (Object.ReferenceEquals(Me.KindTypeField, value) <> true) Then
Me.KindTypeField = value
Me.RaisePropertyChanged("KindType")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property ProfileId() As Integer
Get
Return Me.ProfileIdField
End Get
Set
If (Me.ProfileIdField.Equals(value) <> true) Then
Me.ProfileIdField = value
Me.RaisePropertyChanged("ProfileId")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property StoreName() As String
Get
Return Me.StoreNameField
End Get
Set
If (Object.ReferenceEquals(Me.StoreNameField, value) <> true) Then
Me.StoreNameField = value
Me.RaisePropertyChanged("StoreName")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property User() As EDMIServiceReference.UserState
Get
Return Me.UserField
End Get
Set
If (Object.ReferenceEquals(Me.UserField, value) <> true) Then
Me.UserField = value
Me.RaisePropertyChanged("User")
End If
End Set
End Property
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
If (Not (propertyChanged) Is Nothing) Then
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
End If
End Sub
End Class
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _ <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="Rights.AccessRight", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API")> _ System.Runtime.Serialization.DataContractAttribute(Name:="Rights.AccessRight", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API")> _
Public Enum RightsAccessRight As Integer Public Enum RightsAccessRight As Integer
@ -787,6 +1347,12 @@ Namespace EDMIServiceReference
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValueResponse")> _ <System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValueResponse")> _
Function SetAttributeValueAsync(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.SetAttributeValueResponse) Function SetAttributeValueAsync(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.SetAttributeValueResponse)
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse")> _
Function ImportFile(ByVal Data As EDMIServiceReference.ImportFileRequest) As EDMIServiceReference.ImportFileResponse
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse")> _
Function ImportFileAsync(ByVal Data As EDMIServiceReference.ImportFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileResponse)
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentStreamRequest) von Nachricht "DocumentStreamRequest" nicht mit dem Standardwert (GetFileByObjectId) übereinstimmt. 'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentStreamRequest) von Nachricht "DocumentStreamRequest" nicht mit dem Standardwert (GetFileByObjectId) übereinstimmt.
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse"), _ <System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse"), _
System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdObjectDoesN"& _ System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdObjectDoesN"& _
@ -1128,6 +1694,14 @@ Namespace EDMIServiceReference
Return MyBase.Channel.SetAttributeValueAsync(Data) Return MyBase.Channel.SetAttributeValueAsync(Data)
End Function End Function
Public Function ImportFile(ByVal Data As EDMIServiceReference.ImportFileRequest) As EDMIServiceReference.ImportFileResponse Implements EDMIServiceReference.IEDMIService.ImportFile
Return MyBase.Channel.ImportFile(Data)
End Function
Public Function ImportFileAsync(ByVal Data As EDMIServiceReference.ImportFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileResponse) Implements EDMIServiceReference.IEDMIService.ImportFileAsync
Return MyBase.Channel.ImportFileAsync(Data)
End Function
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _ <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId
Return MyBase.Channel.GetFileByObjectId(request) Return MyBase.Channel.GetFileByObjectId(request)

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.datacontract.org/2004/07/System.IO" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/System.IO" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xs:complexType name="FileInfo">
<xs:complexContent mixed="false">
<xs:extension base="tns:FileSystemInfo" />
</xs:complexContent>
</xs:complexType>
<xs:element name="FileInfo" nillable="true" type="tns:FileInfo" />
<xs:complexType name="FileSystemInfo">
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##local" processContents="skip" />
</xs:sequence>
<xs:attribute ref="ser:FactoryType" />
</xs:complexType>
<xs:element name="FileSystemInfo" nillable="true" type="tns:FileSystemInfo" />
</xs:schema>

View File

@ -191,6 +191,15 @@
<soap12:body use="literal" /> <soap12:body use="literal" />
</wsdl:output> </wsdl:output>
</wsdl:operation> </wsdl:operation>
<wsdl:operation name="ImportFile">
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetFileByObjectId"> <wsdl:operation name="GetFileByObjectId">
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" style="document" /> <soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" style="document" />
<wsdl:input name="DocumentStreamRequest"> <wsdl:input name="DocumentStreamRequest">

View File

@ -73,6 +73,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Client\NewFile.vb" /> <Compile Include="Client\NewFile.vb" />
<Compile Include="Client\Options.vb" />
<Compile Include="Client\Rights.vb" /> <Compile Include="Client\Rights.vb" />
<Compile Include="Client\Channel.vb" /> <Compile Include="Client\Channel.vb" />
<Compile Include="Connected Services\EDMIServiceReference\Reference.vb"> <Compile Include="Connected Services\EDMIServiceReference\Reference.vb">
@ -109,6 +110,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <None Include="app.config" />
<None Include="Connected Services\EDMIServiceReference\Arrays.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse.datasource"> <None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
@ -118,6 +122,9 @@
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource"> <None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse.datasource"> <None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
@ -142,18 +149,27 @@
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.xsd"> <None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.ZooFlow.State.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Exceptions.xsd"> <None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Exceptions.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.FileStorage.NewFile.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.FileStorage.SetAttributeValue.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Messages.xsd"> <None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Messages.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.NewFile.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.SetAttributeValue.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.wsdl" /> <None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.wsdl" />
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.xsd"> <None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
@ -168,6 +184,9 @@
<None Include="Connected Services\EDMIServiceReference\System.Data.xsd"> <None Include="Connected Services\EDMIServiceReference\System.Data.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\System.IO.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\EDMIServiceReference\System.xsd"> <None Include="Connected Services\EDMIServiceReference\System.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>

View File

@ -410,9 +410,7 @@ Public Class ImportZUGFeRDFiles
AddRejectedState(oMessageId, "NoFerdsException", " Email enthielt keine ZUGFeRD-Dokumente", "", oSQLTransaction) AddRejectedState(oMessageId, "NoFerdsException", " Email enthielt keine ZUGFeRD-Dokumente", "", oSQLTransaction)
Catch ex As NoFerdsAlternateException Catch ex As NoFerdsAlternateException
' TODO ' TODO: Maybe dont even log this 'error', since it's not really an error and it might happen *A LOT*
' Maybe dont even log this 'error', since it's not really an error
' and it might happen *A LOT*
_logger.Error(ex) _logger.Error(ex)
oMoveDirectory = oArgs.NonZugferdDirectory oMoveDirectory = oArgs.NonZugferdDirectory

View File

@ -0,0 +1,12 @@
Imports System.Runtime.CompilerServices
Public Module DataRowEx
<Extension()>
Public Function ItemEx(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T
Try
Return Utils.NotNull(pRow.Item(pFieldName), pDefaultValue)
Catch ex As Exception
Return Nothing
End Try
End Function
End Module

View File

@ -74,6 +74,7 @@
<Import Include="System.Threading.Tasks" /> <Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="DataRowEx.vb" />
<Compile Include="InvalidChars.vb" /> <Compile Include="InvalidChars.vb" />
<Compile Include="Utils.vb" /> <Compile Include="Utils.vb" />
<Compile Include="My Project\AssemblyInfo.vb" /> <Compile Include="My Project\AssemblyInfo.vb" />

View File

@ -1,4 +1,5 @@
Imports System.Drawing Imports System.Drawing
Imports System.Runtime.CompilerServices
Imports System.Text Imports System.Text
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports System.Windows.Forms Imports System.Windows.Forms

View File

@ -1,7 +1,7 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Namespace [PatternModule] Namespace Modules
Public Class BaseModule Public Class BaseModule
Friend ReadOnly Logger As Logger Friend ReadOnly Logger As Logger
Private ReadOnly MyRegex As Regex = New Regex("{#(\w+)#([\:\.\w\s_-]+)}+") Private ReadOnly MyRegex As Regex = New Regex("{#(\w+)#([\:\.\w\s_-]+)}+")

View File

@ -1,6 +1,6 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace [PatternModule] Namespace Modules
Public Class Clipboard Public Class Clipboard
Inherits BaseModule Inherits BaseModule
Implements IModule Implements IModule

View File

@ -2,7 +2,7 @@
Imports DigitalData.Controls.LookupGrid Imports DigitalData.Controls.LookupGrid
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace [PatternModule] Namespace Modules
''' <summary> ''' <summary>
''' Patterns for control values on a panel ''' Patterns for control values on a panel
''' </summary> ''' </summary>
@ -14,11 +14,9 @@ Namespace [PatternModule]
Public Property PatternIdentifier As String = "CTRL" Implements IModule.PatternIdentifier Public Property PatternIdentifier As String = "CTRL" Implements IModule.PatternIdentifier
Public Property IsComplex As Boolean = True Implements IModule.IsComplex Public Property IsComplex As Boolean = True Implements IModule.IsComplex
Private ReadOnly Logger As Logger
Public Sub New(pLogConfig As LogConfig) Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
Logger = pLogConfig.GetLogger()
End Sub End Sub
Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace

View File

@ -0,0 +1,67 @@
Imports System.IO
Imports DigitalData.Modules.Logging
Namespace Modules
Public Class FileInformation
Inherits BaseModule
Implements IModule
Public Const FILE_VALUE_FILEINFO = "FILEINFO"
Public Const FILE_VALUE_FILENAME = "FILENAME"
Public Const FILE_VALUE_EXTENSION = "EXTENSION"
Public Const FILE_VALUE_FILENAME_EXT = "FILENAME_EXT"
Public Const FILE_VALUE_DATE_CREATED = "DATE_CREATED"
Public Const FILE_VALUE_DATE_MODIFIED = "DATE_MODIFIED"
Public Property PatternIdentifier As String = "FILE" Implements IModule.PatternIdentifier
Public Property IsComplex As Boolean = False Implements IModule.IsComplex
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
End Sub
Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace
Dim oResult = pInput
Dim oCounter = 0
Dim oFileInfo As FileInfo = pReplaceMap.Item(FILE_VALUE_FILEINFO)
' Replace Filename without extension
While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_FILENAME)
Dim oFilenameWithoutExtension = Path.GetFileNameWithoutExtension(oFileInfo.Name)
oResult = ReplacePattern(oResult, PatternIdentifier, oFilenameWithoutExtension)
IncrementCounterOrThrow(oCounter)
End While
' Replace Filename with extension
While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_FILENAME_EXT)
Dim oFilename As String = oFileInfo.Name
oResult = ReplacePattern(oResult, PatternIdentifier, oFilename)
IncrementCounterOrThrow(oCounter)
End While
' Replace Extension
While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_FILENAME_EXT)
Dim oExtension As String = oFileInfo.Extension.Substring(1)
oResult = ReplacePattern(oResult, PatternIdentifier, oExtension)
IncrementCounterOrThrow(oCounter)
End While
' Replace creation date
While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_DATE_CREATED)
Dim oDateCreated = oFileInfo.CreationTime.ToString("yyyy-MM-dd")
oResult = ReplacePattern(oResult, PatternIdentifier, oDateCreated)
IncrementCounterOrThrow(oCounter)
End While
' Replace last modification date
While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_DATE_CREATED)
Dim oDateModified = oFileInfo.LastWriteTime.ToString("yyyy-MM-dd")
oResult = ReplacePattern(oResult, PatternIdentifier, oDateModified)
IncrementCounterOrThrow(oCounter)
End While
Return oResult
End Function
End Class
End Namespace

View File

@ -0,0 +1,55 @@
Imports DigitalData.Modules.Logging
Namespace Modules
''' <summary>
''' Patterns for Generating a Filename in Global Indexer
''' </summary>
Public Class Globix
Inherits BaseModule
Implements IModule
Public Const GBX_VALUE_INDICIES = "GLOBIX_INDICIES"
Public Property PatternIdentifier As String = "GBX" Implements IModule.PatternIdentifier
Public Property IsComplex As Boolean = True Implements IModule.IsComplex
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
End Sub
Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace
Dim oResult = pInput
Dim oCounter = 0
Dim pIndexes As Dictionary(Of String, List(Of String)) = pReplaceMap.Item(GBX_VALUE_INDICIES)
While ContainsPattern(oResult, PatternIdentifier)
Try
Dim oIndexName As String = GetNextPattern(oResult, PatternIdentifier).Value
If pIndexes.ContainsKey(oIndexName) = False Then
Logger.Warn("Value for Index [{0}] does not exist and will not be used for replacing. Skipping.", oIndexName)
End If
' TODO: If Index contains multiple values, only the first value will be used as value
Dim oIndexValues As List(Of String) = pIndexes.Item(oIndexName)
Dim oFirstValue As String = oIndexValues.FirstOrDefault()
If oFirstValue Is Nothing Then
Logger.Warn("Value for Index [{0}] is empty and will not be used for replacing. Skipping.")
Return oResult
End If
oResult = ReplacePattern(oResult, PatternIdentifier, oFirstValue)
Catch ex As Exception
Logger.Error(ex)
Return oResult
Finally
IncrementCounterOrThrow(oCounter)
End Try
End While
Return oResult
End Function
End Class
End Namespace

View File

@ -2,7 +2,7 @@
Imports DigitalData.Controls.LookupGrid Imports DigitalData.Controls.LookupGrid
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace [PatternModule] Namespace Modules
''' <summary> ''' <summary>
''' Patterns for Windream Indicies ''' Patterns for Windream Indicies
''' </summary> ''' </summary>
@ -15,11 +15,8 @@ Namespace [PatternModule]
Public Property PatternIdentifier As String = "IDB" Implements IModule.PatternIdentifier Public Property PatternIdentifier As String = "IDB" Implements IModule.PatternIdentifier
Public Property IsComplex As Boolean = True Implements IModule.IsComplex Public Property IsComplex As Boolean = True Implements IModule.IsComplex
Private ReadOnly Logger As Logger
Public Sub New(pLogConfig As LogConfig) Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
Logger = pLogConfig.GetLogger()
End Sub End Sub
Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace

View File

@ -1,6 +1,6 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace [PatternModule] Namespace Modules
''' <summary> ''' <summary>
''' Simple patterns that only rely on .NET functions ''' Simple patterns that only rely on .NET functions
''' </summary> ''' </summary>
@ -12,6 +12,9 @@ Namespace [PatternModule]
Public Const INT_VALUE_MACHINE = "MACHINE" Public Const INT_VALUE_MACHINE = "MACHINE"
Public Const INT_VALUE_DOMAIN = "DOMAIN" Public Const INT_VALUE_DOMAIN = "DOMAIN"
Public Const INT_VALUE_DATE = "DATE" Public Const INT_VALUE_DATE = "DATE"
Public Const INT_VALUE_DATE_YYYY = "DATE_YYYY"
Public Const INT_VALUE_DATE_MM = "DATE_MM"
Public Const INT_VALUE_DATE_DD = "DATE_DD"
Public Property PatternIdentifier As String = "INT" Implements IModule.PatternIdentifier Public Property PatternIdentifier As String = "INT" Implements IModule.PatternIdentifier
Public Property IsComplex As Boolean = False Implements IModule.IsComplex Public Property IsComplex As Boolean = False Implements IModule.IsComplex
@ -23,30 +26,29 @@ Namespace [PatternModule]
Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace
Dim oResult = pInput Dim oResult = pInput
Dim oCounter = 0 Dim oCounter = 0
Dim oNow As Date = Now
' Replace Username(s)
While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_USERNAME)
oResult = ReplacePattern(oResult, PatternIdentifier, pReplaceMap.Item(INT_VALUE_USERNAME))
IncrementCounterOrThrow(oCounter)
End While
' Replace Machinename(s)
While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_MACHINE)
oResult = ReplacePattern(oResult, PatternIdentifier, pReplaceMap.Item(INT_VALUE_MACHINE))
IncrementCounterOrThrow(oCounter)
End While
' Replace Domainname(s)
While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DOMAIN)
oResult = ReplacePattern(oResult, PatternIdentifier, pReplaceMap.Item(INT_VALUE_DOMAIN))
IncrementCounterOrThrow(oCounter)
End While
' Replace CurrentDate(s) ' Replace CurrentDate(s)
While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE) While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE)
oResult = ReplacePattern(oResult, PatternIdentifier, pReplaceMap.Item(INT_VALUE_DATE)) oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("yyyy-MM-dd"))
IncrementCounterOrThrow(oCounter)
End While
' Replace Year(s)
While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_YYYY)
oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("yyyy"))
IncrementCounterOrThrow(oCounter)
End While
' Replace Month(s)
While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_MM)
oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("MM"))
IncrementCounterOrThrow(oCounter)
End While
' Replace Day(s)
While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_DD)
oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("dd"))
IncrementCounterOrThrow(oCounter) IncrementCounterOrThrow(oCounter)
End While End While

View File

@ -1,6 +1,6 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace [PatternModule] Namespace Modules
Public Class User Public Class User
Inherits BaseModule Inherits BaseModule
Implements IModule Implements IModule

View File

@ -2,7 +2,7 @@
Imports DigitalData.Controls.LookupGrid Imports DigitalData.Controls.LookupGrid
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace [PatternModule] Namespace Modules
''' <summary> ''' <summary>
''' Patterns for Windream Indicies ''' Patterns for Windream Indicies
''' </summary> ''' </summary>
@ -15,11 +15,8 @@ Namespace [PatternModule]
Public Property PatternIdentifier As String = "WMI" Implements IModule.PatternIdentifier Public Property PatternIdentifier As String = "WMI" Implements IModule.PatternIdentifier
Public Property IsComplex As Boolean = True Implements IModule.IsComplex Public Property IsComplex As Boolean = True Implements IModule.IsComplex
Private ReadOnly Logger As Logger
Public Sub New(pLogConfig As LogConfig) Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
Logger = pLogConfig.GetLogger()
End Sub End Sub
Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace

View File

@ -81,10 +81,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Constants.vb" /> <Compile Include="Constants.vb" />
<Compile Include="Modules\FileInformation.vb" />
<Compile Include="Modules\IDB.vb" /> <Compile Include="Modules\IDB.vb" />
<Compile Include="Modules\Globix.vb" />
<Compile Include="Modules\Windream.vb" /> <Compile Include="Modules\Windream.vb" />
<Compile Include="Modules\User.vb" /> <Compile Include="Modules\User.vb" />
<Compile Include="Modules\IModule.vb" /> <Compile Include="IModule.vb" />
<Compile Include="Modules\Clipboard.vb" /> <Compile Include="Modules\Clipboard.vb" />
<Compile Include="Modules\Controls.vb" /> <Compile Include="Modules\Controls.vb" />
<Compile Include="Modules\Internal.vb" /> <Compile Include="Modules\Internal.vb" />

View File

@ -1,4 +1,5 @@
Imports System.Text.RegularExpressions Imports System.IO
Imports System.Text.RegularExpressions
Imports System.Windows.Forms Imports System.Windows.Forms
Imports DigitalData.Controls.LookupGrid Imports DigitalData.Controls.LookupGrid
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
@ -49,7 +50,7 @@ Public Class Patterns2
Private ReadOnly LogConfig As LogConfig Private ReadOnly LogConfig As LogConfig
Private ReadOnly Logger As Logger Private ReadOnly Logger As Logger
Private ReadOnly Base As PatternModule.BaseModule Private ReadOnly Base As Modules.BaseModule
Private ReadOnly ControlPanel As Panel Private ReadOnly ControlPanel As Panel
Private ReadOnly IDBActive As Boolean Private ReadOnly IDBActive As Boolean
@ -59,13 +60,14 @@ Public Class Patterns2
Public Sub New(pLogConfig As LogConfig) Public Sub New(pLogConfig As LogConfig)
LogConfig = pLogConfig LogConfig = pLogConfig
Logger = pLogConfig.GetLogger() Logger = pLogConfig.GetLogger()
Base = New PatternModule.BaseModule(LogConfig) Base = New Modules.BaseModule(LogConfig)
Modules.AddRange({ Modules.AddRange({
New PatternModule.Internal(LogConfig), New Modules.Internal(LogConfig),
New PatternModule.Clipboard(LogConfig), New Modules.Clipboard(LogConfig),
New PatternModule.Controls(LogConfig), New Modules.Controls(LogConfig),
New PatternModule.User(LogConfig) New Modules.User(LogConfig),
New Modules.FileInformation(LogConfig)
}) })
End Sub End Sub
@ -75,12 +77,12 @@ Public Class Patterns2
IDBActive = pIDBActive IDBActive = pIDBActive
End Sub End Sub
Public Function ReplaceAllValues(pInput As String, pPanel As Panel, pUser As State.UserState) As String Public Function ReplaceAllValues(pInput As String, pPanel As Panel, pUser As State.UserState, pFIleinfo As FileInfo) As String
Dim oResult = pInput Dim oResult = pInput
For Each oModule In Modules For Each oModule In Modules
Try Try
Dim oArgs = GetReplaceMapForModule(oModule, pPanel, pUser) Dim oArgs = GetReplaceMapForModule(oModule, pPanel:=pPanel, pUser:=pUser, pFileInfo:=pFIleinfo)
oResult = oModule.Replace(oResult, oArgs) oResult = oModule.Replace(oResult, oArgs)
Catch ex As Exception Catch ex As Exception
Logger.Warn("Placeholders for String [{0}] could not be replaced completely in Module [{1}]. Skipping.", pInput, oModule.GetType.Name) Logger.Warn("Placeholders for String [{0}] could not be replaced completely in Module [{1}]. Skipping.", pInput, oModule.GetType.Name)
@ -94,17 +96,27 @@ Public Class Patterns2
Public Function ReplaceUserValues(pInput As String, pUser As State.UserState) As String Public Function ReplaceUserValues(pInput As String, pUser As State.UserState) As String
Dim oResult = pInput Dim oResult = pInput
Dim oModule = GetModule(Of PatternModule.User)() Dim oModule = GetModule(Of Modules.User)()
Dim oArgs = GetReplaceMapForModule(oModule, pUser:=pUser) Dim oArgs = GetReplaceMapForModule(oModule, pUser:=pUser)
oResult = DoReplaceForModule(oResult, oModule, oArgs) oResult = DoReplaceForModule(oResult, oModule, oArgs)
Return oResult Return oResult
End Function End Function
Public Function ReplaceFileValues(pInput As String, pFileInfo As FileInfo) As String
Dim oResult = pInput
Dim oModule = GetModule(Of Modules.User)()
Dim oArgs = GetReplaceMapForModule(oModule, pFileInfo:=pFileInfo)
oResult = DoReplaceForModule(oResult, oModule, oArgs)
Return oResult
End Function
Public Function ReplaceControlValues(pInput As String, pPanel As Panel) As String Public Function ReplaceControlValues(pInput As String, pPanel As Panel) As String
Dim oResult = pInput Dim oResult = pInput
Dim oModule = GetModule(Of PatternModule.Controls)() Dim oModule = GetModule(Of Modules.Controls)()
Dim oArgs = GetReplaceMapForModule(oModule, pPanel:=pPanel) Dim oArgs = GetReplaceMapForModule(oModule, pPanel:=pPanel)
oResult = DoReplaceForModule(oResult, oModule, oArgs) oResult = DoReplaceForModule(oResult, oModule, oArgs)
@ -114,7 +126,7 @@ Public Class Patterns2
Public Function ReplaceWindreamValues(pInput As String, pWMObject As WMObject) As String Public Function ReplaceWindreamValues(pInput As String, pWMObject As WMObject) As String
Dim oResult = pInput Dim oResult = pInput
Dim oModule = GetModule(Of PatternModule.Windream)() Dim oModule = GetModule(Of Modules.Windream)()
Dim oArgs = GetReplaceMapForModule(oModule, pWMObject:=pWMObject) Dim oArgs = GetReplaceMapForModule(oModule, pWMObject:=pWMObject)
oResult = DoReplaceForModule(oResult, oModule, oArgs) oResult = DoReplaceForModule(oResult, oModule, oArgs)
@ -124,17 +136,29 @@ Public Class Patterns2
Public Function ReplaceInternalValues(pInput As String) As String Public Function ReplaceInternalValues(pInput As String) As String
Dim oResult = pInput Dim oResult = pInput
Dim oInternalModule = GetModule(Of PatternModule.Internal)() Dim oInternalModule = GetModule(Of Modules.Internal)()
Dim oInternalArgs = GetReplaceMapForModule(oInternalModule) Dim oInternalArgs = GetReplaceMapForModule(oInternalModule)
oResult = DoReplaceForModule(oResult, oInternalModule, oInternalArgs) oResult = DoReplaceForModule(oResult, oInternalModule, oInternalArgs)
Dim oClipboardModule = GetModule(Of PatternModule.Clipboard)() Dim oClipboardModule = GetModule(Of Modules.Clipboard)()
Dim oClipboardArgs = GetReplaceMapForModule(oClipboardModule) Dim oClipboardArgs = GetReplaceMapForModule(oClipboardModule)
oResult = DoReplaceForModule(oResult, oClipboardModule, oClipboardArgs) oResult = DoReplaceForModule(oResult, oClipboardModule, oClipboardArgs)
Return oResult Return oResult
End Function End Function
Public Function ReplaceGlobixValues(pInput As String, pGlobixIndexes As Dictionary(Of String, List(Of String))) As String
Dim oResult = pInput
Dim oGlobixModule = GetModule(Of Modules.Globix)()
Dim oGlobixArgs = GetReplaceMapForModule(oGlobixModule, pGlobixIndexes:=pGlobixIndexes)
oResult = DoReplaceForModule(oResult, oGlobixModule, oGlobixArgs)
Return oResult
End Function
Private Function DoReplaceForModule(pInput As String, pModule As IModule, pArgs As Dictionary(Of String, Object)) As String Private Function DoReplaceForModule(pInput As String, pModule As IModule, pArgs As Dictionary(Of String, Object)) As String
Try Try
pInput = pModule.Replace(pInput, pArgs) pInput = pModule.Replace(pInput, pArgs)
@ -152,53 +176,62 @@ Public Class Patterns2
SingleOrDefault() SingleOrDefault()
End Function End Function
Private Function GetReplaceMapForModule(pModule As IModule, Optional pPanel As Panel = Nothing, Optional pUser As State.UserState = Nothing, Optional pWMObject As WMObject = Nothing) As Dictionary(Of String, Object) Private Function GetReplaceMapForModule(pModule As IModule,
Optional pPanel As Panel = Nothing,
Optional pUser As State.UserState = Nothing,
Optional pWMObject As WMObject = Nothing,
Optional pGlobixIndexes As Dictionary(Of String, List(Of String)) = Nothing,
Optional pFileInfo As FileInfo = Nothing
) As Dictionary(Of String, Object)
Dim oArgs As New Dictionary(Of String, Object) Dim oArgs As New Dictionary(Of String, Object)
If TypeOf pModule Is PatternModule.Clipboard Then If TypeOf pModule Is Modules.Clipboard Then
Try Try
oArgs.Add(PatternModule.Clipboard.CLIP_VALUE_BOARD, My.Computer.Clipboard.GetText()) oArgs.Add(Patterns.Modules.Clipboard.CLIP_VALUE_BOARD, My.Computer.Clipboard.GetText())
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try
ElseIf TypeOf pModule Is PatternModule.Internal Then ElseIf TypeOf pModule Is Modules.FileInformation Then
Try Try
oArgs.Add(PatternModule.Internal.INT_VALUE_USERNAME, System.Environment.UserName) oArgs.Add(Patterns.Modules.FileInformation.FILE_VALUE_FILEINFO, pFileInfo)
oArgs.Add(PatternModule.Internal.INT_VALUE_MACHINE, System.Environment.MachineName)
oArgs.Add(PatternModule.Internal.INT_VALUE_DOMAIN, System.Environment.UserDomainName)
oArgs.Add(PatternModule.Internal.INT_VALUE_DATE, Now.ToShortDateString)
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try
ElseIf TypeOf pModule Is PatternModule.User Then ElseIf TypeOf pModule Is Modules.User Then
Try Try
oArgs.Add(PatternModule.User.USER_VALUE_EMAIL, pUser.Email) oArgs.Add(Patterns.Modules.User.USER_VALUE_EMAIL, pUser.Email)
oArgs.Add(PatternModule.User.USER_VALUE_LANGUAGE, pUser.Language) oArgs.Add(Patterns.Modules.User.USER_VALUE_LANGUAGE, pUser.Language)
oArgs.Add(PatternModule.User.USER_VALUE_PRENAME, pUser.GivenName) oArgs.Add(Patterns.Modules.User.USER_VALUE_PRENAME, pUser.GivenName)
oArgs.Add(PatternModule.User.USER_VALUE_SHORTNAME, pUser.ShortName) oArgs.Add(Patterns.Modules.User.USER_VALUE_SHORTNAME, pUser.ShortName)
oArgs.Add(PatternModule.User.USER_VALUE_SURNAME, pUser.Surname) oArgs.Add(Patterns.Modules.User.USER_VALUE_SURNAME, pUser.Surname)
oArgs.Add(PatternModule.User.USER_VALUE_USER_ID, pUser.UserId) oArgs.Add(Patterns.Modules.User.USER_VALUE_USER_ID, pUser.UserId)
oArgs.Add(PatternModule.User.USER_VALUE_USER_NAME, pUser.UserName) oArgs.Add(Patterns.Modules.User.USER_VALUE_USER_NAME, pUser.UserName)
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try
ElseIf TypeOf pModule Is PatternModule.Controls Then ElseIf TypeOf pModule Is Modules.Controls Then
Try Try
oArgs.Add(PatternModule.Controls.CTRL_VALUE_PANEL, pPanel) oArgs.Add(Patterns.Modules.Controls.CTRL_VALUE_PANEL, pPanel)
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try
ElseIf TypeOf pModule Is PatternModule.Windream Then ElseIf TypeOf pModule Is Modules.Windream Then
Try Try
oArgs.Add(PatternModule.Windream.WM_VALUE_DOCUMENT, pWMObject) oArgs.Add(Patterns.Modules.Windream.WM_VALUE_DOCUMENT, pWMObject)
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try
ElseIf TypeOf pModule Is Modules.Globix Then
Try
oArgs.Add(Patterns.Modules.Globix.GBX_VALUE_INDICIES, pGlobixIndexes)
Catch ex As Exception
Logger.Error(ex)
End Try
End If End If
Return oArgs Return oArgs

View File

@ -17,19 +17,27 @@ Namespace State
Public Property MachineName As String Public Property MachineName As String
Public Property DateFormat As String Public Property DateFormat As String
Public Property Language As String Public Property Language As String
Public Property LanguageID As Int16 Public Property LanguageId As Integer
Public Property IsAdmin As Boolean = False Public Property IsAdmin As Boolean = False
Public Property HideBasicConfig As Boolean = False Public Property HideBasicConfig As Boolean = False
''' <summary> ''' <summary>
''' Initialize user object with values that can be read from the environment ''' Initialize user object with values that can be read from the environment. Only meant for Global Application State
''' </summary> ''' </summary>
Public Sub New() Public Sub New()
Language = Thread.CurrentThread.CurrentCulture.Name Language = Thread.CurrentThread.CurrentCulture.Name
UserName = System.Environment.UserName UserName = System.Environment.UserName
MachineName = System.Environment.MachineName MachineName = System.Environment.MachineName
End Sub End Sub
''' <summary>
''' Initialize user object with user name. Mandatory for sending user data between systems.
''' </summary>
Public Sub New(pUserName As String)
MyBase.New()
UserName = pUserName
End Sub
End Class End Class
End Namespace End Namespace

View File

@ -8,4 +8,14 @@ Public Class BaseClass
LogConfig = pLogConfig LogConfig = pLogConfig
Logger = pLogConfig.GetLogger() Logger = pLogConfig.GetLogger()
End Sub End Sub
Public Sub LogAndThrow(pMessage As String)
Logger.Warn(pMessage)
Throw New ApplicationException(pMessage)
End Sub
Public Sub LogAndThrow(pException As Exception, pMessage As String)
Logger.Error(pException)
Throw New ApplicationException(pMessage, pException)
End Sub
End Class End Class

View File

@ -7,20 +7,12 @@ Public MustInherit Class BaseMethod
Friend ReadOnly Database As MSSQLServer Friend ReadOnly Database As MSSQLServer
Friend ReadOnly Helpers As Helpers Friend ReadOnly Helpers As Helpers
Friend ReadOnly GlobalState As GlobalState
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer) Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pGlobalState As GlobalState)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
Database = pMSSQLServer Database = pMSSQLServer
Helpers = New Helpers(pLogConfig, pMSSQLServer) Helpers = New Helpers(pLogConfig, pMSSQLServer)
GlobalState = pGlobalState
End Sub End Sub
Public Function LogAndThrow(pMessage As String)
Logger.Warn(pMessage)
Throw New ApplicationException(pMessage)
End Function
Public Function LogAndThrow(pException As Exception, pMessage As String)
Logger.Error(pException)
Throw New ApplicationException(pMessage, pException)
End Function
End Class End Class

View File

@ -1,17 +1,17 @@
Imports DigitalData.Modules.Database Imports System.IO
Imports System.ServiceModel
Imports System.ServiceModel.Description
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Language
Imports DigitalData.Modules Imports DigitalData.Modules
Imports System.IO Imports DigitalData.Modules.EDMI
Imports System.ServiceModel Imports DigitalData.Modules.EDMI.File
Imports System.Data.SqlClient
Imports System.ServiceModel.Description
Imports DigitalData.Services.EDMIService.Messages
Imports DigitalData.Modules.EDMI.API.Rights Imports DigitalData.Modules.EDMI.API.Rights
Imports DigitalData.Services.EDMIService.Messages
Imports DigitalData.Services.EDMIService.Exceptions Imports DigitalData.Services.EDMIService.Exceptions
Imports DigitalData.Services.EDMIService.GlobalState Imports DigitalData.Services.EDMIService.Methods
Imports DigitalData.Services.EDMIService.FileStorage Imports DigitalData.Services.EDMIService.Methods.SetAttributeValue
Imports DigitalData.Services.EDMIService.FileStorage.SetAttributeValue
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession)> <ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession)>
Public Class EDMIService Public Class EDMIService
@ -33,13 +33,12 @@ Public Class EDMIService
Private ReadOnly _Logger As Logger Private ReadOnly _Logger As Logger
Private ReadOnly _Debug As Boolean = False Private ReadOnly _Debug As Boolean = False
Private ReadOnly _Username As String Private ReadOnly _Username As String
Private ReadOnly _IDBHelpers As IDB.Helpers
Private _IDBHelpers As IDB.Helpers
Public Shared Sub Configure(Config As ServiceConfiguration) Public Shared Sub Configure(Config As ServiceConfiguration)
Dim oBaseAddress = Config.BaseAddresses.Item(0) Dim oBaseAddress = Config.BaseAddresses.Item(0)
Dim oBinding = EDMI.API.Channel.GetBinding() Dim oBinding = API.Channel.GetBinding()
Dim oAddress = New EndpointAddress(oBaseAddress) Dim oAddress = New EndpointAddress(oBaseAddress)
' See: https://stackoverflow.com/questions/42327988/addserviceendpoint-throws-key-is-null ' See: https://stackoverflow.com/questions/42327988/addserviceendpoint-throws-key-is-null
Dim oDescription = ContractDescription.GetContract(GetType(IEDMIService), GetType(EDMIService)) Dim oDescription = ContractDescription.GetContract(GetType(IEDMIService), GetType(EDMIService))
@ -63,16 +62,22 @@ Public Class EDMIService
Public Function NewFile(Data As NewFile.NewFileRequest) As NewFile.NewFileResponse Implements IEDMIService.NewFile Public Function NewFile(Data As NewFile.NewFileRequest) As NewFile.NewFileResponse Implements IEDMIService.NewFile
_Logger.Debug("Start of Method [NewFile]") _Logger.Debug("Start of Method [NewFile]")
Dim oNewFile As New NewFileMethod(LogConfig, MSSQL_IDB, GlobalState.ObjectStores) Dim oNewFile As New NewFileMethod(LogConfig, MSSQL_IDB, GlobalState)
Return oNewFile.Run(Data) Return oNewFile.Run(Data)
End Function End Function
Public Function SetAttributeValue(Data As SetAttributeValue.SetAttributeValueRequest) As SetAttributeValue.SetAttributeValueResponse Implements IEDMIService.SetAttributeValue Public Function SetAttributeValue(Data As SetAttributeValue.SetAttributeValueRequest) As SetAttributeValue.SetAttributeValueResponse Implements IEDMIService.SetAttributeValue
_Logger.Debug("Start of Method [SetAttributeValue]") _Logger.Debug("Start of Method [SetAttributeValue]")
Dim oSetAttributeValue As New SetAttributeValueMethod(LogConfig, MSSQL_IDB) Dim oSetAttributeValue As New SetAttributeValueMethod(LogConfig, MSSQL_IDB, GlobalState)
Return oSetAttributeValue.Run(Data) Return oSetAttributeValue.Run(Data)
End Function End Function
Public Function ImportFile(pData As GlobalIndexer.ImportFile.ImportFileRequest) As GlobalIndexer.ImportFile.ImportFileResponse Implements IEDMIService.ImportFile
_Logger.Debug("Start of Method [ImportFile]")
Dim oImportFile As New GlobalIndexer.ImportFile.ImportFileMethod(LogConfig, MSSQL_IDB, GlobalState)
Return oImportFile.Run(pData)
End Function
#Region "=== Heartbeat ===" #Region "=== Heartbeat ==="
Public Function Heartbeat() As Boolean Implements IEDMIService.Heartbeat Public Function Heartbeat() As Boolean Implements IEDMIService.Heartbeat
Return True Return True
@ -81,52 +86,18 @@ Public Class EDMIService
#Region "=== Database ===" #Region "=== Database ==="
Public Function ReturnDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult Implements IEDMIService.ReturnDatatableFromCache Public Function ReturnDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult Implements IEDMIService.ReturnDatatableFromCache
Try Dim oReturnDatatableFromCache As New GetDatatableFromCache.GetDatatableFromCacheMethod(LogConfig, MSSQL_ECM, GlobalState)
_Logger.Debug($"ReturnDatatableFromCache: Datatable: {Name}") Dim oResult = oReturnDatatableFromCache.Run(New GetDatatableFromCache.GetDatatableFromCacheRequest With {
.DataTable = Name,
.FilterExpression = FilterExpression,
.SortByColumn = SortByColumn
})
Dim oDataset As DataSet = GlobalState.TableStore If oResult.OK Then
Dim oDataTable As DataTable = Nothing Return New TableResult(oResult.Table)
Else
_Logger.Debug("ReturnDatatableFromCache: DataSet contains [{0}] datatables", oDataset.Tables.Count) Return New TableResult(oResult.ErrorMessage)
End If
If oDataset.Tables.Contains(Name) Then
oDataTable = oDataset.Tables.Item(Name).Copy()
' Apply filter and sorting to data
Dim oFilterExpression As String = Utils.NotNull(FilterExpression, String.Empty)
Dim oSortByColumn As String = Utils.NotNull(SortByColumn, String.Empty)
Dim oFilteredRows = oDataTable.Select(oFilterExpression, oSortByColumn)
Dim oFilteredTable As DataTable = Nothing
If oFilteredRows.Count > 0 Then
oFilteredTable = oFilteredRows.CopyToDataTable()
oFilteredTable.TableName = Name
Else
' Produce empty table
oFilteredTable = oDataTable.Clone()
oFilteredTable.TableName = Name
End If
_Logger.Debug("ReturnDatatableFromCache: Datatable Stats for [{0}]:", Name)
_Logger.Debug("Unfiltered: [{0}] rows", oDataTable.Rows.Count)
_Logger.Debug("Filtered: [{0}] rows", oFilteredTable.Rows.Count)
Return New TableResult(oFilteredTable)
Else
_Logger.Warn($"ReturnDatatableFromCache: Datatable {Name} does not exist")
Throw GetFault($"ReturnDatatableFromCache: Datatable {Name} does not exist")
End If
Catch ex As FaultException
_Logger.Error(ex)
Throw ex
Catch ex As Exception
_Logger.Error(ex)
Throw GetFault(ex)
End Try
End Function End Function
#End Region #End Region

View File

@ -131,15 +131,27 @@
<Compile Include="BaseMethod.vb" /> <Compile Include="BaseMethod.vb" />
<Compile Include="ClassConstants.vb" /> <Compile Include="ClassConstants.vb" />
<Compile Include="Config.vb" /> <Compile Include="Config.vb" />
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueMethod.vb" /> <Compile Include="Methods\FileProperties.vb" />
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueRequest.vb" /> <Compile Include="Methods\GetAttributeValue\GetAttributeValueMethod.vb" />
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueResponse.vb" /> <Compile Include="Methods\GetAttributeValue\GetAttributeValueRequest.vb" />
<Compile Include="Filestorage\NewFile\NewFileMethod.vb" /> <Compile Include="Methods\GetAttributeValue\GetAttributeValueResponse.vb" />
<Compile Include="Filestorage\NewFile\NewFileRequest.vb" /> <Compile Include="Methods\GetDatatableFromCache\GetDatatableFromCacheMethod.vb" />
<Compile Include="Filestorage\NewFile\NewFileResponse.vb" /> <Compile Include="Methods\GetDatatableFromCache\GetDatatableFromCacheRequest.vb" />
<Compile Include="Filestorage\SetAttributeValue\SetAttributeValueMethod.vb" /> <Compile Include="Methods\GetDatatableFromCache\GetDatatableFromCacheResponse.vb" />
<Compile Include="Filestorage\SetAttributeValue\SetAttributeValueResponse.vb" /> <Compile Include="Methods\GlobalIndexer\AutomaticIndex.vb" />
<Compile Include="Filestorage\SetAttributeValue\SetAttributeValueRequest.vb" /> <Compile Include="Methods\GlobalIndexer\BaseIndex.vb" />
<Compile Include="Methods\GlobalIndexer\ImportFile\Steps\AutomaticIndexing.vb" />
<Compile Include="Methods\GlobalIndexer\ImportFile\ImportFileMethod.vb" />
<Compile Include="Methods\GlobalIndexer\ImportFile\ImportFileRequest.vb" />
<Compile Include="Methods\GlobalIndexer\ImportFile\ImportFileResponse.vb" />
<Compile Include="Methods\GlobalIndexer\ImportFile\Steps\PostProcessing.vb" />
<Compile Include="Methods\GlobalIndexer\ManualIndex.vb" />
<Compile Include="Methods\NewFile\NewFileMethod.vb" />
<Compile Include="Methods\NewFile\NewFileRequest.vb" />
<Compile Include="Methods\NewFile\NewFileResponse.vb" />
<Compile Include="Methods\SetAttributeValue\SetAttributeValueMethod.vb" />
<Compile Include="Methods\SetAttributeValue\SetAttributeValueResponse.vb" />
<Compile Include="Methods\SetAttributeValue\SetAttributeValueRequest.vb" />
<Compile Include="GlobalState.vb" /> <Compile Include="GlobalState.vb" />
<Compile Include="IDB\Helpers.vb" /> <Compile Include="IDB\Helpers.vb" />
<Compile Include="Messages\AccessRightResult.vb" /> <Compile Include="Messages\AccessRightResult.vb" />
@ -148,6 +160,7 @@
<Compile Include="Exceptions.vb" /> <Compile Include="Exceptions.vb" />
<Compile Include="Messages\DatabaseResult.vb" /> <Compile Include="Messages\DatabaseResult.vb" />
<Compile Include="EDMIService.vb" /> <Compile Include="EDMIService.vb" />
<Compile Include="Methods\UserAttributeValue.vb" />
<Compile Include="Scheduler\Scheduler.vb" /> <Compile Include="Scheduler\Scheduler.vb" />
<Compile Include="Scheduler\DatatableJob.vb" /> <Compile Include="Scheduler\DatatableJob.vb" />
<Compile Include="Scheduler\JobListener.vb" /> <Compile Include="Scheduler\JobListener.vb" />
@ -233,6 +246,14 @@
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project> <Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
<Name>Logging</Name> <Name>Logging</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Modules.Patterns\Patterns.vbproj">
<Project>{7c3b0c7e-59fe-4e1a-a655-27ae119f9444}</Project>
<Name>Patterns</Name>
</ProjectReference>
<ProjectReference Include="..\Modules.ZooFlow\ZooFlow.vbproj">
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
<Name>ZooFlow</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1"> <BootstrapperPackage Include=".NETFramework,Version=v4.6.1">

View File

@ -1,4 +1,6 @@
Imports DigitalData.Modules.Database Imports System.Data.SqlClient
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class GlobalState Public Class GlobalState
@ -8,6 +10,7 @@ Public Class GlobalState
Private ReadOnly _MSSQL_ECM As MSSQLServer Private ReadOnly _MSSQL_ECM As MSSQLServer
Public Property ObjectStores As New List(Of ObjectStore) Public Property ObjectStores As New List(Of ObjectStore)
Public Property Connections As New List(Of DatabaseConnection)
Public Property TableStore As New DataSet Public Property TableStore As New DataSet
@ -18,15 +21,40 @@ Public Class GlobalState
_MSSQL_ECM = MSSQL_ECM _MSSQL_ECM = MSSQL_ECM
End Sub End Sub
Public Function GetObjectStore(pName As String) As ObjectStore
Return ObjectStores.
Where(Function(store) store.Title.ToUpper = pName.ToUpper).
FirstOrDefault()
End Function
Public Function GetConnection(pConnectionId As Long) As DatabaseConnection
Return Connections.
Where(Function(conn) conn.Id = pConnectionId).
FirstOrDefault()
End Function
Public Function GetConnectionString(pConnectionId As Long) As String
Dim oConnection = GetConnection(pConnectionId)
Dim oBuilder As New SqlConnectionStringBuilder With {
.DataSource = oConnection.Server,
.InitialCatalog = oConnection.Database,
.UserID = oConnection.Username,
.Password = MSSQLServer.DecryptConnectionString(oConnection.Password)
}
Return oBuilder.ToString
End Function
Public Sub LoadObjectStores() Public Sub LoadObjectStores()
_Logger.Debug("Loading Object Stores") _Logger.Info("Loading Object Stores")
Try Try
Dim oSQL As String = "SELECT * FROM VWIDB_OBJECTSTORE" Dim oSQL As String = "SELECT * FROM VWIDB_OBJECTSTORE"
Dim oDatatable As DataTable = _MSSQL_IDB.GetDatatable(oSQL) Dim oDatatable As DataTable = _MSSQL_IDB.GetDatatable(oSQL)
ObjectStores.Clear() ObjectStores.Clear()
_Logger.Debug("Found {0} Object Stores", oDatatable.Rows) _Logger.Info("Found [{0}] Object Stores", oDatatable.Rows.Count)
For Each oRow As DataRow In oDatatable.Rows For Each oRow As DataRow In oDatatable.Rows
Dim oStore As New ObjectStore() With { Dim oStore As New ObjectStore() With {
@ -35,7 +63,7 @@ Public Class GlobalState
.Path = oRow.Item("IDB_PRAEFIX"), .Path = oRow.Item("IDB_PRAEFIX"),
.Title = oRow.Item("OS_TITLE") .Title = oRow.Item("OS_TITLE")
} }
_Logger.Debug("New Object Store [{0}]", oStore.Title) _Logger.Info("New Object Store [{0}]", oStore.Title)
ObjectStores.Add(oStore) ObjectStores.Add(oStore)
Next Next
Catch ex As Exception Catch ex As Exception
@ -43,11 +71,34 @@ Public Class GlobalState
End Try End Try
End Sub End Sub
Public Function GetObjectStore(Name As String) As ObjectStore Public Sub LoadConnections()
Return ObjectStores. _Logger.Info("Loading Database Connections")
Where(Function(o) o.Title.ToUpper = Name.ToUpper). Try
FirstOrDefault() Dim oSQL As String = "SELECT * FROM TBDD_CONNECTION"
End Function Dim oDatatable As DataTable = _MSSQL_ECM.GetDatatable(oSQL)
Connections.Clear()
_Logger.Info("Found [{0}] Connections", oDatatable.Rows.Count)
For Each oRow As DataRow In oDatatable.Rows
Dim oConnection As New DatabaseConnection() With {
.Id = oRow.ItemEx(Of Integer)("GUID"),
.Active = oRow.ItemEx(Of Boolean)("AKTIV"),
.Database = oRow.ItemEx(Of String)("DATENBANK"),
.Title = oRow.ItemEx(Of String)("BEZEICHNUNG"),
.Password = oRow.ItemEx(Of String)("PASSWORD"),
.Provider = oRow.ItemEx(Of String)("SQL_PROVIDER"),
.Server = oRow.ItemEx(Of String)("SERVER"),
.Username = oRow.ItemEx(Of String)("USERNAME")
}
_Logger.Info("New Connection [{0}]", oConnection.Title)
Connections.Add(oConnection)
Next
Catch ex As Exception
_Logger.Error(ex)
End Try
End Sub
Class ObjectStore Class ObjectStore
Public Id As Long Public Id As Long
@ -55,4 +106,15 @@ Public Class GlobalState
Public IsArchive As Boolean Public IsArchive As Boolean
Public Path As String Public Path As String
End Class End Class
Class DatabaseConnection
Public Id As Long
Public Title As String
Public Provider As String
Public Server As String
Public Database As String
Public Username As String
Public Password As String
Public Active As Boolean
End Class
End Class End Class

View File

@ -3,7 +3,7 @@ Imports System.ServiceModel
Imports DigitalData.Modules.Filesystem Imports DigitalData.Modules.Filesystem
Imports DigitalData.Services.EDMIService.Exceptions Imports DigitalData.Services.EDMIService.Exceptions
Imports DigitalData.Services.EDMIService.Messages Imports DigitalData.Services.EDMIService.Messages
Imports DigitalData.Services.EDMIService.FileStorage Imports DigitalData.Services.EDMIService.Methods
<ServiceContract(Name:="IEDMIService", [Namespace]:="http://DigitalData.Services.EDMIService")> <ServiceContract(Name:="IEDMIService", [Namespace]:="http://DigitalData.Services.EDMIService")>
Interface IEDMIService Interface IEDMIService
@ -69,9 +69,12 @@ Interface IEDMIService
<OperationContract> <OperationContract>
Function SetAttributeValue(Data As SetAttributeValue.SetAttributeValueRequest) As SetAttributeValue.SetAttributeValueResponse Function SetAttributeValue(Data As SetAttributeValue.SetAttributeValueRequest) As SetAttributeValue.SetAttributeValueResponse
'----------------------------------------------------- <OperationContract>
' Everything below this line is subject to change! Function ImportFile(Data As GlobalIndexer.ImportFile.ImportFileRequest) As GlobalIndexer.ImportFile.ImportFileResponse
'-----------------------------------------------------
#End Region
#Region "Document (Old)"
<OperationContract> <OperationContract>
<FaultContract(GetType(ObjectDoesNotExistFault))> <FaultContract(GetType(ObjectDoesNotExistFault))>
@ -86,7 +89,6 @@ Interface IEDMIService
<FaultContract(GetType(UnexpectedErrorFault))> <FaultContract(GetType(UnexpectedErrorFault))>
Function ListFilesForUser() As DocumentListResponse Function ListFilesForUser() As DocumentListResponse
#End Region #End Region
#Region "Helpers" #Region "Helpers"

View File

@ -1,9 +1,7 @@
Imports System.Runtime.Serialization Imports System.Runtime.Serialization
Namespace FileStorage.NewFile Namespace Methods
<Serializable> Public Class FileProperties
<DataContract>
Public Class NewFileRequest
''' <summary> ''' <summary>
''' Absolute filename of the file to be imported ''' Absolute filename of the file to be imported
''' </summary> ''' </summary>
@ -41,36 +39,10 @@ Namespace FileStorage.NewFile
Public Property FileChecksum As String Public Property FileChecksum As String
''' <summary> ''' <summary>
''' Name/title of the ObjectStore to save the file to, ex. Work ''' The Raw FileInfo Object
''' </summary> ''' </summary>
<DataMember> <DataMember>
Public Property StoreName As String Public Property FileInfoRaw As IO.FileInfo
''' <summary>
''' The business entity of the file, ex DEFAULT
''' </summary>
<DataMember>
Public Property BusinessEntity As String
''' <summary>
''' The kind of object to be created, ex. DOC
''' </summary>
<DataMember>
Public Property KindType As String
''' <summary>
''' The name of the user importing the file, ex. JenneJ
''' </summary>
<DataMember>
Public Property Who As String
''' <summary>
''' The language of the user
''' </summary>
''' <returns></returns>
<DataMember>
Public Property Language As String
End Class End Class
End Namespace End Namespace

View File

@ -1,12 +1,12 @@
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace FileStorage.GetAttributeValue Namespace Methods.GetAttributeValue
Public Class GetAttributeValueMethod Public Class GetAttributeValueMethod
Inherits BaseMethod Inherits BaseMethod
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer) Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pGlobalState As GlobalState)
MyBase.New(pLogConfig, pDatabase) MyBase.New(pLogConfig, pDatabase, pGlobalState)
End Sub End Sub
Public Function Run(pData As GetAttributeValueRequest) As GetAttributeValueResponse Public Function Run(pData As GetAttributeValueRequest) As GetAttributeValueResponse
@ -16,7 +16,7 @@ Namespace FileStorage.GetAttributeValue
End If End If
Dim oValue As Object Dim oValue As Object
' TODO: Implement GetAttributeValue
Return New GetAttributeValueResponse(pData.ObjectId, oValue) Return New GetAttributeValueResponse(pData.ObjectId, oValue)
Catch ex As Exception Catch ex As Exception

View File

@ -1,4 +1,4 @@
Namespace FileStorage.GetAttributeValue Namespace Methods.GetAttributeValue
Public Class GetAttributeValueRequest Public Class GetAttributeValueRequest
Public Property ObjectId As Long Public Property ObjectId As Long
End Class End Class

View File

@ -1,6 +1,6 @@
Imports System.Runtime.Serialization Imports System.Runtime.Serialization
Namespace FileStorage.GetAttributeValue Namespace Methods.GetAttributeValue
<Serializable> <Serializable>
<DataContract> <DataContract>

View File

@ -0,0 +1,59 @@
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Logging
Namespace Methods.GetDatatableFromCache
Public Class GetDatatableFromCacheMethod
Inherits BaseMethod
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pGlobalState As GlobalState)
MyBase.New(pLogConfig, pMSSQLServer, pGlobalState)
End Sub
Public Function Run(pData As GetDatatableFromCacheRequest) As GetDatatableFromCacheResponse
Try
Logger.Debug($"ReturnDatatableFromCache: Datatable: {pData.DataTable}")
Dim oDataTable As DataTable = Nothing
Logger.Debug("ReturnDatatableFromCache: DataSet contains [{0}] datatables", GlobalState.TableStore.Tables.Count)
If GlobalState.TableStore.Tables.Contains(pData.DataTable) Then
oDataTable = GlobalState.TableStore.Tables.Item(pData.DataTable).Copy()
' Apply filter and sorting to data
Dim oFilterExpression As String = Utils.NotNull(pData.FilterExpression, String.Empty)
Dim oSortByColumn As String = Utils.NotNull(pData.SortByColumn, String.Empty)
Dim oFilteredRows = oDataTable.Select(oFilterExpression, oSortByColumn)
Dim oFilteredTable As DataTable = Nothing
If oFilteredRows.Count > 0 Then
oFilteredTable = oFilteredRows.CopyToDataTable()
oFilteredTable.TableName = pData.DataTable
Else
' Produce empty table
oFilteredTable = oDataTable.Clone()
oFilteredTable.TableName = pData.DataTable
End If
Logger.Debug("ReturnDatatableFromCache: Datatable Stats for [{0}]:", pData.DataTable)
Logger.Debug("Unfiltered: [{0}] rows", oDataTable.Rows.Count)
Logger.Debug("Filtered: [{0}] rows", oFilteredTable.Rows.Count)
Return New GetDatatableFromCacheResponse(oFilteredTable)
Else
Logger.Warn($"ReturnDatatableFromCache: Datatable {pData.DataTable} does not exist")
Return New GetDatatableFromCacheResponse(New KeyNotFoundException($"Datatable {pData.DataTable} does not exist"))
End If
Catch ex As Exception
Logger.Error(ex)
Return New GetDatatableFromCacheResponse(ex)
End Try
End Function
End Class
End Namespace

View File

@ -0,0 +1,14 @@
Imports System.Runtime.Serialization
Namespace Methods.GetDatatableFromCache
<Serializable>
<DataContract>
Public Class GetDatatableFromCacheRequest
<DataMember>
Public Property DataTable As String
<DataMember>
Public Property FilterExpression As String
<DataMember>
Public Property SortByColumn As String
End Class
End Namespace

View File

@ -0,0 +1,22 @@
Imports System.Runtime.Serialization
Namespace Methods.GetDatatableFromCache
<Serializable>
<DataContract>
Public Class GetDatatableFromCacheResponse
Inherits Messages.BaseResponse
<DataMember>
Public Property Table As DataTable
Public Sub New(pTable As DataTable)
MyBase.New()
Table = pTable
End Sub
Public Sub New(pException As Exception, Optional pDetails As String = "")
MyBase.New(pException, pDetails)
End Sub
End Class
End Namespace

View File

@ -0,0 +1,8 @@
Namespace Methods.GlobalIndexer
Public Class AutomaticIndex
Inherits BaseIndex
Public Value As String
End Class
End Namespace

View File

@ -0,0 +1,21 @@
Namespace Methods.GlobalIndexer
Public MustInherit Class BaseIndex
Public Id As Integer
Public Name As String
Public ProfileId As Integer
Public SQLCommand As String
Public SQLConnectionId As Integer
Public Sequence As Integer = 0
Public Function HasSqlCommand() As Boolean
Return Not (
SQLCommand Is Nothing OrElse
SQLCommand = String.Empty OrElse
SQLConnectionId < 0
)
End Function
End Class
End Namespace

View File

@ -0,0 +1,220 @@
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Patterns
Imports DigitalData.Modules.Language
Imports DigitalData.Services.EDMIService.Methods.GetDatatableFromCache
Namespace Methods.GlobalIndexer.ImportFile
Public Class ImportFileMethod
Inherits BaseMethod
Private ReadOnly Patterns As Patterns2
Private ReadOnly GetDatatable As GetDatatableFromCacheMethod
Private Profile As DataRow
Private ManualIndexes As List(Of ManualIndex)
Private AutomaticIndexes As List(Of AutomaticIndex)
Private ManualIndexesPostProcessing As DataTable
Private Const VIEW_PROFILE = "VWGI_DOCTYPE_IDB"
Private Const VIEW_INDEX_MANUAL = "VWDDINDEX_MAN"
Private Const VIEW_INDEX_AUTOMATIC = "VWDDINDEX_AUTOM"
Private Const TABLE_POST_PROCESSING = "TBDD_INDEX_MAN_POSTPROCESSING"
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pGlobalState As GlobalState)
MyBase.New(pLogConfig, pMSSQLServer, pGlobalState)
Patterns = New Patterns2(pLogConfig)
GetDatatable = New GetDatatableFromCacheMethod(LogConfig, Database, GlobalState)
End Sub
''' <summary>
'''
''' </summary>
''' <remarks>
'''
'''
'''
''' </remarks>
Public Function Run(pData As ImportFileRequest)
Try
' TODO: Add missing user properties in UserState from TBDD_USER
'pData.User = ResolveUserFromUserName(pData.User.UserName)
LoadIndexes(pData.ProfileId)
LoadProfile(pData.ProfileId)
Dim oFinalAttributes = pData.AttributeValues
Dim oFileName As String = GetFilenameByNameconvention(pData.File.FileName, Profile.Item("NAMENKONVENTION"))
' Apply post processing
Dim oPostProcessing = New Steps.PostProcessing(LogConfig, ManualIndexesPostProcessing)
oFinalAttributes = oPostProcessing.ApplyManualPostprocessing(oFinalAttributes)
' Apply automatic attributes
Dim oAutomaticIndexing = New Steps.AutomaticIndexing(LogConfig, Database, AutomaticIndexes, GlobalState)
oFinalAttributes = oAutomaticIndexing.ApplyAutomaticeAttributes(oFinalAttributes, pData.File.FileInfoRaw, pData.User)
' Import the file
Dim oNewFile As New NewFileMethod(LogConfig, Database, GlobalState)
Dim oResponse = oNewFile.Run(New NewFile.NewFileRequest With {
.File = pData.File,
.BusinessEntity = pData.BusinessEntity,
.KindType = pData.KindType,
.StoreName = pData.StoreName,
.User = pData.User
})
If oResponse.OK Then
Return New ImportFileResponse(oResponse.ObjectId)
Else
Throw New ApplicationException(oResponse.ErrorMessage)
End If
Catch ex As Exception
Return New ImportFileResponse(ex)
End Try
End Function
Private Function GetFilenameByNameconvention(pFileName As String, pNameconvention As String) As String
Return pFileName
End Function
Private Sub LoadIndexes(pProfileId As Integer)
Logger.Debug("Start of Method [LoadIndexes]")
LoadManualIndexes(pProfileId)
LoadAutomaticIndexes(pProfileId)
LoadPostProcessingSteps()
End Sub
''' <summary>
''' Load Profiles for this Import
''' </summary>
Private Sub LoadProfile(pProfileId As Integer)
Logger.Debug("Start of Method [LoadAutomaticIndexes]")
Try
Dim oProfile = GetDatatable.Run(
New GetDatatableFromCacheRequest With {
.DataTable = VIEW_PROFILE,
.FilterExpression = $"DOCTYPE_ID = {pProfileId}"
})
If oProfile.OK = False Then
LogAndThrow(oProfile.ErrorMessage)
End If
Profile = oProfile.Table.Rows.Item(0)
Catch ex As Exception
LogAndThrow(ex, "Error while automatic loading indexes!")
End Try
End Sub
Private Sub LoadAutomaticIndexes(pProfileId As Integer)
Logger.Debug("Start of Method [LoadAutomaticIndexes]")
Try
' Load automatic Indexes for this Import
Dim oAutomaticIndexes = GetDatatable.Run(
New GetDatatableFromCacheRequest With {
.DataTable = VIEW_INDEX_MANUAL,
.FilterExpression = $"DOK_ID = {pProfileId}"
})
If oAutomaticIndexes.OK = False Then
LogAndThrow(oAutomaticIndexes.ErrorMessage)
End If
Dim oIndexes As New List(Of AutomaticIndex)
For Each oRow As DataRow In oAutomaticIndexes.Table.Rows
Dim oAutomaticIndex As New AutomaticIndex With {
.Id = oRow.ItemEx(Of Integer)("GUID"),
.Name = oRow.ItemEx(Of String)("INDEXNAME"),
.ProfileId = oRow.ItemEx(Of Integer)("DOCTYPE_ID"),
.SQLCommand = oRow.ItemEx(Of String)("SQL_RESULT"),
.SQLConnectionId = oRow.ItemEx(Of Integer)("CONNECTION_ID"),
.Sequence = oRow.ItemEx(Of String)("SEQUENCE"),
.Value = oRow.ItemEx(Of String)("VALUE")
}
Next
AutomaticIndexes = oIndexes
Catch ex As Exception
LogAndThrow(ex, "Error while automatic loading indexes!")
End Try
End Sub
Private Sub LoadManualIndexes(pProfileId As Integer)
Logger.Debug("Start of Method [LoadManualIndexes]")
Try
' Load manual Indexes for this Import
Dim oManualIndexes = GetDatatable.Run(
New GetDatatableFromCacheRequest With {
.DataTable = VIEW_INDEX_MANUAL,
.FilterExpression = $"DOK_ID = {pProfileId}"
})
If oManualIndexes.OK = False Then
LogAndThrow(oManualIndexes.ErrorMessage)
End If
Dim oIndexes As New List(Of ManualIndex)
For Each oRow As DataRow In oManualIndexes.Table.Rows
Dim oManualIndex As New ManualIndex With {
.Id = oRow.ItemEx(Of Integer)("GUID"),
.Name = oRow.ItemEx(Of String)("INDEXNAME"),
.ProfileId = oRow.ItemEx(Of Integer)("DOCTYPE_ID"),
.IsOptional = oRow.ItemEx(Of Boolean)("OPTIONAL"),
.IsMultiselect = oRow.ItemEx(Of String)("MULTISELECT"),
.SQLCommand = oRow.ItemEx(Of String)("SQL_RESULT"),
.SQLConnectionId = oRow.ItemEx(Of Integer)("CONNECTION_ID"),
.DefaultValue = oRow.ItemEx(Of String)("DEFAULT_VALUE"),
.DataType = oRow.ItemEx(Of String)("DATA_TYPE")
}
Next
ManualIndexes = oIndexes
Catch ex As Exception
LogAndThrow(ex, "Error while loading indexes!")
End Try
End Sub
Private Sub LoadPostProcessingSteps()
Logger.Debug("Start of Method [LoadPostProcessingSteps]")
Try
' Generate a string containing all index ids joined into a string
Dim oIndexIdList As List(Of Integer) = ManualIndexes.Select(Function(index) index.Id).ToList()
Dim oIndexIds As String = String.Join(",", oIndexIdList)
' Load all relevant postprocessing steps
Dim oPostProcessingSteps = GetDatatable.Run(
New GetDatatableFromCacheRequest With {
.DataTable = TABLE_POST_PROCESSING,
.FilterExpression = $"IDXMAN_ID IN ({oIndexIds})"
})
If oPostProcessingSteps.OK = False Then
LogAndThrow(oPostProcessingSteps.ErrorMessage)
End If
ManualIndexesPostProcessing = oPostProcessingSteps.Table
Catch ex As Exception
LogAndThrow(ex, "Error while loading post processing steps!")
End Try
End Sub
End Class
End Namespace

View File

@ -0,0 +1,52 @@
Imports System.Runtime.Serialization
Imports DigitalData.Modules.ZooFlow.State
Namespace Methods.GlobalIndexer.ImportFile
<Serializable>
<DataContract>
Public Class ImportFileRequest
''' <summary>
''' Important File properties like, Name, Contents, CreatedAt, ModifiedAt, Checksum
''' </summary>
<DataMember>
Public Property File As FileProperties
''' <summary>
''' The ProfileId the file will be imported with
''' </summary>
<DataMember>
Public Property ProfileId As Integer
''' <summary>
''' The business entity of the file, ex DEFAULT
''' </summary>
<DataMember>
Public Property BusinessEntity As String
''' <summary>
''' The kind of object to be created, ex. DOC
''' </summary>
<DataMember>
Public Property KindType As String
''' <summary>
''' Name/title of the ObjectStore to save the file to, ex. Work
''' </summary>
<DataMember>
Public Property StoreName As String
''' <summary>
''' The attribute values given by the user in the form of
''' Attribute Name/Attribute Value/ControlName
''' </summary>
<DataMember>
Public Property AttributeValues As List(Of UserAttributeValue)
''' <summary>
''' User Importing the file
''' </summary>
''' <returns></returns>
<DataMember>
Public Property User As UserState
End Class
End Namespace

View File

@ -0,0 +1,22 @@
Imports System.Runtime.Serialization
Namespace Methods.GlobalIndexer.ImportFile
<Serializable>
<DataContract>
Public Class ImportFileResponse
Inherits Messages.BaseResponse
<DataMember>
Public Property ObjectId As Long
Public Sub New(pObjectId As Long)
MyBase.New()
ObjectId = pObjectId
End Sub
Public Sub New(pException As Exception, Optional pDetails As String = "")
MyBase.New(pException, pDetails)
End Sub
End Class
End Namespace

View File

@ -0,0 +1,85 @@
Imports System.IO
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Patterns
Imports DigitalData.Modules.ZooFlow.State
Imports DigitalData.Services.EDMIService.GlobalState
Namespace Methods.GlobalIndexer.ImportFile.Steps
Public Class AutomaticIndexing
Inherits BaseClass
Private ReadOnly GlobalState As GlobalState
Private ReadOnly AutomaticIndexes As List(Of AutomaticIndex)
Private ReadOnly Patterns As Patterns2
Private ReadOnly Database As MSSQLServer
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pAutomaticIndexes As List(Of AutomaticIndex), pGlobalState As GlobalState)
MyBase.New(pLogConfig)
Database = pDatabase
GlobalState = pGlobalState
AutomaticIndexes = pAutomaticIndexes
Patterns = New Patterns2(pLogConfig)
End Sub
Public Function ApplyAutomaticeAttributes(pManualAttributes As List(Of UserAttributeValue), pFileInfo As FileInfo, pUserState As UserState) As List(Of UserAttributeValue)
Logger.Debug("Start of Method [ApplyAutomaticeAttributes]")
Dim oAttributes = pManualAttributes
For Each oAutomaticIndex In AutomaticIndexes
' We add oAttributes from the previous run into the current run so it is in theory possible to reference
' automatic attributes which have been set just before.
Dim oAttribute = ApplyAutomaticIndex(oAutomaticIndex, pFileInfo, pUserState, oAttributes)
oAttributes.Add(oAttribute)
Next
Return oAttributes
End Function
Private Function ApplyAutomaticIndex(pAutomaticIndex As AutomaticIndex, pFileInfo As FileInfo, pUserState As UserState, pAttributes As List(Of UserAttributeValue)) As UserAttributeValue
Dim oAttributeDict = pAttributes.ToDictionary(
Function(attr) attr.AttributeName,
Function(attr) attr.AttributeValues)
' If there is no SQL command, we use the Value property and replace all placeholders in it.
If pAutomaticIndex.HasSqlCommand = False Then
Dim oResult As String = GetPlaceholderValue(pAutomaticIndex.Value, pFileInfo, pUserState, oAttributeDict)
Return New UserAttributeValue With {
.AttributeValues = New List(Of String) From {oResult},
.AttributeName = pAutomaticIndex.Name,
.AttributeId = pAutomaticIndex.Id
}
End If
' Otherwise we will replace placeholders in the SQL command and then execute it
Dim oConnectionString As String = GlobalState.GetConnectionString(pAutomaticIndex.SQLConnectionId)
Dim oFinalSQLCommand = pAutomaticIndex.SQLCommand
oFinalSQLCommand = GetPlaceholderValue(oFinalSQLCommand, pFileInfo, pUserState, oAttributeDict)
' Now we have a SQL command which only contains vector placeholders
' Next, we execute the command to get our result
Dim oValue = Database.GetScalarValueWithConnection(oFinalSQLCommand, oConnectionString)
' TODO: Return multiple values
Return New UserAttributeValue With {
.AttributeValues = New List(Of String) From {oValue},
.AttributeName = pAutomaticIndex.Name,
.AttributeId = pAutomaticIndex.Id
}
End Function
Private Function GetPlaceholderValue(pValue As String, pFileInfo As FileInfo, pUserState As UserState, pAttributes As Dictionary(Of String, List(Of String))) As String
Dim oResult As String = pValue
oResult = Patterns.ReplaceInternalValues(oResult)
oResult = Patterns.ReplaceFileValues(oResult, pFileInfo)
oResult = Patterns.ReplaceUserValues(oResult, pUserState)
oResult = Patterns.ReplaceGlobixValues(oResult, pAttributes)
Return oResult
End Function
End Class
End Namespace

View File

@ -0,0 +1,98 @@
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Namespace Methods.GlobalIndexer.ImportFile.Steps
Public Class PostProcessing
Inherits BaseClass
Public Const TYPE_VBSPLIT = "VBSPLIT"
Public Const TYPE_VBREPLACE = "VBREPLACE"
Public Const TYPE_REGEXPRESSION = "REG. EXPRESSION"
Private PostprocessingSteps As DataTable
Public Sub New(pLogConfig As LogConfig, pPostProcessingSteps As DataTable)
MyBase.New(pLogConfig)
PostprocessingSteps = pPostProcessingSteps
End Sub
Public Function ApplyManualPostprocessing(pManualAttributes As List(Of UserAttributeValue)) As List(Of UserAttributeValue)
Logger.Debug("Start of Method [ApplyManualPostprocessing]")
Dim oAttributes = pManualAttributes
For Each oProcessingRow As DataRow In PostprocessingSteps.Rows
Dim oIndexId = oProcessingRow.ItemEx(Of Integer)("IDXMAN_ID")
Dim oIndex As UserAttributeValue = pManualAttributes.
Where(Function(attr) attr.AttributeId = oProcessingRow.ItemEx(Of Integer)("IDXMAN_ID")).
FirstOrDefault()
Dim oValue = GetPostprocessingValue(oIndex.AttributeValues, oProcessingRow)
oAttributes.Add(New UserAttributeValue With {
.AttributeId = oIndexId,
.AttributeName = oIndex.AttributeName,
.AttributeValues = oIndex.AttributeValues,
.ControlName = oIndex.ControlName
})
Next
Return oAttributes
End Function
Public Function GetPostprocessingValue(pValues As List(Of String), pRow As DataRow)
Logger.Debug("Start of Method [GetPostprocessingValue]")
Dim oType = pRow.Item("TYPE")
Dim oResult As New List(Of String)
Logger.Debug("Type of Postprocessing is [{0}]", oType)
Select Case oType
Case TYPE_VBREPLACE
Dim oFindString = pRow.Item("TEXT1")
Dim oReplaceString = pRow.Item("TEXT2")
Logger.Debug("Replacing [{0}] with [{1}]", oFindString, oReplaceString)
For Each oIndexValue In pValues
Dim oReplaceResult = oIndexValue.Replace(oFindString, oReplaceString)
If oReplaceResult.Equals(oIndexValue) Then
Logger.Debug("Replace did not succeed, ReplaceString was not found.")
Else
Logger.Debug("Replace successful for [{0}].", oIndexValue)
End If
oResult.Add(oReplaceResult)
Next
Case TYPE_VBSPLIT
Dim oSeparator As String = pRow.Item("TEXT1")
Dim oSplitIndex As Integer = 0
Integer.TryParse(pRow.Item("TEXT2"), oSplitIndex)
Logger.Debug("Splitting String at Separator [{0}] and Index [{1}]", oSeparator, oSplitIndex)
For Each oIndexValue In pValues
Dim oSplitted As List(Of String) = oIndexValue.Split(oSeparator).ToList()
Logger.Debug("Split succeeded, resulting list has [{0}] items.", oSplitted.Count)
If oSplitIndex < oSplitted.Count Then
Dim oValue = oSplitted.Item(oSplitIndex)
Logger.Debug("Saving value [{0}] from Index [{1}]", oValue, oSplitIndex)
oResult.Add(oValue)
Else
Logger.Debug("SplitIndex(TEXT2) was out of array bounds. Skipping.")
End If
Next
Case Else
LogAndThrow($"Postprocessing type [{oType}] is not supported!")
End Select
Return oResult
End Function
End Class
End Namespace

View File

@ -0,0 +1,12 @@
Namespace Methods.GlobalIndexer
Public Class ManualIndex
Inherits BaseIndex
Public DataType As String
Public IsOptional As Boolean
Public IsMultiselect As Boolean
Public DefaultValue As String
End Class
End Namespace

View File

@ -2,19 +2,17 @@
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Database.MSSQLServer.TransactionMode Imports DigitalData.Modules.Database.MSSQLServer.TransactionMode
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Services.EDMIService.FileStorage Imports DigitalData.Services.EDMIService.Methods
Imports DigitalData.Services.EDMIService.GlobalState Imports DigitalData.Services.EDMIService.GlobalState
Public Class NewFileMethod Public Class NewFileMethod
Inherits BaseMethod Inherits BaseMethod
Private ReadOnly ObjectStores As List(Of ObjectStore)
Private ReadOnly Connection As SqlConnection Private ReadOnly Connection As SqlConnection
Private ReadOnly Transaction As SqlTransaction Private ReadOnly Transaction As SqlTransaction
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pObjectStores As List(Of ObjectStore)) Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pGlobalState As GlobalState)
MyBase.New(pLogConfig, pMSSQLServer) MyBase.New(pLogConfig, pMSSQLServer, pGlobalState)
ObjectStores = pObjectStores
Connection = Database.GetConnection() Connection = Database.GetConnection()
Transaction = Connection.BeginTransaction() Transaction = Connection.BeginTransaction()
@ -23,21 +21,21 @@ Public Class NewFileMethod
Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse
Dim oFilePath As String = Nothing Dim oFilePath As String = Nothing
Dim oExistingObjectId = TestFileChecksumExists(pData.FileChecksum) Dim oExistingObjectId = TestFileChecksumExists(pData.File.FileChecksum)
If oExistingObjectId > 0 Then If oExistingObjectId > 0 Then
Return New NewFile.NewFileResponse(oExistingObjectId) Return New NewFile.NewFileResponse(oExistingObjectId)
End If End If
Try Try
Dim oObjectId = NewObjectId(pData.KindType, pData.BusinessEntity, pData.Who) Dim oObjectId = NewObjectId(pData.KindType, pData.BusinessEntity, pData.User.UserName)
If oObjectId = 0 Then If oObjectId = 0 Then
LogAndThrow("Could not create new ObjectId!") LogAndThrow("Could not create new ObjectId!")
End If End If
' Find ObjectStore by Title ' Find ObjectStore by Title
Logger.Debug("Checking for DataStore [{0}].", pData.StoreName) Logger.Debug("Checking for DataStore [{0}].", pData.StoreName)
Dim oStore = ObjectStores. Dim oStore = GlobalState.ObjectStores.
Where(Function(store) store.Title.Equals(pData.StoreName, StringComparison.OrdinalIgnoreCase)). Where(Function(store) store.Title.Equals(pData.StoreName, StringComparison.OrdinalIgnoreCase)).
SingleOrDefault() SingleOrDefault()
@ -51,10 +49,10 @@ Public Class NewFileMethod
' Get directory by DateImported or, if not supplied, by current date ' Get directory by DateImported or, if not supplied, by current date
Dim oSubDirectory As String Dim oSubDirectory As String
If IsNothing(pData.FileImportedAt) Then If IsNothing(pData.File.FileImportedAt) Then
oSubDirectory = GetDateSubDirectory(Now) oSubDirectory = GetDateSubDirectory(Now)
Else Else
oSubDirectory = GetDateSubDirectory(pData.FileImportedAt) oSubDirectory = GetDateSubDirectory(pData.File.FileImportedAt)
End If End If
Logger.Debug("Subdirectory is [{0}]", oSubDirectory) Logger.Debug("Subdirectory is [{0}]", oSubDirectory)
@ -78,25 +76,25 @@ Public Class NewFileMethod
oKeepFileName = True oKeepFileName = True
End If End If
Dim oFileName As String = GetFileObjectFileName(oObjectId, pData.FileName, oKeepFileName) Dim oFileName As String = GetFileObjectFileName(oObjectId, pData.File.FileName, oKeepFileName)
Logger.Debug("Filename is [{0}]", oFileName) Logger.Debug("Filename is [{0}]", oFileName)
oFilePath = IO.Path.Combine(oFinalPath, oFileName) oFilePath = IO.Path.Combine(oFinalPath, oFileName)
Dim oFileObjectInfo As IO.FileInfo = New IO.FileInfo(oFilePath) Dim oFileObjectInfo As IO.FileInfo = New IO.FileInfo(oFilePath)
Dim oFileObjectSize As Long = pData.FileContents.Length Dim oFileObjectSize As Long = pData.File.FileContents.Length
Dim oFileObjectExtension As String = oFileObjectInfo.Extension.Substring(1) Dim oFileObjectExtension As String = oFileObjectInfo.Extension.Substring(1)
Dim oFileObjectName As String = oFileObjectInfo.Name Dim oFileObjectName As String = oFileObjectInfo.Name
Logger.Debug("File Information for [{0}]:", oFileObjectName) Logger.Debug("File Information for [{0}]:", oFileObjectName)
Logger.Debug("Size: [{0}]", oFileObjectSize) Logger.Debug("Size: [{0}]", oFileObjectSize)
Logger.Debug("Extension: [{0}]", oFileObjectExtension) Logger.Debug("Extension: [{0}]", oFileObjectExtension)
Logger.Debug("Checksum: [{0}]", pData.FileChecksum) Logger.Debug("Checksum: [{0}]", pData.File.FileChecksum)
Try Try
Using oStream = New IO.FileStream(oFilePath, IO.FileMode.Create, IO.FileAccess.Write) Using oStream = New IO.FileStream(oFilePath, IO.FileMode.Create, IO.FileAccess.Write)
Logger.Info("Saving file to path [{0}]", oFilePath) Logger.Info("Saving file to path [{0}]", oFilePath)
oStream.Write(pData.FileContents, 0, oFileObjectSize) oStream.Write(pData.File.FileContents, 0, oFileObjectSize)
oStream.Flush(True) oStream.Flush(True)
oStream.Close() oStream.Close()
End Using End Using
@ -109,7 +107,16 @@ Public Class NewFileMethod
Logger.Info("Creating IDB FileObject for ObjectId [{0}].", oObjectId) Logger.Info("Creating IDB FileObject for ObjectId [{0}].", oObjectId)
' Insert into DB ' Insert into DB
Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO '{oFinalPath}', '{oFileObjectName}', '{oFileObjectExtension}',{oFileObjectSize},'{pData.FileChecksum}' ,'{pData.Who}','{oObjectId}',{oStore.Id}" Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO
'{oFinalPath}',
'{oFileObjectName}',
'{oFileObjectExtension}',
{oFileObjectSize},
'{pData.File.FileChecksum}' ,
'{pData.User.UserName}',
'{oObjectId}',
{oStore.Id}"
Dim oResult As Boolean = Database.ExecuteNonQueryWithConnectionObject(oSQL, Connection, ExternalTransaction, Transaction) Dim oResult As Boolean = Database.ExecuteNonQueryWithConnectionObject(oSQL, Connection, ExternalTransaction, Transaction)
If oResult = False Then If oResult = False Then
@ -121,9 +128,9 @@ Public Class NewFileMethod
'TODO: File dates in try catch 'TODO: File dates in try catch
Dim oDefaultAttributes As New Dictionary(Of String, Object) From { Dim oDefaultAttributes As New Dictionary(Of String, Object) From {
{"OriginFileName", pData?.FileName}, {"OriginFileName", pData.File.FileName},
{"OriginCreationDatetime", pData?.FileCreatedAt}, {"OriginCreationDatetime", pData.File.FileCreatedAt},
{"OriginChangedDatetime", pData?.FileChangedAt} {"OriginChangedDatetime", pData.File.FileChangedAt}
} }
For Each oAttribute As KeyValuePair(Of String, Object) In oDefaultAttributes For Each oAttribute As KeyValuePair(Of String, Object) In oDefaultAttributes
@ -133,7 +140,7 @@ Public Class NewFileMethod
Continue For Continue For
End If End If
Dim oSuccess = Helpers.SetAttributeValue(Connection, Transaction, oObjectId, oAttribute.Key, oAttribute.Value, "de-DE", pData.Who) Dim oSuccess = Helpers.SetAttributeValue(Connection, Transaction, oObjectId, oAttribute.Key, oAttribute.Value, pData.User.Language, pData.User.UserName)
If oSuccess Then If oSuccess Then
Logger.Debug("Default Attribute [{0}] written with value [{1}]", oAttribute.Key, oAttribute.Value) Logger.Debug("Default Attribute [{0}] written with value [{1}]", oAttribute.Key, oAttribute.Value)
Else Else

View File

@ -0,0 +1,38 @@
Imports System.Runtime.Serialization
Imports DigitalData.Modules.ZooFlow.State
Namespace Methods.NewFile
<Serializable>
<DataContract>
Public Class NewFileRequest
<DataMember>
Public Property File As FileProperties
''' <summary>
''' Name/title of the ObjectStore to save the file to, ex. Work
''' </summary>
<DataMember>
Public Property StoreName As String
''' <summary>
''' The business entity of the file, ex DEFAULT
''' </summary>
<DataMember>
Public Property BusinessEntity As String
''' <summary>
''' The kind of object to be created, ex. DOC
''' </summary>
<DataMember>
Public Property KindType As String
''' <summary>
''' User Importing the file
''' </summary>
''' <returns></returns>
<DataMember>
Public Property User As UserState
End Class
End Namespace

View File

@ -1,6 +1,6 @@
Imports System.Runtime.Serialization Imports System.Runtime.Serialization
Namespace FileStorage.SetAttributeValue Namespace Methods.SetAttributeValue
<Serializable> <Serializable>
<DataContract> <DataContract>
Public Class SetAttributeValueResponse Public Class SetAttributeValueResponse

View File

@ -3,15 +3,15 @@ Imports DigitalData.Modules.Database
Imports DigitalData.Services.EDMIService.IDB Imports DigitalData.Services.EDMIService.IDB
Imports System.Data.SqlClient Imports System.Data.SqlClient
Namespace FileStorage.SetAttributeValue Namespace Methods.SetAttributeValue
Public Class SetAttributeValueMethod Public Class SetAttributeValueMethod
Inherits BaseMethod Inherits BaseMethod
Private Connection As SqlConnection Private Connection As SqlConnection
Private Transaction As SqlTransaction Private Transaction As SqlTransaction
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer) Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pGlobalState As GlobalState)
MyBase.New(pLogConfig, pDatabase) MyBase.New(pLogConfig, pDatabase, pGlobalState)
Connection = Database.GetConnection() Connection = Database.GetConnection()
Transaction = Connection.BeginTransaction() Transaction = Connection.BeginTransaction()

View File

@ -1,6 +1,6 @@
Imports System.Runtime.Serialization Imports System.Runtime.Serialization
Namespace FileStorage.SetAttributeValue Namespace Methods.SetAttributeValue
<Serializable> <Serializable>
<DataContract> <DataContract>
Public Class SetAttributeValueRequest Public Class SetAttributeValueRequest

View File

@ -1,6 +1,6 @@
Imports System.Runtime.Serialization Imports System.Runtime.Serialization
Namespace FileStorage.NewFile Namespace Methods.NewFile
<Serializable> <Serializable>
<DataContract> <DataContract>
Public Class NewFileResponse Public Class NewFileResponse

View File

@ -0,0 +1,10 @@
Namespace Methods
Public Class UserAttributeValue
Public Property AttributeId As Integer
Public Property AttributeName As String
Public Property AttributeValues As List(Of String)
Public Property ControlName As String
End Class
End Namespace

View File

@ -1,4 +1,5 @@
Module SettingsModule Module SettingsModule
Public Const SERVICE_NAME As String = "DDEDMIService" Public Const SERVICE_NAME As String = "DDEDMIService"
Public Const SERVICE_DISPLAY_NAME As String = "Digital Data EDMI Service" Public Const SERVICE_DISPLAY_NAME As String = "Digital Data EDMI Service"
Public Const SERVICE_BASE_ADDRESS As String = "net.tcp://localhost:9000/DigitalData/Services/Main"
End Module End Module

View File

@ -73,8 +73,9 @@ Public Class WindowsService
_Global = New GlobalState(_LogConfig, _MSSQL_IDB, _MSSQL_ECM) _Global = New GlobalState(_LogConfig, _MSSQL_IDB, _MSSQL_ECM)
_Scheduler = New Scheduler(_LogConfig, _MSSQL_ECM, _Global.TableStore) _Scheduler = New Scheduler(_LogConfig, _MSSQL_ECM, _Global.TableStore)
_Logger.Debug("Loading Objectstores") _Logger.Debug("Loading Global Data")
_Global.LoadObjectStores() _Global.LoadObjectStores()
_Global.LoadConnections()
_Logger.Debug("Starting Scheduler") _Logger.Debug("Starting Scheduler")
_Scheduler.Start() _Scheduler.Start()
@ -92,7 +93,7 @@ Public Class WindowsService
_Logger.Debug("Starting WCF ServiceHost") _Logger.Debug("Starting WCF ServiceHost")
Dim oBaseAddresses() As Uri = {New Uri("net.tcp://localhost:9000/DigitalData/Services/Main")} Dim oBaseAddresses() As Uri = {New Uri(SERVICE_BASE_ADDRESS)}
_ServiceHost = New ServiceHost(Of EDMIService)(oBaseAddresses) _ServiceHost = New ServiceHost(Of EDMIService)(oBaseAddresses)
_ServiceHost.EnableMetadataExchange(False) _ServiceHost.EnableMetadataExchange(False)