Zooflow: WIP

This commit is contained in:
Jonathan Jenne 2021-12-01 16:22:51 +01:00
parent 8a76425c94
commit 77621193f2
45 changed files with 768 additions and 270 deletions

View File

@ -64,9 +64,11 @@ Public Class ClassDetailForm
Case PAGE_IDB_BUSINESS_ENTITIES
Load_IDBEntity(PrimaryKey, IsInsert)
Return True
Case PAGE_IDB_OBJECT_STORES
Load_IDBObjectstore(PrimaryKey, IsInsert)
Return True
Case PAGE_CW_PROFILES
Load_CWProfile(PrimaryKey, IsInsert)
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.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.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.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)
_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}")
End Sub
Public IDBSystemIndices As List(Of String)

View File

@ -315,7 +315,7 @@ Public Class ClassInit
Case "USER_LANGUAGE"
MyApplication.User.Language = NotNull(oValue.ToString, "de-DE")
Case "USER_LANGUAGEID"
MyApplication.User.LanguageID = CShort(oValue)
MyApplication.User.LanguageId = CShort(oValue)
End Select
End Sub
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 Function
'' <summary>
''' Ersetzt alle nicht zulässigen Zeichen im angegebenen Dateinamen
''' </summary>
''' <param name="sFilename">Dateiname ohne Pfadangabe</param>
''' <param name="sChar">Ersatzzeichen für alle unzulässigen Zeichen
''' im Dateinamen</param>
Public Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String
_LOGGER.Info(" Filename before CleanFilename: '" & sFilename & "'")
If sFilename.Contains(".\") Then
sFilename = sFilename.Replace(".\", "\")
End If
'If sFilename.Contains("'") Then
' sFilename = sFilename.Replace("'", "")
'End If
'If sFilename.Contains("..") Then
' sFilename = sFilename.Replace("..", ".")
'End If
' 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, "[\\/:*?""<>|\r\n]", "", System.Text.RegularExpressions.RegexOptions.Singleline)
'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))
_LOGGER.Info("Filename after CleanFilename: '" & sFilename & "'")
Return sFilename
End Function
''' <summary>
'''' Ersetzt alle nicht zulässigen Zeichen im angegebenen Dateinamen
'''' </summary>
'''' <param name="sFilename">Dateiname ohne Pfadangabe</param>
'''' <param name="sChar">Ersatzzeichen für alle unzulässigen Zeichen
'''' im Dateinamen</param>
'Public Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String
' _LOGGER.Info(" Filename before CleanFilename: '" & sFilename & "'")
' If sFilename.Contains(".\") Then
' sFilename = sFilename.Replace(".\", "\")
' End If
' 'If sFilename.Contains("'") Then
' ' sFilename = sFilename.Replace("'", "")
' 'End If
' 'If sFilename.Contains("..") Then
' ' sFilename = sFilename.Replace("..", ".")
' 'End If
' ' 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, "[\\/:*?""<>|\r\n]", "", System.Text.RegularExpressions.RegexOptions.Singleline)
' '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))
' _LOGGER.Info("Filename after CleanFilename: '" & sFilename & "'")
' Return sFilename
'End Function
End Class

View File

@ -247,7 +247,7 @@ Partial Class frmGlobix_Index
Me.SplitContainerControl1.Panel2.Controls.Add(Me.DocumentViewer1)
Me.SplitContainerControl1.Panel2.Text = "Panel2"
Me.SplitContainerControl1.Size = New System.Drawing.Size(1005, 508)
Me.SplitContainerControl1.SplitterPosition = 591
Me.SplitContainerControl1.SplitterPosition = 522
Me.SplitContainerControl1.TabIndex = 2
'
'pnlIndex
@ -258,7 +258,7 @@ Partial Class frmGlobix_Index
Me.pnlIndex.ForeColor = System.Drawing.SystemColors.ControlText
Me.pnlIndex.Location = New System.Drawing.Point(0, 33)
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
'
'Panel3
@ -267,7 +267,7 @@ Partial Class frmGlobix_Index
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel3.Location = New System.Drawing.Point(0, 433)
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
'
'btnAblageFlow
@ -278,7 +278,7 @@ Partial Class frmGlobix_Index
Me.btnAblageFlow.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnAblageFlow.Location = New System.Drawing.Point(0, 0)
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.Text = "Starte Ablage"
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.Location = New System.Drawing.Point(0, 0)
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
'
'ComboBoxEdit1
@ -306,7 +306,7 @@ Partial Class frmGlobix_Index
Me.ComboBoxEdit1.Properties.ButtonsStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat
Me.ComboBoxEdit1.Properties.NullText = "Bitte wählen Sie ein Profil"
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
'
'DocumentViewer1
@ -315,7 +315,7 @@ Partial Class frmGlobix_Index
Me.DocumentViewer1.FileLoaded = False
Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0)
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
'
'GlobixDataset

View File

@ -60,7 +60,7 @@ Public Class frmFlowSearch
cmbAttributeDate.Items.Add(IDB_ADDED_WHEN_String_Englisch)
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 = 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
cmbAttributeDate.Items.Add(oRow.Item("ATTR_TITLE"))
@ -191,7 +191,7 @@ Public Class frmFlowSearch
Try
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)
If Not IsNothing(oDTOBJECT_RESULT) Then
If oDTOBJECT_RESULT.Rows.Count = 0 Then
@ -375,7 +375,7 @@ Public Class frmFlowSearch
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 = 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 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
If oSQLFlowSearch <> String.Empty Then
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)
Dim oForm As New frmFlowSearch(oSQLFlowSearch)
oForm.Show()

View File

@ -150,12 +150,14 @@ Public Class Client
Dim oFileImportResponse = Await _channel.NewFileAsync(New NewFileRequest With {
.BusinessEntity = pBusinessEntity,
.FileName = oFileInfo.Name,
.FileCreatedAt = oFileCreatedAt,
.FileChangedAt = oFileModifiedAt,
.FileContents = oContents,
.FileImportedAt = pImportOptions.DateImported,
.FileChecksum = oFileHash,
.File = New FileProperties With {
.FileName = oFileInfo.Name,
.FileCreatedAt = oFileCreatedAt,
.FileChangedAt = oFileModifiedAt,
.FileContents = oContents,
.FileImportedAt = pImportOptions.DateImported,
.FileChecksum = oFileHash
},
.KindType = pObjectKind,
.StoreName = pObjectStoreName,
.Who = pImportOptions.Username
@ -529,6 +531,16 @@ Public Class Client
End Try
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>
''' Return infos about a file object
''' </summary>

View File

@ -1,15 +1,11 @@
<?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: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.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 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="Language" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="StoreName" nillable="true" type="xs:string" />
@ -19,7 +15,7 @@
<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:extension xmlns:q2="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" base="q2:BaseResponse">
<xs:sequence>
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
</xs:sequence>

View File

@ -1,10 +1,11 @@
<?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:complexType name="SetAttributeValueRequest">
<xs:sequence>
<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="Language" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
<xs:element minOccurs="0" name="Who" type="xs:long" />
</xs:sequence>

View File

@ -0,0 +1,14 @@
<?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: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 minOccurs="0" name="FileName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="FileProperties" nillable="true" type="tns:FileProperties" />
</xs:schema>

View File

@ -8,8 +8,9 @@
<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.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.FileStorage.SetAttributeValue" />
<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.Methods" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" />
<xsd:import namespace="http://schemas.microsoft.com/Message" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
</xsd:schema>

View File

@ -1,8 +1,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: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.FileStorage.SetAttributeValue" />
<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.Methods.SetAttributeValue" />
<xs:import namespace="http://schemas.microsoft.com/Message" />
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
<xs:element name="Heartbeat">
@ -162,28 +162,28 @@
<xs:element name="NewFile">
<xs:complexType>
<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:complexType>
</xs:element>
<xs:element name="NewFileResponse">
<xs:complexType>
<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:complexType>
</xs:element>
<xs:element name="SetAttributeValue">
<xs:complexType>
<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:complexType>
</xs:element>
<xs:element name="SetAttributeValueResponse">
<xs:complexType>
<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>

View File

@ -30,8 +30,9 @@
<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="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.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.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.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="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="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" />
</Metadata>

View File

@ -117,6 +117,7 @@ Namespace EDMIServiceReference
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileRequest)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.FileProperties)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueRequest)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.RightsAccessRight))> _
@ -151,8 +152,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _
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"& _
"age.NewFile"), _
System.Runtime.Serialization.DataContractAttribute(Name:="NewFileResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"NewFile"), _
System.SerializableAttribute()> _
Partial Public Class NewFileResponse
Inherits EDMIServiceReference.BaseResponse
@ -176,8 +177,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _
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"& _
"age.SetAttributeValue"), _
System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"SetAttributeValue"), _
System.SerializableAttribute()> _
Partial Public Class SetAttributeValueResponse
Inherits EDMIServiceReference.BaseResponse
@ -336,8 +337,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _
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"& _
"age.NewFile"), _
System.Runtime.Serialization.DataContractAttribute(Name:="NewFileRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"NewFile"), _
System.SerializableAttribute()> _
Partial Public Class NewFileRequest
Inherits Object
@ -350,22 +351,7 @@ Namespace EDMIServiceReference
Private BusinessEntityField As String
<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 FileNameField As String
Private FileField As EDMIServiceReference.FileProperties
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private KindTypeField As String
@ -402,6 +388,120 @@ Namespace EDMIServiceReference
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 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()> _
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 Who() As String
Get
Return Me.WhoField
End Get
Set
If (Object.ReferenceEquals(Me.WhoField, value) <> true) Then
Me.WhoField = value
Me.RaisePropertyChanged("Who")
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 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()> _
Public Property FileChangedAt() As String
Get
@ -480,58 +580,6 @@ Namespace EDMIServiceReference
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 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()> _
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 Who() As String
Get
Return Me.WhoField
End Get
Set
If (Object.ReferenceEquals(Me.WhoField, value) <> true) Then
Me.WhoField = value
Me.RaisePropertyChanged("Who")
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)
@ -544,8 +592,8 @@ Namespace EDMIServiceReference
<System.Diagnostics.DebuggerStepThroughAttribute(), _
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"& _
"age.SetAttributeValue"), _
System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
"SetAttributeValue"), _
System.SerializableAttribute()> _
Partial Public Class SetAttributeValueRequest
Inherits Object
@ -560,6 +608,9 @@ Namespace EDMIServiceReference
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private AttributeValueField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private LanguageField As String
<System.Runtime.Serialization.OptionalFieldAttribute()> _
Private ObjectIdField As Long
@ -602,6 +653,19 @@ Namespace EDMIServiceReference
End Set
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()> _
Public Property ObjectId() As Long
Get

View File

@ -145,15 +145,18 @@
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Exceptions.xsd">
<SubType>Designer</SubType>
</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">
<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.xsd">
<SubType>Designer</SubType>

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" />
</ItemGroup>
<ItemGroup>
<Compile Include="DataRowEx.vb" />
<Compile Include="InvalidChars.vb" />
<Compile Include="Utils.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />

View File

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

View File

@ -17,19 +17,28 @@ Namespace State
Public Property MachineName As String
Public Property DateFormat 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 HideBasicConfig As Boolean = False
''' <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>
Public Sub New()
Language = Thread.CurrentThread.CurrentCulture.Name
UserName = System.Environment.UserName
MachineName = System.Environment.MachineName
End Sub
''' <summary>
''' Initialize user object with user id. Mandatory for sending user data between systems.
''' </summary>
''' <param name="pUserId"></param>
Public Sub New(pUserId As Integer)
MyBase.New()
UserId = pUserId
End Sub
End Class
End Namespace

