ACPGeneratr is a project contributed by the Deloitte PIER team. Its stated purpose is to provide a tool for bulk uploading into an Alfresco repository.
The download explodes into the following structure…
ACPGeneratr
|
--acpGeneratr # The .java and .class files that make up the application.
|
--content # Place the files to be imported here.
|
--definition_files # Should contain a .tsv category tree definition and a .csv metadata definition file
|
--doc # HTML format documentation of the java classes
|
--testDestDir # The directory in which the compressed archive will be generated.
|
--tools # Excel format spreadsheet defining classes
|
Common errors.txt
README v.2.2.txt
This provides the basic definition of the import and is rigged to look like an Alfresco export definition. As a result, we need to supply the following metadata…
It appears that you must change the routine createXML to define any file types that you wish to import, which do not match to the definitions already in this file.
However before making any changes, decide if you can simply live with the existing definitions or, perhaps, make minor changes to the property names.
The getValue routine parses and returns the properties list for each document. You probably need to change some of these to meet your own requirements.
This is the .csv file in definition_files. The name of the file is irrelevant, as you define it to the programme at run-time.
The first line consists of the properties list, and the second line consists of the values to satisfy those properties.
This is the .tsv file in definition_files. Entries may be as complex as required so long as there is a category entry for each cat: item you defined in the .csv file.
Each entry consists of the category to which the value maps, followed by one or more possible mappings that may appear in the .csv file.
As it stands, you have to invoke the generator from the command line. Assuming you are in the base directory, as described above, the command line is…
java acpGenerator.ACPGenerator <Model> <Source> <Output> <Content> <Properties> <DateType> <Categories>
Using the sample data supplied, the values might be…
The command line example, as provided in the file README v.2.2.txt, doesn't work because it doesn't specify the class name. The version shown above will work, given valid parameters.
You can use any zip utility to create the archive; 7zip works well on Windows. Create a .zip that contains the importXML.xml file and the importContent folder. You could simply change the extension from .zip to .acp but, in version 3.0, Alfresco will happily import from a .zip.
Go to the parent space that you wish to import into, select import and provide the name of the .acp or .zip file.