Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo
This commit is contained in:
commit
6709827740
@ -144,11 +144,11 @@ Public Class ClassIDBData
|
||||
oOldAttributeResult = GetVariableValue(pAttributeName, oIDBTyp)
|
||||
oTypeOldResult = oOldAttributeResult.GetType.ToString
|
||||
If oTypeOldResult = "System.Data.DataTable" Then
|
||||
Dim myOldValues As DataTable = oOldAttributeResult
|
||||
If myOldValues.Rows.Count > 1 Then
|
||||
Dim oOldValues As DataTable = oOldAttributeResult
|
||||
If oOldValues.Rows.Count > 1 Then
|
||||
|
||||
'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues
|
||||
For Each oOldValueRow As DataRow In myOldValues.Rows
|
||||
For Each oOldValueRow As DataRow In oOldValues.Rows
|
||||
Dim oExists As Boolean = False
|
||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||
Dim oInfo1 = $"Checking oldValue[{oOldValueRow.Item(0)}] vs NewValue [{oNewValueRow.Item(1)}]"
|
||||
|
||||
@ -45,12 +45,12 @@ Public Class ClassInit
|
||||
|
||||
' === Init Schritte definieren
|
||||
_Loader.AddStep("Initializing Database (1/2)", AddressOf InitializeDatabase, True)
|
||||
_Loader.AddStep("Initializing Service", AddressOf InitializeService, True)
|
||||
_Loader.AddStep("Initializing EDMI Service", AddressOf InitializeService, True)
|
||||
_Loader.AddStep("Initializing Database (2/2)", AddressOf InitializeDatabaseWithFallback, True)
|
||||
_Loader.AddStep("Initializing User..", AddressOf InitializeUser, True)
|
||||
_Loader.AddStep("Initializing Language..", AddressOf InitializeLanguage, False)
|
||||
_Loader.AddStep("Loading 3rd-party licenses..", AddressOf Initialize3rdParty, False)
|
||||
_Loader.AddStep("Loading Basic Configs..", AddressOf InitBasicData, False)
|
||||
_Loader.AddStep("Initializing User", AddressOf InitializeUser, True)
|
||||
_Loader.AddStep("Initializing Language", AddressOf InitializeLanguage, False)
|
||||
_Loader.AddStep("Initializing 3rd-party licenses", AddressOf Initialize3rdParty, False)
|
||||
_Loader.AddStep("Initializing Basic Config", AddressOf InitBasicData, False)
|
||||
' === Init Schritte definieren
|
||||
|
||||
AddHandler _Loader.ProgressChanged, AddressOf ProgressChanged
|
||||
@ -156,8 +156,7 @@ Public Class ClassInit
|
||||
Private Sub Initialize3rdParty(MyApplication As My.MyApplication)
|
||||
Try
|
||||
Dim oSql = "Select LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'"
|
||||
Dim oDatatable As DataTable = _DataASorDB.GetDatatable("DD_ECM", oSql, "TBDD_3RD_PARTY_MODULES", "", "")
|
||||
|
||||
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSql)
|
||||
|
||||
If oDatatable.Rows.Count = 0 Then
|
||||
Throw New InitException("Konfiguration konnte nicht geladen werden!")
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Namespace ClipboardWatcher
|
||||
Public Class ClassProfileLoader
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
Private ReadOnly Logger As Logger
|
||||
Private Database As ClassDataASorDB
|
||||
Private ReadOnly Database As DatabaseWithFallback
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, AppServerOrDB As ClassDataASorDB)
|
||||
Public Sub New(LogConfig As LogConfig, Database As DatabaseWithFallback)
|
||||
Me.LogConfig = LogConfig
|
||||
Me.Logger = LogConfig.GetLogger()
|
||||
Me.Database = AppServerOrDB
|
||||
Me.Database = Database
|
||||
End Sub
|
||||
|
||||
Public Function LoadProfiles() As Boolean
|
||||
@ -22,10 +23,10 @@ Namespace ClipboardWatcher
|
||||
Dim oWindowSQL As String = $"SELECT DISTINCT T.* FROM VWCW_PROFILE_REL_WINDOW T, VWCW_USER_PROFILE T1 WHERE T.PROFILE_ID = T1.GUID AND ({oWhereClause})"
|
||||
Dim oControlSQL As String = $"SELECT DISTINCT T.* FROM VWCW_PROFILE_REL_CONTROL T, VWCW_USER_PROFILE T1 WHERE T.PROFILE_ID = T1.GUID AND ({oWhereClause})"
|
||||
|
||||
Dim oUserProfiles = Database.GetDatatable("DD_ECM", oProfileSQL, "VWCW_USER_PROFILE", "", "", "DB")
|
||||
Dim oProfileProcesses = Database.GetDatatable("DD_ECM", oProcessSQL, "TBCW_PROFILE_PROCESS", "", "", "DB")
|
||||
Dim oProfileWindows = Database.GetDatatable("DD_ECM", oWindowSQL, "VWCW_PROFILE_REL_WINDOW", "", "", "DB")
|
||||
Dim oProfileControls = Database.GetDatatable("DD_ECM", oControlSQL, "VWCW_PROFILE_REL_CONTROL", "", "", "DB")
|
||||
Dim oUserProfiles = Database.GetDatatable("VWCW_USER_PROFILE", oProfileSQL, Constants.DatabaseType.ECM)
|
||||
Dim oProfileProcesses = Database.GetDatatable("VWCW_PROFILE_REL_WINDOW", oProcessSQL, Constants.DatabaseType.ECM)
|
||||
Dim oProfileWindows = Database.GetDatatable("VWCW_PROFILE_REL_WINDOW", oWindowSQL, Constants.DatabaseType.ECM)
|
||||
Dim oProfileControls = Database.GetDatatable("VWCW_PROFILE_REL_CONTROL", oControlSQL, Constants.DatabaseType.ECM)
|
||||
|
||||
My.Application.ClipboardWatcher.UserProfiles = oUserProfiles
|
||||
My.Application.ClipboardWatcher.ProfileProcesses = oProfileProcesses
|
||||
|
||||
@ -247,7 +247,7 @@ Public Class frmFlowForm
|
||||
|
||||
AddHandler HotkeyClass.HotKeyPressed, AddressOf HotkeyClass_HotKeyPressed
|
||||
|
||||
ProfileLoader = New ClassProfileLoader(My.LogConfig, AppServerOrDB)
|
||||
ProfileLoader = New ClassProfileLoader(My.LogConfig, My.Database)
|
||||
ProfileLoader.LoadProfiles()
|
||||
Catch ex As Exception
|
||||
ShowErrorMessage(ex)
|
||||
|
||||
@ -101,7 +101,7 @@ Public Class frmtest
|
||||
DateTimePicker1.Value,
|
||||
cmbObjectStoreType.Text,
|
||||
"DEFAULT",
|
||||
New Client.ImportFileOptions With {
|
||||
New Client.NewFileOptions With {
|
||||
.KeepExtension = True
|
||||
}
|
||||
)
|
||||
|
||||
@ -1,18 +1,21 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports System.IO
|
||||
Imports System.ServiceModel
|
||||
Imports DigitalData.Modules.EDMI.API.Constants
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
Imports DigitalData.Modules.EDMI.API.Rights
|
||||
Imports System.ServiceModel
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class Client
|
||||
Private Const INVALID_OBEJCT_ID As Long = 0
|
||||
Private Const KIND_TYPE_DOC = "DOC"
|
||||
|
||||
Public Const DEFAULT_SERVICE_PORT = 9000
|
||||
|
||||
Private ReadOnly _logger As Logger
|
||||
Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
||||
Private ReadOnly _IPAddressServer As String
|
||||
|
||||
|
||||
Private _dummy_table_attributes As DataTable
|
||||
Private _channel As IEDMIServiceChannel
|
||||
|
||||
Public Class StreamedFile
|
||||
@ -105,13 +108,6 @@ Public Class Client
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Import options for NewFileAsync. Contains default values for all options
|
||||
''' </summary>
|
||||
Public Class ImportFileOptions
|
||||
Public KeepExtension As Boolean = True
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' TODO: Creates a new object
|
||||
''' </summary>
|
||||
@ -120,6 +116,15 @@ Public Class Client
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Import options for NewFileAsync. Contains default values for all options
|
||||
''' </summary>
|
||||
Public Class NewFileOptions
|
||||
Public KeepExtension As Boolean = True
|
||||
Public Username As String = String.Empty
|
||||
Public Language As String = String.Empty
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Imports a file from a filepath, creating a IDB ObjectId and Filesystem Object
|
||||
''' </summary>
|
||||
@ -132,8 +137,14 @@ Public Class Client
|
||||
''' <exception cref="FileNotFoundException">When local filepath was not found</exception>
|
||||
''' <exception cref="ApplicationException">When there was a error in the Service</exception>
|
||||
''' <returns>The ObjectId of the newly generated filesystem object</returns>
|
||||
Public Async Function NewFileAsync(pFilePath As String, pAddedWho As String, pAddedWhen As Date, pObjectStoreType As String, pBusinessEntity As String, pImportOptions As ImportFileOptions) As Task(Of Long)
|
||||
Public Async Function NewFileAsync(pFilePath As String, pAddedWho As String, pAddedWhen As Date, pObjectStoreType As String, pBusinessEntity As String, Optional pImportOptions As NewFileOptions = Nothing) As Task(Of Long)
|
||||
Try
|
||||
' Set default options
|
||||
If pImportOptions Is Nothing Then
|
||||
pImportOptions = New NewFileOptions()
|
||||
End If
|
||||
|
||||
' Check if file exists
|
||||
If File.Exists(pFilePath) = False Then
|
||||
Throw New FileNotFoundException("ImportFileAsync: Path does not exist")
|
||||
End If
|
||||
@ -141,6 +152,7 @@ Public Class Client
|
||||
Dim oFileInfo As New FileInfo(pFilePath)
|
||||
Dim oExtension As String = oFileInfo.Extension
|
||||
|
||||
' Creating new ObjectId
|
||||
Dim oObjectIdResponse = Await _channel.NewObjectIdAsync(New NewObjectIdRequest With {
|
||||
.BusinessEntity = pBusinessEntity,
|
||||
.KindType = KIND_TYPE_DOC,
|
||||
@ -151,6 +163,7 @@ Public Class Client
|
||||
Throw New ApplicationException("ImportFileAsync: Could not get ObjectId")
|
||||
End If
|
||||
|
||||
' Create new FileObject for ObjectId
|
||||
Dim oFilePathResponse = Await _channel.NewFileObjectAsync(New NewFileObjectRequest With {
|
||||
.DateImported = pAddedWhen,
|
||||
.Extension = oExtension,
|
||||
@ -163,6 +176,7 @@ Public Class Client
|
||||
Throw New ApplicationException("ImportFileAsync: Could not get FileObject Path")
|
||||
End If
|
||||
|
||||
' Importing the file now
|
||||
Using oFileStream As New FileStream(pFilePath, FileMode.Open, FileAccess.Read)
|
||||
Using oMemoryStream As New MemoryStream()
|
||||
oFileStream.CopyTo(oMemoryStream)
|
||||
@ -189,87 +203,265 @@ Public Class Client
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function CreateObjectId(pKindType As String, pWho As String, pBusinessEntity As String) As Long
|
||||
Try
|
||||
Dim oResponse = _channel.NewObjectId(New NewObjectIdRequest With {
|
||||
.KindType = pKindType,
|
||||
.BusinessEntity = pBusinessEntity,
|
||||
.Who = pWho
|
||||
})
|
||||
Return oResponse.ObjectId
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
Public Class SetVariableValueOptions
|
||||
Public CheckDeleted As Boolean = False
|
||||
Public Username As String = String.Empty
|
||||
Public Language As String = String.Empty
|
||||
End Class
|
||||
|
||||
Public Function CreateFileStoreObject(pObjectId As Long, pStoreType As String, pDate As String, pExtension As String, pKeepExtension As String) As String
|
||||
''' <summary>
|
||||
''' Sets a value to an attribute
|
||||
''' </summary>
|
||||
''' <param name="pObjectId">IDB ObjectId</param>
|
||||
''' <param name="pAttributeName">Name of the attribute</param>
|
||||
''' <param name="pAttributeType">The type of Attribute</param>
|
||||
''' <param name="pValue"></param>
|
||||
''' <param name="pOptions"></param>
|
||||
''' <returns></returns>
|
||||
Public Function SetVariableValue(pObjectId As Long, pAttributeName As String, pAttributeType As AttributeType, pValue As Object, Optional pOptions As SetVariableValueOptions = Nothing) As Boolean
|
||||
Try
|
||||
' Remove dot in Extension
|
||||
If pExtension.StartsWith(".") Then
|
||||
pExtension = pExtension.Substring(1)
|
||||
' Set default options
|
||||
If pOptions Is Nothing Then
|
||||
pOptions = New SetVariableValueOptions()
|
||||
End If
|
||||
|
||||
Dim oArgs As New NewFileObjectRequest With {
|
||||
.ObjectId = pObjectId,
|
||||
.StoreType = pStoreType,
|
||||
.DateImported = pDate,
|
||||
.Extension = pExtension,
|
||||
.KeepExtension = pKeepExtension
|
||||
}
|
||||
Dim oResponse = _channel.NewFileObject(oArgs)
|
||||
Return oResponse.FileObjectPath
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
Dim oLanguage = NotNull(pOptions.Language, GetUserLanguage())
|
||||
Dim oUsername = NotNull(pOptions.Username, Environment.UserName)
|
||||
|
||||
Public Async Function ImportFileObjectAsync(pContent As Byte(), pWho As String, pObjectId As Long, pObjectStoreType As String, pFileObjectPath As String) As Task(Of Boolean)
|
||||
Try
|
||||
Dim oData As New ImportFileIntoFileObjectRequest() With {
|
||||
.Contents = pContent,
|
||||
.Who = pWho,
|
||||
.FilePath = pFileObjectPath,
|
||||
.ObjectId = pObjectId,
|
||||
.ObjectStoreType = pObjectStoreType
|
||||
}
|
||||
Try
|
||||
Dim oResponse = _channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId})
|
||||
If oResponse.Exists = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
' TODO: Check if Attribute exists
|
||||
|
||||
Dim oType = pValue.GetType.Name
|
||||
|
||||
If oType = GetType(DataTable).Name Then
|
||||
Dim oValueTable As DataTable = pValue
|
||||
Dim oCurrentValue As Object
|
||||
Dim oCurrentValueType As String
|
||||
|
||||
If pOptions.CheckDeleted = True Then
|
||||
Dim oOptions As New GetVariableValueOptions With {
|
||||
.Language = oLanguage,
|
||||
.Username = oUsername
|
||||
}
|
||||
|
||||
' Get current value
|
||||
oCurrentValue = GetVariableValue(pObjectId, pAttributeName, pAttributeType, oOptions)
|
||||
|
||||
' Get current type
|
||||
oCurrentValueType = oCurrentValue.GetType.Name
|
||||
|
||||
' If current value is datatable
|
||||
If oCurrentValueType = GetType(DataTable).Name Then
|
||||
|
||||
' Convert value to Datatable
|
||||
Dim oCurrentTable As DataTable = oCurrentValue
|
||||
|
||||
If oCurrentTable.Rows.Count > 1 Then
|
||||
|
||||
'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues
|
||||
For Each oRow As DataRow In oCurrentTable.Rows
|
||||
Dim oExists As Boolean = False
|
||||
For Each oNewValueRow As DataRow In oValueTable.Rows
|
||||
Dim oInfo = $"Checking oldValue[{oRow.Item(0)}] vs NewValue [{oNewValueRow.Item(1)}]"
|
||||
If oNewValueRow.Item(1).ToString.ToUpper = oRow.Item(0).ToString.ToUpper Then
|
||||
oExists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If oExists = False Then
|
||||
_logger.Debug($"Value [{oRow.Item(0)}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!")
|
||||
DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oRow.Item(0))
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
If oValueTable.Rows.Count > 1 Then
|
||||
Dim oExists As Boolean = False
|
||||
For Each oNewValueRow As DataRow In oValueTable.Rows
|
||||
_logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]")
|
||||
|
||||
If oNewValueRow.Item(1).ToString.ToUpper = oCurrentValue.ToString.ToUpper Then
|
||||
oExists = True
|
||||
Exit For
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
If oExists = False Then
|
||||
_logger.Debug($"Value [{oCurrentValue}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!")
|
||||
DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue)
|
||||
End If
|
||||
|
||||
Else
|
||||
_logger.Debug($"Value [{oCurrentValue}] of Attribute [{pAttributeName}] obviously was updated during runtime - will be deleted!")
|
||||
DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
For Each oNewValueRow As DataRow In oValueTable.Rows
|
||||
Dim oSuccess As Boolean = False
|
||||
Dim oSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT
|
||||
EXEC PRIDB_NEW_OBJ_DATA({pObjectId}, '{pAttributeName}', '{oUsername}', '{oNewValueRow.Item(1)}', '{oLanguage}', 0, @OMD_ID = @NEW_OBJ_MD_ID OUTPUT)"
|
||||
|
||||
Dim oResult = _channel.ExecuteNonQuery_MSSQL_IDB(oSQL)
|
||||
|
||||
If Not oResult.OK Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
Else
|
||||
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)"
|
||||
|
||||
Dim oResult = _channel.ExecuteNonQuery_MSSQL_IDB(oSql)
|
||||
|
||||
Return oResult.OK
|
||||
End If
|
||||
|
||||
Dim oResponse = Await _channel.ImportFileIntoFileObjectAsync(oData)
|
||||
Return oResponse.Result
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function GetFileByObjectIdAsync(ObjectId As Long) As Task(Of StreamedFile)
|
||||
Try
|
||||
Dim oData As New DocumentStreamRequest() With {.ObjectId = ObjectId}
|
||||
Dim oResponse As DocumentStreamResponse = Await _channel.GetFileByObjectIdAsync(oData)
|
||||
Dim oMemoryStream As New MemoryStream()
|
||||
oResponse.FileContents.CopyTo(oMemoryStream)
|
||||
oMemoryStream.Position = 0
|
||||
Public Class GetVariableValueOptions
|
||||
Public FromIDB As Boolean = False
|
||||
Public Username As String = String.Empty
|
||||
Public Language As String = String.Empty
|
||||
End Class
|
||||
|
||||
Public Function GetVariableValue(pObjectId As Long, pAttributeName As String, pAttributeType As AttributeType, Optional pOptions As GetVariableValueOptions = Nothing) As Object
|
||||
If pOptions Is Nothing Then
|
||||
pOptions = New GetVariableValueOptions()
|
||||
End If
|
||||
|
||||
Dim oLanguage = NotNull(pOptions.Language, GetUserLanguage())
|
||||
Dim oUsername = NotNull(pOptions.Username, Environment.UserName)
|
||||
|
||||
' Check if ObjectId exists
|
||||
Try
|
||||
Dim oResponse = _channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId})
|
||||
If oResponse.Exists = False Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Return New StreamedFile() With {
|
||||
.Stream = oMemoryStream,
|
||||
.FileName = oResponse.FileName
|
||||
}
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
' Get Attributes and Values from Database
|
||||
Dim oTable As DataTable
|
||||
|
||||
Try
|
||||
Dim oResult As TableResult = _channel.ReturnDatatable_MSSQL_IDB($"EXEC [PRIDB_GET_VALUE_DT]({pObjectId}, '{oLanguage}')")
|
||||
|
||||
If oResult.OK = False Then
|
||||
Throw New ApplicationException(oResult.ErrorMessage)
|
||||
End If
|
||||
|
||||
If oResult.Table Is Nothing OrElse oResult.Table.Rows.Count = 0 Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
oTable = oResult.Table
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
' TODO: Check if Attribute exists & REfactor
|
||||
|
||||
|
||||
|
||||
Try
|
||||
Dim oVectorAttribute As Boolean = False
|
||||
Select Case pAttributeType
|
||||
Case AttributeType.VectorInteger
|
||||
oVectorAttribute = True
|
||||
Case AttributeType.VectorString
|
||||
oVectorAttribute = True
|
||||
Case Else
|
||||
oVectorAttribute = False
|
||||
End Select
|
||||
|
||||
Dim oAttributeValue As Object = Nothing
|
||||
|
||||
If Not IsNothing(_dummy_table_attributes) Then
|
||||
If oVectorAttribute = True And _dummy_table_attributes.Rows.Count = 1 And pOptions.FromIDB = False Then
|
||||
Try
|
||||
If pAttributeName = "IDBCreatedWhen" Then
|
||||
pAttributeName = "ADDED_WHEN"
|
||||
ElseIf pAttributeName = "IDBCreatedWho" Then
|
||||
pAttributeName = "ADDED_WHO"
|
||||
ElseIf pAttributeName = "IDBChangedWhen" Then
|
||||
pAttributeName = "CHANGED_WHEN"
|
||||
ElseIf pAttributeName = "IDBChangedWho" Then
|
||||
pAttributeName = "CHANGED_WHO"
|
||||
End If
|
||||
|
||||
oAttributeValue = _dummy_table_attributes.Rows(0).Item(pAttributeName)
|
||||
Catch ex As Exception
|
||||
_logger.Debug($"Error getting Attribute from IDB_DT_DOC_DATA: {ex.Message}")
|
||||
End Try
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not IsNothing(oAttributeValue) Then
|
||||
Return oAttributeValue
|
||||
Else
|
||||
_logger.Debug($"oAttributeValue for Attribute [{pAttributeName}] is so far nothing..Now trying FNIDB_PM_GET_VARIABLE_VALUE ")
|
||||
End If
|
||||
Dim oFNSQL = $"SELECT * FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({pObjectId},'{pAttributeName}','{oLanguage}',CONVERT(BIT,'0'))"
|
||||
Dim oDatatable As TableResult = _channel.ReturnDatatable_MSSQL_IDB(oFNSQL)
|
||||
|
||||
If oDatatable.OK = False Then
|
||||
Throw New ApplicationException(oDatatable.ErrorMessage)
|
||||
End If
|
||||
|
||||
If oDatatable.Table.Rows.Count = 1 Then
|
||||
oAttributeValue = oDatatable.Table.Rows.Item(0).Item(0)
|
||||
End If
|
||||
Return oAttributeValue
|
||||
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return Nothing
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function ListFilesForUserAsync() As Task(Of FileList)
|
||||
Private Function DeleteTermObjectFromMetadata(pObjectId As Long, pAttributeName As String, pTerm2Delete As String, Optional pUsername As String = "", Optional pLanguage As String = "") As Boolean
|
||||
Try
|
||||
Dim oResponse As DocumentListResponse = Await _channel.ListFilesForUserAsync(New ListFilesForUserRequest())
|
||||
Return New FileList() With {
|
||||
.Datatable = oResponse.Datatable
|
||||
}
|
||||
Dim oLanguage = NotNull(pLanguage, GetUserLanguage())
|
||||
Dim oUsername = NotNull(pUsername, Environment.UserName)
|
||||
|
||||
Dim oIdIsForeign As Integer = 1
|
||||
Dim oDELSQL = $"EXEC PRIDB_DELETE_TERM_OBJECT_METADATA {pObjectId},'{pAttributeName}','{pTerm2Delete}','{oUsername}','{oLanguage}',{oIdIsForeign}"
|
||||
Dim oResult = _channel.ExecuteNonQuery_MSSQL_IDB(oDELSQL)
|
||||
|
||||
Return oResult.OK
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@ -324,23 +516,20 @@ 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 = Await _channel.ReturnDatatableFromCacheAsync(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>
|
||||
''' <param name="UserId"></param>
|
||||
''' <param name="ObjectId"></param>
|
||||
''' <returns></returns>
|
||||
Public Function GetDocumentInfo(UserId As Long, ObjectId As Long) As DocumentInfo
|
||||
Try
|
||||
Dim oParams = New DocumentInfoRequest With {
|
||||
Dim oResponse As DocumentInfoResponse = _channel.GetFileInfoByObjectId(New DocumentInfoRequest With {
|
||||
.ObjectId = ObjectId,
|
||||
.UserId = UserId
|
||||
}
|
||||
Dim oResponse As DocumentInfoResponse = _channel.GetFileInfoByObjectId(oParams)
|
||||
})
|
||||
|
||||
Return New DocumentInfo With {
|
||||
.AccessRight = oResponse.FileRight,
|
||||
@ -413,5 +602,8 @@ Public Class Client
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetUserLanguage() As String
|
||||
Return Threading.Thread.CurrentThread.CurrentUICulture.Name
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@ -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="TestObjectIdExistsResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TypeInfo>DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||
</GenericObjectDataSource>
|
||||
@ -178,6 +178,15 @@
|
||||
<wsdl:message name="IEDMIService_ImportFileIntoFileObject_UnexpectedErrorFaultFault_FaultMessage">
|
||||
<wsdl:part xmlns:q19="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptions" name="detail" element="q19:UnexpectedErrorFault" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="TestObjectIdExistsRequest">
|
||||
<wsdl:part name="parameters" element="tns:TestObjectIdExistsRequest" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="TestObjectIdExistsResponse">
|
||||
<wsdl:part name="parameters" element="tns:TestObjectIdExistsResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_TestObjectIdExists_UnexpectedErrorFaultFault_FaultMessage">
|
||||
<wsdl:part xmlns:q20="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptions" name="detail" element="q20:UnexpectedErrorFault" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="IEDMIService">
|
||||
<wsdl:operation name="Heartbeat">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/Heartbeat" message="tns:IEDMIService_Heartbeat_InputMessage" />
|
||||
@ -270,5 +279,10 @@
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileIntoFileObjectResponse" name="ImportFileIntoFileObjectResponse" message="tns:ImportFileIntoFileObjectResponse" />
|
||||
<wsdl:fault wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileIntoFileObjectUnexpectedErrorFaultFault" name="UnexpectedErrorFaultFault" message="tns:IEDMIService_ImportFileIntoFileObject_UnexpectedErrorFaultFault_FaultMessage" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="TestObjectIdExists">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExists" name="TestObjectIdExistsRequest" message="tns:TestObjectIdExistsRequest" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExistsResponse" name="TestObjectIdExistsResponse" message="tns:TestObjectIdExistsResponse" />
|
||||
<wsdl:fault wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExistsUnexpectedErrorFaultFault" name="UnexpectedErrorFaultFault" message="tns:IEDMIService_TestObjectIdExists_UnexpectedErrorFaultFault_FaultMessage" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
</wsdl:definitions>
|
||||
@ -278,4 +278,20 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="TestObjectIdExistsRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="TestObjectIdExistsResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="Deleted" type="xs:boolean" />
|
||||
<xs:element minOccurs="0" name="Exists" type="xs:boolean" />
|
||||
<xs:element minOccurs="0" name="Inactive" type="xs:boolean" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@ -475,6 +475,16 @@ Namespace EDMIServiceReference
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileIntoFileObject", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileIntoFileObjectResp"& _
|
||||
"onse")> _
|
||||
Function ImportFileIntoFileObjectAsync(ByVal request As EDMIServiceReference.ImportFileIntoFileObjectRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileIntoFileObjectResponse)
|
||||
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExists", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExistsResponse"), _
|
||||
System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.UnexpectedErrorFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExistsUnexpected"& _
|
||||
"ErrorFaultFault", Name:="UnexpectedErrorFault", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptio"& _
|
||||
"ns")> _
|
||||
Function TestObjectIdExists(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As EDMIServiceReference.TestObjectIdExistsResponse
|
||||
|
||||
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Vorgang mehrere Rückgabewerte aufweist.
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExists", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExistsResponse")> _
|
||||
Function TestObjectIdExistsAsync(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.TestObjectIdExistsResponse)
|
||||
End Interface
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
@ -755,23 +765,23 @@ Namespace EDMIServiceReference
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public Contents() As Byte
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)>
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)> _
|
||||
Public FilePath As String
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)>
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)> _
|
||||
Public ObjectId As Long
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)>
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)> _
|
||||
Public ObjectStoreType As String
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)>
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)> _
|
||||
Public Who As String
|
||||
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal Contents() As Byte, ByVal FilePath As String, ByVal ObjectId As Long, ByVal ObjectStoreType As String, ByVal Who As String)
|
||||
MyBase.New
|
||||
Me.Contents = Contents
|
||||
@ -781,150 +791,194 @@ Namespace EDMIServiceReference
|
||||
Me.Who = Who
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(),
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"),
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced),
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="ImportFileIntoFileObjectResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=True)>
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="ImportFileIntoFileObjectResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
|
||||
Partial Public Class ImportFileIntoFileObjectResponse
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)>
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public Result As Boolean
|
||||
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal Result As Boolean)
|
||||
MyBase.New
|
||||
Me.Result = Result
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>
|
||||
Public Interface IEDMIServiceChannel
|
||||
Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel
|
||||
End Interface
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(),
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>
|
||||
Partial Public Class EDMIServiceClient
|
||||
Inherits System.ServiceModel.ClientBase(Of EDMIServiceReference.IEDMIService)
|
||||
Implements EDMIServiceReference.IEDMIService
|
||||
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="TestObjectIdExistsRequest", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
|
||||
Partial Public Class TestObjectIdExistsRequest
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public ObjectId As Long
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal ObjectId As Long)
|
||||
MyBase.New
|
||||
Me.ObjectId = ObjectId
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="TestObjectIdExistsResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
|
||||
Partial Public Class TestObjectIdExistsResponse
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public Deleted As Boolean
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)> _
|
||||
Public Exists As Boolean
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)> _
|
||||
Public Inactive As Boolean
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal Deleted As Boolean, ByVal Exists As Boolean, ByVal Inactive As Boolean)
|
||||
MyBase.New
|
||||
Me.Deleted = Deleted
|
||||
Me.Exists = Exists
|
||||
Me.Inactive = Inactive
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")> _
|
||||
Public Interface IEDMIServiceChannel
|
||||
Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel
|
||||
End Interface
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")> _
|
||||
Partial Public Class EDMIServiceClient
|
||||
Inherits System.ServiceModel.ClientBase(Of EDMIServiceReference.IEDMIService)
|
||||
Implements EDMIServiceReference.IEDMIService
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal endpointConfigurationName As String)
|
||||
MyBase.New(endpointConfigurationName)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String)
|
||||
MyBase.New(endpointConfigurationName, remoteAddress)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
|
||||
MyBase.New(endpointConfigurationName, remoteAddress)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
|
||||
MyBase.New(binding, remoteAddress)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function Heartbeat() As Boolean Implements EDMIServiceReference.IEDMIService.Heartbeat
|
||||
Return MyBase.Channel.Heartbeat
|
||||
End Function
|
||||
|
||||
|
||||
Public Function HeartbeatAsync() As System.Threading.Tasks.Task(Of Boolean) Implements EDMIServiceReference.IEDMIService.HeartbeatAsync
|
||||
Return MyBase.Channel.HeartbeatAsync
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatableFromCache(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatableFromCache
|
||||
Return MyBase.Channel.ReturnDatatableFromCache(Name, FilterExpression, SortByColumn)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatableFromCacheAsync(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatableFromCacheAsync
|
||||
Return MyBase.Channel.ReturnDatatableFromCacheAsync(Name, FilterExpression, SortByColumn)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_Firebird(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_Firebird
|
||||
Return MyBase.Channel.ReturnDatatable_Firebird(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_FirebirdAsync
|
||||
Return MyBase.Channel.ReturnDatatable_FirebirdAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_Firebird(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_Firebird
|
||||
Return MyBase.Channel.ReturnScalar_Firebird(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_FirebirdAsync
|
||||
Return MyBase.Channel.ReturnScalar_FirebirdAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_Firebird(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_Firebird
|
||||
Return MyBase.Channel.ExecuteNonQuery_Firebird(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_FirebirdAsync
|
||||
Return MyBase.Channel.ExecuteNonQuery_FirebirdAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_IDB
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_IDB(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_IDBAsync
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_IDBAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_IDB
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_IDB(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_IDBAsync
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_IDBAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_IDB
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDB(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_IDBAsync
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDBAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_ECM
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_ECM(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_ECMAsync
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_ECMAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_ECM
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_ECM(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_ECMAsync
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_ECMAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_ECM
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECM(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_ECMAsync
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECMAsync(SQL)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ImportFile(ByVal request As EDMIServiceReference.DocumentImportRequest) As EDMIServiceReference.DocumentImportResponse Implements EDMIServiceReference.IEDMIService.ImportFile
|
||||
Return MyBase.Channel.ImportFile(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ImportFile(ByVal Contents() As Byte, ByVal DocumentType As String, ByVal FileName As String, ByVal ObjectStoreId As Long, ByVal RetentionDays As Long) As Long
|
||||
Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
|
||||
inValue.Contents = Contents
|
||||
@ -932,15 +986,15 @@ Namespace EDMIServiceReference
|
||||
inValue.FileName = FileName
|
||||
inValue.ObjectStoreId = ObjectStoreId
|
||||
inValue.RetentionDays = RetentionDays
|
||||
Dim retVal As EDMIServiceReference.DocumentImportResponse = CType(Me, EDMIServiceReference.IEDMIService).ImportFile(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentImportResponse = CType(Me,EDMIServiceReference.IEDMIService).ImportFile(inValue)
|
||||
Return retVal.ObjectId
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ImportFileAsync(ByVal request As EDMIServiceReference.DocumentImportRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportResponse) Implements EDMIServiceReference.IEDMIService.ImportFileAsync
|
||||
Return MyBase.Channel.ImportFileAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ImportFileAsync(ByVal Contents() As Byte, ByVal DocumentType As String, ByVal FileName As String, ByVal ObjectStoreId As Long, ByVal RetentionDays As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportResponse)
|
||||
Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
|
||||
inValue.Contents = Contents
|
||||
@ -948,104 +1002,104 @@ Namespace EDMIServiceReference
|
||||
inValue.FileName = FileName
|
||||
inValue.ObjectStoreId = ObjectStoreId
|
||||
inValue.RetentionDays = RetentionDays
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).ImportFileAsync(inValue)
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileAsync(inValue)
|
||||
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
|
||||
Return MyBase.Channel.GetFileByObjectId(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileByObjectId(ByVal ObjectId As Long, <System.Runtime.InteropServices.OutAttribute()> ByRef FileContents As System.IO.Stream) As String
|
||||
Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest()
|
||||
inValue.ObjectId = ObjectId
|
||||
Dim retVal As EDMIServiceReference.DocumentStreamResponse = CType(Me, EDMIServiceReference.IEDMIService).GetFileByObjectId(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentStreamResponse = CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectId(inValue)
|
||||
FileContents = retVal.FileContents
|
||||
Return retVal.FileName
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_GetFileByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentStreamRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) Implements EDMIServiceReference.IEDMIService.GetFileByObjectIdAsync
|
||||
Return MyBase.Channel.GetFileByObjectIdAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse)
|
||||
Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest()
|
||||
inValue.ObjectId = ObjectId
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue)
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_GetFileInfoByObjectId(ByVal request As EDMIServiceReference.DocumentInfoRequest) As EDMIServiceReference.DocumentInfoResponse Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectId
|
||||
Return MyBase.Channel.GetFileInfoByObjectId(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileInfoByObjectId(ByVal ObjectId As Long, ByVal UserId As Long, <System.Runtime.InteropServices.OutAttribute()> ByRef FullPath As String) As EDMIServiceReference.RightsAccessRight
|
||||
Dim inValue As EDMIServiceReference.DocumentInfoRequest = New EDMIServiceReference.DocumentInfoRequest()
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.UserId = UserId
|
||||
Dim retVal As EDMIServiceReference.DocumentInfoResponse = CType(Me, EDMIServiceReference.IEDMIService).GetFileInfoByObjectId(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentInfoResponse = CType(Me,EDMIServiceReference.IEDMIService).GetFileInfoByObjectId(inValue)
|
||||
FullPath = retVal.FullPath
|
||||
Return retVal.FileRight
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileInfoByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentInfoRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentInfoResponse) Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectIdAsync
|
||||
Return MyBase.Channel.GetFileInfoByObjectIdAsync(request)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ListFilesForUser(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As EDMIServiceReference.DocumentListResponse Implements EDMIServiceReference.IEDMIService.ListFilesForUser
|
||||
Return MyBase.Channel.ListFilesForUser(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ListFilesForUser() As System.Data.DataTable
|
||||
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest()
|
||||
Dim retVal As EDMIServiceReference.DocumentListResponse = CType(Me, EDMIServiceReference.IEDMIService).ListFilesForUser(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentListResponse = CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUser(inValue)
|
||||
Return retVal.Datatable
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ListFilesForUserAsync(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) Implements EDMIServiceReference.IEDMIService.ListFilesForUserAsync
|
||||
Return MyBase.Channel.ListFilesForUserAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse)
|
||||
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest()
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue)
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_NewObjectId(ByVal request As EDMIServiceReference.NewObjectIdRequest) As EDMIServiceReference.NewObjectIdResponse Implements EDMIServiceReference.IEDMIService.NewObjectId
|
||||
Return MyBase.Channel.NewObjectId(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewObjectId(ByVal BusinessEntity As String, ByVal KindType As String, ByVal Who As String) As Long
|
||||
Dim inValue As EDMIServiceReference.NewObjectIdRequest = New EDMIServiceReference.NewObjectIdRequest()
|
||||
inValue.BusinessEntity = BusinessEntity
|
||||
inValue.KindType = KindType
|
||||
inValue.Who = Who
|
||||
Dim retVal As EDMIServiceReference.NewObjectIdResponse = CType(Me, EDMIServiceReference.IEDMIService).NewObjectId(inValue)
|
||||
Dim retVal As EDMIServiceReference.NewObjectIdResponse = CType(Me,EDMIServiceReference.IEDMIService).NewObjectId(inValue)
|
||||
Return retVal.ObjectId
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_NewObjectIdAsync(ByVal request As EDMIServiceReference.NewObjectIdRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewObjectIdResponse) Implements EDMIServiceReference.IEDMIService.NewObjectIdAsync
|
||||
Return MyBase.Channel.NewObjectIdAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewObjectIdAsync(ByVal BusinessEntity As String, ByVal KindType As String, ByVal Who As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewObjectIdResponse)
|
||||
Dim inValue As EDMIServiceReference.NewObjectIdRequest = New EDMIServiceReference.NewObjectIdRequest()
|
||||
inValue.BusinessEntity = BusinessEntity
|
||||
inValue.KindType = KindType
|
||||
inValue.Who = Who
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).NewObjectIdAsync(inValue)
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).NewObjectIdAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_NewFileObject(ByVal request As EDMIServiceReference.NewFileObjectRequest) As EDMIServiceReference.NewFileObjectResponse Implements EDMIServiceReference.IEDMIService.NewFileObject
|
||||
Return MyBase.Channel.NewFileObject(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewFileObject(ByVal DateImported As Date, ByVal Extension As String, ByVal KeepExtension As Boolean, ByVal ObjectId As Long, ByVal StoreType As String) As String
|
||||
Dim inValue As EDMIServiceReference.NewFileObjectRequest = New EDMIServiceReference.NewFileObjectRequest()
|
||||
inValue.DateImported = DateImported
|
||||
@ -1053,15 +1107,15 @@ Namespace EDMIServiceReference
|
||||
inValue.KeepExtension = KeepExtension
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.StoreType = StoreType
|
||||
Dim retVal As EDMIServiceReference.NewFileObjectResponse = CType(Me, EDMIServiceReference.IEDMIService).NewFileObject(inValue)
|
||||
Dim retVal As EDMIServiceReference.NewFileObjectResponse = CType(Me,EDMIServiceReference.IEDMIService).NewFileObject(inValue)
|
||||
Return retVal.FileObjectPath
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_NewFileObjectAsync(ByVal request As EDMIServiceReference.NewFileObjectRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileObjectResponse) Implements EDMIServiceReference.IEDMIService.NewFileObjectAsync
|
||||
Return MyBase.Channel.NewFileObjectAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewFileObjectAsync(ByVal DateImported As Date, ByVal Extension As String, ByVal KeepExtension As Boolean, ByVal ObjectId As Long, ByVal StoreType As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileObjectResponse)
|
||||
Dim inValue As EDMIServiceReference.NewFileObjectRequest = New EDMIServiceReference.NewFileObjectRequest()
|
||||
inValue.DateImported = DateImported
|
||||
@ -1069,14 +1123,14 @@ Namespace EDMIServiceReference
|
||||
inValue.KeepExtension = KeepExtension
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.StoreType = StoreType
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).NewFileObjectAsync(inValue)
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).NewFileObjectAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ImportFileIntoFileObject(ByVal request As EDMIServiceReference.ImportFileIntoFileObjectRequest) As EDMIServiceReference.ImportFileIntoFileObjectResponse Implements EDMIServiceReference.IEDMIService.ImportFileIntoFileObject
|
||||
Return MyBase.Channel.ImportFileIntoFileObject(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ImportFileIntoFileObject(ByVal Contents() As Byte, ByVal FilePath As String, ByVal ObjectId As Long, ByVal ObjectStoreType As String, ByVal Who As String) As Boolean
|
||||
Dim inValue As EDMIServiceReference.ImportFileIntoFileObjectRequest = New EDMIServiceReference.ImportFileIntoFileObjectRequest()
|
||||
inValue.Contents = Contents
|
||||
@ -1084,15 +1138,15 @@ Namespace EDMIServiceReference
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.ObjectStoreType = ObjectStoreType
|
||||
inValue.Who = Who
|
||||
Dim retVal As EDMIServiceReference.ImportFileIntoFileObjectResponse = CType(Me, EDMIServiceReference.IEDMIService).ImportFileIntoFileObject(inValue)
|
||||
Dim retVal As EDMIServiceReference.ImportFileIntoFileObjectResponse = CType(Me,EDMIServiceReference.IEDMIService).ImportFileIntoFileObject(inValue)
|
||||
Return retVal.Result
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ImportFileIntoFileObjectAsync(ByVal request As EDMIServiceReference.ImportFileIntoFileObjectRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileIntoFileObjectResponse) Implements EDMIServiceReference.IEDMIService.ImportFileIntoFileObjectAsync
|
||||
Return MyBase.Channel.ImportFileIntoFileObjectAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ImportFileIntoFileObjectAsync(ByVal Contents() As Byte, ByVal FilePath As String, ByVal ObjectId As Long, ByVal ObjectStoreType As String, ByVal Who As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileIntoFileObjectResponse)
|
||||
Dim inValue As EDMIServiceReference.ImportFileIntoFileObjectRequest = New EDMIServiceReference.ImportFileIntoFileObjectRequest()
|
||||
inValue.Contents = Contents
|
||||
@ -1102,5 +1156,23 @@ Namespace EDMIServiceReference
|
||||
inValue.Who = Who
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileIntoFileObjectAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_TestObjectIdExists(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As EDMIServiceReference.TestObjectIdExistsResponse Implements EDMIServiceReference.IEDMIService.TestObjectIdExists
|
||||
Return MyBase.Channel.TestObjectIdExists(request)
|
||||
End Function
|
||||
|
||||
Public Function TestObjectIdExists(ByVal ObjectId As Long, <System.Runtime.InteropServices.OutAttribute()> ByRef Exists As Boolean, <System.Runtime.InteropServices.OutAttribute()> ByRef Inactive As Boolean) As Boolean
|
||||
Dim inValue As EDMIServiceReference.TestObjectIdExistsRequest = New EDMIServiceReference.TestObjectIdExistsRequest()
|
||||
inValue.ObjectId = ObjectId
|
||||
Dim retVal As EDMIServiceReference.TestObjectIdExistsResponse = CType(Me,EDMIServiceReference.IEDMIService).TestObjectIdExists(inValue)
|
||||
Exists = retVal.Exists
|
||||
Inactive = retVal.Inactive
|
||||
Return retVal.Deleted
|
||||
End Function
|
||||
|
||||
Public Function TestObjectIdExistsAsync(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.TestObjectIdExistsResponse) Implements EDMIServiceReference.IEDMIService.TestObjectIdExistsAsync
|
||||
Return MyBase.Channel.TestObjectIdExistsAsync(request)
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
@ -261,6 +261,18 @@
|
||||
<soap12:fault use="literal" name="UnexpectedErrorFaultFault" namespace="" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="TestObjectIdExists">
|
||||
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/TestObjectIdExists" style="document" />
|
||||
<wsdl:input name="TestObjectIdExistsRequest">
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output name="TestObjectIdExistsResponse">
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="UnexpectedErrorFaultFault">
|
||||
<soap12:fault use="literal" name="UnexpectedErrorFaultFault" namespace="" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="EDMIService">
|
||||
<wsdl:port name="NetTcpBinding_IEDMIService" binding="tns:NetTcpBinding_IEDMIService">
|
||||
|
||||
@ -1,6 +1,20 @@
|
||||
Public Class Constants
|
||||
Public Const DEFAULT_SERVICE_PORT = 9000
|
||||
|
||||
Public Enum DatabaseType
|
||||
ECM
|
||||
IDB
|
||||
End Enum
|
||||
|
||||
Public Enum AttributeType
|
||||
Varchar = 1
|
||||
BigInteger = 2
|
||||
Float = 3
|
||||
[Decimal] = 4
|
||||
[Date] = 5
|
||||
[DateTime] = 6
|
||||
Bit = 7
|
||||
VectorString = 8
|
||||
VectorInteger = 9
|
||||
End Enum
|
||||
End Class
|
||||
|
||||
@ -142,6 +142,9 @@
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult.datasource">
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</None>
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse.datasource">
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</None>
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Text
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
@ -73,12 +74,29 @@ Public Class File
|
||||
End Function
|
||||
|
||||
Public Function GetChecksum(FilePath As String) As String
|
||||
Using oFileStream = IO.File.OpenRead(FilePath)
|
||||
Using oStream As New BufferedStream(oFileStream, 1200000)
|
||||
Dim oChecksum() As Byte = SHA256.Create.ComputeHash(oStream)
|
||||
Return BitConverter.ToString(oChecksum).Replace("-", String.Empty)
|
||||
Try
|
||||
Using oFileStream = IO.File.OpenRead(FilePath)
|
||||
Using oStream As New BufferedStream(oFileStream, 1200000)
|
||||
Dim oChecksum() As Byte = SHA256.Create.ComputeHash(oStream)
|
||||
Return FormatHash(oChecksum)
|
||||
End Using
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetChecksumFromString(pStringToCheck As String) As String
|
||||
Dim oBytes() As Byte = Encoding.UTF8.GetBytes(pStringToCheck)
|
||||
Dim oChecksum() As Byte = SHA256.Create.ComputeHash(oBytes)
|
||||
Return FormatHash(oChecksum)
|
||||
End Function
|
||||
|
||||
Private Function FormatHash(pChecksum)
|
||||
Return BitConverter.
|
||||
ToString(pChecksum).
|
||||
Replace("-", String.Empty)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.4.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.4.0")>
|
||||
<Assembly: AssemblyVersion("1.0.6.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.6.0")>
|
||||
|
||||
@ -469,6 +469,32 @@ Public Class EDMIService
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function TestObjectIdExists(Data As TestObjectIdExistsRequest) As TestObjectIdExistsResponse Implements IEDMIService.TestObjectIdExists
|
||||
Try
|
||||
Dim oSQL As String = $"SELECT IDB_OBJ_ID, ACTIVE, DELETED FROM TBIDB_OBJECT WHERE IDB_OBJ_ID = {Data.ObjectId}"
|
||||
Dim oTable As DataTable = MSSQL_IDB.GetDatatable(oSQL)
|
||||
|
||||
If IsNothing(oTable) OrElse oTable.Rows.Count = 0 Then
|
||||
_Logger.Warn("ObjectId {0} does not exist")
|
||||
Return New TestObjectIdExistsResponse(False)
|
||||
End If
|
||||
|
||||
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||
Dim oActive = Utils.NotNull(oRow.Item("ACTIVE"), False)
|
||||
Dim oDeleted = Utils.NotNull(oRow.Item("DELETED"), False)
|
||||
|
||||
Return New TestObjectIdExistsResponse(True) With {
|
||||
.Deleted = oDeleted,
|
||||
.Inactive = Not oActive
|
||||
}
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Return New TestObjectIdExistsResponse(False)
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function NewFileObject(Data As NewFileObjectRequest) As NewFileObjectResponse Implements IEDMIService.NewFileObject
|
||||
Try
|
||||
Dim oStoreType As String = Data.StoreType
|
||||
|
||||
@ -131,6 +131,28 @@ Namespace Messages
|
||||
End Class
|
||||
#End Region
|
||||
|
||||
#Region "Helpers"
|
||||
<MessageContract>
|
||||
Public Class TestObjectIdExistsRequest
|
||||
<MessageBodyMember>
|
||||
Public ObjectId As Long
|
||||
End Class
|
||||
|
||||
<MessageContract>
|
||||
Public Class TestObjectIdExistsResponse
|
||||
Public Sub New(pExists As Boolean)
|
||||
Exists = pExists
|
||||
End Sub
|
||||
|
||||
<MessageBodyMember>
|
||||
Public Exists As Boolean = False
|
||||
<MessageBodyMember>
|
||||
Public Inactive As Boolean = False
|
||||
<MessageBodyMember>
|
||||
Public Deleted As Boolean = False
|
||||
End Class
|
||||
#End Region
|
||||
|
||||
End Namespace
|
||||
|
||||
|
||||
|
||||
@ -92,4 +92,10 @@ Interface IEDMIService
|
||||
Function ImportFileIntoFileObject(Data As ImportFileIntoFileObjectRequest) As ImportFileIntoFileObjectResponse
|
||||
#End Region
|
||||
|
||||
#Region "Helpers"
|
||||
<OperationContract>
|
||||
<FaultContract(GetType(UnexpectedErrorFault))>
|
||||
Function TestObjectIdExists(Data As TestObjectIdExistsRequest) As TestObjectIdExistsResponse
|
||||
#End Region
|
||||
|
||||
End Interface
|
||||
@ -38,7 +38,7 @@ Public Class WindowsService
|
||||
Try
|
||||
Dim oServicePath As String = AppDomain.CurrentDomain.BaseDirectory
|
||||
|
||||
_LogConfig = New LogConfig(LogConfig.PathType.CustomPath, IO.Path.Combine(oServicePath, "Log"))
|
||||
_LogConfig = New LogConfig(LogConfig.PathType.CustomPath, IO.Path.Combine(oServicePath, "Log"), Nothing, Nothing, Nothing, 3)
|
||||
_Logger = _LogConfig.GetLogger()
|
||||
|
||||
Try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user