View File

@ -14,13 +14,13 @@ Public MustInherit Class BaseMethod
Helpers = New Helpers(pLogConfig, pMSSQLServer)
End Sub
Public Function LogAndThrow(pMessage As String)
Public Sub LogAndThrow(pMessage As String)
Logger.Warn(pMessage)
Throw New ApplicationException(pMessage)
End Function
End Sub
Public Function LogAndThrow(pException As Exception, pMessage As String)
Public Sub LogAndThrow(pException As Exception, pMessage As String)
Logger.Error(pException)
Throw New ApplicationException(pMessage, pException)
End Function
End Sub
End Class

View File

@ -10,8 +10,8 @@ Imports DigitalData.Services.EDMIService.Messages
Imports DigitalData.Modules.EDMI.API.Rights
Imports DigitalData.Services.EDMIService.Exceptions
Imports DigitalData.Services.EDMIService.GlobalState
Imports DigitalData.Services.EDMIService.FileStorage
Imports DigitalData.Services.EDMIService.FileStorage.SetAttributeValue
Imports DigitalData.Services.EDMIService.Methods
Imports DigitalData.Services.EDMIService.Methods.SetAttributeValue
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession)>
Public Class EDMIService
@ -81,52 +81,18 @@ Public Class EDMIService
#Region "=== Database ==="
Public Function ReturnDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult Implements IEDMIService.ReturnDatatableFromCache
Try
_Logger.Debug($"ReturnDatatableFromCache: Datatable: {Name}")
Dim oReturnDatatableFromCache As New GetDatatableFromCache.GetDatatableFromCacheMethod(LogConfig, MSSQL_ECM, GlobalState.TableStore)
Dim oResult = oReturnDatatableFromCache.Run(New GetDatatableFromCache.GetDatatableFromCacheRequest With {
.DataTable = Name,
.FilterExpression = FilterExpression,
.SortByColumn = SortByColumn
})
Dim oDataset As DataSet = GlobalState.TableStore
Dim oDataTable As DataTable = Nothing
_Logger.Debug("ReturnDatatableFromCache: DataSet contains [{0}] datatables", oDataset.Tables.Count)
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
If oResult.OK Then
Return New TableResult(oResult.Table)
Else
Return New TableResult(oResult.ErrorMessage)
End If
End Function
#End Region

