Skip to content

Commit 1af6bc2

Browse files
authored
Add files via upload
1 parent 27ef953 commit 1af6bc2

7 files changed

+143
-0
lines changed

ImportExportUtil.jar

39.3 KB
Binary file not shown.

generic.properties

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Generic migration properties
2+
#
3+
# Make a copy of this file for your migration
4+
#
5+
#
6+
# User Validation
7+
# set to TRUE to validate usernames for Owner, CreatedBy, Modified By, etc.
8+
# Method can be FlatFile, Spreadsheet, or other (yet to be defined)
9+
# If FlatFile or Spreadsheet, need to give expected location of validation file
10+
USER_VALIDATION = FALSE
11+
USER_VALIDATION_METHOD = FlatFile
12+
USER_VALIDATION_FILE = users.txt
13+
# ADded to support DND's request that user be taken as verbatim.
14+
# Default value is include
15+
# Include mode means user needs to be found by validation method above, Exclude means it must
16+
# not be. If it doesn't matter, set USER_VALIDATION to FALSE
17+
USER_VALIDATION_MODE = include
18+
# Defaults to use if validation above fails
19+
DEF_CREATEDBY = Admin
20+
DEF_OWNER = Admin
21+
# Change to location you want for default location if destination cell is empty or unparseable.
22+
DEF_LOCATION = Enterprise:Unsorted
23+
DEF_LOCALE = en_CA
24+
# define how dates will be formatted so that they can be parsed.
25+
# Note: to use this, make sure that the date format below matches what you have EXACTLY
26+
DATE_FORMAT = dd/MM/YYYY h:mm:ss a
27+
DATE_TIMEZONE = UTC
28+
DATE_TZ_OFFSET = -5
29+
# Destination client - OI, REST, or CWS are the options, currently only OI has been built out
30+
# See below for specific parameters for our destination client, they are all prefixed with
31+
# DEST_CLIENT_
32+
DEST_CLIENT = OI
33+
START_ROW = 0
34+
# Debug method only - don't use for production runs
35+
MAX_ROWS = 10
36+
# Works with COL_EXCLUSION. WHen this value detected in row Identified by COL_EXCLUSION,
37+
# skip this row
38+
EXCLUDE_VAL = Exclude
39+
# VERSION_SUPPORT - true we append version to document when duplicate found, false, we ignore.
40+
# VERS_SUPPORT_MODE - 3 possible values:
41+
# 0 - no support - duplicates are dropped.
42+
# 1 - rename as new object (use this one for emails)
43+
# 2 - treat as new version of same object. (use this one for documents)
44+
# 3 - intelligent; guess on doing 1, if object is a document, or 2, if object is an email
45+
VERSION_SUPPORT = true
46+
VERS_SUPPORT_MODE = 3
47+
# EMAIL_TYPES below only used if VERS_SUPPORT_MODE = 3. It tells us which file extensions
48+
# represent emails
49+
VERS_SUPPORT_EMAIL_TYPES = msg,eml
50+
# note double slashes for all backslashes
51+
# If the source file needs a transformation of the file names, the next two params are for that
52+
# Path_Replace is the part of the file name to truncate, and replaceWith is what to replace it with
53+
PATH_REPLACE = \\\\vmware-host\\Shared Folders\\E
54+
PATH_REPLACEWITH = D:\\OPENTEXT\\Upload
55+
# PATH_COLON_SUBSTITUTE - replace all colons found in path elements (names, locations) with this
56+
# character. Default is Unicode high colon to be similar to Enterprise Conect
57+
PATH_COLON_SUBSTITUTE = \u02F8
58+
#
59+
# new param _ISWEBDAV - in case we get a webDAV path
60+
LOCATION_ISWEDAV = true
61+
LOCATION_WEBDAV_PREFIX = https://gcdocs.gc.ca/nrcan_rncan_dav/
62+
LOCATION_WEBDAV_ENTWSNAME = enterprise
63+
LOCATION_WEBDAV_PATHSEPARATOR = /
64+
#
65+
# LOCATION_PREFIX - sometimes they give us the path (in COL_LOCATION) without 'Enterprise'
66+
# If that happens, specify a prefix. The prefix can be just 'Enterprise' or 'Enterprise:Some Folder'
67+
# Note, this parameter is ignored if LOCATION_ISWEBDAV set to false
68+
LOCATION_PREFIX = Enterprise
69+
#
70+
# Location delimiter. Default is ':' but in some cases we get backslashes
71+
# Comment this out if either a)
72+
LOCATION_DELIMITER = \\
73+
#COMMENT_FORMAT - use these to add Multilingual comments. Comment the lines out if there
74+
# is no requirement to add a comment to each object.
75+
#COMMENT_FORMAT_en_CA = Migrated From {TRUNC_PATH /} Saved By {COL_AUTHOR undefined /}
76+
#COMMENT_FORMAT_fr_CA = migré à partir de {TRUNC_PATH /} Enregistré par {COL_AUTHOR indefini /}
77+
78+
79+
# Client specific attributes - i.e properties specific to Object Importer or REST or CWS
80+
DEST_CLIENT_OI_MaxItems = 1000
81+
DEST_CLIENT_OI_NamePrefix = importG-Drives
82+
DEST_CLIENT_OI_Path =
83+
DEST_CLIENT_OI_CATROOT = Content Server Categories
84+
DEST_CLIENT_OI_VERSADDTITLETOLOC = false
85+
86+
# Spreadsheet properties
87+
# if our spreadsheet is expecting to have a header row, then
88+
# these map to the header string.
89+
# If our spreadsheet has no header row, then these map directly to the column no.
90+
#
91+
COL_NAME = File Name
92+
# file extension, i.e. .msg, .docx, etc.
93+
COL_EXT = Extension
94+
# column defining location of file
95+
COL_FILESPEC = Full Path
96+
COL_LOCATION = GCDOCS Location
97+
COL_OBJTYPE = Type
98+
COL_CREATEDATE = Last Modified Date UTC (+0:00)
99+
COL_AUTHOR = Doc Author
100+
COL_EXCLUSIONS = Markup
101+
#COL_CREATEDBY = Author
102+
#COL_OWNER = Doc Owner
103+
104+
# Attribute parsing options
105+
# MV_SUPPORT - whether or not we support Multi-valued attributes,
106+
# MV_DELIM_CHAR - character used to delimit MV values in a table cell
107+
MV_SUPPORT = true
108+
MV_DELIM_CHAR = ;
109+
110+
# Identify any categories here.
111+
#COL_CAT_<cat#>_<attr#> = <col header>
112+
#Attr_<cat#>_<attr#> = Attribute display name
113+
# Here is an example. Note that the category path starts *after* whatever you have defined
114+
# in the parameter DEST_CLIENT_OI_CATROOT (typically is "Content Server Categories")
115+
#CAT_1 = Migration:Description of Resource
116+
#CAT_2 = Migration:Hérité / Legacy
117+
#ATTR_1_1 = Type de document / Document Type
118+
#ATTR_1_2 = Langue / Language
119+
#ATTR_DEFVAL_1_1 = Indéfini / Undefined
120+
#ATTR_DEFVAL_1_2 = Anglais / English
121+
#ATTR_2_1 = Size / Taile
122+
#ATTR_DEFVAL_2_1 = Big / Gros
123+
# ATTR_TYPE_<cat>_<attr> - for when it's not a string
124+
# when not present, we assume String.
125+
# Valid values are Date, Integer, and String - they confer with the Java primitive type names
126+
# ATTR_TYPE_1_5 = Date

