EDMI: Prepare using moving files to archive and setting retention date on import
This commit is contained in:
parent
9095c0cd07
commit
88dfb3fab1
@ -314,13 +314,20 @@ Public Class EDMIService
|
|||||||
|
|
||||||
#Region "Document"
|
#Region "Document"
|
||||||
''' <summary>
|
''' <summary>
|
||||||
'''
|
''' Imports a file according to ObjectStoreId
|
||||||
''' </summary>
|
''' </summary>
|
||||||
''' <param name="FileName"></param>
|
''' <param name="FileName"></param>
|
||||||
''' <param name="Contents"></param>
|
''' <param name="Contents"></param>
|
||||||
''' <param name="AddedWho"></param>
|
|
||||||
''' <returns></returns>
|
''' <returns></returns>
|
||||||
Public Function ImportFile(FileName As String, Contents() As Byte, AddedWho As String) As DocumentResult Implements IEDMIService.ImportFile
|
Public Function ImportFile(FileName As String, Contents() As Byte, ObjectStoreId As Int64, DocumentType As String, Optional RetentionDays As Int64 = Nothing) As DocumentResult Implements IEDMIService.ImportFile
|
||||||
|
' TODO:
|
||||||
|
' - Get Object Store -> Object Catalog -> Catalog Path
|
||||||
|
' - If IS_ARCHIVE = True And RetentionDays <> Nothing:
|
||||||
|
' DoArchive!
|
||||||
|
' - Refactor EDMIPath to get ObjectStore at service start up
|
||||||
|
' and return ObjectStore Path from ObjectStoreId + RelativePath
|
||||||
|
' VWIDB_OBJECTSTORE
|
||||||
|
|
||||||
Dim oDocumentType As String = "DummyDocumentType"
|
Dim oDocumentType As String = "DummyDocumentType"
|
||||||
Dim oRelativePath As String = EDMIPath.GetRelativePath(oDocumentType, FileName)
|
Dim oRelativePath As String = EDMIPath.GetRelativePath(oDocumentType, FileName)
|
||||||
Dim oAbsolutePath As String = EDMIPath.GetActivePath(oDocumentType, FileName)
|
Dim oAbsolutePath As String = EDMIPath.GetActivePath(oDocumentType, FileName)
|
||||||
@ -348,7 +355,7 @@ Public Class EDMIService
|
|||||||
Dim oCommand As New SqlCommand("PRIDB_NEW_DOCUMENT")
|
Dim oCommand As New SqlCommand("PRIDB_NEW_DOCUMENT")
|
||||||
oCommand.Parameters.AddWithValue("@OBJ_ST_ID", 1)
|
oCommand.Parameters.AddWithValue("@OBJ_ST_ID", 1)
|
||||||
oCommand.Parameters.AddWithValue("@REL_PATH", oRelativePath)
|
oCommand.Parameters.AddWithValue("@REL_PATH", oRelativePath)
|
||||||
oCommand.Parameters.AddWithValue("@WHO", AddedWho)
|
oCommand.Parameters.AddWithValue("@WHO", _username)
|
||||||
oCommand.Parameters.AddWithValue("@REF_DOCID", 0)
|
oCommand.Parameters.AddWithValue("@REF_DOCID", 0)
|
||||||
oCommand.Parameters.Add(New SqlParameter("@IDB_OBJ_ID", SqlDbType.BigInt))
|
oCommand.Parameters.Add(New SqlParameter("@IDB_OBJ_ID", SqlDbType.BigInt))
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Interface IEDMIService
|
|||||||
|
|
||||||
#Region "Document (New)"
|
#Region "Document (New)"
|
||||||
<OperationContract>
|
<OperationContract>
|
||||||
Function ImportFile(FileName As String, Contents As Byte(), AddedWho As String) As DocumentResult
|
Function ImportFile(FileName As String, Contents As Byte(), ObjectStoreId As Int64, DocumentType As String, Optional RetentionDays As Int64 = Nothing) As DocumentResult
|
||||||
|
|
||||||
<OperationContract>
|
<OperationContract>
|
||||||
Function GetFileByObjectId(Data As Messages.DocumentStreamRequest) As Messages.DocumentStreamResponse
|
Function GetFileByObjectId(Data As Messages.DocumentStreamRequest) As Messages.DocumentStreamResponse
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user