-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathImportExport.sopm
More file actions
251 lines (236 loc) · 15 KB
/
ImportExport.sopm
File metadata and controls
251 lines (236 loc) · 15 KB
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
240
241
242
243
244
245
246
247
248
249
250
251
<?xml version="1.0" encoding="utf-8" ?>
<otrs_package version="1.0">
<CVS>$Id: ImportExport.sopm,v 1.55 2013-06-18 10:01:20 ub Exp $</CVS>
<Name>ImportExport</Name>
<Version>0.0.0</Version>
<Framework>3.3.x</Framework>
<Vendor>OTRS AG</Vendor>
<URL>http://otrs.org/</URL>
<License>GNU AFFERO GENERAL PUBLIC LICENSE Version 3, November 2007</License>
<Description Lang="en">The ImportExport package.</Description>
<Description Lang="de">Das ImportExport Paket.</Description>
<Description Lang="es">El paquete ImportExport.</Description>
<Filelist>
<File Permission="755" Location="bin/otrs.ImportExport.pl"/>
<File Permission="644" Location="doc/import-export-database.png"/>
<File Permission="644" Location="Kernel/Config/Files/ImportExport.xml"/>
<File Permission="644" Location="Kernel/Language/bg_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/cs_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/ct_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/da_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/de_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/es_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/fa_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/fr_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/it_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/ja_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/ms_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/nb_NO_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/nl_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/pl_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/pt_BR_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/pt_PT_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/ru_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Language/zh_CN_ImportExport.pm"/>
<File Permission="644" Location="Kernel/Modules/AdminImportExport.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/ImportExportLayoutCheckbox.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/ImportExportLayoutDTL.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/ImportExportLayoutSelection.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/ImportExportLayoutText.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/LayoutImportExport.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/Standard/AdminImportExport.dtl"/>
<File Permission="644" Location="Kernel/System/ImportExport.pm"/>
<File Permission="644" Location="Kernel/System/ImportExport/FormatBackend/CSV.pm"/>
<File Permission="644" Location="scripts/test/ImportExport.t"/>
<File Permission="644" Location="scripts/test/ImportExportFormatCSV.t"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV001-MSExcel-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV001-MSExcel-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV001-OpenOffice-Colon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV001-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV001-OpenOffice-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV002-MSExcel-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV002-MSExcel-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV002-OpenOffice-Colon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV002-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV002-OpenOffice-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV003-MSExcel-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV003-MSExcel-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV003-OpenOffice-Colon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV003-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV003-OpenOffice-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV004-MSExcel-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV004-MSExcel-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV004-OpenOffice-Colon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV004-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV004-OpenOffice-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV005-MSExcel-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV005-MSExcel-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV005-OpenOffice-Colon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV005-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV005-OpenOffice-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV006-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV006-OpenOffice-Colon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV006-OpenOffice-Tabulator.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV007-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="scripts/test/sample/ImportExport/ImportExportFormatCSV008-OpenOffice-Semicolon.csv"/>
<File Permission="644" Location="var/packagesetup/ImportExport.pm"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/css/ITSM.ImportExport.css"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/img/icons/importexport_arrow_up.png"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/img/icons/importexport_arrow_up_disabled.png"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/img/icons/importexport_arrow_down.png"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/img/icons/importexport_arrow_down_disabled.png"/>
</Filelist>
<DatabaseInstall Type="post">
<TableCreate Name="imexport_template">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="imexport_object" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="imexport_format" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="name" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="valid_id" Required="true" Type="SMALLINT"/>
<Column Name="comments" Required="false" Size="200" Type="VARCHAR"/>
<Column Name="create_time" Required="false" Type="DATE"/>
<Column Name="create_by" Required="false" Type="INTEGER"/>
<Column Name="change_time" Required="false" Type="DATE"/>
<Column Name="change_by" Required="false" Type="INTEGER"/>
<ForeignKey ForeignTable="users">
<Reference Local="create_by" Foreign="id"/>
<Reference Local="change_by" Foreign="id"/>
</ForeignKey>
</TableCreate>
<TableCreate Name="imexport_object">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="template_id" Required="true" Type="BIGINT"/>
<Column Name="data_key" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="data_value" Required="true" Size="200" Type="VARCHAR"/>
<Index Name="imexport_object_template_id">
<IndexColumn Name="template_id"/>
</Index>
</TableCreate>
<TableCreate Name="imexport_format">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="template_id" Required="true" Type="BIGINT"/>
<Column Name="data_key" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="data_value" Required="true" Size="200" Type="VARCHAR"/>
<Index Name="imexport_format_template_id">
<IndexColumn Name="template_id"/>
</Index>
</TableCreate>
<TableCreate Name="imexport_mapping">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="template_id" Required="true" Type="BIGINT"/>
<Column Name="position" Required="true" Type="INTEGER"/>
<Index Name="imexport_mapping_template_id">
<IndexColumn Name="template_id"/>
</Index>
</TableCreate>
<TableCreate Name="imexport_mapping_object">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="mapping_id" Required="true" Type="BIGINT"/>
<Column Name="data_key" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="data_value" Required="true" Size="200" Type="VARCHAR"/>
<Index Name="imexport_mapping_object_mapping_id">
<IndexColumn Name="mapping_id"/>
</Index>
</TableCreate>
<TableCreate Name="imexport_mapping_format">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="mapping_id" Required="true" Type="BIGINT"/>
<Column Name="data_key" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="data_value" Required="true" Size="200" Type="VARCHAR"/>
<Index Name="imexport_mapping_format_mapping_id">
<IndexColumn Name="mapping_id"/>
</Index>
</TableCreate>
<TableCreate Name="imexport_search">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="BIGINT"/>
<Column Name="template_id" Required="true" Type="BIGINT"/>
<Column Name="data_key" Required="true" Size="100" Type="VARCHAR"/>
<Column Name="data_value" Required="true" Size="200" Type="VARCHAR"/>
<Index Name="imexport_search_template_id">
<IndexColumn Name="template_id"/>
</Index>
</TableCreate>
</DatabaseInstall>
<DatabaseUninstall Type="pre">
<TableDrop Name="imexport_template"/>
<TableDrop Name="imexport_object"/>
<TableDrop Name="imexport_format"/>
<TableDrop Name="imexport_mapping"/>
<TableDrop Name="imexport_mapping_object"/>
<TableDrop Name="imexport_mapping_format"/>
<TableDrop Name="imexport_search"/>
</DatabaseUninstall>
<CodeUpgrade Type="post" Version="2.0.3"><![CDATA[
# define function name
my $FunctionName = 'CodeUpgradeFromBefore_2_0_3';
# create the package name
my $CodeModule = 'var::packagesetup::' . $Param{Structure}->{Name}->{Content};
# The code module has just recently been copied to it's location in the file system.
# In a persistent Perl environment an old version of the module might still be loaded,
# as watchdogs like Apache2::Reload haven't had a chance to reload it.
# So we need to make sure that the new version is being loaded.
# Kernel::System::Main::Require() checks the relative file path, so we need to remove that from %INC.
# This is only needed in persistent Perl environment, but does no harm in a CGI environment.
my $CodeModulePath = $CodeModule;
$CodeModulePath =~ s/::/\//g;
$CodeModulePath .= '.pm';
delete $INC{$CodeModulePath};
# load the module
if ( $Self->{MainObject}->Require($CodeModule) ) {
# create new instance
my $CodeObject = $CodeModule->new( %{$Self} );
if ($CodeObject) {
# start methode
if ( !$CodeObject->$FunctionName(%{$Self}) ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method $FunctionName() on $CodeModule.pm."
);
}
}
# error handling
else {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method new() on $CodeModule.pm."
);
}
}
]]></CodeUpgrade>
<IntroUninstall Type="pre" Title="Uninstallation Information" Lang="en"><![CDATA[
</br>
<strong>ATTENTION</strong>
</br>
</br>
If you uninstall this package, all database tables that were created during installation will be deleted.
All data from these tables will be irrevocably lost!
</br>
</br>
((enjoy))</br>
</br>
]]></IntroUninstall>
<IntroUninstall Type="pre" Title="Uninstallation Information" Lang="de"><![CDATA[
</br>
<strong>ACHTUNG</strong>
</br>
</br>
Bei der Deinstallation werden die von diesem Paket angelegten Datenbank-Tabellen gelöscht.
Alle darin enthaltenen Daten gehen unwiderruflich verloren!
</br>
</br>
((enjoy))</br>
</br>
]]></IntroUninstall>
<IntroUninstall Type="pre" Title="Uninstallation Information" Lang="es"><![CDATA[
<br/>
<strong>ATENCIÓN</strong>
<br/>
<br/>
Si usted desinstala este paquete, todas las tablas de la base de datos que se crearon durante la instalación
del mismo, se eliminarán. ¡La totalidad de los datos que contenían dichas tablas, se perderá irrevocablemente!
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUninstall>
</otrs_package>