View File

@ -131,15 +131,22 @@
<Compile Include="BaseMethod.vb" />
<Compile Include="ClassConstants.vb" />
<Compile Include="Config.vb" />
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueMethod.vb" />
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueRequest.vb" />
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueResponse.vb" />
<Compile Include="Filestorage\NewFile\NewFileMethod.vb" />
<Compile Include="Filestorage\NewFile\NewFileRequest.vb" />
<Compile Include="Filestorage\NewFile\NewFileResponse.vb" />
<Compile Include="Filestorage\SetAttributeValue\SetAttributeValueMethod.vb" />
<Compile Include="Filestorage\SetAttributeValue\SetAttributeValueResponse.vb" />
<Compile Include="Filestorage\SetAttributeValue\SetAttributeValueRequest.vb" />
<Compile Include="Methods\FileProperties.vb" />
<Compile Include="Methods\GetAttributeValue\GetAttributeValueMethod.vb" />
<Compile Include="Methods\GetAttributeValue\GetAttributeValueRequest.vb" />
<Compile Include="Methods\GetAttributeValue\GetAttributeValueResponse.vb" />
<Compile Include="Methods\GetDatatableFromCache\GetDatatableFromCacheMethod.vb" />
<Compile Include="Methods\GetDatatableFromCache\GetDatatableFromCacheRequest.vb" />
<Compile Include="Methods\GetDatatableFromCache\GetDatatableFromCacheResponse.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\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="IDB\Helpers.vb" />
<Compile Include="Messages\AccessRightResult.vb" />
@ -148,6 +155,7 @@
<Compile Include="Exceptions.vb" />
<Compile Include="Messages\DatabaseResult.vb" />
<Compile Include="EDMIService.vb" />
<Compile Include="Methods\UserAttributeValue.vb" />
<Compile Include="Scheduler\Scheduler.vb" />
<Compile Include="Scheduler\DatatableJob.vb" />
<Compile Include="Scheduler\JobListener.vb" />
@ -233,6 +241,10 @@
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
<Name>Logging</Name>
</ProjectReference>
<ProjectReference Include="..\Modules.Patterns\Patterns.vbproj">
<Project>{7c3b0c7e-59fe-4e1a-a655-27ae119f9444}</Project>
<Name>Patterns</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">