lib/poi-3.14-20160307.jar

2.41 MB
Binary file not shown.

lib/poi-ooxml-3.14-20160307.jar

1.23 MB
Binary file not shown.
5.65 MB
Binary file not shown.

lib/xmlbeans-2.6.0.jar

2.6 MB
Binary file not shown.

runUtil.bat

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@echo off
2+
REM
3+
REM This application depends on there being a java runtime engine (JRE) at version 7 vers71 or better
4+
REM Set the following parameters based on your setup
5+
REM
6+
REM JREDIR - base directory where JDK or JRE is installed
7+
REM PROPFILE - path to properties file (if just a filename, properties file is assumed to be in same directory as this batch file).
8+
REM INPUTFILE - path to Excel spreadsheet to be parsed
9+
REM
10+
REM NOTE: anything else that is configurable is in the properties file. Use generic.properties as a guide
11+
12+
set PROPFILE=DND-POC.properties
13+
set INPUTFILE=Import File DND 2018-02-09.xlsx
14+
set JREDIR=D:\app\Java\jre7
15+
set JAVA=%JREDIR%\bin\java
16+
echo Using path %JAVA% for JRE
17+
%JAVA% -cp "ImportExportUtil.jar;lib/*" ca.hferguson.util.DataMigrator %PROPFILE% "%INPUTFILE%"

0 commit comments

Comments
 (0)