EDMI: Load Object Store Paths
This commit is contained in:
@@ -6,38 +6,21 @@ Public Class Path
|
||||
Private ReadOnly _Logger As Logger
|
||||
Private ReadOnly _BasePath As String
|
||||
|
||||
Public Const PATH_ACTIVE As String = "Active"
|
||||
Public Const PATH_ARCHIVE As String = "Archive"
|
||||
Public Const PATH_EDMI As String = "EDMI"
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, DatastoreBasePath As String)
|
||||
_LogConfig = LogConfig
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_BasePath = DatastoreBasePath
|
||||
End Sub
|
||||
|
||||
Public Function GetActivePath(DocumentType As String, Optional FileName As String = "") As String
|
||||
Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE}
|
||||
Public Function GetFullPath(DocumentType As String, Optional FileName As String = "") As String
|
||||
Dim oParts = New List(Of String) From {_BasePath}
|
||||
oParts.AddRange(Do_GetRelativePath(DocumentType, FileName))
|
||||
|
||||
Return IO.Path.Combine(oParts.ToArray())
|
||||
End Function
|
||||
|
||||
Public Function GetActivePathFromRelativePath(RelativePath As String) As String
|
||||
Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE}
|
||||
oParts.Add(RelativePath)
|
||||
Return IO.Path.Combine(oParts.ToArray)
|
||||
End Function
|
||||
|
||||
Public Function GetArchivePath(DocumentType As String, Optional FileName As String = "") As String
|
||||
Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE}
|
||||
oParts.AddRange(Do_GetRelativePath(DocumentType, FileName))
|
||||
|
||||
Return IO.Path.Combine(oParts.ToArray())
|
||||
End Function
|
||||
|
||||
Public Function GetArchivePathFromRelativePath(RelativePath As String) As String
|
||||
Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE}
|
||||
Public Function GetFullPathFromRelativePath(RelativePath As String) As String
|
||||
Dim oParts = New List(Of String) From {_BasePath}
|
||||
oParts.Add(RelativePath)
|
||||
Return IO.Path.Combine(oParts.ToArray)
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user