1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
|
''' <summary>
''' Permet de sauvegarder la configuration d'un package
''' </summary>
''' <remarks></remarks>
<DataContract(IsReference:=True)>
<SerializableAttribute()>
Public Class Package
''' <summary>
''' Nom du package
''' </summary>
''' <remarks>Variable globale</remarks>
Private G_Name As String
''' <summary>
''' Répertoire source pour le transfert de fichier
''' </summary>
''' <remarks>Variable globale</remarks>
Private G_Source_Path As String
''' <summary>
''' Permet d'identifier les fichiers à transférer
''' </summary>
''' <remarks>Variable globale</remarks>
Private G_Identification_Tag As String
''' <summary>
''' Indique le type de tranfert
''' </summary>
''' <remarks>Variable globale</remarks>
Private G_Transfert_Type As Transfert_Type
''' <summary>
''' Indique quel compte e-mai ldoit être utilisé pour les alertes
''' </summary>
''' <remarks>Variable globale</remarks>
Private GAlertAccounts As New Collection(Of AlertAccount)
''' <summary>
''' Indique quel compte FTP doit être utilisé pour se connecter au FTP
''' </summary>
''' <remarks>Variable globale</remarks>
Private G_Transfert_Account As FTP_Account
Private GPlanifications As New Collection(Of DayPlanification)
Private GDestinations As New Collection(Of Destination)
Private GFrequency As Frequency
Private GPlanificationsEnabled As Boolean
Private GOrder As Integer
Private GLastTreatmentDate As New DateTime
Private GFTPACcountName As String
''' <summary>
''' Initialise une nouvelle instance de package
''' </summary>
''' <param name="Name">Nom du package</param>
''' <param name="Source_Path">Répertoire source pour le transfert de fichier</param>
''' <param name="Transfert_Type">Indique quel compte e-mai ldoit être utilisé pour les alertes</param>
''' <param name="Identifications_Tag">Permet d'identifier les fichiers à transférer</param>
''' <param name="Transfert_Account">Indique quel compte FTP doit être utilisé pour se connecter au FTP</param>
''' <remarks></remarks>
Public Sub New(ByVal Name As String, ByVal Source_Path As String, ByVal Transfert_Type As Transfert_Type, ByVal Identifications_Tag As String, ByRef Transfert_Account As FTP_Account)
G_Name = Name
G_Source_Path = Source_Path
G_Transfert_Type = Transfert_Type
G_Identification_Tag = Identifications_Tag
G_Transfert_Account = Transfert_Account
GDestinations = New Collection(Of Destination)
GAlertAccounts = New Collection(Of AlertAccount)
End Sub
Public Sub New()
GDestinations = New Collection(Of Destination)
GAlertAccounts = New Collection(Of AlertAccount)
End Sub
''' <summary>
''' Obtient ou définit le nom du package
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<DataMember()>
Public Property Name() As String
Get
Return G_Name
End Get
Set(ByVal value As String)
G_Name = value
End Set
End Property
''' <summary>
''' Obtient ou définit le chemin d'accès au répertoire source du transfert
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<DataMember()>
Public Property Source_Path() As String
Get
Return G_Source_Path
End Get
Set(ByVal value As String)
G_Source_Path = value
End Set
End Property
''' <summary>
''' Obtient ou définit le type de transfert
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<DataMember()>
Public Property Transfert_Type() As Transfert_Type
Get
Return G_Transfert_Type
End Get
Set(ByVal value As Transfert_Type)
G_Transfert_Type = value
End Set
End Property
''' <summary>
''' Obtient ou définit le pattern permettant d'identifier les fichiers à transférer
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<DataMember()>
Public Property Identification_Tag() As String
Get
Return G_Identification_Tag
End Get
Set(ByVal value As String)
G_Identification_Tag = value
End Set
End Property
''' <summary>
''' Obtient ou définit le compte FTP qui doit être utilisé pour le transfert
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<DataMember()>
Public Property Transfert_Account As FTP_Account
Get
Return G_Transfert_Account
End Get
Set(ByVal value As FTP_Account)
G_Transfert_Account = value
End Set
End Property
''' <summary>
''' Obtient ou définit le compte e-amil qui doit être utilisé pour les alertes
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<DataMember()>
Public Property AlertAccounts As Collection(Of AlertAccount)
Get
Return GAlertAccounts
End Get
Set(ByVal value As Collection(Of AlertAccount))
GAlertAccounts = value
End Set
End Property
<DataMember()>
Public Property Destinations As Collection(Of Destination)
Get
Return GDestinations
End Get
Set(ByVal value As Collection(Of Destination))
GDestinations = value
End Set
End Property
<DataMember()>
Public Property Planifications As Collection(Of DayPlanification)
Get
Return GPlanifications
End Get
Set(ByVal value As Collection(Of DayPlanification))
GPlanifications = value
End Set
End Property
<DataMember()>
Public Property LastTreatmentDate As DateTime
Get
Return GLastTreatmentDate
End Get
Set(ByVal value As DateTime)
GLastTreatmentDate = value
End Set
End Property
<DataMember()>
Public Property Frequency As Frequency
Get
Return GFrequency
End Get
Set(ByVal value As Frequency)
GFrequency = value
End Set
End Property
<DataMember()>
Public Property Order As Integer
Get
Return GOrder
End Get
Set(ByVal value As Integer)
GOrder = value
End Set
End Property
<DataMember()>
Public Property FrequencyEnabled As Boolean
Get
Return GFrequency.Enable
End Get
Set(ByVal value As Boolean)
GFrequency.Enable = value
End Set
End Property
<DataMember()>
Public Property PlanificationsEnabled As Boolean
Get
Return GPlanificationsEnabled
End Get
Set(ByVal value As Boolean)
GPlanificationsEnabled = value
End Set
End Property
End Class |
Partager