EDMIAPI: Improve Service an Client, Revert some changed function names
This commit is contained in:
parent
c06ccd9d04
commit
edd34b18a0
@ -1,5 +1,6 @@
|
||||
Imports System.IO
|
||||
Imports System.ServiceModel
|
||||
Imports System.Timers
|
||||
Imports DigitalData.Modules.EDMI.API.Constants
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
Imports DigitalData.Modules.EDMI.API.Rights
|
||||
@ -7,78 +8,34 @@ Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class Client
|
||||
' Constants
|
||||
Private Const UPDATE_INTERVAL_IN_MINUTES As Integer = 1
|
||||
Public Const INVALID_OBEJCT_ID As Long = 0
|
||||
Private Const KIND_TYPE_DOC = "DOC"
|
||||
|
||||
Private ReadOnly _LogConfig As LogConfig
|
||||
Private ReadOnly _logger As Logger
|
||||
Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
||||
Private ReadOnly _IPAddressServer As String
|
||||
Private ReadOnly _PortServer As Integer
|
||||
Private ReadOnly _FileEx As Filesystem.File
|
||||
Private _channel As IEDMIServiceChannel
|
||||
' Helper Classes
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
Private ReadOnly Logger As Logger
|
||||
Private ReadOnly FileEx As Filesystem.File
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new EDMI Client object
|
||||
''' </summary>
|
||||
''' <param name="pLogConfig">LogConfig object</param>
|
||||
''' <param name="pServiceAdress">The IP address/hostname and port, separated by semicolon or colon, ex. 1.2.3.4:9000</param>
|
||||
Public Sub New(pLogConfig As LogConfig, pServiceAdress As String)
|
||||
_LogConfig = pLogConfig
|
||||
_logger = pLogConfig.GetLogger()
|
||||
_FileEx = New Filesystem.File(pLogConfig)
|
||||
' Runtime Variables
|
||||
Private ReadOnly ServerAddress As String
|
||||
Private ReadOnly ServerPort As Integer
|
||||
|
||||
Dim oServiceAddress As String = pServiceAdress
|
||||
Dim oAddressArray() As String
|
||||
' Channel
|
||||
Private ReadOnly ChannelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
||||
Private Channel As IEDMIServiceChannel
|
||||
|
||||
If oServiceAddress.Contains(";") Then
|
||||
oAddressArray = oServiceAddress.Split(";")
|
||||
Else
|
||||
oAddressArray = oServiceAddress.Split(":")
|
||||
End If
|
||||
' Update Timer
|
||||
Private WithEvents UpdateTimer As New Timers.Timer
|
||||
|
||||
Try
|
||||
_IPAddressServer = oAddressArray(0)
|
||||
_PortServer = oAddressArray(1)
|
||||
|
||||
Dim oBinding = Channel.GetBinding()
|
||||
Dim oAddress = New EndpointAddress($"net.tcp://{_IPAddressServer}:{_PortServer}/DigitalData/Services/Main")
|
||||
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
|
||||
|
||||
_channelFactory = oFactory
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new EDMI Client object
|
||||
''' </summary>
|
||||
''' <param name="LogConfig">LogConfig object</param>
|
||||
''' <param name="IPAddress">The IP address to connect to</param>
|
||||
''' <param name="PortNumber">The Port number to use for the connection</param>
|
||||
Public Sub New(LogConfig As LogConfig, IPAddress As String, PortNumber As Integer)
|
||||
_LogConfig = LogConfig
|
||||
_logger = LogConfig.GetLogger()
|
||||
_FileEx = New Filesystem.File(LogConfig)
|
||||
|
||||
Try
|
||||
_IPAddressServer = IPAddress
|
||||
Dim oBinding = Channel.GetBinding()
|
||||
Dim oAddress = New EndpointAddress($"net.tcp://{IPAddress}:{PortNumber}/DigitalData/Services/Main")
|
||||
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
|
||||
|
||||
_channelFactory = oFactory
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
' Public Variables
|
||||
Public CachedTables As New List(Of String)
|
||||
|
||||
''' <summary>
|
||||
''' Parse a IPAddress:Port String into its parts
|
||||
''' </summary>
|
||||
''' <param name="AddressWithOptionalPort"></param>
|
||||
''' <returns></returns>
|
||||
Public Shared Function ParseServiceAddress(AddressWithOptionalPort As String) As Tuple(Of String, Integer)
|
||||
Dim oSplit() As String = AddressWithOptionalPort.Split(":"c)
|
||||
Dim oAppServerAddress As String = oSplit(0)
|
||||
@ -95,22 +52,81 @@ Public Class Client
|
||||
Return New Tuple(Of String, Integer)(oAppServerAddress, oAppServerPort)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new EDMI Client object
|
||||
''' </summary>
|
||||
''' <param name="pLogConfig">LogConfig object</param>
|
||||
''' <param name="pServiceAdress">The IP address/hostname and port, separated by semicolon or colon, ex. 1.2.3.4:9000</param>
|
||||
Public Sub New(pLogConfig As LogConfig, pServiceAdress As String)
|
||||
LogConfig = pLogConfig
|
||||
Logger = pLogConfig.GetLogger()
|
||||
FileEx = New Filesystem.File(pLogConfig)
|
||||
|
||||
Dim oServiceAddress As String = pServiceAdress
|
||||
Dim oAddressArray() As String
|
||||
|
||||
If oServiceAddress.Contains(";") Then
|
||||
oAddressArray = oServiceAddress.Split(";")
|
||||
Else
|
||||
oAddressArray = oServiceAddress.Split(":")
|
||||
End If
|
||||
|
||||
UpdateTimer.Interval = 60 * 1000 * UPDATE_INTERVAL_IN_MINUTES
|
||||
UpdateTimer.Start()
|
||||
|
||||
Try
|
||||
ServerAddress = oAddressArray(0)
|
||||
ServerPort = oAddressArray(1)
|
||||
|
||||
Dim oBinding = API.Channel.GetBinding()
|
||||
Dim oAddress = New EndpointAddress($"net.tcp://{ServerAddress}:{ServerPort}/DigitalData/Services/Main")
|
||||
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
|
||||
|
||||
ChannelFactory = oFactory
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new EDMI Client object
|
||||
''' </summary>
|
||||
''' <param name="LogConfig">LogConfig object</param>
|
||||
''' <param name="IPAddress">The IP address to connect to</param>
|
||||
''' <param name="PortNumber">The Port number to use for the connection</param>
|
||||
Public Sub New(LogConfig As LogConfig, IPAddress As String, PortNumber As Integer)
|
||||
Me.LogConfig = LogConfig
|
||||
Logger = LogConfig.GetLogger()
|
||||
FileEx = New Filesystem.File(LogConfig)
|
||||
|
||||
Try
|
||||
ServerAddress = IPAddress
|
||||
Dim oBinding = API.Channel.GetBinding()
|
||||
Dim oAddress = New EndpointAddress($"net.tcp://{IPAddress}:{PortNumber}/DigitalData/Services/Main")
|
||||
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
|
||||
|
||||
ChannelFactory = oFactory
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Connect to the service
|
||||
''' </summary>
|
||||
''' <returns>True if connection was successful, false otherwise</returns>
|
||||
Public Function Connect() As Boolean
|
||||
Try
|
||||
_channel = GetChannel()
|
||||
Channel = GetChannel()
|
||||
|
||||
_logger.Debug("Opening channel..")
|
||||
_channel.Open()
|
||||
Logger.Debug("Opening channel..")
|
||||
Channel.Open()
|
||||
|
||||
_logger.Info($"Connection to AppService {_IPAddressServer} successfully established!")
|
||||
Logger.Info($"Connection to AppService {ServerAddress} successfully established!")
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@ -119,17 +135,29 @@ Public Class Client
|
||||
''' Aborts the channel and creates a new connection
|
||||
''' </summary>
|
||||
Public Sub Reconnect()
|
||||
_logger.Warn("Connection faulted. Trying to reconnect..")
|
||||
Logger.Warn("Connection faulted. Trying to reconnect..")
|
||||
|
||||
Try
|
||||
_channel.Abort()
|
||||
_channel = GetChannel()
|
||||
_channel.Open()
|
||||
Channel.Abort()
|
||||
Channel = GetChannel()
|
||||
Channel.Open()
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Async Function UpdateTimer_Elapsed(sender As Object, e As ElapsedEventArgs) As Task Handles UpdateTimer.Elapsed
|
||||
Try
|
||||
Dim oTables As String() = Await Channel.GetCachedTablesAsync()
|
||||
CachedTables = oTables.
|
||||
Select(Function(table) table.ToUpper).
|
||||
ToList()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
CachedTables = New List(Of String)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Imports a file from a filepath, creating a IDB ObjectId and Filesystem Object
|
||||
''' </summary>
|
||||
@ -157,7 +185,7 @@ Public Class Client
|
||||
Dim oFileName As String = oFileInfo.Name
|
||||
Dim oFileCreatedAt As Date = oFileInfo?.CreationTime
|
||||
Dim oFileModifiedAt As Date = oFileInfo?.LastWriteTime
|
||||
Dim oFileHash As String = _FileEx.GetChecksum(oFileInfo.FullName)
|
||||
Dim oFileHash As String = FileEx.GetChecksum(oFileInfo.FullName)
|
||||
|
||||
' Importing the file now
|
||||
Using oFileStream As New FileStream(pFilePath, FileMode.Open, FileAccess.Read)
|
||||
@ -165,7 +193,7 @@ Public Class Client
|
||||
oFileStream.CopyTo(oMemoryStream)
|
||||
Dim oContents = oMemoryStream.ToArray()
|
||||
|
||||
Dim oFileImportResponse = Await _channel.NewFileAsync(New NewFileRequest With {
|
||||
Dim oFileImportResponse = Await Channel.NewFileAsync(New NewFileRequest With {
|
||||
.BusinessEntity = pBusinessEntity,
|
||||
.File = New FileProperties With {
|
||||
.FileName = oFileInfo.Name,
|
||||
@ -191,7 +219,7 @@ Public Class Client
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return INVALID_OBEJCT_ID
|
||||
End Try
|
||||
End Function
|
||||
@ -205,32 +233,32 @@ Public Class Client
|
||||
pBusinessEntity As String,
|
||||
Optional pImportOptions As Options.ImportFileOptions = Nothing) As Task(Of ImportFileResponse)
|
||||
Try
|
||||
Dim oImportFile As New Modules.Globix.ImportFile(_LogConfig, _channel)
|
||||
Dim oImportFile As New Modules.Globix.ImportFile(LogConfig, Channel)
|
||||
Return Await oImportFile.RunAsync(pFilePath, pProfileId, pAttributeValues, pObjectStoreName, pObjectKind, pBusinessEntity, pImportOptions)
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Zooflow_GetFileObject(pObjectId As Long, pLoadFileContents As Boolean) As FileObject
|
||||
Try
|
||||
Dim oGetFileObject As New Modules.Zooflow.GetFileObject(_LogConfig, _channel)
|
||||
Dim oGetFileObject As New Modules.Zooflow.GetFileObject(LogConfig, Channel)
|
||||
Dim oFileObject = oGetFileObject.Run(pObjectId, pLoadFileContents)
|
||||
Return oFileObject
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function GetFileObjectAsync(pObjectId As Long, pLoadFileContents As Boolean) As Task(Of FileObject)
|
||||
Try
|
||||
Dim oGetFileObject As New Modules.Zooflow.GetFileObject(_LogConfig, Me)
|
||||
Dim oGetFileObject As New Modules.Zooflow.GetFileObject(LogConfig, Me)
|
||||
Dim oFileObject = Await oGetFileObject.RunAsync(pObjectId, pLoadFileContents)
|
||||
Return oFileObject
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
@ -256,13 +284,13 @@ Public Class Client
|
||||
}
|
||||
|
||||
Try
|
||||
Dim oResponse = _channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId})
|
||||
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)
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
@ -287,7 +315,7 @@ Public Class Client
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oExists As Boolean = False
|
||||
For Each oNewValueRow As DataRow In oValueTable.Rows
|
||||
_logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]")
|
||||
Logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]")
|
||||
|
||||
If oNewValueRow.Item(1).ToString.ToUpper = oRow.Item(0).ToString.ToUpper Then
|
||||
oExists = True
|
||||
@ -296,7 +324,7 @@ Public Class Client
|
||||
Next
|
||||
|
||||
If oExists = False Then
|
||||
_logger.Debug($"Value [{oRow.Item(0)}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!")
|
||||
Logger.Debug($"Value [{oRow.Item(0)}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!")
|
||||
DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oRow.Item(0))
|
||||
End If
|
||||
|
||||
@ -308,7 +336,7 @@ Public Class Client
|
||||
'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues
|
||||
Dim oExists As Boolean = False
|
||||
For Each oNewValueRow As DataRow In oValueTable.Rows
|
||||
_logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]")
|
||||
Logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]")
|
||||
|
||||
If oNewValueRow.Item(1).ToString.ToUpper = oCurrentValue.ToString.ToUpper Then
|
||||
oExists = True
|
||||
@ -317,12 +345,12 @@ Public Class Client
|
||||
|
||||
Next
|
||||
If oExists = False Then
|
||||
_logger.Debug($"Value [{oCurrentValue}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!")
|
||||
Logger.Debug($"Value [{oCurrentValue}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!")
|
||||
DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue.Value)
|
||||
End If
|
||||
|
||||
Else
|
||||
_logger.Debug($"Value [{oCurrentValue}] of Attribute [{pAttributeName}] obviously was updated during runtime - will be deleted!")
|
||||
Logger.Debug($"Value [{oCurrentValue}] of Attribute [{pAttributeName}] obviously was updated during runtime - will be deleted!")
|
||||
DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue.Value)
|
||||
|
||||
End If
|
||||
@ -348,7 +376,7 @@ Public Class Client
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@ -367,14 +395,14 @@ Public Class Client
|
||||
|
||||
' Check if ObjectId exists
|
||||
Try
|
||||
Dim oResponse = _channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId})
|
||||
Dim oResponse = Channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId})
|
||||
If oResponse.Exists = False Then
|
||||
Return New VariableValue()
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return New VariableValue()
|
||||
|
||||
End Try
|
||||
@ -407,7 +435,7 @@ Public Class Client
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return New VariableValue()
|
||||
|
||||
End Try
|
||||
@ -452,7 +480,7 @@ Public Class Client
|
||||
Return oAttributeValue
|
||||
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
|
||||
End Try
|
||||
@ -462,7 +490,7 @@ Public Class Client
|
||||
Dim oAttributes As New List(Of ObjectAttribute)
|
||||
|
||||
Try
|
||||
Dim oResult As TableResult = _channel.ReturnDatatable_MSSQL_IDB($"EXEC [PRIDB_GET_VALUE_DT] {pObjectId}, '{pLanguage}'")
|
||||
Dim oResult As TableResult = Channel.ReturnDatatable_MSSQL_IDB($"EXEC [PRIDB_GET_VALUE_DT] {pObjectId}, '{pLanguage}'")
|
||||
|
||||
If oResult.OK = False Then
|
||||
Throw New ApplicationException(oResult.ErrorMessage)
|
||||
@ -488,7 +516,7 @@ Public Class Client
|
||||
|
||||
Return oAttributes
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
@ -503,11 +531,11 @@ Public Class Client
|
||||
|
||||
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)
|
||||
Dim oResult = Channel.ExecuteNonQuery_MSSQL_IDB(oSql)
|
||||
|
||||
If oResult.OK = False Then
|
||||
_logger.Warn("Error while deleting Term object")
|
||||
_logger.Error(oResult.ErrorMessage)
|
||||
Logger.Warn("Error while deleting Term object")
|
||||
Logger.Error(oResult.ErrorMessage)
|
||||
End If
|
||||
|
||||
Return oResult.OK
|
||||
@ -520,92 +548,92 @@ Public Class Client
|
||||
|
||||
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)
|
||||
Dim oResult = Channel.ExecuteNonQuery_MSSQL_IDB(oDELSQL)
|
||||
|
||||
If oResult.OK = False Then
|
||||
_logger.Warn("Error while deleting Term object")
|
||||
_logger.Error(oResult.ErrorMessage)
|
||||
Logger.Warn("Error while deleting Term object")
|
||||
Logger.Error(oResult.ErrorMessage)
|
||||
End If
|
||||
|
||||
Return oResult.OK
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetDatatableFromIDB(pSQL As String, Optional pConnectionId As Integer = 0) As GetDatatableResponse
|
||||
Try
|
||||
Dim oResponse = _channel.ReturnDatatable(New GetDatatableRequest() With {
|
||||
Dim oResponse = Channel.ReturnDatatable(New GetDatatableRequest() With {
|
||||
.SqlCommand = pSQL,
|
||||
.NamedDatabase = DatabaseName.IDB,
|
||||
.ConnectionId = pConnectionId
|
||||
})
|
||||
Return oResponse
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function GetDatatableFromIDBAsync(pSQL As String, Optional pConnectionId As Integer = 0) As Task(Of GetDatatableResponse)
|
||||
Try
|
||||
Dim oResponse = Await _channel.ReturnDatatableAsync(New GetDatatableRequest() With {
|
||||
Dim oResponse = Await Channel.ReturnDatatableAsync(New GetDatatableRequest() With {
|
||||
.SqlCommand = pSQL,
|
||||
.NamedDatabase = DatabaseName.IDB,
|
||||
.ConnectionId = pConnectionId
|
||||
})
|
||||
Return oResponse
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetScalarValueFromIDB(pSQL As String, Optional pConnectionId As Integer = 0) As GetScalarValueResponse
|
||||
Try
|
||||
Dim oResponse = _channel.ReturnScalarValue(New GetScalarValueRequest() With {
|
||||
Dim oResponse = Channel.ReturnScalarValue(New GetScalarValueRequest() With {
|
||||
.SqlCommand = pSQL,
|
||||
.NamedDatabase = DatabaseName.IDB,
|
||||
.ConnectionId = pConnectionId
|
||||
})
|
||||
Return oResponse
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function GetScalarValueFromIDBAsync(pSQL As String, Optional pConnectionId As Integer = 0) As Task(Of GetScalarValueResponse)
|
||||
Try
|
||||
Dim oResponse = Await _channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
|
||||
Dim oResponse = Await Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
|
||||
.SqlCommand = pSQL,
|
||||
.NamedDatabase = DatabaseName.IDB,
|
||||
.ConnectionId = pConnectionId
|
||||
})
|
||||
Return oResponse
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetDatatableByName(DatatableName As String, Optional FilterExpression As String = "", Optional SortByColumn As String = "") As TableResult
|
||||
Try
|
||||
Dim oResponse = _channel.ReturnDatatableFromCache(DatatableName, FilterExpression, SortByColumn)
|
||||
Dim oResponse = Channel.ReturnDatatableFromCache(DatatableName, FilterExpression, SortByColumn)
|
||||
Return oResponse
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
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)
|
||||
Dim oResponse = Await Channel.ReturnDatatableFromCacheAsync(DatatableName, FilterExpression, SortByColumn)
|
||||
Return oResponse
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
@ -618,7 +646,7 @@ Public Class Client
|
||||
''' <returns></returns>
|
||||
Public Function GetDocumentInfo(UserId As Long, ObjectId As Long) As DocumentInfo
|
||||
Try
|
||||
Dim oResponse As DocumentInfoResponse = _channel.GetFileInfoByObjectId(New DocumentInfoRequest With {
|
||||
Dim oResponse As DocumentInfoResponse = Channel.GetFileInfoByObjectId(New DocumentInfoRequest With {
|
||||
.ObjectId = ObjectId,
|
||||
.UserId = UserId
|
||||
})
|
||||
@ -629,15 +657,15 @@ Public Class Client
|
||||
}
|
||||
|
||||
Catch ex As FaultException(Of ObjectDoesNotExistFault)
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
|
||||
Catch ex As FaultException
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
|
||||
End Try
|
||||
@ -649,14 +677,14 @@ Public Class Client
|
||||
.ObjectId = ObjectId,
|
||||
.UserId = UserId
|
||||
}
|
||||
Dim oResponse As DocumentInfoResponse = Await _channel.GetFileInfoByObjectIdAsync(oParams)
|
||||
Dim oResponse As DocumentInfoResponse = Await Channel.GetFileInfoByObjectIdAsync(oParams)
|
||||
|
||||
Return New DocumentInfo With {
|
||||
.AccessRight = oResponse.FileRight,
|
||||
.FullPath = oResponse.FullPath
|
||||
}
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
@ -669,14 +697,14 @@ Public Class Client
|
||||
''' <returns>A channel object</returns>
|
||||
Private Function GetChannel() As IEDMIServiceChannel
|
||||
Try
|
||||
_logger.Debug("...Creating channel..")
|
||||
Dim oChannel = _channelFactory.CreateChannel()
|
||||
Logger.Debug("...Creating channel..")
|
||||
Dim oChannel = ChannelFactory.CreateChannel()
|
||||
|
||||
AddHandler oChannel.Faulted, AddressOf Reconnect
|
||||
|
||||
Return oChannel
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<xsd:schema targetNamespace="http://DigitalData.Services.EDMIService/Imports">
|
||||
<xsd:import namespace="http://DigitalData.Services.EDMIService" />
|
||||
<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||
<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptions" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System" />
|
||||
@ -17,7 +18,6 @@
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.ZooFlow.State" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" />
|
||||
<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GetFileObject" />
|
||||
<xsd:import namespace="http://schemas.microsoft.com/Message" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
|
||||
@ -29,6 +29,12 @@
|
||||
<wsdl:message name="IEDMIService_Heartbeat_OutputMessage">
|
||||
<wsdl:part name="parameters" element="tns:HeartbeatResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_GetCachedTables_InputMessage">
|
||||
<wsdl:part name="parameters" element="tns:GetCachedTables" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_GetCachedTables_OutputMessage">
|
||||
<wsdl:part name="parameters" element="tns:GetCachedTablesResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_ReturnDatatableFromCache_InputMessage">
|
||||
<wsdl:part name="parameters" element="tns:ReturnDatatableFromCache" />
|
||||
</wsdl:message>
|
||||
@ -203,6 +209,10 @@
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/Heartbeat" message="tns:IEDMIService_Heartbeat_InputMessage" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/HeartbeatResponse" message="tns:IEDMIService_Heartbeat_OutputMessage" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetCachedTables">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetCachedTables" message="tns:IEDMIService_GetCachedTables_InputMessage" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetCachedTablesResponse" message="tns:IEDMIService_GetCachedTables_OutputMessage" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ReturnDatatableFromCache">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ReturnDatatableFromCache" message="tns:IEDMIService_ReturnDatatableFromCache_InputMessage" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ReturnDatatableFromCacheResponse" message="tns:IEDMIService_ReturnDatatableFromCache_OutputMessage" />
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?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.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<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.Methods.Database.GetDatatable" />
|
||||
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue" />
|
||||
@ -21,6 +22,18 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetCachedTables">
|
||||
<xs:complexType>
|
||||
<xs:sequence />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetCachedTablesResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="GetCachedTablesResult" nillable="true" type="q1:ArrayOfstring" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ReturnDatatableFromCache">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@ -33,35 +46,35 @@
|
||||
<xs:element name="ReturnDatatableFromCacheResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatableFromCacheResult" nillable="true" type="q1:TableResult" />
|
||||
<xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatableFromCacheResult" nillable="true" type="q2:TableResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ReturnDatatable">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetDatatable" minOccurs="0" name="pData" nillable="true" type="q2:GetDatatableRequest" />
|
||||
<xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetDatatable" minOccurs="0" name="pData" nillable="true" type="q3:GetDatatableRequest" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ReturnDatatableResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetDatatable" minOccurs="0" name="ReturnDatatableResult" nillable="true" type="q3:GetDatatableResponse" />
|
||||
<xs:element xmlns:q4="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetDatatable" minOccurs="0" name="ReturnDatatableResult" nillable="true" type="q4:GetDatatableResponse" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ReturnScalarValue">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q4="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue" minOccurs="0" name="pData" nillable="true" type="q4:GetScalarValueRequest" />
|
||||
<xs:element xmlns:q5="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue" minOccurs="0" name="pData" nillable="true" type="q5:GetScalarValueRequest" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ReturnScalarValueResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q5="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue" minOccurs="0" name="ReturnScalarValueResult" nillable="true" type="q5:GetScalarValueResponse" />
|
||||
<xs:element xmlns:q6="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue" minOccurs="0" name="ReturnScalarValueResult" nillable="true" type="q6:GetScalarValueResponse" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -75,7 +88,7 @@
|
||||
<xs:element name="ReturnDatatable_FirebirdResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q6="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatable_FirebirdResult" nillable="true" type="q6:TableResult" />
|
||||
<xs:element xmlns:q7="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatable_FirebirdResult" nillable="true" type="q7:TableResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -89,7 +102,7 @@
|
||||
<xs:element name="ReturnScalar_FirebirdResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q7="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnScalar_FirebirdResult" nillable="true" type="q7:ScalarResult" />
|
||||
<xs:element xmlns:q8="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnScalar_FirebirdResult" nillable="true" type="q8:ScalarResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -103,7 +116,7 @@
|
||||
<xs:element name="ExecuteNonQuery_FirebirdResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q8="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ExecuteNonQuery_FirebirdResult" nillable="true" type="q8:NonQueryResult" />
|
||||
<xs:element xmlns:q9="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ExecuteNonQuery_FirebirdResult" nillable="true" type="q9:NonQueryResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -117,7 +130,7 @@
|
||||
<xs:element name="ReturnDatatable_MSSQL_IDBResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q9="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatable_MSSQL_IDBResult" nillable="true" type="q9:TableResult" />
|
||||
<xs:element xmlns:q10="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatable_MSSQL_IDBResult" nillable="true" type="q10:TableResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -131,7 +144,7 @@
|
||||
<xs:element name="ReturnScalar_MSSQL_IDBResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q10="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnScalar_MSSQL_IDBResult" nillable="true" type="q10:ScalarResult" />
|
||||
<xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnScalar_MSSQL_IDBResult" nillable="true" type="q11:ScalarResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -145,7 +158,7 @@
|
||||
<xs:element name="ExecuteNonQuery_MSSQL_IDBResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ExecuteNonQuery_MSSQL_IDBResult" nillable="true" type="q11:NonQueryResult" />
|
||||
<xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ExecuteNonQuery_MSSQL_IDBResult" nillable="true" type="q12:NonQueryResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -159,7 +172,7 @@
|
||||
<xs:element name="ReturnDatatable_MSSQL_ECMResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatable_MSSQL_ECMResult" nillable="true" type="q12:TableResult" />
|
||||
<xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnDatatable_MSSQL_ECMResult" nillable="true" type="q13:TableResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -173,7 +186,7 @@
|
||||
<xs:element name="ReturnScalar_MSSQL_ECMResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnScalar_MSSQL_ECMResult" nillable="true" type="q13:ScalarResult" />
|
||||
<xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ReturnScalar_MSSQL_ECMResult" nillable="true" type="q14:ScalarResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -187,63 +200,63 @@
|
||||
<xs:element name="ExecuteNonQuery_MSSQL_ECMResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ExecuteNonQuery_MSSQL_ECMResult" nillable="true" type="q14:NonQueryResult" />
|
||||
<xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ExecuteNonQuery_MSSQL_ECMResult" nillable="true" type="q15:NonQueryResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="NewFile">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" minOccurs="0" name="Data" nillable="true" type="q15:NewFileRequest" />
|
||||
<xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" minOccurs="0" name="Data" nillable="true" type="q16:NewFileRequest" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="NewFileResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" minOccurs="0" name="NewFileResult" nillable="true" type="q16:NewFileResponse" />
|
||||
<xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.NewFile" minOccurs="0" name="NewFileResult" nillable="true" type="q17:NewFileResponse" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="SetAttributeValue">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" minOccurs="0" name="Data" nillable="true" type="q17:SetAttributeValueRequest" />
|
||||
<xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" minOccurs="0" name="Data" nillable="true" type="q18:SetAttributeValueRequest" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="SetAttributeValueResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" minOccurs="0" name="SetAttributeValueResult" nillable="true" type="q18:SetAttributeValueResponse" />
|
||||
<xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.SetAttributeValue" minOccurs="0" name="SetAttributeValueResult" nillable="true" type="q19:SetAttributeValueResponse" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ImportFile">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" minOccurs="0" name="Data" nillable="true" type="q19:ImportFileRequest" />
|
||||
<xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" minOccurs="0" name="Data" nillable="true" type="q20:ImportFileRequest" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ImportFileResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" minOccurs="0" name="ImportFileResult" nillable="true" type="q20:ImportFileResponse" />
|
||||
<xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile" minOccurs="0" name="ImportFileResult" nillable="true" type="q21:ImportFileResponse" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetFileObject">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GetFileObject" minOccurs="0" name="Data" nillable="true" type="q21:GetFileObjectRequest" />
|
||||
<xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GetFileObject" minOccurs="0" name="Data" nillable="true" type="q22:GetFileObjectRequest" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetFileObjectResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GetFileObject" minOccurs="0" name="GetFileObjectResult" nillable="true" type="q22:GetFileObjectResponse" />
|
||||
<xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods.GetFileObject" minOccurs="0" name="GetFileObjectResult" nillable="true" type="q23:GetFileObjectResponse" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -257,7 +270,7 @@
|
||||
<xs:element name="DocumentStreamResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q23="http://schemas.microsoft.com/Message" name="FileContents" type="q23:StreamBody" />
|
||||
<xs:element xmlns:q24="http://schemas.microsoft.com/Message" name="FileContents" type="q24:StreamBody" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -273,7 +286,7 @@
|
||||
<xs:element name="DocumentInfoResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q24="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" minOccurs="0" name="FileRight" type="q24:Rights.AccessRight" />
|
||||
<xs:element xmlns:q25="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" minOccurs="0" name="FileRight" type="q25:Rights.AccessRight" />
|
||||
<xs:element minOccurs="0" name="FullPath" nillable="true" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
<MetadataFile FileName="service.wsdl" MetadataType="Wsdl" ID="63e6618a-fa84-4922-b771-92728dee5bd0" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="DigitalData.Services.EDMIService.xsd" MetadataType="Schema" ID="8b75b395-459e-4678-b979-5e50ebd6a173" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="service.xsd" MetadataType="Schema" ID="1d0f216a-7f01-4129-a6bf-26e91c5e631d" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="Arrays.xsd" MetadataType="Schema" ID="74eac9b3-9049-499b-bf42-5e443530645c" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="DigitalData.Services.EDMIService.Messages.xsd" MetadataType="Schema" ID="e5cf75a6-ec46-4c8a-867b-a1c0a9ce8894" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="System.xsd" MetadataType="Schema" ID="e0db7004-6943-4cf8-b88f-4811ed14a341" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="System.Data.xsd" MetadataType="Schema" ID="6c7bdb47-eea4-4d03-bc52-9747c865bbf0" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
@ -39,7 +40,6 @@
|
||||
<MetadataFile FileName="DigitalData.Modules.ZooFlow.State.xsd" MetadataType="Schema" ID="c9ca2958-d16e-444e-ac34-40fc3c6a86cb" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="DigitalData.Services.EDMIService.Methods.SetAttributeValue.xsd" MetadataType="Schema" ID="a34a2b84-4efd-4be1-83ee-bcb340176a49" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd" MetadataType="Schema" ID="4c9227ac-82b3-4aff-bcb3-eab453dc69c5" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="Arrays.xsd" MetadataType="Schema" ID="74eac9b3-9049-499b-bf42-5e443530645c" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="DigitalData.Services.EDMIService.Methods.GetFileObject.xsd" MetadataType="Schema" ID="39eb9e73-dc51-4849-bb13-09c4d0753ad3" 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" />
|
||||
|
||||
@ -110,6 +110,7 @@ Namespace EDMIServiceReference
|
||||
System.Runtime.Serialization.DataContractAttribute(Name:="ScalarResult", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages"& _
|
||||
""), _
|
||||
System.SerializableAttribute(), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(String())), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.BaseResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _
|
||||
@ -137,7 +138,6 @@ Namespace EDMIServiceReference
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ImportFileRequest)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ImportFileResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(String())), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.GetFileObjectRequest)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.GetFileObjectResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.FileObject)), _
|
||||
@ -201,6 +201,7 @@ Namespace EDMIServiceReference
|
||||
System.Runtime.Serialization.DataContractAttribute(Name:="GetScalarValueResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Methods."& _
|
||||
"Database.GetScalarValue"), _
|
||||
System.SerializableAttribute(), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(String())), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.BaseResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ScalarResult)), _
|
||||
@ -228,7 +229,6 @@ Namespace EDMIServiceReference
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ImportFileRequest)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ImportFileResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(String())), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.GetFileObjectRequest)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.GetFileObjectResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.FileObject)), _
|
||||
@ -1749,6 +1749,12 @@ Namespace EDMIServiceReference
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/Heartbeat", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/HeartbeatResponse")> _
|
||||
Function HeartbeatAsync() As System.Threading.Tasks.Task(Of Boolean)
|
||||
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetCachedTables", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetCachedTablesResponse")> _
|
||||
Function GetCachedTables() As String()
|
||||
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetCachedTables", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetCachedTablesResponse")> _
|
||||
Function GetCachedTablesAsync() As System.Threading.Tasks.Task(Of String())
|
||||
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ReturnDatatableFromCache", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ReturnDatatableFromCacheResp"& _
|
||||
"onse"), _
|
||||
System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.UnexpectedErrorFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/ReturnDatatableFromCacheUnex"& _
|
||||
@ -2143,6 +2149,14 @@ Namespace EDMIServiceReference
|
||||
Return MyBase.Channel.HeartbeatAsync
|
||||
End Function
|
||||
|
||||
Public Function GetCachedTables() As String() Implements EDMIServiceReference.IEDMIService.GetCachedTables
|
||||
Return MyBase.Channel.GetCachedTables
|
||||
End Function
|
||||
|
||||
Public Function GetCachedTablesAsync() As System.Threading.Tasks.Task(Of String()) Implements EDMIServiceReference.IEDMIService.GetCachedTablesAsync
|
||||
Return MyBase.Channel.GetCachedTablesAsync
|
||||
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
|
||||
|
||||
@ -50,6 +50,15 @@
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetCachedTables">
|
||||
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/GetCachedTables" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ReturnDatatableFromCache">
|
||||
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/ReturnDatatableFromCache" style="document" />
|
||||
<wsdl:input>
|
||||
|
||||
@ -11,25 +11,41 @@ Public Class DatabaseWithFallback
|
||||
Private ReadOnly _DatabaseEDM As MSSQLServer
|
||||
Private ReadOnly _DatabaseIDB As MSSQLServer
|
||||
|
||||
Public Enum TableType
|
||||
TBIDB_ATTRIBUTE
|
||||
End Enum
|
||||
''' <summary>
|
||||
''' Options for GetDatatable
|
||||
''' </summary>
|
||||
Public Class GetDatatableOptions
|
||||
Public ReadOnly FallbackSQL
|
||||
Public ReadOnly FallbackType
|
||||
|
||||
Public Class Table
|
||||
Public TableName As String
|
||||
Public SQLCommand As String
|
||||
Public DatabaseType As Constants.DatabaseType
|
||||
''' <summary>
|
||||
''' Filter expression for the cached Datatable
|
||||
''' </summary>
|
||||
Public Property FilterExpression As String = ""
|
||||
''' <summary>
|
||||
''' Columns to sort the cached Datatable by
|
||||
''' </summary>
|
||||
Public Property SortByColumn As String = ""
|
||||
''' <summary>
|
||||
''' Force the fallback, skipping the service completely
|
||||
''' </summary>
|
||||
Public Property ForceFallback As Boolean = False
|
||||
''' <summary>
|
||||
''' Connection Id to use, references TBDD_CONNECTION
|
||||
''' </summary>
|
||||
Public Property ConnectionId As Integer = 0
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new options object for GetDatatable options
|
||||
''' </summary>
|
||||
''' <param name="pFallbackSQL">SQL Command to execute as fallback</param>
|
||||
''' <param name="pFallbackType">Named Database to use for the fallback SQL Command</param>
|
||||
Public Sub New(pFallbackSQL As String, pFallbackType As Constants.DatabaseType)
|
||||
FallbackSQL = pFallbackSQL
|
||||
FallbackType = pFallbackType
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Property Tables As New List(Of Table) From {
|
||||
New Table With {
|
||||
.DatabaseType = Constants.DatabaseType.IDB,
|
||||
.TableName = "TBIDB_ATTRIBUTE",
|
||||
.SQLCommand = "SELECT * FROM TBIDB_ATTRIBUTE"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer)
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_Client = Client
|
||||
@ -37,42 +53,95 @@ Public Class DatabaseWithFallback
|
||||
_DatabaseIDB = DatabaseIDB
|
||||
End Sub
|
||||
|
||||
Public Function GetDatatable(pDataTableName As String, pFallbackSQL As String, pFallbackType As Constants.DatabaseType, Optional pFilterExpression As String = "", Optional pSortByColumn As String = "", Optional pForceFallback As Boolean = False) As DataTable
|
||||
''' <summary>
|
||||
''' Returns a Datatable by trying to fetch a cached version from the service, then querying the database through the service and querying the database directly as fallback.
|
||||
''' </summary>
|
||||
''' <param name="pDataTableName">Name of the Cached Datatable</param>
|
||||
''' <param name="pOptions">Options object</param>
|
||||
Public Function GetDatatable(pDataTableName As String, pOptions As GetDatatableOptions) As DataTable
|
||||
Return GetDatatable(pDataTableName, pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, pOptions.ForceFallback, pOptions.ConnectionId)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Returns a datatable directly from the database.
|
||||
''' </summary>
|
||||
''' <param name="pOptions">Options object</param>
|
||||
Public Function GetDatatable(pOptions As GetDatatableOptions) As DataTable
|
||||
Dim oForceFallback = True
|
||||
Return GetDatatable("FORCE_FALLBACK", pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, oForceFallback, pOptions.ConnectionId)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Returns a Datatable by trying to fetch a cached version from the service, then querying the database through the service and querying the database directly as fallback.
|
||||
''' </summary>
|
||||
''' <param name="pDataTableName">Name of the Cached Datatable</param>
|
||||
''' <param name="pFallbackSQL">SQL Command to execute as fallback</param>
|
||||
''' <param name="pFallbackType">Named Database to use for the fallback SQL Command</param>
|
||||
''' <param name="pFilterExpression">Filter expression for the cached Datatable</param>
|
||||
''' <param name="pSortByColumn">Columns to sort the cached Datatable by</param>
|
||||
''' <param name="pForceFallback">Force the fallback, skipping the service completely</param>
|
||||
''' <param name="pConnectionId">Connection Id to use, references TBDD_CONNECTION</param>
|
||||
Public Function GetDatatable(pDataTableName As String, pFallbackSQL As String, pFallbackType As Constants.DatabaseType, Optional pFilterExpression As String = "", Optional pSortByColumn As String = "", Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As DataTable
|
||||
Try
|
||||
Dim oResult As DataTable = Nothing
|
||||
Dim oTableResult As TableResult = Nothing
|
||||
|
||||
If pForceFallback = False Then
|
||||
Dim oTableResult As TableResult
|
||||
|
||||
Try
|
||||
oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
oTableResult = Nothing
|
||||
End Try
|
||||
|
||||
If oTableResult Is Nothing OrElse oTableResult.OK = False Then
|
||||
_Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName)
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType)
|
||||
End If
|
||||
|
||||
Return oTableResult.Table
|
||||
Else
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType)
|
||||
' If there is no client, we assume there is no service (configured)
|
||||
If _Client Is Nothing Then
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||
End If
|
||||
|
||||
' If ForceFallback flag is set, we go to database immediately
|
||||
If pForceFallback Then
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||
End If
|
||||
|
||||
' If the table is not cached, we go to database immediately
|
||||
If Not IsTableCached(pDataTableName) Then
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||
End If
|
||||
|
||||
' If there is a proper ConnectionId, we go to database immediately
|
||||
If pConnectionId > 0 Then
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||
End If
|
||||
|
||||
Try
|
||||
oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
oTableResult = Nothing
|
||||
End Try
|
||||
|
||||
If oTableResult Is Nothing OrElse oTableResult.OK = False Then
|
||||
_Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName)
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||
Else
|
||||
Return oTableResult.Table
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Return Nothing
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetDatatableFromDatabase(SQLCommand As String, DatabaseType As Constants.DatabaseType)
|
||||
Private Function IsTableCached(pName As String) As Boolean
|
||||
If _Client Is Nothing Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return _Client.CachedTables.Contains(pName.ToUpper)
|
||||
End Function
|
||||
|
||||
Private Function GetDatatableFromDatabase(SQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer)
|
||||
Try
|
||||
Select Case DatabaseType
|
||||
Case DatabaseType.ECM
|
||||
Case Constants.DatabaseType.ECM
|
||||
Return _DatabaseEDM.GetDatatable(SQLCommand)
|
||||
|
||||
Case DatabaseType.IDB
|
||||
Case Constants.DatabaseType.IDB
|
||||
Return _DatabaseIDB.GetDatatable(SQLCommand)
|
||||
|
||||
Case Else
|
||||
|
||||
@ -100,7 +100,7 @@ Public Class EDMIService
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult Implements IEDMIService.GetDatatableFromCache
|
||||
Public Function ReturnDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult Implements IEDMIService.ReturnDatatableFromCache
|
||||
Dim oReturnDatatableFromCache As New GetDatatableFromCache.GetDatatableFromCacheMethod(LogConfig, MSSQL_IDB, MSSQL_ECM, GlobalState)
|
||||
Dim oResult = oReturnDatatableFromCache.Run(New GetDatatableFromCache.GetDatatableFromCacheRequest With {
|
||||
.DataTable = Name,
|
||||
@ -115,13 +115,13 @@ Public Class EDMIService
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function GetDatatable(pData As GetDatatable.GetDatatableRequest) As GetDatatable.GetDatatableResponse Implements IEDMIService.GetDatatable
|
||||
Public Function ReturnDatatable(pData As GetDatatable.GetDatatableRequest) As GetDatatable.GetDatatableResponse Implements IEDMIService.ReturnDatatable
|
||||
_Logger.Debug("Start of Method [ReturnDatatable]")
|
||||
Dim oGetDatatable As New GetDatatable.GetDatatableMethod(LogConfig, MSSQL_IDB, MSSQL_ECM, GlobalState)
|
||||
Return oGetDatatable.Run(pData)
|
||||
End Function
|
||||
|
||||
Public Function GetScalarValue(pData As GetScalarValue.GetScalarValueRequest) As GetScalarValue.GetScalarValueResponse Implements IEDMIService.GetScalarValue
|
||||
Public Function ReturnScalarValue(pData As GetScalarValue.GetScalarValueRequest) As GetScalarValue.GetScalarValueResponse Implements IEDMIService.ReturnScalarValue
|
||||
_Logger.Debug("Start of Method [ReturnScalarValue]")
|
||||
Dim oGetScalarValue As New GetScalarValue.GetScalarValueMethod(LogConfig, MSSQL_IDB, MSSQL_ECM, GlobalState)
|
||||
Return oGetScalarValue.Run(pData)
|
||||
|
||||
@ -21,13 +21,13 @@ Interface IEDMIService
|
||||
<OperationContract>
|
||||
<FaultContract(GetType(UnexpectedErrorFault))>
|
||||
<FaultContract(GetType(DataTableDoesNotExistFault))>
|
||||
Function GetDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult
|
||||
Function ReturnDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult
|
||||
|
||||
<OperationContract>
|
||||
Function GetDatatable(pData As GetDatatable.GetDatatableRequest) As GetDatatable.GetDatatableResponse
|
||||
Function ReturnDatatable(pData As GetDatatable.GetDatatableRequest) As GetDatatable.GetDatatableResponse
|
||||
|
||||
<OperationContract>
|
||||
Function GetScalarValue(pData As GetScalarValue.GetScalarValueRequest) As GetScalarValue.GetScalarValueResponse
|
||||
Function ReturnScalarValue(pData As GetScalarValue.GetScalarValueRequest) As GetScalarValue.GetScalarValueResponse
|
||||
#End Region
|
||||
|
||||
#Region "Database (Firebird)"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user