diff --git a/Service.EDMIService/EDMIService.vb b/Service.EDMIService/EDMIService.vb
index bd0e5ea7..3a4885fa 100644
--- a/Service.EDMIService/EDMIService.vb
+++ b/Service.EDMIService/EDMIService.vb
@@ -314,13 +314,20 @@ Public Class EDMIService
#Region "Document"
'''
- '''
+ ''' Imports a file according to ObjectStoreId
'''
'''
'''
- '''
'''
- 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 oRelativePath As String = EDMIPath.GetRelativePath(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")
oCommand.Parameters.AddWithValue("@OBJ_ST_ID", 1)
oCommand.Parameters.AddWithValue("@REL_PATH", oRelativePath)
- oCommand.Parameters.AddWithValue("@WHO", AddedWho)
+ oCommand.Parameters.AddWithValue("@WHO", _username)
oCommand.Parameters.AddWithValue("@REF_DOCID", 0)
oCommand.Parameters.Add(New SqlParameter("@IDB_OBJ_ID", SqlDbType.BigInt))
diff --git a/Service.EDMIService/IEDMIService.vb b/Service.EDMIService/IEDMIService.vb
index 41a595f7..9df8a652 100644
--- a/Service.EDMIService/IEDMIService.vb
+++ b/Service.EDMIService/IEDMIService.vb
@@ -49,7 +49,7 @@ Interface IEDMIService
#Region "Document (New)"
- 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
Function GetFileByObjectId(Data As Messages.DocumentStreamRequest) As Messages.DocumentStreamResponse