View File

@ -26,7 +26,7 @@ Public Class GlobalState
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
Dim oStore As New ObjectStore() With {
@ -35,7 +35,7 @@ Public Class GlobalState
.Path = oRow.Item("IDB_PRAEFIX"),
.Title = oRow.Item("OS_TITLE")
}
_Logger.Debug("New Object Store [{0}]", oStore.Title)
_Logger.Info("New Object Store [{0}]", oStore.Title)
ObjectStores.Add(oStore)
Next
Catch ex As Exception

View File

@ -3,7 +3,7 @@ Imports System.ServiceModel
Imports DigitalData.Modules.Filesystem
Imports DigitalData.Services.EDMIService.Exceptions
Imports DigitalData.Services.EDMIService.Messages
Imports DigitalData.Services.EDMIService.FileStorage
Imports DigitalData.Services.EDMIService.Methods
<ServiceContract(Name:="IEDMIService", [Namespace]:="http://DigitalData.Services.EDMIService")>
Interface IEDMIService

View File

@ -1,9 +1,7 @@
Imports System.Runtime.Serialization
Namespace FileStorage.NewFile
<Serializable>
<DataContract>
Public Class NewFileRequest
Namespace Methods
Public Class FileProperties
''' <summary>
''' Absolute filename of the file to be imported
''' </summary>
@ -39,38 +37,6 @@ Namespace FileStorage.NewFile
''' </summary>
<DataMember>
Public Property FileChecksum As String
''' <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>
''' 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 Namespace

