EDMI: Fixes
This commit is contained in:
parent
b5120e4115
commit
b63c1b5052
@ -215,9 +215,19 @@ Public Class Client
|
|||||||
.AccessRight = oResponse.FileRight,
|
.AccessRight = oResponse.FileRight,
|
||||||
.FullPath = oResponse.FullPath
|
.FullPath = oResponse.FullPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Catch ex As FaultException(Of ObjectDoesNotExistFault)
|
||||||
|
_logger.Error(ex)
|
||||||
|
Throw ex
|
||||||
|
|
||||||
|
Catch ex As FaultException
|
||||||
|
_logger.Error(ex)
|
||||||
|
Throw ex
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_logger.Error(ex)
|
_logger.Error(ex)
|
||||||
Throw ex
|
Throw ex
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@ -395,34 +395,14 @@ Public Class EDMIService
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function ListFilesForUser() As DocumentListResponse Implements IEDMIService.ListFilesForUser
|
|
||||||
Try
|
|
||||||
Dim oDatatable = GetFileList()
|
|
||||||
|
|
||||||
Return New DocumentListResponse() With {
|
|
||||||
.Datatable = oDatatable
|
|
||||||
}
|
|
||||||
|
|
||||||
Catch ex As FaultException
|
|
||||||
_Logger.Error(ex)
|
|
||||||
Throw ex
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
_Logger.Error(ex)
|
|
||||||
Dim oDetails As New UnexpectedErrorFault(ex)
|
|
||||||
Throw New FaultException(Of UnexpectedErrorFault)(oDetails, oDetails.ErrorMessage)
|
|
||||||
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function GetFileInfoByObjectId(Data As DocumentInfoRequest) As DocumentInfoResponse Implements IEDMIService.GetFileInfoByObjectId
|
Public Function GetFileInfoByObjectId(Data As DocumentInfoRequest) As DocumentInfoResponse Implements IEDMIService.GetFileInfoByObjectId
|
||||||
Try
|
Try
|
||||||
Dim oAccessRight = GetAccessRightForObjectId(Data.UserId, Data.ObjectId)
|
Dim oAccessRight = GetAccessRightForObjectId(Data.UserId, Data.ObjectId)
|
||||||
Dim oFullPath = GetFullPathForObjectId(Data.ObjectId)
|
Dim oFullPath = GetFullPathForObjectId(Data.ObjectId)
|
||||||
|
|
||||||
If oFullPath = String.Empty Then
|
If oFullPath = String.Empty Then
|
||||||
Dim oDetails As New ObjectDoesNotExistFault(Data.ObjectId)
|
Dim oFault As New ObjectDoesNotExistFault(Data.ObjectId)
|
||||||
Throw New FaultException(Of ObjectDoesNotExistFault)(oDetails)
|
Throw New FaultException(Of ObjectDoesNotExistFault)(oFault, oFault.ErrorMessage)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return New DocumentInfoResponse With {
|
Return New DocumentInfoResponse With {
|
||||||
@ -430,6 +410,28 @@ Public Class EDMIService
|
|||||||
.FullPath = oFullPath
|
.FullPath = oFullPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Catch ex As FaultException
|
||||||
|
_Logger.Warn("GetFileInfoByObjectId: " & ex.Message)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw ex
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Dim oDetails As New UnexpectedErrorFault(ex)
|
||||||
|
_Logger.Warn("GetFileInfoByObjectId: " & oDetails.ErrorMessage)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw New FaultException(Of UnexpectedErrorFault)(oDetails, oDetails.ErrorMessage)
|
||||||
|
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ListFilesForUser() As DocumentListResponse Implements IEDMIService.ListFilesForUser
|
||||||
|
Try
|
||||||
|
Dim oDatatable = GetFileList()
|
||||||
|
|
||||||
|
Return New DocumentListResponse() With {
|
||||||
|
.Datatable = oDatatable
|
||||||
|
}
|
||||||
|
|
||||||
Catch ex As FaultException
|
Catch ex As FaultException
|
||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
Throw ex
|
Throw ex
|
||||||
@ -470,7 +472,7 @@ Public Class EDMIService
|
|||||||
Dim oFullPath As String
|
Dim oFullPath As String
|
||||||
|
|
||||||
If oRows.Count = 0 Then
|
If oRows.Count = 0 Then
|
||||||
_Logger.Warn("GetFullPathForObjectId: Full path does not exist for on object [{1}]", ObjectId)
|
_Logger.Warn("GetFullPathForObjectId: Full path does not exist for object [{0}]", ObjectId)
|
||||||
oFullPath = String.Empty
|
oFullPath = String.Empty
|
||||||
Else
|
Else
|
||||||
Dim oRow As DataRow = oRows.First()
|
Dim oRow As DataRow = oRows.First()
|
||||||
@ -479,7 +481,7 @@ Public Class EDMIService
|
|||||||
|
|
||||||
Return oFullPath
|
Return oFullPath
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_Logger.Warn("GetFullPathForObjectId: Unexpected Error while getting full path for object [{0}].", ObjectId)
|
_Logger.Warn("GetFullPathForObjectId: Unexpected Error while getting full path for object [{0}].", ObjectId)
|
||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user