View File

@ -1,7 +1,7 @@
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Namespace FileStorage.GetAttributeValue
Namespace Methods.GetAttributeValue
Public Class GetAttributeValueMethod
Inherits BaseMethod
@ -16,7 +16,7 @@ Namespace FileStorage.GetAttributeValue
End If
Dim oValue As Object
' TODO: Implement GetAttributeValue
Return New GetAttributeValueResponse(pData.ObjectId, oValue)
Catch ex As Exception

View File

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

View File

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

View File

@ -0,0 +1,62 @@
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Logging
Namespace Methods.GetDatatableFromCache
Public Class GetDatatableFromCacheMethod
Inherits BaseMethod
Private ReadOnly TableStore As DataSet
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pTableStore As DataSet)
MyBase.New(pLogConfig, pMSSQLServer)
TableStore = pTableStore
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", TableStore.Tables.Count)
If TableStore.Tables.Contains(pData.DataTable) Then
oDataTable = 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,227 @@
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 TableStore As DataSet
Private ReadOnly Patterns As Patterns2
Private ReadOnly GetDatatable As GetDatatableFromCacheMethod
Private ManualIndexes As DataTable
Private AutomaticIndexes As DataTable
Private ManualIndexesPostProcessing As DataTable
Private Const VIEW_INDEX_MANUAL = "VWDDINDEX_MAN"
Private Const VIEW_INDEX_AUTOMATIC = "VWDDINDEX_AUTOM"
Private Const TABLE_POST_PROCESSING = "TBDD_INDEX_MAN_POSTPROCESSING"
Private Const TYPE_VBSPLIT = "VBSPLIT"
Private Const TYPE_VBREPLACE = "VBREPLACE"
Private Const TYPE_REGEXPRESSION = "REG. EXPRESSION"
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer, pTableStore As DataSet)
MyBase.New(pLogConfig, pMSSQLServer)
TableStore = pTableStore
Patterns = New Patterns2(pLogConfig)
GetDatatable = New GetDatatableFromCacheMethod(LogConfig, Database, TableStore)
End Sub
''' <summary>
'''
''' </summary>
''' <remarks>
'''
'''
'''
''' </remarks>
Public Function Run(pData As ImportFileRequest)
Try
LoadIndexes(pData.ProfileId)
Dim oFinalAttributes = pData.AttributeValues
' apply the post processing
oFinalAttributes = ApplyManualPostprocessing(oFinalAttributes, ManualIndexesPostProcessing)
' TODO: apply the manual attributes
oFinalAttributes = ApplyAutomaticeAttributes(oFinalAttributes)
Catch ex As Exception
Return New ImportFileResponse(ex)
End Try
End Function
Private Function ApplyManualPostprocessing(pManualAttributes As List(Of UserAttributeValue), pPostprocessingSteps As DataTable) As List(Of UserAttributeValue)
Logger.Debug("Start of Method [ApplyManualPostprocessing]")
Dim oAttributes = pManualAttributes
For Each oProcessingRow As DataRow In pPostprocessingSteps.Rows
Dim oIndexId = oProcessingRow.ItemEx(Of Integer)("IDXMAN_ID")
Dim oIndexRow As DataRow = ManualIndexes.Select($"GUID = {oIndexId}").FirstOrDefault()
Dim oIndex As UserAttributeValue = pManualAttributes.
Where(Function(attr) attr.AttributeId = oProcessingRow.ItemEx(Of Integer)("IDXMAN_ID")).
FirstOrDefault()
Dim oValue = GetPostprocessingValue(oIndex.AttributeValues, oIndexRow)
oAttributes.Add(New UserAttributeValue With {
.AttributeId = oIndexId,
.AttributeName = oIndex.AttributeName,
.AttributeValues = oIndex.AttributeValues,
.ControlName = oIndex.ControlName
})
Next
Return oAttributes
End Function
Private Function ApplyAutomaticeAttributes(pManualAttributes As List(Of UserAttributeValue)) As List(Of UserAttributeValue)
Logger.Debug("Start of Method [ApplyAutomaticeAttributes]")
Return pManualAttributes
End Function
Private 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
Private Sub LoadIndexes(pProfileId As Integer)
Logger.Debug("Start of Method [LoadIndexes]")
LoadManualIndexes(pProfileId)
LoadAutomaticIndexes(pProfileId)
LoadPostProcessingSteps()
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
AutomaticIndexes = oAutomaticIndexes.Table
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
ManualIndexes = oManualIndexes.Table
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 New List(Of Integer)
For Each oRow As DataRow In ManualIndexes.Rows
oIndexIdList.Add(oRow.ItemEx(Of Integer)("GUID"))
Next
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,36 @@
Imports System.Runtime.Serialization
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>
Public Property ProfileId As Integer
''' <summary>
''' The attribute values given by the user in the form of
''' Attribute Name/Attribute Value/ControlName
''' </summary>
Public Property AttributeValues As List(Of UserAttributeValue)
''' <summary>
''' The name of the user importing the file, ex. JenneJ
''' </summary>
<DataMember>
Public Property Who As String
''' <summary>
''' The language of the user, ex. de-DE
''' </summary>
<DataMember>
Public Property Language As String
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

@ -2,7 +2,7 @@
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Database.MSSQLServer.TransactionMode
Imports DigitalData.Modules.Logging
Imports DigitalData.Services.EDMIService.FileStorage
Imports DigitalData.Services.EDMIService.Methods
Imports DigitalData.Services.EDMIService.GlobalState
Public Class NewFileMethod
@ -23,7 +23,7 @@ Public Class NewFileMethod
Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse
Dim oFilePath As String = Nothing
Dim oExistingObjectId = TestFileChecksumExists(pData.FileChecksum)
Dim oExistingObjectId = TestFileChecksumExists(pData.File.FileChecksum)
If oExistingObjectId > 0 Then
Return New NewFile.NewFileResponse(oExistingObjectId)
End If
@ -51,10 +51,10 @@ Public Class NewFileMethod
' Get directory by DateImported or, if not supplied, by current date
Dim oSubDirectory As String
If IsNothing(pData.FileImportedAt) Then
If IsNothing(pData.File.FileImportedAt) Then
oSubDirectory = GetDateSubDirectory(Now)
Else
oSubDirectory = GetDateSubDirectory(pData.FileImportedAt)
oSubDirectory = GetDateSubDirectory(pData.File.FileImportedAt)
End If
Logger.Debug("Subdirectory is [{0}]", oSubDirectory)
@ -78,25 +78,25 @@ Public Class NewFileMethod
oKeepFileName = True
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)
oFilePath = IO.Path.Combine(oFinalPath, oFileName)
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 oFileObjectName As String = oFileObjectInfo.Name
Logger.Debug("File Information for [{0}]:", oFileObjectName)
Logger.Debug("Size: [{0}]", oFileObjectSize)
Logger.Debug("Extension: [{0}]", oFileObjectExtension)
Logger.Debug("Checksum: [{0}]", pData.FileChecksum)
Logger.Debug("Checksum: [{0}]", pData.File.FileChecksum)
Try
Using oStream = New IO.FileStream(oFilePath, IO.FileMode.Create, IO.FileAccess.Write)
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.Close()
End Using
@ -109,7 +109,7 @@ Public Class NewFileMethod
Logger.Info("Creating IDB FileObject for ObjectId [{0}].", oObjectId)
' 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.Who}','{oObjectId}',{oStore.Id}"
Dim oResult As Boolean = Database.ExecuteNonQueryWithConnectionObject(oSQL, Connection, ExternalTransaction, Transaction)
If oResult = False Then
@ -121,9 +121,9 @@ Public Class NewFileMethod
'TODO: File dates in try catch
Dim oDefaultAttributes As New Dictionary(Of String, Object) From {
{"OriginFileName", pData?.FileName},
{"OriginCreationDatetime", pData?.FileCreatedAt},
{"OriginChangedDatetime", pData?.FileChangedAt}
{"OriginFileName", pData.File.FileName},
{"OriginCreationDatetime", pData.File.FileCreatedAt},
{"OriginChangedDatetime", pData.File.FileChangedAt}
}
For Each oAttribute As KeyValuePair(Of String, Object) In oDefaultAttributes

View File

@ -0,0 +1,43 @@
Imports System.Runtime.Serialization
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>
''' 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 Namespace

View File

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

View File

@ -3,7 +3,7 @@ Imports DigitalData.Modules.Database
Imports DigitalData.Services.EDMIService.IDB
Imports System.Data.SqlClient
Namespace FileStorage.SetAttributeValue
Namespace Methods.SetAttributeValue
Public Class SetAttributeValueMethod
Inherits BaseMethod

View File

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

View File

@ -1,6 +1,6 @@
Imports System.Runtime.Serialization
Namespace FileStorage.NewFile
Namespace Methods.NewFile
<Serializable>
<DataContract>
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
Public Const SERVICE_NAME As String = "DDEDMIService"
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

View File

@ -92,7 +92,7 @@ Public Class WindowsService
_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.EnableMetadataExchange(False)