53 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/deletespace.post.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Bulk Import - Delete Space
3 | Web Script that quickly deletes a space and all of its contents.
4 | /bulk/import/delete
5 | admin
6 | Bulk Import
7 |
8 | true
9 |
10 |
11 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/fs/fsconfig.get.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Filesystem Bulk Import Source Config
3 | Web Script that provides the configuration fields for the filesystem bulk import source.
4 | /bulk/import/fs/config
5 |
6 | admin
7 | Bulk Import
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/fs/fsconfig.get.html.ftl:
--------------------------------------------------------------------------------
1 | [#ftl]
2 |
3 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/initiate.post.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Bulk Import - Initiate
3 | Web Script that initiates a bulk import.
4 | /bulk/import/initiate
5 | admin
6 | none
7 | Bulk Import
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/pause.post.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Bulk Import - Pause
3 | Web Script that provides a way to request that a bulk import be paused.
4 | /bulk/import/pause
5 |
6 | admin
7 | Bulk Import
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/pause.post.json.202.ftl:
--------------------------------------------------------------------------------
1 | [#ftl]
2 | {
3 | "result" : "${result}"
4 | }
5 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/resume.post.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Bulk Import - Resume
3 | Web Script that provides a way to request that a paused bulk import be resumed.
4 | /bulk/import/resume
5 |
6 | admin
7 | Bulk Import
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/resume.post.json.202.ftl:
--------------------------------------------------------------------------------
1 | [#ftl]
2 | {
3 | "result" : "${result}"
4 | }
5 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/status.get.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Bulk Import Status
3 | Web Script that provides a simple UI for monitoring the status of a bulk import.
4 | /bulk/import/status
5 |
6 | admin
7 | Bulk Import
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/stop.post.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Bulk Import - Stop
3 | Web Script that provides a way to request that a bulk import be stopped.
4 | /bulk/import/stop
5 |
6 | admin
7 | Bulk Import
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/stop.post.json.202.ftl:
--------------------------------------------------------------------------------
1 | [#ftl]
2 | {
3 | "result" : "${result}"
4 | }
5 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/ui.get.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Bulk Import
3 | Web Script that provides a simple UI for initiating a bulk import.
4 | /bulk/import
5 |
6 | admin
7 | Bulk Import
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/module/org.alfresco.extension.alfresco-bulk-import/alfresco-global.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Tunables (and default values) for the Bulk Import Tool
3 | ###############################################################################
4 | # To override these default values, add each property you wish to override to
5 | # alfresco-global.properties and set them to whatever value is appropriate.
6 | ###############################################################################
7 |
8 | # The maximum "weight" of a batch. Each file in a node (whether content,
9 | # metadata or version) counts towards this total, as does (a fraction of)
10 | # content file size.
11 | alfresco-bulk-import.batch.weight=100
12 |
13 | # The size of the thread pool (during the file import phase only)
14 | # <= 0 means autosize based on the number of CPU cores in the server
15 | alfresco-bulk-import.file.threadpool.size=-1
16 |
17 | # The maximum size (number of batches) allowed in the queue, before scanning
18 | # receives back-pressure (i.e. gets blocked)
19 | alfresco-bulk-import.batch.queue.size=100
20 |
21 | # How long to keep inactive threads alive
22 | alfresco-bulk-import.threadpool.keepAlive.time=10
23 | alfresco-bulk-import.threadpool.keepAlive.units=MINUTES
24 |
25 |
26 | ###############################################################################
27 | # Tunables (and default values) for the Default (Filesystem) import source
28 | ###############################################################################
29 |
30 | # Default separator for multi-value fields in metadata files (note: this can
31 | # be overridden on a case-by-case basis in individual metadata files)
32 | alfresco-bulk-import.source.filesystem.multi-value-separator=,
33 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/module/org.alfresco.extension.alfresco-bulk-import/context/core-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/module/org.alfresco.extension.alfresco-bulk-import/context/filesystem-source-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/module/org.alfresco.extension.alfresco-bulk-import/context/public-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/module/org.alfresco.extension.alfresco-bulk-import/context/web-scripts-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
43 |
44 |
45 |
46 |
49 |
50 |
51 |
52 |
55 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/module/org.alfresco.extension.alfresco-bulk-import/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.logger.org.alfresco.extension.bulkimport=warn
2 | log4j.logger.org.alfresco.extension.bulkimport.impl.Scanner=info
3 | log4j.logger.org.alfresco.extension.bulkimport.impl.LoggingBulkImportCompletionHandler=info
4 | log4j.logger.org.alfresco.extension.bulkimport.impl.BulkImporterImpl=info
5 | log4j.logger.org.alfresco.extension.bulkimport.webscripts=info
6 |
7 | # Handy debugging settings
8 | #log4j.logger.org.alfresco.extension.bulkimport.impl.BatchImporterImpl=debug
9 | #log4j.logger.org.alfresco.repo.transaction.RetryingTransactionHelper=info
10 |
--------------------------------------------------------------------------------
/amp/src/main/amp/config/alfresco/module/org.alfresco.extension.alfresco-bulk-import/module-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/amp/src/main/amp/module.properties:
--------------------------------------------------------------------------------
1 | module.id=org.alfresco.extension.alfresco-bulk-import
2 | module.version=2.1.0.900
3 | module.title=Alfresco Bulk Import v2.1.1-SNAPSHOT (for Alfresco v5.0+)
4 | module.description=Alfresco Bulk Import tool. Provides high performance bulk loading of content into Alfresco.
5 | module.repo.version.min=5.0.0
6 | module.repo.version.max=5.99.99
7 |
8 | # Note: this is commented out as Alfresco Community 5.0 appears to have a bug in it that breaks module edition compatibility checking.
9 | # See: https://groups.google.com/forum/#!topic/alfresco-bulk-filesystem-import/ssNknci8c70
10 | #module.editions=Community,Enterprise
11 |
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/logo.png
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-01.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-01.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-02.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-02.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-03.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-03.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-04.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-04.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-05.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-05.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-06.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-06.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-07.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-07.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/images/bulkimport/spinner-frame-08.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/amp/src/main/amp/web/images/bulkimport/spinner-frame-08.gif
--------------------------------------------------------------------------------
/amp/src/main/amp/web/scripts/bulkimport/favicon.min.js:
--------------------------------------------------------------------------------
1 | /* http://mit-license.org */ (function(h,e){if(!h.favicon){var f=e.getElementsByTagName("head")[0],d=null,g=function(a){var b=e.createElement("link");b.type="image/x-icon";b.rel="icon";b.href=a;a=f.getElementsByTagName("link");for(var c=0;cBulkImportItems.
37 | *
38 | * @param userId The userId with which to run the import (must not be null, empty or blank, and must be a valid Alfresco userId).
39 | * @param target The nodeRef of the target space in which to perform the import (must not be null, and the target space must exist and be writeable).
40 | * @param batch The batch to import (may be null or empty, though both of those states result in nothing happening).
41 | * @param replaceExisting Flag indicating whether existing nodes are to be replaced or skipped.
42 | * @param dryRun Flag indicating that the import should be a "dry run" (nothing written to the repository).
43 | * @throws InterruptedException If the batch is interrupted during processing.
44 | */
45 | public void importBatch(String userId,
46 | NodeRef target,
47 | Batch batch,
48 | boolean replaceExisting,
49 | boolean dryRun)
50 | throws InterruptedException;
51 | }
52 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/impl/BulkImportThreadFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.impl;
21 |
22 | import java.text.DecimalFormat;
23 | import java.util.concurrent.Executors;
24 | import java.util.concurrent.ThreadFactory;
25 | import java.util.concurrent.atomic.AtomicLong;
26 |
27 |
28 | /**
29 | * This ThreadFactory provides human-readable names for threads initiated by the Bulk Filesystem Importer.
30 | *
31 | * @author Peter Monks (pmonks@gmail.com)
32 | */
33 | public class BulkImportThreadFactory
34 | implements ThreadFactory
35 | {
36 | private final static String THREAD_NAME_PREFIX = "BulkImport-Importer-";
37 |
38 | private final DecimalFormat decimalFormat = new DecimalFormat("0000");
39 | private final AtomicLong currentThreadNumber = new AtomicLong(0);
40 |
41 |
42 | /**
43 | * @see java.util.concurrent.ThreadFactory#newThread(java.lang.Runnable)
44 | */
45 | @Override
46 | public Thread newThread(final Runnable runnable)
47 | {
48 | final Thread result = Executors.defaultThreadFactory().newThread(runnable);
49 |
50 | result.setName(THREAD_NAME_PREFIX + decimalFormat.format(currentThreadNumber.incrementAndGet()));
51 | result.setDaemon(true);
52 |
53 | return(result);
54 | }
55 |
56 |
57 | /**
58 | * Resets this thread pool (i.e. sets the thread number counter back to zero).
59 | */
60 | public void reset()
61 | {
62 | currentThreadNumber.set(0);
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/impl/ItemImportException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport.impl;
22 |
23 | import org.alfresco.extension.bulkimport.source.BulkImportItem;
24 | import org.alfresco.extension.bulkimport.source.BulkImportItemVersion;
25 |
26 | /**
27 | * This simple exception adds the failed item to the stack.
28 | *
29 | * @author Peter Monks (pmonks@gmail.com)
30 | *
31 | */
32 | public class ItemImportException
33 | extends RuntimeException
34 | {
35 | private static final long serialVersionUID = -8885681046650475606L;
36 |
37 | final BulkImportItem failedItem;
38 |
39 |
40 | public ItemImportException(final BulkImportItem failedItem, final Throwable rootCause)
41 | {
42 | super("Unexpected exception:\n " + (rootCause == null ? "" : String.valueOf(rootCause.getClass()) + ": " + rootCause.getMessage()) +
43 | "\nWhile importing item: " + String.valueOf(failedItem), rootCause);
44 |
45 | this.failedItem = failedItem;
46 | }
47 |
48 |
49 | /**
50 | * @return The BulkImportItem that failed (may be null).
51 | */
52 | public BulkImportItem getFailedItem()
53 | {
54 | return(failedItem);
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/impl/OutOfOrderBatchException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport.impl;
22 |
23 | /**
24 | * This exception represents the case where a batch has been received
25 | * out-of-order i.e. it contains a node whose parent hasn't been imported yet.
26 | *
27 | * Custom BulkImportSource implementations may throw this
28 | * exception to indicate to the core bulk import logic that the batch should be
29 | * rolled back and requeued.
30 | *
31 | * @author Peter Monks (pmonks@gmail.com)
32 | *
33 | */
34 | public class OutOfOrderBatchException
35 | extends RuntimeException
36 | {
37 | private static final long serialVersionUID = 5644065156780862L;
38 |
39 | private final String missingParentPath;
40 |
41 |
42 | /**
43 | * Constructs an out-of-order batch exception.
44 | *
45 | * @param missingParentPath The parent path (as a String) that's missing. Should be in the source-root-relative format "foo/bar".
46 | */
47 | public OutOfOrderBatchException(final String missingParentPath)
48 | {
49 | super();
50 |
51 | this.missingParentPath = missingParentPath;
52 | }
53 |
54 | public OutOfOrderBatchException(final String missingParentPath, final Throwable t)
55 | {
56 | super(t);
57 |
58 | this.missingParentPath = missingParentPath;
59 | }
60 |
61 | public String getMissingParentPath()
62 | {
63 | return(missingParentPath);
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/impl/WritableBulkImportStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport.impl;
22 |
23 | import org.alfresco.extension.bulkimport.source.BulkImportSource;
24 | import org.alfresco.extension.bulkimport.source.BulkImportSourceStatus;
25 |
26 | /**
27 | * Defines a fully writable interface to the BulkImportStatus.
28 | *
29 | * @author Peter Monks (pmonks@gmail.com)
30 | * @see org.alfresco.extension.bulkimport.source.BulkImportSourceStatus
31 | *
32 | */
33 | public interface WritableBulkImportStatus
34 | extends BulkImportSourceStatus
35 | {
36 | void importStarted(String initiatingUserId,
37 | BulkImportSource source,
38 | String targetSpace,
39 | BulkImportThreadPoolExecutor threadPool,
40 | long batchWeight,
41 | boolean inPlaceImportPossible,
42 | boolean isDryRun);
43 | void scanningComplete();
44 | void pauseRequested();
45 | void resumeRequested();
46 | void stopRequested();
47 | void importComplete();
48 | void unexpectedError(Throwable t);
49 |
50 | void setCurrentlyImporting(String name);
51 | void batchCompleted(Batch batch);
52 |
53 | void preregisterTargetCounters(String[] counterNames);
54 | void incrementTargetCounter(String counterName);
55 | void incrementTargetCounter(String counterName, long value);
56 | }
57 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/FilesystemBulkImportItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport.source.fs;
22 |
23 | import java.util.NavigableSet;
24 |
25 | import org.apache.commons.logging.Log;
26 | import org.apache.commons.logging.LogFactory;
27 | import org.alfresco.extension.bulkimport.source.AbstractBulkImportItem;
28 |
29 |
30 | /**
31 | * This class represents a BulkImportItem sourced from the
32 | * server's local filesystem.
33 | *
34 | * @author Peter Monks (pmonks@gmail.com)
35 | *
36 | */
37 | public final class FilesystemBulkImportItem
38 | extends AbstractBulkImportItem
39 | {
40 | final static Log log = LogFactory.getLog(FilesystemBulkImportItem.class);
41 |
42 | public FilesystemBulkImportItem(final String name,
43 | final boolean isDirectory,
44 | final String relativePathOfParent,
45 | final NavigableSet versions)
46 | {
47 | super(name,
48 | isDirectory,
49 | relativePathOfParent,
50 | versions);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/ImportFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.fs;
21 |
22 |
23 | /**
24 | * Definition of a filesystem source filter - a class that filters out import items identified from the source
25 | * directory from the import.
26 | *
27 | * Note that source filters can be "chained", in which case each source filter effectively has
28 | * "veto" power - if any single filter requests that a given importable item be filtered, it
29 | * will be filtered.
30 | *
31 | * @author Peter Monks (pmonks@gmail.com)
32 | */
33 | public interface ImportFilter
34 | {
35 |
36 | /**
37 | * Method that checks whether the given FilesystemBulkImportItem should be filtered.
38 | *
39 | * @param item The import item to check for filtering (will not be null).
40 | * @return True if the given import item should be filtered, false otherwise.
41 | */
42 | boolean shouldFilter(FilesystemBulkImportItem item);
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/importfilters/AndImportFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.fs.importfilters;
21 |
22 | import java.util.ArrayList;
23 | import java.util.List;
24 |
25 | import org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem;
26 | import org.alfresco.extension.bulkimport.source.fs.ImportFilter;
27 |
28 | /**
29 | * This class provides an ImportFilter that only returns true if all of the configured ImportFilters return true.
30 | *
31 | * @author Peter Monks (pmonks@gmail.com)
32 | */
33 | public class AndImportFilter
34 | implements ImportFilter
35 | {
36 | private final List filters;
37 |
38 | public AndImportFilter(final ImportFilter left, final ImportFilter right)
39 | {
40 | // PRECONDITIONS
41 | assert left != null : "left must not be null.";
42 | assert right != null : "right must not be null.";
43 |
44 | // Body
45 | this.filters = new ArrayList<>(2);
46 |
47 | filters.add(left);
48 | filters.add(right);
49 | }
50 |
51 | public AndImportFilter(final List filters)
52 | {
53 | // PRECONDITIONS
54 | assert filters != null : "filters must not be null.";
55 | assert filters.size() >= 2 : "filters must contain at least 2 items.";
56 |
57 | // Body
58 | this.filters = filters;
59 | }
60 |
61 |
62 | /**
63 | * @see org.alfresco.extension.bulkimport.source.fs.ImportFilter#shouldFilter(org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem)
64 | */
65 | @Override
66 | public boolean shouldFilter(final FilesystemBulkImportItem item)
67 | {
68 | boolean result = true;
69 |
70 | for (final ImportFilter filter : filters)
71 | {
72 | if (!filter.shouldFilter(item))
73 | {
74 | result = false;
75 | break;
76 | }
77 | }
78 |
79 | return(result);
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/importfilters/DirectoryImportFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.fs.importfilters;
21 |
22 | import org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem;
23 | import org.alfresco.extension.bulkimport.source.fs.ImportFilter;
24 |
25 |
26 | /**
27 | * This class is an ImportFilter that filters out directories.
28 | *
29 | * @author Peter Monks (pmonks@gmail.com)
30 | */
31 | public class DirectoryImportFilter
32 | implements ImportFilter
33 | {
34 |
35 | /**
36 | * @see org.alfresco.extension.bulkimport.source.fs.ImportFilter#shouldFilter(org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem)
37 | */
38 | @Override
39 | public boolean shouldFilter(final FilesystemBulkImportItem item)
40 | {
41 | return(item.isDirectory());
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/importfilters/FileImportFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.fs.importfilters;
21 |
22 | import org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem;
23 | import org.alfresco.extension.bulkimport.source.fs.ImportFilter;
24 |
25 |
26 | /**
27 | * This class is an ImportFilter that filters out files.
28 | *
29 | * @author Peter Monks (pmonks@gmail.com)
30 | */
31 | public class FileImportFilter
32 | implements ImportFilter
33 | {
34 | /**
35 | * @see org.alfresco.extension.bulkimport.source.fs.ImportFilter#shouldFilter(org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem)
36 | */
37 | @Override
38 | public boolean shouldFilter(final FilesystemBulkImportItem item)
39 | {
40 | return(!item.isDirectory());
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/importfilters/FileNameRegexImportFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.fs.importfilters;
21 |
22 |
23 | import java.util.regex.Pattern;
24 |
25 | import org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem;
26 | import org.alfresco.extension.bulkimport.source.fs.ImportFilter;
27 |
28 |
29 | /**
30 | * This class is an ImportFilter that filters out files and/or folders whose name, excluding
31 | * path, matches the configured regular expression.
32 | *
33 | * @author Peter Monks (pmonks@gmail.com)
34 | */
35 | public class FileNameRegexImportFilter
36 | implements ImportFilter
37 | {
38 | private final Pattern pattern;
39 |
40 |
41 | /**
42 | * Simple constructor for a FileNameRegexSourceFilter
43 | *
44 | * @param filenameRegex The regex to use to match against file and folder names (must not be null).
45 | */
46 | public FileNameRegexImportFilter(final String filenameRegex)
47 | {
48 | this.pattern = Pattern.compile(filenameRegex);
49 | }
50 |
51 |
52 | /**
53 | * @see org.alfresco.extension.bulkimport.source.fs.ImportFilter#shouldFilter(org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem)
54 | */
55 | @Override
56 | public boolean shouldFilter(final FilesystemBulkImportItem item)
57 | {
58 | return(pattern.matcher(item.getName()).matches());
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/importfilters/HiddenFileFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.fs.importfilters;
21 |
22 | import java.util.Iterator;
23 |
24 | import org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem;
25 | import org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItemVersion;
26 | import org.alfresco.extension.bulkimport.source.fs.ImportFilter;
27 |
28 |
29 | /**
30 | * This class is an ImportFilter that filters out hidden files.
31 | *
32 | * The exact definition of "hidden" is OS dependent - see http://download.oracle.com/javase/6/docs/api/java/io/File.html#isHidden() for details.
33 | *
34 | * @author Peter Monks (pmonks@gmail.com)
35 | */
36 | public class HiddenFileFilter
37 | implements ImportFilter
38 | {
39 | /**
40 | * @see org.alfresco.extension.bulkimport.source.fs.ImportFilter#shouldFilter(org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem)
41 | */
42 | @Override
43 | public boolean shouldFilter(final FilesystemBulkImportItem item)
44 | {
45 | boolean result = false;
46 |
47 | if (item.numberOfVersions() > 0)
48 | {
49 | Iterator iter = item.getVersions().descendingIterator();
50 |
51 | while (iter.hasNext())
52 | {
53 | FilesystemBulkImportItemVersion version = iter.next();
54 |
55 | if (version.hasContent() && version.getContentFile().isHidden())
56 | {
57 | result = true;
58 | break;
59 | }
60 | }
61 | }
62 |
63 | return(result);
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/source/fs/importfilters/NotImportFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.fs.importfilters;
21 |
22 | import org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem;
23 | import org.alfresco.extension.bulkimport.source.fs.ImportFilter;
24 |
25 |
26 | /**
27 | * This class provides an ImportFilter that returns the opposite of the configured SourceFilter.
28 | *
29 | * @author Peter Monks (pmonks@gmail.com)
30 | */
31 | public class NotImportFilter
32 | implements ImportFilter
33 | {
34 | private ImportFilter original;
35 |
36 | public NotImportFilter(final ImportFilter original)
37 | {
38 | // PRECONDITIONS
39 | assert original != null : "original must not be null.";
40 |
41 | // Body
42 | this.original = original;
43 | }
44 |
45 |
46 | /**
47 | * @see org.alfresco.extension.bulkimport.source.fs.ImportFilter#shouldFilter(org.alfresco.extension.bulkimport.source.fs.FilesystemBulkImportItem)
48 | */
49 | @Override
50 | public boolean shouldFilter(final FilesystemBulkImportItem item)
51 | {
52 | return(!original.shouldFilter(item));
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/util/DataDictionaryBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Peter Monks
3 | *
4 | * This file is part of Alfresco
5 | *
6 | * Alfresco is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Lesser General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * Alfresco is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public License
17 | * along with Alfresco. If not, see .
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.util;
21 |
22 | import java.util.Collection;
23 |
24 | import org.alfresco.service.cmr.dictionary.AspectDefinition;
25 | import org.alfresco.service.cmr.dictionary.ConstraintDefinition;
26 | import org.alfresco.service.cmr.dictionary.ModelDefinition;
27 | import org.alfresco.service.cmr.dictionary.TypeDefinition;
28 |
29 | /**
30 | * This interface provides an easy way to get an Alfresco Data Dictionary.
31 | *
32 | * @author Peter Monks (pmonks@gmail.com)
33 | *
34 | */
35 | public interface DataDictionaryBuilder
36 | {
37 | /**
38 | * This method returns the entire registered data dictionary in the Alfresco instance.
39 | *
40 | * @return A handy representation of an Alfresco data dictionary.
41 | */
42 | public Collection getDataDictionary();
43 |
44 | public class Model
45 | {
46 | public ModelDefinition model;
47 | public Collection constraints;
48 | public Collection types;
49 | public Collection aspects;
50 |
51 | // Getters required for Freemarker - see http://freemarker.sourceforge.net/docs/pgui_misc_beanwrapper.html#beanswrapper_hash
52 | public ModelDefinition getModel() { return(model); }
53 | public Collection getConstraints() { return(constraints); }
54 | public Collection getTypes() { return(types); }
55 | public Collection getAspects() { return(aspects); }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/util/ThreadPauser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.util;
21 |
22 | import org.apache.commons.logging.Log;
23 | import org.apache.commons.logging.LogFactory;
24 |
25 | import java.util.concurrent.locks.Condition;
26 | import java.util.concurrent.locks.ReentrantLock;
27 |
28 |
29 | /**
30 | * This class encapsulates the logic for pausing and resuming imports.
31 | *
32 | * @author Peter Monks (pmonks@gmail.com)
33 | */
34 | public final class ThreadPauser
35 | {
36 | private final static Log log = LogFactory.getLog(ThreadPauser.class);
37 |
38 | private volatile boolean paused = false;
39 | private final ReentrantLock pauseLock = new ReentrantLock();
40 | private final Condition pauseCondition = pauseLock.newCondition();
41 |
42 |
43 | /**
44 | * @return The current pause state.
45 | */
46 | public boolean isPaused()
47 | {
48 | return(paused);
49 | }
50 |
51 |
52 | /**
53 | * Pause the current import.
54 | */
55 | public void pause()
56 | {
57 | if (!paused)
58 | {
59 | pauseLock.lock();
60 |
61 | try
62 | {
63 | paused = true;
64 | }
65 | finally
66 | {
67 | pauseLock.unlock();
68 | }
69 | }
70 | }
71 |
72 |
73 | /**
74 | * Resume the current import.
75 | */
76 | public void resume()
77 | {
78 | if (paused)
79 | {
80 | pauseLock.lock();
81 |
82 | try
83 | {
84 | paused = false;
85 | pauseCondition.signalAll();
86 | }
87 | finally
88 | {
89 | pauseLock.unlock();
90 | }
91 | }
92 | }
93 |
94 |
95 | /**
96 | * Blocks the current thread if an import is paused.
97 | * @throws InterruptedException
98 | */
99 | public void blockIfPaused()
100 | throws InterruptedException
101 | {
102 | if (paused)
103 | {
104 | pauseLock.lock();
105 |
106 | try
107 | {
108 | while (paused) pauseCondition.await();
109 | }
110 | finally
111 | {
112 | pauseLock.unlock();
113 | }
114 | }
115 | }
116 |
117 | }
118 |
119 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/webscripts/BulkImportPauseWebScript.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.webscripts;
21 |
22 |
23 | import org.alfresco.extension.bulkimport.BulkImporter;
24 | import org.springframework.extensions.webscripts.Cache;
25 | import org.springframework.extensions.webscripts.DeclarativeWebScript;
26 | import org.springframework.extensions.webscripts.Status;
27 | import org.springframework.extensions.webscripts.WebScriptRequest;
28 |
29 | import java.util.HashMap;
30 | import java.util.Map;
31 |
32 |
33 | /**
34 | * Web Script class that pauses a bulk import, if one is in progress.
35 | *
36 | * @author Peter Monks (peter.monks@alfresco.com)
37 | */
38 | public class BulkImportPauseWebScript
39 | extends DeclarativeWebScript
40 | {
41 | private final BulkImporter importer;
42 |
43 |
44 | public BulkImportPauseWebScript(final BulkImporter importer)
45 | {
46 | // PRECONDITIONS
47 | assert importer != null : "importer must not be null.";
48 |
49 | // BODY
50 | this.importer = importer;
51 | }
52 |
53 |
54 | /**
55 | * @see DeclarativeWebScript#executeImpl(WebScriptRequest, Status, Cache)
56 | */
57 | @Override
58 | protected Map executeImpl(final WebScriptRequest request, final Status status, final Cache cache)
59 | {
60 | Map result = new HashMap<>();
61 |
62 | cache.setNeverCache(true);
63 |
64 | if (importer.getStatus().inProgress())
65 | {
66 | if (!importer.getStatus().isPaused())
67 | {
68 | result.put("result", "pause requested");
69 | importer.pause();
70 | status.setCode(Status.STATUS_ACCEPTED, "Pause requested.");
71 | status.setRedirect(true); // Make sure the custom 202 status template is used (why this is needed at all is beyond me...)
72 | }
73 | else
74 | {
75 | result.put("result", "import is already paused");
76 | status.setCode(Status.STATUS_BAD_REQUEST, "Bulk import is already paused.");
77 | }
78 | }
79 | else
80 | {
81 | result.put("result", "no imports in progress");
82 | status.setCode(Status.STATUS_BAD_REQUEST, "No bulk imports are in progress.");
83 | }
84 |
85 | return(result);
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/webscripts/BulkImportResumeWebScript.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.webscripts;
21 |
22 |
23 | import org.alfresco.extension.bulkimport.BulkImporter;
24 | import org.springframework.extensions.webscripts.Cache;
25 | import org.springframework.extensions.webscripts.DeclarativeWebScript;
26 | import org.springframework.extensions.webscripts.Status;
27 | import org.springframework.extensions.webscripts.WebScriptRequest;
28 |
29 | import java.util.HashMap;
30 | import java.util.Map;
31 |
32 |
33 | /**
34 | * Web Script class that resumes a bulk import, if one is paused.
35 | *
36 | * @author Peter Monks (peter.monks@alfresco.com)
37 | */
38 | public class BulkImportResumeWebScript
39 | extends DeclarativeWebScript
40 | {
41 | private final BulkImporter importer;
42 |
43 |
44 | public BulkImportResumeWebScript(final BulkImporter importer)
45 | {
46 | // PRECONDITIONS
47 | assert importer != null : "importer must not be null.";
48 |
49 | // BODY
50 | this.importer = importer;
51 | }
52 |
53 |
54 | /**
55 | * @see DeclarativeWebScript#executeImpl(WebScriptRequest, Status, Cache)
56 | */
57 | @Override
58 | protected Map executeImpl(final WebScriptRequest request, final Status status, final Cache cache)
59 | {
60 | Map result = new HashMap<>();
61 |
62 | cache.setNeverCache(true);
63 |
64 | if (importer.getStatus().isPaused())
65 | {
66 | result.put("result", "resume requested");
67 | importer.resume();
68 | status.setCode(Status.STATUS_ACCEPTED, "Resume requested.");
69 | status.setRedirect(true); // Make sure the custom 202 status template is used (why this is needed at all is beyond me...)
70 | }
71 | else
72 | {
73 | result.put("result", "no imports in progress");
74 | status.setCode(Status.STATUS_BAD_REQUEST, "No bulk imports are in progress.");
75 | }
76 |
77 | return(result);
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/webscripts/BulkImportStatusWebScript.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.webscripts;
21 |
22 | import java.util.HashMap;
23 | import java.util.Map;
24 |
25 | import org.springframework.extensions.webscripts.Cache;
26 | import org.springframework.extensions.webscripts.DeclarativeWebScript;
27 | import org.springframework.extensions.webscripts.Status;
28 | import org.springframework.extensions.webscripts.WebScriptRequest;
29 |
30 | import org.alfresco.extension.bulkimport.BulkImporter;
31 |
32 |
33 | /**
34 | * Web Script class that provides status information on the bulk filesystem import process.
35 | *
36 | * @author Peter Monks (peter.monks@alfresco.com)
37 | */
38 | public class BulkImportStatusWebScript
39 | extends DeclarativeWebScript
40 | {
41 | // Output parameters (for Freemarker)
42 | private final static String RESULT_IMPORT_STATUS = "importStatus";
43 |
44 | // Attributes
45 | private final BulkImporter importer;
46 |
47 |
48 | public BulkImportStatusWebScript(final BulkImporter importer)
49 | {
50 | // PRECONDITIONS
51 | assert importer != null : "importer must not be null.";
52 |
53 | //BODY
54 | this.importer = importer;
55 | }
56 |
57 |
58 | /**
59 | * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
60 | */
61 | @Override
62 | protected Map executeImpl(final WebScriptRequest request,
63 | final Status status,
64 | final Cache cache)
65 | {
66 | Map result = new HashMap<>();
67 |
68 | cache.setNeverCache(true);
69 |
70 | result.put(RESULT_IMPORT_STATUS, importer.getStatus());
71 |
72 | return(result);
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/webscripts/BulkImportStopWebScript.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.webscripts;
21 |
22 |
23 | import java.util.HashMap;
24 | import java.util.Map;
25 |
26 | import org.springframework.extensions.webscripts.Cache;
27 | import org.springframework.extensions.webscripts.DeclarativeWebScript;
28 | import org.springframework.extensions.webscripts.Status;
29 | import org.springframework.extensions.webscripts.WebScriptRequest;
30 |
31 | import org.alfresco.extension.bulkimport.BulkImporter;
32 |
33 |
34 | /**
35 | * Web Script class that stops a bulk import, if one is in progress.
36 | *
37 | * @author Peter Monks (peter.monks@alfresco.com)
38 | */
39 | public class BulkImportStopWebScript
40 | extends DeclarativeWebScript
41 | {
42 | private final BulkImporter importer;
43 |
44 |
45 | public BulkImportStopWebScript(final BulkImporter importer)
46 | {
47 | // PRECONDITIONS
48 | assert importer != null : "importer must not be null.";
49 |
50 | // BODY
51 | this.importer = importer;
52 | }
53 |
54 |
55 | /**
56 | * @see org.springframework.extensions.webscripts.DeclarativeWebScript#executeImpl(org.springframework.extensions.webscripts.WebScriptRequest, org.springframework.extensions.webscripts.Status, org.springframework.extensions.webscripts.Cache)
57 | */
58 | @Override
59 | protected Map executeImpl(final WebScriptRequest request, final Status status, final Cache cache)
60 | {
61 | Map result = new HashMap<>();
62 |
63 | cache.setNeverCache(true);
64 |
65 | if (importer.getStatus().inProgress())
66 | {
67 | result.put("result", "stop requested");
68 | importer.stop();
69 | status.setCode(Status.STATUS_ACCEPTED, "Stop requested.");
70 | status.setRedirect(true); // Make sure the custom 202 status template is used (why this is needed at all is beyond me...)
71 | }
72 | else
73 | {
74 | result.put("result", "no imports in progress");
75 | status.setCode(Status.STATUS_BAD_REQUEST, "No bulk imports are in progress.");
76 | }
77 |
78 | return(result);
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/amp/src/main/java/org/alfresco/extension/bulkimport/webscripts/DataDictionaryWebScript.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.webscripts;
21 |
22 | import java.util.HashMap;
23 | import java.util.Map;
24 |
25 | import org.springframework.extensions.webscripts.Cache;
26 | import org.springframework.extensions.webscripts.DeclarativeWebScript;
27 | import org.springframework.extensions.webscripts.Status;
28 | import org.springframework.extensions.webscripts.WebScriptRequest;
29 |
30 | import org.alfresco.extension.bulkimport.util.DataDictionaryBuilder;
31 |
32 |
33 | /**
34 | * Web Script class that provides status information on the installed data dictionary.
35 | *
36 | * @author Peter Monks (peter.monks@alfresco.com)
37 | */
38 | public class DataDictionaryWebScript
39 | extends DeclarativeWebScript
40 | {
41 | // Output parameters (for Freemarker)
42 | private final static String RESULT_DATA_DICTIONARY = "dataDictionary";
43 |
44 | // Attributes
45 | private final DataDictionaryBuilder dataDictionaryBuilder;
46 |
47 |
48 | public DataDictionaryWebScript(final DataDictionaryBuilder dataDictionaryBuilder)
49 | {
50 | // PRECONDITIONS
51 | assert dataDictionaryBuilder != null : "dataDictionaryBuilder must not be null.";
52 |
53 | //BODY
54 | this.dataDictionaryBuilder = dataDictionaryBuilder;
55 | }
56 |
57 |
58 | /**
59 | * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
60 | */
61 | @Override
62 | protected Map executeImpl(final WebScriptRequest request,
63 | final Status status,
64 | final Cache cache)
65 | {
66 | Map result = new HashMap<>();
67 |
68 | cache.setNeverCache(true);
69 |
70 | result.put(RESULT_DATA_DICTIONARY, dataDictionaryBuilder.getDataDictionary());
71 |
72 | return(result);
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/api/.versioneye.properties:
--------------------------------------------------------------------------------
1 | # Properties for https://www.VersionEye.com
2 | #Wed Jul 20 14:11:36 PDT 2016
3 | project_id=578fe9b93a9dbf0009a4d299
4 |
--------------------------------------------------------------------------------
/api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | org.alfresco.extension
7 | alfresco-bulk-import-api
8 | jar
9 | Bulk Import Tool - Public API JAR
10 | Bulk Import Tool - Public API JAR project.
11 |
12 |
13 | org.alfresco.extension
14 | alfresco-bulk-import-parent
15 | 2.1.1-SNAPSHOT
16 |
17 |
18 |
19 |
20 | ${alfresco.groupId}
21 | alfresco-repository
22 | provided
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/api/src/main/java/org/alfresco/extension/bulkimport/BulkImportCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport;
21 |
22 | import org.alfresco.extension.bulkimport.source.BulkImportItem;
23 |
24 | /**
25 | * This interface exposes a callback into the bulk importer for pluggable source implementations.
26 | *
27 | * @author Peter Monks (pmonks@gmail.com)
28 | *
29 | */
30 | public interface BulkImportCallback
31 | {
32 | /**
33 | * Submits the given folder for import.
34 | *
35 | * Notes:
36 | *
37 | *
The implementation of this method is synchronized, and therefore
38 | * thread safe.
39 | *
This method may block (e.g. if the import work queue is full).
40 | *
The caller of this method must let the
41 | * InterruptedException percolate up the call stack without
42 | * catching it. This is critically important to ensure manually stopped
43 | * imports stop in a timely fashion.
44 | *
45 | *
46 | * @param item The folder being submitted(must not be null).
47 | * @throws InterruptedException If the thread is interrupted.
48 | */
49 | @SuppressWarnings("rawtypes")
50 | void submit(BulkImportItem item)
51 | throws InterruptedException;
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/api/src/main/java/org/alfresco/extension/bulkimport/BulkImportCompletionHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport;
22 |
23 | /**
24 | * This interface defines custom processing that can occur at the end of a bulk import.
25 | *
26 | * @author Peter Monks (pmonks@gmail.com)
27 | *
28 | */
29 | public interface BulkImportCompletionHandler
30 | {
31 | /**
32 | * Called when an import completes, regardless of state (succeeded, failed or stopped).
33 | *
34 | * Notes:
35 | *
36 | *
The code must not use any Alfresco repository services whatsoever,
37 | * as this method is executed on a background thread that runs outside of both
38 | * an Alfresco authentication context and an Alfresco transaction.
39 | *
The code should complete quickly. Lengthy processing (e.g. RPCs to external
40 | * services) should be done on a separate background thread.
41 | *
The code should not throw exceptions - any it does throw will be caught, logged,
42 | * then swallowed (ignored).
43 | *
44 | *
45 | * @param status The R/O status object, as at the conclusion of the import (will not be null).
46 | */
47 | void importComplete(BulkImportStatus status);
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/org/alfresco/extension/bulkimport/BulkImporter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport;
21 |
22 | import java.util.List;
23 | import java.util.Map;
24 |
25 | import org.alfresco.service.cmr.repository.NodeRef;
26 |
27 | import org.alfresco.extension.bulkimport.source.BulkImportSource;
28 |
29 |
30 | /**
31 | * Interface defining the bulk importer.
32 | *
33 | * @author Peter Monks (pmonks@gmail.com)
34 | */
35 | public interface BulkImporter
36 | {
37 | /**
38 | * @return The bulk import sources installed in this Alfresco instance, with the map key as the sourceBeanId (will not be null or empty).
39 | */
40 | Map getBulkImportSources();
41 |
42 |
43 | /**
44 | * Initiates a bulk import. getStatus().inProgress() must be false prior to calling this method or an exception will be thrown.
45 | *
46 | * @param sourceBeanId The bean id of the bulk import source to read content from (must not be null, empty or blank).
47 | * @param parameters The parameters (if any) provided by the initiator of the import (will not be null, but may be empty).
48 | * @param target The target space to ingest the content into (must not be null and must be a valid, writable space in the repository).
49 | */
50 | void start(String sourceBeanId, Map> parameters, NodeRef target);
51 |
52 |
53 | /**
54 | * Initiates a bulk import. getStatus().inProgress() must be false prior to calling this method or an exception will be thrown.
55 | *
56 | * @param source The source to read content from (must not be null).
57 | * @param parameters The parameters (if any) provided by the initiator of the import (will not be null, but may be empty).
58 | * @param target The target space to ingest the content into (must not be null and must be a valid, writable space in the repository).
59 | */
60 | void start(BulkImportSource source, Map> parameters, NodeRef target);
61 |
62 |
63 | /**
64 | * Request that the import be paused, if one is in progress (which can be determined by calling getStatus().inProgress()).
65 | * Note that this is done asynchronously - it may take a little while for in-flight transactions to complete before they are paused.
66 | */
67 | void pause();
68 |
69 |
70 | /**
71 | * Request that a paused import be resumed, if one is paused (which can be determined by calling getStatus().isPaused()).
72 | */
73 | void resume();
74 |
75 |
76 | /**
77 | * Requests that an import be stopped, if one is in progress (which can be determined by calling getStatus().inProgress()).
78 | * Note that this is done asynchronously - it may take a little while for in-flight transactions to complete.
79 | */
80 | void stop();
81 |
82 |
83 | /**
84 | * @return A status object that describes the current state of the bulk filesystem importer (will not be null).
85 | */
86 | BulkImportStatus getStatus();
87 | }
88 |
--------------------------------------------------------------------------------
/api/src/main/java/org/alfresco/extension/bulkimport/source/AbstractBulkImportSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport.source;
22 |
23 | import java.util.List;
24 | import java.util.Map;
25 |
26 |
27 | /**
28 | * This class provides some handy default implementations for some of the
29 | * methods in BulkImportSource. Its use is optional.
30 | *
31 | * @author Peter Monks (pmonks@gmail.com)
32 | *
33 | */
34 | public abstract class AbstractBulkImportSource
35 | implements BulkImportSource
36 | {
37 | protected final BulkImportSourceStatus importStatus;
38 |
39 | private final String name;
40 | private final String description;
41 | private final String configWebScriptUri;
42 | private final String[] counterNames;
43 |
44 |
45 | protected AbstractBulkImportSource(final BulkImportSourceStatus importStatus,
46 | final String name,
47 | final String description,
48 | final String configWebScriptUri,
49 | final String[] counterNames)
50 | {
51 | this.importStatus = importStatus;
52 | this.name = name;
53 | this.description = description;
54 | this.configWebScriptUri = configWebScriptUri;
55 | this.counterNames = counterNames;
56 | }
57 |
58 |
59 | /**
60 | * @see org.alfresco.extension.bulkimport.source.BulkImportSource#getName()
61 | */
62 | @Override
63 | public String getName()
64 | {
65 | return(name);
66 | }
67 |
68 |
69 | /**
70 | * @see org.alfresco.extension.bulkimport.source.BulkImportSource#getDescription()
71 | */
72 | @Override
73 | public String getDescription()
74 | {
75 | return(description);
76 | }
77 |
78 |
79 | /**
80 | * @see org.alfresco.extension.bulkimport.source.BulkImportSource#getConfigWebScriptURI()
81 | */
82 | @Override
83 | public String getConfigWebScriptURI()
84 | {
85 | return(configWebScriptUri);
86 | }
87 |
88 |
89 | /**
90 | * @see org.alfresco.extension.bulkimport.source.BulkImportSource#init(org.alfresco.extension.bulkimport.source.BulkImportSourceStatus, java.util.Map)
91 | */
92 | @Override
93 | public void init(BulkImportSourceStatus status, Map> parameters)
94 | {
95 | if (counterNames != null)
96 | {
97 | status.preregisterSourceCounters(counterNames);
98 | }
99 | }
100 |
101 |
102 | /**
103 | * @see org.alfresco.extension.bulkimport.source.BulkImportSource#getParameters()
104 | */
105 | @Override
106 | public Map getParameters()
107 | {
108 | // Default action: no parameters
109 | return(null);
110 | }
111 |
112 |
113 | /**
114 | * @see org.alfresco.extension.bulkimport.source.BulkImportSource#inPlaceImportPossible()
115 | */
116 | @Override
117 | public boolean inPlaceImportPossible()
118 | {
119 | // Default action: source doesn't support in-place imports
120 | return(false);
121 | }
122 |
123 | }
124 |
--------------------------------------------------------------------------------
/api/src/main/java/org/alfresco/extension/bulkimport/source/BulkImportItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source;
21 |
22 | import java.util.NavigableSet;
23 |
24 |
25 | /**
26 | * This interface represents a "bulk import item" - a series of versions that
27 | * will be imported as a single node (content OR space) into the repository.
28 | *
29 | * Notes:
30 | *
31 | *
Implementations of this interface must be as lightweight as possible, as
32 | * there may be many instances of these in memory at once. For this reason
33 | * it is recommended that implementations only maintain references to the underlying
34 | * content and metadata sources (e.g. java.io.File objects, rather
35 | * than InputStreams or a Map containing metadata).
36 | *
The import tool will call the putContent and getMetadata methods at most once,
37 | * allowing implementations to convert those references to actual values exactly once,
38 | * without retaining those values.
39 | *
40 | *
41 | * @author Peter Monks (pmonks@gmail.com)
42 | */
43 | public interface BulkImportItem
44 | {
45 | /**
46 | * @return The path (delimited by '/' characters), relative to the root of the source, of this item's parent (null indicates that the parent is the root of the source).
47 | */
48 | String getRelativePathOfParent();
49 |
50 | /**
51 | * @return The parent association type to use for this item (may be null).
52 | */
53 | String getParentAssoc();
54 |
55 | /**
56 | * @return The namespace for the item (may be null).
57 | */
58 | String getNamespace();
59 |
60 | /**
61 | * @return The name of the item as it is / should be in the repository (must not be null, empty or blank, and must meet Alfresco's naming rules for nodes).
62 | */
63 | String getName();
64 |
65 | /**
66 | * @return True if this item is a directory (cm:folder or descendent type), false otherwise.
67 | */
68 | boolean isDirectory();
69 |
70 | /**
71 | * @return The size (in bytes) of this item, defined as the size of all content (_not_ metadata!) files in all versions (will usually be 0 for directories).
72 | */
73 | long sizeInBytes();
74 |
75 | /**
76 | * @return The number of versions in this item. Should normally be implemented as return(getVersions().size()).
77 | */
78 | int numberOfVersions();
79 |
80 | /**
81 | * @return The number of aspects in this item, in all versions.
82 | */
83 | int numberOfAspects();
84 |
85 | /**
86 | * @return The number of metadata properties in this item, in all versions.
87 | */
88 | int numberOfMetadataProperties();
89 |
90 | /**
91 | * @return The set of versions comprising this item, sorted by version number (must not be null or empty, and should contain only one entry if this item is a directory).
92 | */
93 | NavigableSet getVersions();
94 | }
95 |
--------------------------------------------------------------------------------
/api/src/main/java/org/alfresco/extension/bulkimport/source/BulkImportItemVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport.source;
22 |
23 | import java.io.Serializable;
24 | import java.math.BigDecimal;
25 | import java.util.Map;
26 | import java.util.Set;
27 |
28 | import org.alfresco.service.cmr.repository.ContentWriter;
29 |
30 | /**
31 | * This interface identifies a single version within an importable item.
32 | *
33 | * Invariants:
34 | * * hasContent() || hasMetadata() == true
35 | *
36 | * @author Peter Monks (pmonks@gmail.com)
37 | *
38 | */
39 | public interface BulkImportItemVersion
40 | {
41 | /**
42 | * Constant to represent an "unversioned" (i.e. HEAD) version.
43 | */
44 | public final static BigDecimal VERSION_HEAD = BigDecimal.valueOf(Long.MAX_VALUE);
45 |
46 | /**
47 | * @return Returns the decimal representation of the version number (can be null if this version doesn't have a version number).
48 | */
49 | BigDecimal getVersionNumber();
50 |
51 | /**
52 | * @return Returns the comment for this version, if any (can be null if this version doesn't have a version comment).
53 | */
54 | String getVersionComment();
55 |
56 | /**
57 | * @return The type for this version (may be null, but must be a valid Alfresco type if not null).
58 | */
59 | String getType();
60 |
61 | /**
62 | * @return The aspect(s) for this version (may be null or empty).
63 | */
64 | Set getAspects();
65 |
66 | /**
67 | * @return True if this version has content, false if not.
68 | */
69 | boolean hasContent();
70 |
71 | /**
72 | * @return A human-readable reference to the source of the content (used in error messages) (may be null if hasContent() = false).
73 | */
74 | String getContentSource();
75 |
76 | /**
77 | * @return The size (in bytes) of this version, defined as the size of the content (_not_ metadata!) file (will usually be 0 for directories).
78 | */
79 | long sizeInBytes();
80 |
81 | /**
82 | * @return True if the content is already in-place (in which case the content url property must be returned from the getMetadata call).
83 | */
84 | boolean contentIsInPlace();
85 |
86 | /**
87 | * Called when the content of this version is ready to be streamed into the repository.
88 | *
89 | * Notes:
90 | *
91 | *
This method is not called if contentIsInPlace() returns true.
92 | *
It is the implementer's responsibility to set the MIME type, encoding and/or locale of the content being written.
93 | * Neither the import tool nor Alfresco will "guess" these values.
94 | *
95 | *
96 | * @param writer The ContentWriter to use for this version (will not be null).
97 | */
98 | void putContent(ContentWriter writer);
99 |
100 | /**
101 | * @return True if this version has metadata, false if not.
102 | */
103 | boolean hasMetadata();
104 |
105 | /**
106 | * @return A human-readable reference to the source of the metadata (used in error messages) (may be null if hasMetadata() = false).
107 | */
108 | String getMetadataSource();
109 |
110 | /**
111 | * @return The metadata of this version, if any (may return null or empty).
112 | */
113 | Map getMetadata();
114 | }
--------------------------------------------------------------------------------
/api/src/main/java/org/alfresco/extension/bulkimport/source/BulkImportSourceStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Alfresco is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * Alfresco is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with Alfresco. If not, see .
16 | */
17 |
18 | package org.alfresco.extension.bulkimport.source;
19 |
20 | import org.alfresco.extension.bulkimport.BulkImportStatus;
21 |
22 | /**
23 | * This interface provides a minimal write interface on top of
24 | * BulkImportStatus, to allow a BulkImportSource
25 | * to track source-side statistics.
26 | *
27 | * @author Peter Monks (pmonks@gmail.com)
28 | *
29 | */
30 | public interface BulkImportSourceStatus
31 | extends BulkImportStatus
32 | {
33 | /**
34 | * @param name The name of the source object currently being scanned (may be null).
35 | */
36 | void setCurrentlyScanning(String name);
37 |
38 | /**
39 | * "Preregisters" counters - creates them and initialises them to zero. This method is
40 | * optional - incrementing a counter that doesn't already exist will create it. It does
41 | * however ensure that all counters show up in the status display, even if they haven't
42 | * been incremented yet.
43 | *
44 | * @param counterNames The list of counter names to preregister (may be null).
45 | */
46 | void preregisterSourceCounters(String[] counterNames);
47 |
48 | /**
49 | * @param counterName The name of the counter to increment. Will be created (and
50 | * set to 1) if it doesn't already exist. (must not be null)
51 | */
52 | void incrementSourceCounter(String counterName);
53 |
54 | /**
55 | * @param counterName The name of the counter to increment. Will be created (and
56 | * set to value) if it doesn't already exist. (must not be null)
57 | * @param value The value to increment by.
58 | */
59 | void incrementSourceCounter(String counterName, long value);
60 | }
61 |
--------------------------------------------------------------------------------
/contrib/README.md:
--------------------------------------------------------------------------------
1 | Contributions
2 | =============
3 | This directory is intended to house 3rd party contributions to the tool that don't need to be directly integrated into the tool's own code. Examples might include:
4 | * Scripts
5 | * Pluggable sources
6 | * etc.
--------------------------------------------------------------------------------
/contrib/sources/README.md:
--------------------------------------------------------------------------------
1 | Contributions
2 | =============
3 | This directory is intended to house additional BulkImportSource implementations.
--------------------------------------------------------------------------------
/contrib/sources/sample-source/.versioneye.properties:
--------------------------------------------------------------------------------
1 | # Properties for https://www.VersionEye.com
2 | #Wed Jul 20 14:11:52 PDT 2016
3 | project_id=578fe9c93a9dbf0011a09e56
4 |
--------------------------------------------------------------------------------
/contrib/sources/sample-source/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | org.alfresco.extension
7 | sample-bulk-import-source
8 | amp
9 | 0.1-SNAPSHOT
10 | Sample Source - AMP
11 | A sample bulk import source that loads a small hardcoded set of content.
12 |
13 |
14 | org.alfresco.maven
15 | alfresco-sdk-parent
16 | 2.2.0
17 |
18 |
19 |
20 |
21 |
22 | ${alfresco.groupId}
23 | alfresco-platform-distribution
24 | ${alfresco.version}
25 | pom
26 | import
27 |
28 |
29 |
30 |
31 |
32 |
33 | ${alfresco.groupId}
34 | alfresco-repository
35 | provided
36 |
37 |
38 | org.alfresco.extension
39 | alfresco-bulk-import-api
40 | 2.1.1-SNAPSHOT
41 | provided
42 |
43 |
44 |
45 |
46 | ${project.artifactId}-${project.version}
47 |
48 |
49 | org.apache.maven.plugins
50 | maven-compiler-plugin
51 |
52 | 1.7
53 | 1.7
54 |
55 |
56 |
57 | com.versioneye
58 | versioneye-maven-plugin
59 | 3.10.2
60 |
61 | ${basedir}/.versioneye.properties
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/contrib/sources/sample-source/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/samplesource/config.get.desc.xml:
--------------------------------------------------------------------------------
1 |
2 | Sample Bulk Import Source Config
3 | Web Script that provides the configuration fields for the sample bulk import source.
4 | /bulk/import/samplesource/config
5 |
6 | admin
7 | Bulk Import Samples
8 |
9 | true
10 |
11 |
12 |
--------------------------------------------------------------------------------
/contrib/sources/sample-source/src/main/amp/config/alfresco/extension/templates/webscripts/org/alfresco/extension/bulkimport/samplesource/config.get.html.ftl:
--------------------------------------------------------------------------------
1 | [#ftl]
2 |
The sample source doesn't have any form fields, but if your source has some this is where they would go.
3 |
--------------------------------------------------------------------------------
/contrib/sources/sample-source/src/main/amp/config/alfresco/module/org.alfresco.extension.sample-bulk-import-source/module-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/contrib/sources/sample-source/src/main/amp/module.properties:
--------------------------------------------------------------------------------
1 | module.id=org.alfresco.extension.sample-bulk-import-source
2 | module.version=0.99.900
3 | module.title=Sample Source
4 | module.description=A sample bulk import source that loads a small hardcoded set of content.
5 | module.repo.version.min=5.0.0
6 | module.repo.version.max=5.99.99
7 | module.editions=Community,Enterprise
8 |
9 | module.depends.org.alfresco.extension.alfresco-bulk-import=2.0.0-*
10 |
--------------------------------------------------------------------------------
/contrib/sources/sample-source/src/main/java/org/alfresco/extension/bulkimport/source/sample/SampleSourceImportItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | package org.alfresco.extension.bulkimport.source.sample;
21 |
22 | import java.math.BigDecimal;
23 | import java.util.NavigableSet;
24 | import java.util.TreeSet;
25 |
26 | import org.apache.commons.logging.Log;
27 | import org.apache.commons.logging.LogFactory;
28 |
29 | import org.alfresco.extension.bulkimport.source.AbstractBulkImportItem;
30 |
31 |
32 | /**
33 | * This class represents the BulkImportSource portion of the
34 | * sample custom bulk import source.
35 | *
36 | * @author Peter Monks (pmonks@gmail.com)
37 | *
38 | */
39 | public final class SampleSourceImportItem
40 | extends AbstractBulkImportItem
41 | {
42 | private final static Log log = LogFactory.getLog(SampleSourceImportItem.class);
43 |
44 |
45 |
46 | public SampleSourceImportItem(final String parentPath,
47 | final String name,
48 | final boolean isDirectory,
49 | final int numVersions)
50 | {
51 | super(name, isDirectory, parentPath, synthesiseVersions(name, isDirectory, numVersions));
52 | }
53 |
54 |
55 | private final static NavigableSet synthesiseVersions(final String name, final boolean isDirectory, final int numVersions)
56 | {
57 | NavigableSet result = new TreeSet<>();
58 |
59 | // Add at least one version
60 | result.add(new SampleSourceImportItemVersion(name, isDirectory, BigDecimal.ONE));
61 |
62 | if (!isDirectory && numVersions > 1)
63 | {
64 | for (int i = 1; i < numVersions; i++)
65 | {
66 | result.add(new SampleSourceImportItemVersion(name, isDirectory, BigDecimal.valueOf(i + 1)));
67 | }
68 | }
69 |
70 | return(result);
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/contrib/sources/sample-source/src/main/java/org/alfresco/extension/bulkimport/source/sample/SampleSourceImportItemVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 |
21 | package org.alfresco.extension.bulkimport.source.sample;
22 |
23 | import java.math.BigDecimal;
24 |
25 | import org.alfresco.model.ContentModel;
26 | import org.alfresco.service.cmr.repository.ContentWriter;
27 | import org.alfresco.extension.bulkimport.source.AbstractBulkImportItemVersion;
28 |
29 |
30 | /**
31 | * This class is a simple sample source version.
32 | *
33 | * @author Peter Monks (pmonks@gmail.com)
34 | *
35 | */
36 | public final class SampleSourceImportItemVersion
37 | extends AbstractBulkImportItemVersion
38 | {
39 | public SampleSourceImportItemVersion(final String name,
40 | final boolean isDirectory,
41 | final BigDecimal versionNumber)
42 | {
43 | super(isDirectory ? ContentModel.TYPE_FOLDER.toString() : ContentModel.TYPE_CONTENT.toString(), versionNumber);
44 |
45 | this.contentReference = isDirectory ? null : "This is the content of version " + String.valueOf(versionNumber) + " of " + name + ".";
46 | this.metadataReference = null; // Sample source doesn't support metadata
47 | }
48 |
49 | /**
50 | * @see org.alfresco.extension.bulkimport.source.BulkImportItemVersion#getContentSource()
51 | */
52 | @Override
53 | public String getContentSource()
54 | {
55 | return("Synthetic Content");
56 | }
57 |
58 | /**
59 | * @see org.alfresco.extension.bulkimport.source.BulkImportItemVersion#sizeInBytes()
60 | */
61 | @Override
62 | public long sizeInBytes()
63 | {
64 | return(contentReference == null ? 0 : contentReference.length());
65 | }
66 |
67 | /**
68 | * @see org.alfresco.extension.bulkimport.source.BulkImportItemVersion#putContent(org.alfresco.service.cmr.repository.ContentWriter)
69 | */
70 | @Override
71 | public void putContent(final ContentWriter writer)
72 | {
73 | // Provide some hardcoded content
74 | writer.setMimetype("text/plain");
75 | writer.setEncoding("UTF8");
76 | writer.putContent(contentReference);
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/icon.idraw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/icon.idraw
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/icon.png
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
5 | 4.0.0
6 | org.alfresco.extension
7 | alfresco-bulk-import-parent
8 | pom
9 | 2.1.1-SNAPSHOT
10 | Bulk Import Tool - Parent POM
11 | Bulk Import Tool for Alfresco v5.x.
12 |
13 |
14 | org.alfresco.maven
15 | alfresco-sdk-parent
16 | 2.2.0
17 |
18 |
19 |
20 |
21 | Apache License 2.0
22 | http://www.apache.org/licenses/LICENSE-2.0.html
23 | repo
24 |
25 |
26 |
27 |
28 |
29 | pmonks
30 | Peter Monks
31 | pmonks@gmail.com
32 |
33 |
34 |
35 |
36 | scm:git:https://github.com/pmonks/alfresco-bulk-import.git
37 | scm:git:https://github.com/pmonks/alfresco-bulk-import.git
38 | https://github.com/pmonks/alfresco-bulk-import
39 |
40 |
41 |
42 | github
43 | https://github.com/pmonks/alfresco-bulk-import/issues
44 |
45 |
46 |
47 |
48 |
49 | ${alfresco.groupId}
50 | alfresco-platform-distribution
51 | ${alfresco.version}
52 | pom
53 | import
54 |
55 |
56 |
57 |
58 |
59 | ${project.artifactId}-${project.version}
60 |
61 |
62 | org.apache.maven.plugins
63 | maven-compiler-plugin
64 |
65 | 1.7
66 | 1.7
67 |
68 |
69 |
70 |
71 |
72 |
73 | api
74 | amp
75 |
76 | contrib/sources/sample-source
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/test/data/FailureTests/DuplicateName/file1.txt:
--------------------------------------------------------------------------------
1 | On disk this is called file1.txt.
--------------------------------------------------------------------------------
/test/data/FailureTests/DuplicateName/file1.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | conflictedFilename.txt
5 | On disk this is called file1.txt.
6 | File that (via shadow metadata file) has a filename that conflicts with another file. File on disk was called file1.txt.
7 |
8 |
--------------------------------------------------------------------------------
/test/data/FailureTests/DuplicateName/file2.txt:
--------------------------------------------------------------------------------
1 | On disk this is called file2.txt.
--------------------------------------------------------------------------------
/test/data/FailureTests/DuplicateName/file2.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | conflictedFilename.txt
5 | On disk this is called file2.txt.
6 | File that (via shadow metadata file) has a filename that conflicts with another file. File on disk was called file2.txt.
7 |
8 |
--------------------------------------------------------------------------------
/test/data/FailureTests/InvalidTag/invalidTag.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/FailureTests/InvalidTag/invalidTag.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:content
5 | cm:versionable,cm:taggable
6 | Of foxes and lazy dogs.
7 | Short sentence that uses all 26 letters.
8 | 1901-01-01T12:34:56.789+10:00
9 |
10 | workspace://SpacesStore/12345678-1234-5678-90ab-cdef12345678
11 |
12 |
--------------------------------------------------------------------------------
/test/data/ManualTests/AssociationTest/multiValuedProperty.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/ManualTests/AssociationTest/multiValuedProperty.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #
5 | cm:versionable # cm:taggable
6 | Multi-valued properties.
7 | A file with multi-valued properties, using a custom separator.
8 | 1901-01-01T12:34:56.789+10:00
9 |
10 | workspace://SpacesStore/f453c669-9c31-44fa-9c2c-7ec7b926ffb8 # workspace://SpacesStore/1ca7dc1f-9a2b-448a-bcd1-c83cc2722537
11 |
12 |
--------------------------------------------------------------------------------
/test/data/ManualTests/AssociationTest/taggedFile.txt:
--------------------------------------------------------------------------------
1 | This file has been tagged.
--------------------------------------------------------------------------------
/test/data/ManualTests/AssociationTest/taggedFile.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:taggable
5 | This file is tagged.
6 | This file has been tagged.
7 |
8 | workspace://SpacesStore/f453c669-9c31-44fa-9c2c-7ec7b926ffb8
9 |
10 |
--------------------------------------------------------------------------------
/test/data/ManualTests/CustomModelTests/import/bitContentModel.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/ManualTests/CustomModelTests/import/bitContentModel.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:content
5 | bit:testaspect
6 | Of foxes and lazy dogs.
7 | Short sentence that uses all 26 letters.
8 | 1901-01-01T12:34:56.789+10:00
9 |
10 | Long property name with a long value.
11 |
12 |
--------------------------------------------------------------------------------
/test/data/ManualTests/CustomModelTests/import/directoryWithCustomType.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | bit:folder
5 |
6 |
--------------------------------------------------------------------------------
/test/data/ManualTests/CustomModelTests/import/directoryWithCustomType/fileToMakeGitHappy.txt:
--------------------------------------------------------------------------------
1 | This file only exists because git is too stupid to version control empty folders.
--------------------------------------------------------------------------------
/test/data/ManualTests/CustomModelTests/model/bitContentModel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Custom Content Model for testing the Bulk Import Tool
6 | Peter Monks (pmonks@gmail.com)
7 | 1.0
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Custom folder type
21 | cm:folder
22 |
23 |
24 |
25 |
26 |
27 | Bulk Import Tool Test Aspect
28 |
29 |
30 | d:text
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/test/data/ManualTests/CustomModelTests/model/custom-bit-content-model-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 | alfresco/extension/bitContentModel.xml
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/test/data/MultiPassTests/pass1/subDirectory/test.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/MultiPassTests/pass1/test.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/MultiPassTests/pass2/anotherFile.txt:
--------------------------------------------------------------------------------
1 | This file should only appear after running the tool against the "pass2" directory, regardless of the value of the "replace" flag.
--------------------------------------------------------------------------------
/test/data/MultiPassTests/pass2/subDirectory/anotherFile.txt:
--------------------------------------------------------------------------------
1 | This file should only appear after running the tool against the "pass2" directory, regardless of the value of the "replace" flag.
--------------------------------------------------------------------------------
/test/data/MultiPassTests/pass2/subDirectory/test.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the description of test.txt. It should be populated after running the tool against the "pass2" directory, provided the "replace" flag is on.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/MultiPassTests/pass2/test.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the description of test.txt. It should be populated after running the tool against the "pass2" directory, provided the "replace" flag is on.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FileFolderVolumeTests/cleanTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -rf sub1
3 | rm -rf sub2
4 | rm -rf sub3
5 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FileFolderVolumeTests/createTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ -z "$1" ]; then
4 | echo "WARNING: this script will create approximately 20,000 small files on your"
5 | echo " drive, and it will take quite a while to do so."
6 | read -p "Press any key to continue or Ctrl+C to quit..."
7 | fi
8 |
9 | echo "Creating templates..."
10 | mkdir -p 100files
11 | ../createFiles.sh 100 ./100files/
12 | mkdir -p 1000files
13 | ../createFiles.sh 1000 ./1000files/
14 | mkdir -p 10000files
15 | ../createFiles.sh 10000 ./10000files/
16 |
17 | echo "Creating a deep directory structure..."
18 | mkdir -p sub1/sub1.1/
19 | mkdir -p sub1/sub1.2/
20 | mkdir -p sub1/sub1.3/
21 | mkdir -p sub1/sub1.4/
22 | mkdir -p sub1/sub1.5/
23 | mkdir -p sub1/sub1.6/
24 | mkdir -p sub1/sub1.7/
25 | mkdir -p sub1/sub1.8/
26 | mkdir -p sub1/sub1.9/
27 | mkdir -p sub1/sub1.10/
28 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.1/sub2.1.1.1.1.1/
29 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.2/
30 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.3/
31 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/
32 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.1/
33 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.2/
34 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.3/
35 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.4/
36 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.5/
37 |
38 | echo "Copying templates across the deep directory structure..."
39 | cp 1000files/* sub1/
40 | cp 100files/* sub1/sub1.1/
41 | cp 100files/* sub1/sub1.2/
42 | cp 100files/* sub1/sub1.3/
43 | cp 100files/* sub1/sub1.4/
44 | cp 100files/* sub1/sub1.5/
45 | cp 100files/* sub1/sub1.6/
46 | cp 100files/* sub1/sub1.7/
47 | cp 100files/* sub1/sub1.8/
48 | cp 100files/* sub1/sub1.9/
49 | cp 100files/* sub1/sub1.10/
50 | cp 1000files/* sub2/
51 | cp 1000files/* sub2/sub2.1/
52 | cp 1000files/* sub2/sub2.1/sub2.1.1/
53 | cp 1000files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/
54 | cp 1000files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.1/
55 | cp 1000files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.1/sub2.1.1.1.1.1/
56 | mv 1000files/ sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.1/sub2.1.1.1.1.1/sub2.1.1.1.1.1.1/
57 | mv 10000files/ sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.1/sub2.1.1.1.1.1/sub2.1.1.1.1.1.1/sub2.1.1.1.1.1.1.1/
58 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.2/
59 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.3/
60 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/
61 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.1/
62 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.2/
63 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.3/
64 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.4/sub2.1.1.1.4.4/
65 | cp 100files/* sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.5/
66 | mv 100files/ sub3/
67 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FileNameTests/cleanTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -rf Punctuation
3 | rm -rf Unicode
4 | rm *.txt
5 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FileSizeTests/cleanTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm *.bin
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FileSizeTests/createTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ -z "$1" ]; then
4 | echo "WARNING: this script will create around 4.2GB of random data on your drive, and"
5 | echo " it will take quite a while to do so."
6 | read -p "Press any key to continue or Ctrl+C to quit..."
7 | fi
8 |
9 | echo "Creating small (KB) files..."
10 | touch zeroByte.bin
11 | dd if=/dev/urandom of=oneKilobyte.bin bs=1024 count=1 > /dev/null 2>&1
12 | dd if=/dev/urandom of=tenKilobytes.bin bs=1024 count=10 > /dev/null 2>&1
13 | dd if=/dev/urandom of=oneHundredKilobytes.bin bs=1024 count=100 > /dev/null 2>&1
14 |
15 | echo "Creating medium (MB) files..."
16 | dd if=/dev/urandom of=oneMegabyte.bin bs=$((1024 * 1024)) count=1 > /dev/null 2>&1
17 | dd if=/dev/urandom of=tenMegabytes.bin bs=$((1024 * 1024)) count=10 > /dev/null 2>&1
18 | dd if=/dev/urandom of=oneHundredMegabytes.bin bs=$((1024 * 1024)) count=100 > /dev/null 2>&1
19 |
20 | echo "Creating large (GB) files..."
21 | dd if=/dev/urandom of=oneGigabyte.bin bs=$((1024 * 1024 * 1024)) count=1 > /dev/null 2>&1
22 | dd if=/dev/urandom of=threeGigabytes.bin bs=$((1024 * 1024 * 1024)) count=3 > /dev/null 2>&1
23 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FileVolumeTests/cleanTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -rf 100*files
3 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FileVolumeTests/createTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ -z "$1" ]; then
4 | echo "WARNING: this script will create 111,100 small files on your drive, and"
5 | echo " it will take quite a while to do so."
6 | read -p "Press any key to continue or Ctrl+C to quit..."
7 | fi
8 |
9 | echo "Creating 100 files..."
10 | mkdir -p 100files
11 | ../createFiles.sh 100 ./100files/
12 |
13 | echo "Creating 1000 files..."
14 | mkdir -p 1000files
15 | ../createFiles.sh 1000 ./1000files/
16 |
17 | echo "Creating 10000 files..."
18 | mkdir -p 10000files
19 | ../createFiles.sh 10000 ./10000files/
20 |
21 | echo "Creating 100000 files..."
22 | mkdir -p 100000files
23 | ../createFiles.sh 100000 ./100000files/
24 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FolderStructureTests/cleanTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -rf deep
3 | rm -rf sub1
4 | rm -rf sub2
5 | rm -rf sub3
6 | rm -rf large-folder-structure
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FolderStructureTests/createTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo "Creating pathological folder structure..."
3 | mkdir -p sub1/1.1
4 | mkdir -p sub1/1.2
5 | mkdir -p sub1/1.3
6 | mkdir -p sub1/1.4
7 | mkdir -p sub1/1.5
8 | mkdir -p sub1/1.6
9 | mkdir -p sub1/1.7
10 | mkdir -p sub1/1.8
11 | mkdir -p sub1/1.9
12 | mkdir -p sub1/1.10
13 | mkdir -p sub2/sub2.1/sub2.1.1/sub2.1.1.1/sub2.1.1.1.1/sub2.1.1.1.1.1/sub2.1.1.1.1.1.1/sub2.1.1.1.1.1.1.1
14 | mkdir -p sub3
15 | mkdir -p deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep
16 | touch deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deepFile.txt
17 | echo "This file is located in a very deep folder structure." >>deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/deepFile.txt
18 |
19 | # Note: this will only work if lein-exec (https://github.com/kumarshantanu/lein-exec) is installed
20 | ./make-large-folder-structure.clj
21 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/FolderStructureTests/make-large-folder-structure.clj:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env lein-exec
2 | ;
3 | ; Copyright (C) 2007 Peter Monks
4 | ;
5 | ; Licensed under the Apache License, Version 2.0 (the "License");
6 | ; you may not use this file except in compliance with the License.
7 | ; You may obtain a copy of the License at
8 | ;
9 | ; http://www.apache.org/licenses/LICENSE-2.0
10 | ;
11 | ; Unless required by applicable law or agreed to in writing, software
12 | ; distributed under the License is distributed on an "AS IS" BASIS,
13 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | ; See the License for the specific language governing permissions and
15 | ; limitations under the License.
16 | ;
17 | ; This file is part of an unsupported extension to Alfresco.
18 | ;
19 |
20 | ; This script creates a large number of folders with random filenames. Each
21 | ; folder will contain "dirs-per-dir" directories, and there are five levels of
22 | ; nesting (so dirs-per-dir ^ 5 total directories are created).
23 | ;
24 | ; Dependencies:
25 | ; * lein-exec (https://github.com/kumarshantanu/lein-exec)
26 | ;
27 |
28 | (require '[clojure.java.io :as io])
29 | (require '[clojure.string :as s])
30 |
31 | ; Be very careful changing this, as it's raised to the power 5 to come up with the final directory list!
32 | (def dirs-per-dir 12)
33 |
34 | (def min-name-length 4)
35 | (def max-name-length 20)
36 |
37 | (def filename-chars
38 | [\a \b \c \d \e \f \g \h \i \j \k \l \m \n \o \p \q \r \s \t \u \v \w \x \y \z
39 | \A \B \C \D \E \F \G \H \I \J \K \L \M \N \O \P \Q \R \S \T \U \V \W \X \Y \Z
40 | \0 \1 \2 \3 \4 \5 \6 \7 \8 \9])
41 |
42 | (def filename-chars-length (count filename-chars))
43 |
44 | (defn random-filename
45 | "Return a random, valid directory name between min-name-length and max-name-length characters long."
46 | []
47 | (let [name-length (+ min-name-length (rand-int (- max-name-length min-name-length)))]
48 | (s/join
49 | (for [i (range name-length)]
50 | (nth filename-chars (rand-int filename-chars-length))))))
51 |
52 | (def directories
53 | (for [a (for [i (range dirs-per-dir)] (random-filename))
54 | b (for [i (range dirs-per-dir)] (random-filename))
55 | c (for [i (range dirs-per-dir)] (random-filename))
56 | d (for [i (range dirs-per-dir)] (random-filename))
57 | e (for [i (range dirs-per-dir)] (random-filename))]
58 | (s/join "/" ["large-folder-structure" a b c d e "dummy.txt"])))
59 |
60 | (println "Creating" (count directories) "random directories, 5 levels deep...")
61 |
62 | (doall (map io/make-parents directories))
63 |
64 | (println "Done")
65 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/JPEG_example_JPG_RIP_100.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/JPEG_example_JPG_RIP_100.jpg
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Newtons_cradle_animation_book_2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Newtons_cradle_animation_book_2.gif
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/activision-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/activision-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/activiti-petal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/activiti-petal.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/addthis-button.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/addthis-button.gif
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/akeroilfieldservices-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/akeroilfieldservices-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/analytics:
--------------------------------------------------------------------------------
1 | function piResponse() {
2 | piSetCookie('visitor_id1234', '245990215', 30);
3 | if (document.location.protocol != "https:") {
4 | var analytics_link = "http://" + "www2.alfresco.com/analytics?";
5 | pi.tracker.visitor_id='245990215'
6 | var variables = 'conly=true';
7 | for (property in pi.tracker) {
8 | variables += "&"+property+"="+pi.tracker[property];
9 | }
10 | var headID = document.getElementsByTagName("head")[0];
11 | piScriptObj[piScriptNum] = document.createElement('script');
12 | piScriptObj[piScriptNum].type = 'text/javascript';
13 | piScriptObj[piScriptNum].src = analytics_link + variables;
14 | headID.appendChild(piScriptObj[piScriptNum]);
15 | piScriptObj[piScriptNum].onload = function() { return; }
16 | }
17 | }
18 |
19 | piResponse();
20 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/analytics(1):
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/analytics(1)
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/anu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/anu.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/astrium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/astrium.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/caceis-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/caceis-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/calendar-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/calendar-24.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/cisco.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/cisco.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/content-platform-petal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/content-platform-petal.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/document-management-petal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/document-management-petal.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/ea-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/ea-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/fox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/fox.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/hbsp-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/hbsp-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/hotels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/hotels.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/islington-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/islington-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/juntadeandalucia-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/juntadeandalucia-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/kaplan-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/kaplan-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/klm-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/klm-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/landsend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/landsend.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/laposte-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/laposte-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/marriott-vacations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/marriott-vacations.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/merck.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/merck.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/nasa-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/nasa-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/news-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/news-24.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/nxp-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/nxp-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/p.json:
--------------------------------------------------------------------------------
1 | _ate.ad.hpr({"urls":[],"segments" : [],"loc": "OTUxMDFOQVVTQ0EyMTczMDU4MTgwNzAwMDBDVg=="})
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/phila.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/phila.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/pipe(1).run:
--------------------------------------------------------------------------------
1 | pipesCallback({"count":3,"value":{"title":"Alfresco Events","description":"A calendar listing of upcoming Alfresco events and webinars.","request":"Alfresco Events","pubDate":"Fri, 28 Jan 2011 16:40:49 -0800","generator":"http:\/\/run.pipes.yahoo.com\/pipes\/","published":"","callback":"pipesCallback","items":[{"description":"18 Jan 2011 \u2013 United States & Canada (Multiple Cities)","title":"Alfresco Lunch and Learns - January-February 2011","link":"http:\/\/www.alfresco.com\/about\/events\/2011\/01\/lunch-learns-january-february-2011\/","geo:lat":null,"geo:long":null,"media":{"thumbnails":[],"regular":[]}},{"description":"3 Feb 2011 \u2013 Online webinar 11am ET, 8am PT, 4pm UK","title":"Partner Solution: (Formtek Inc) Engineering Data Management Module for Alfresco","link":"http:\/\/www.alfresco.com\/about\/events\/2011\/02\/engineering-data-management-module-for-alfresco\/","geo:lat":null,"geo:long":null,"media":{"thumbnails":[],"regular":[]}},{"description":"8 Feb 2011 \u2013 Online webinar 11am ET, 8am PT, 4pm UK","title":"Partner Solution: (Rivet Logic) Enterprise Collaboration with the Confluence Wiki and Alfresco","link":"http:\/\/www.alfresco.com\/about\/events\/2011\/02\/enterprise-collaboration-with-the-confluence-wiki-and-alfresco\/","geo:lat":null,"geo:long":null,"media":{"thumbnails":[],"regular":[]}}],"requesturl":"http:\/\/run.pipes.yahoo.com\/pipes\/pipe.run?_id=c0c51db8a400630a47307357342041fa&_render=badge&_callback=pipesCallback"}})
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/pipe.run:
--------------------------------------------------------------------------------
1 | pipesCallback({"count":3,"value":{"title":"Alfresco NewsCenter","description":"An aggregation of Alfresco press releases, Alfresco media coverage, and general Alfresco news about ECM and open source.","request":"Alfresco NewsCenter","pubDate":"Fri, 28 Jan 2011 16:23:39 -0800","generator":"http:\/\/run.pipes.yahoo.com\/pipes\/","published":"","callback":"pipesCallback","items":[{"description":"System Integrator Reaches Key Milestone Leveraging CMIS-enabled Content Management and Collaboration Solutions from Alfresco","title":"Zia Consulting Named Alfresco Platinum Partner","link":"http:\/\/www.alfresco.com\/media\/releases\/2011\/01\/zia-consulting-named-alfresco-platinum-partner\/","geo:lat":null,"geo:long":null,"media":{"thumbnails":[],"regular":[]}},{"description":"Alfresco, a provider of an open source CMS platform, is pursuing a social content management strategy with the release today of Alfresco Enterprise ...","title":"IT Business Edge \u2013 Content Management Gets Dynamic","link":"http:\/\/www.alfresco.com\/media\/coverage\/2011\/01\/itbusinessedge-dynamic-content\/","geo:lat":null,"geo:long":null,"media":{"thumbnails":[],"regular":[]}},{"description":"Alfresco has embedded social networking capabilities into its open source content management system. Alfresco Enterprise 3.4\u2019s redesigned Share ...","title":"ZDNet \u2013 Alfresco CMS becomes more social","link":"http:\/\/www.alfresco.com\/media\/coverage\/2011\/01\/zdnet-social-cms\/","geo:lat":null,"geo:long":null,"media":{"thumbnails":[],"regular":[]}}],"requesturl":"http:\/\/run.pipes.yahoo.com\/pipes\/pipe.run?_id=73c5daaef5f45e25106b34fff33facc9&_render=badge&_callback=pipesCallback"}})
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/records-management-petal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/records-management-petal.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/sesameworkshop-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/sesameworkshop-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/shadowbox.css:
--------------------------------------------------------------------------------
1 | #sb-title-inner,#sb-info-inner,#sb-loading-inner,div.sb-message{font-family:"HelveticaNeue-Light","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:200;color:#fff;}
2 | #sb-container{position:fixed;margin:0;padding:0;top:0;left:0;z-index:999;text-align:left;visibility:hidden;display:none;}
3 | #sb-overlay{position:relative;height:100%;width:100%;}
4 | #sb-wrapper{position:absolute;visibility:hidden;width:100px;}
5 | #sb-wrapper-inner{position:relative;border:15px solid #fff;overflow:hidden;height:100px;-moz-border-radius: 10px;
6 | border-radius: 10px;}
7 | #sb-body{position:relative;height:100%;}
8 | #sb-body-inner{position:absolute;height:100%;width:100%;}
9 | #sb-player.html{height:100%;overflow:auto;}
10 | #sb-body img{border:none;}
11 | #sb-loading{position:relative;height:100%;}
12 | #sb-loading-inner{position:absolute;font-size:14px;line-height:24px;height:24px;top:50%;margin-top:-12px;width:100%;text-align:center;}
13 | #sb-loading-inner span{background:url(loading.gif) no-repeat;padding-left:34px;display:inline-block;}
14 | #sb-body,#sb-loading{background-color:#060606;}
15 | #sb-title,#sb-info{position:relative;margin:0;padding:0;overflow:hidden;}
16 | #sb-title,#sb-title-inner{height:26px;line-height:26px;}
17 | #sb-title-inner{font-size:16px;}
18 | #sb-info,#sb-info-inner{height:20px;line-height:20px;}
19 | #sb-info-inner{font-size:12px;}
20 | #sb-nav{float:right;height:16px;padding:2px 0;width:45%;}
21 | #sb-nav a{display:block;float:right;height:16px;width:16px;margin-left:3px;cursor:pointer;background-repeat:no-repeat;}
22 | #sb-nav-close{background-image:url(close.png);}
23 | #sb-nav-next{background-image:url(next.png);}
24 | #sb-nav-previous{background-image:url(previous.png);}
25 | #sb-nav-play{background-image:url(play.png);}
26 | #sb-nav-pause{background-image:url(pause.png);}
27 | #sb-counter{float:left;width:45%;}
28 | #sb-counter a{padding:0 4px 0 0;text-decoration:none;cursor:pointer;color:#fff;}
29 | #sb-counter a.sb-counter-current{text-decoration:underline;}
30 | div.sb-message{font-size:12px;padding:10px;text-align:center;}
31 | div.sb-message a:link,div.sb-message a:visited{color:#fff;text-decoration:underline;}
32 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/share-petal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/share-petal.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/sncf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/sncf.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/social-content-management-video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/social-content-management-video.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/sonypictures-logo-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/sonypictures-logo-rollover.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/subnav.js:
--------------------------------------------------------------------------------
1 | /*
2 | Initialize and render the Menu when its elements are ready
3 | to be scripted.
4 | */
5 |
6 | YAHOO.util.Event.onContentReady("subnav", function () {
7 |
8 | /*
9 | Instantiate a Menu: The first argument passed to the
10 | constructor is the id of the element in the page
11 | representing the Menu; the second is an object literal
12 | of configuration properties.
13 | */
14 |
15 | var oMenu = new YAHOO.widget.Menu(
16 | "subnav",
17 | {
18 | position: "static",
19 | hidedelay: 750,
20 | lazyload: true,
21 | effect: {
22 | effect: YAHOO.widget.ContainerEffect.FADE,
23 | duration: 0.25
24 | }
25 | }
26 | );
27 |
28 | /*
29 | Call the "render" method with no arguments since the
30 | markup for this Menu instance is already exists in the page.
31 | */
32 |
33 | oMenu.render();
34 |
35 | });
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/toyota.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/toyota.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/utilities.js:
--------------------------------------------------------------------------------
1 | /*
2 | Initialize and render the MenuBar when its elements are ready
3 | to be scripted.
4 | */
5 |
6 | YAHOO.util.Event.onContentReady("utility-links", function () {
7 |
8 | /*
9 | Instantiate a MenuBar: The first argument passed to the constructor
10 | is the id for the Menu element to be created, the second is an
11 | object literal of configuration properties.
12 | */
13 |
14 | var oMenuBar = new YAHOO.widget.MenuBar("utility-links", {
15 | autosubmenudisplay: true,
16 | hidedelay: 750,
17 | lazyload: true });
18 |
19 | /*
20 | Call the "render" method with no arguments since the
21 | markup for this MenuBar instance is already exists in
22 | the page.
23 | */
24 |
25 | oMenuBar.render();
26 |
27 | });
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/web-content-management-petal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/web-content-management-petal.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/westminster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/westminster.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/yell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Open Source Enterprise Content Management System (CMS) by Alfresco_files/yell.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/PDF32000_2008.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/PDF32000_2008.pdf
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/PNG_transparency_demonstration_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/PNG_transparency_demonstration_1.png
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/Sunflower_as_gif_small.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/Sunflower_as_gif_small.gif
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/testdoc.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/testdoc.doc
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/testdocx.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/testdocx.docx
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/testpptx.ppt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/testpptx.ppt
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/testpptx.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/testpptx.pptx
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/testtxt.txt:
--------------------------------------------------------------------------------
1 | This is a plain ASCII text file.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/testxls.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/testxls.xls
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MIMETypeTests/testxlsx.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pmonks/alfresco-bulk-import/5c8a92fd8bbab30abac8ee04a5986c52eacfadfc/test/data/SinglePassTests/MIMETypeTests/testxlsx.xlsx
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/basicProperties.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/basicProperties.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:content
5 | cm:versionable
6 | Of foxes and lazy dogs.
7 | Short sentence that uses all 26 letters.
8 | 1901-01-01T12:34:56.789+10:00
9 |
10 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/directoryFromMetadata.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:folder
5 | This is directoryFromMetadata.
6 |
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/directoryWithMetadata.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is directoryWithMetadata.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/directoryWithMetadata/ignore.me:
--------------------------------------------------------------------------------
1 | This file is only here to ensure Mercurial creates the parent folder.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/directoryWithNamespace.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | http://www.alfresco.org/model/application/1.0
5 | This is directoryWithNamespace.
6 |
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/directoryWithNamespace/ignore.me:
--------------------------------------------------------------------------------
1 | This file is only here to ensure Mercurial creates the parent folder.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/dublinCore.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/dublinCore.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:content
5 | cm:dublincore,app:inlineeditable
6 | Of foxes and lazy dogs.
7 | Short sentence that uses all 26 letters, with Dublin Core properties.
8 | 1901-01-01T12:34:56.789+10:00
9 |
10 | Peter Monks
11 | Alfresco Software Inc.
12 | Peter Monks
13 | Simple text
14 | dublinCore.txt
15 | Alfresco Software Inc.
16 | Worldwide
17 | Public Domain
18 | Of foxes and lazy dogs.
19 |
20 | true
21 |
22 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/fileWithMetadata.txt:
--------------------------------------------------------------------------------
1 | This is fileWithMetadata.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/fileWithMetadata.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is fileWithMetadata.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/fileWithWeirdExtension.properties.xml:
--------------------------------------------------------------------------------
1 | This is weirdFile2.properties.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/fileWithWeirdExtension2.metadata.properties:
--------------------------------------------------------------------------------
1 | This is weirdFile3.metadata.props.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/fileWithoutExtension:
--------------------------------------------------------------------------------
1 | This is the final version of fileWithoutExtension.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/fileWithoutExtension.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the final version of fileWithoutExtension.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/issue54.txt:
--------------------------------------------------------------------------------
1 | This is a test case for issue #54 - Allow setting properties to current timestamp.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/issue54.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Issue 54 Test Case
5 | This is a test case for issue #54.
6 | NOW
7 | NOW
8 |
9 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/metadataOnly.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is metadataOnly.txt.metadata.properties.xml.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/renamedFile.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/renamedFile.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:content
5 | renamedFileWasRenamed.txt
6 | Of foxes and lazy dogs.
7 | A file that should be called "renamedFileWasRenamed.txt", even though that's not its name in the filesystem.
8 | 1901-01-01T12:34:56.789+10:00
9 |
10 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/residualProperty.txt:
--------------------------------------------------------------------------------
1 | This is residualProperty.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/residualProperty.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is a residual property that doesn't exist in the data dictionary.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/sampleAlfrescoContentModel.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | Alfresco Bulk Filesystem Import Test Case Empty Model
7 | Peter Monks
8 | 2011-01-25
9 | 1.0
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/sampleAlfrescoContentModel.xml.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:dictionaryModel
5 | cm:versionable
6 | BFSIT Test Case Empty Model
7 | Empty content model for the Bulk Filesystem Import Test Case.
8 | BFSIT Test Case Empty Model
9 | Empty content model for the Bulk Filesystem Import Test Case.
10 | Peter Monks
11 | 1901-01-01T12:34:56.789+10:00
12 | 1.0
13 | false
14 |
15 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/systemDirectory.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is systemDirectory.
5 | cm:systemfolder
6 |
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/systemDirectory/ignore.me:
--------------------------------------------------------------------------------
1 | This file is only here to ensure Mercurial creates the parent folder.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/test.txt:
--------------------------------------------------------------------------------
1 | This is test.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/unicodeProperties.txt:
--------------------------------------------------------------------------------
1 | Хуткі карычневы ліса скача праз ляніва сабаку.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/MetadataTests/unicodeProperties.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cm:content
5 | cm:dublincore,app:inlineeditable
6 | З лісы і лянівых сабак.
7 | Кароткія прапановы, які выкарыстоўвае ўсе 26 літар, з Dublin Core ўласцівасцямі.
8 | 1901-01-01T12:34:56.789+10:00
9 |
10 | Пётр Манахі
11 | Alfresco Software Inc.
12 | Пётр Манахі
13 | просты тэкст
14 | unicodeProperties.txt
15 | Alfresco Software Inc.
16 | сусветны
17 | усеагульнае здабытак
18 | З лісы і лянівых сабак.
19 |
20 | true
21 |
22 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/PermissionTests/cleanTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm -rf readable*
3 | chmod u+rwx unreadable*
4 | rm -rf unreadable*
5 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/PermissionTests/createTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Creating permissioned and non-permissioned files..."
4 |
5 | echo "The quick brown fox jumps over the lazy dogs." > readable.txt
6 | mkdir -p readableDirectory
7 | echo "The quick brown fox jumps over the lazy dogs." > unreadable.txt
8 | mkdir -p unreadableDirectory
9 | chmod ugo-rwx unreadable*
10 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/directoryWithMetadata.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is directoryWithMetadata.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/directoryWithMetadata/fileToMakeGitHappy.txt:
--------------------------------------------------------------------------------
1 | This file is here because git doesn't store empty directories (which is silly).
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/directoryWithMetadataVersions.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the HEAD version of directoryWithMetadataVersions.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/directoryWithMetadataVersions.metadata.properties.xml.v1:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 1 of directoryWithMetadataVersions.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/directoryWithMetadataVersions.metadata.properties.xml.v2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 2 of directoryWithMetadataVersions.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/directoryWithMetadataVersions/fileToMakeGitHappy.txt:
--------------------------------------------------------------------------------
1 | This file is here because git doesn't store empty directories (which is silly).
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt:
--------------------------------------------------------------------------------
1 | This is the final version of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.metadata.properties.xml.v2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 2 of fileWithGappyVersions.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.metadata.properties.xml.v7:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 7 of fileWithGappyVersions.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.metadata.properties.xml.v8:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 8 of fileWithGappyVersions.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v1:
--------------------------------------------------------------------------------
1 | This is version 1 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v10:
--------------------------------------------------------------------------------
1 | This is version 10 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v3:
--------------------------------------------------------------------------------
1 | This is version 3 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v4:
--------------------------------------------------------------------------------
1 | This is version 4 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v5:
--------------------------------------------------------------------------------
1 | This is version 5 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v6:
--------------------------------------------------------------------------------
1 | This is version 6 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v7:
--------------------------------------------------------------------------------
1 | This is version 7 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithGappyVersions.txt.v9:
--------------------------------------------------------------------------------
1 | This is version 9 of fileWithGappyVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithMetadata.txt:
--------------------------------------------------------------------------------
1 | This is fileWithMetadata.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithMetadata.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is fileWithMetadata.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithNoVersions.txt:
--------------------------------------------------------------------------------
1 | This is fileWithNoVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithSparseVersions.txt:
--------------------------------------------------------------------------------
1 | This is the final version of fileWithSparseVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithSparseVersions.txt.v0:
--------------------------------------------------------------------------------
1 | This is version 0 of fileWithSparseVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithSparseVersions.txt.v4:
--------------------------------------------------------------------------------
1 | This is version 4 of fileWithSparseVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithSparseVersions.txt.v7:
--------------------------------------------------------------------------------
1 | This is version 7 of fileWithSparseVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersions.txt:
--------------------------------------------------------------------------------
1 | This is the final version of fileWithVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersions.txt.v1:
--------------------------------------------------------------------------------
1 | This is version 1 of fileWithVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersions.txt.v2:
--------------------------------------------------------------------------------
1 | This is version 2 of fileWithVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersions.txt.v3:
--------------------------------------------------------------------------------
1 | This is version 3 of fileWithVersions.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt:
--------------------------------------------------------------------------------
1 | This is the final version of fileWithVersionsAndMetadata.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the final version of fileWithVersionsAndMetadata.txt.
5 | This is the final version of fileWithVersionsAndMetadata.txt.
6 |
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt.metadata.properties.xml.v1:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 1 of fileWithVersionsAndMetadata.txt.
5 | This is version 1 of fileWithVersionsAndMetadata.txt.
6 |
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt.metadata.properties.xml.v2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 2 of fileWithVersionsAndMetadata.txt.
5 | This is version 2 of fileWithVersionsAndMetadata.txt.
6 |
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt.metadata.properties.xml.v3:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 3 of fileWithVersionsAndMetadata.txt.
5 | This is version 3 of fileWithVersionsAndMetadata.txt.
6 |
7 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt.v1:
--------------------------------------------------------------------------------
1 | This is version 1 of fileWithVersionsAndMetadata.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt.v2:
--------------------------------------------------------------------------------
1 | This is version 2 of fileWithVersionsAndMetadata.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithVersionsAndMetadata.txt.v3:
--------------------------------------------------------------------------------
1 | This is version 3 of fileWithVersionsAndMetadata.txt.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithoutExtension:
--------------------------------------------------------------------------------
1 | This is the final version of fileWithoutExtension.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithoutExtension.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the final version of fileWithoutExtension.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithoutExtension.v1:
--------------------------------------------------------------------------------
1 | This is version 1 of fileWithoutExtension.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/fileWithoutExtension.v2:
--------------------------------------------------------------------------------
1 | This is version 2 of fileWithoutExtension.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | vHEAD
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v0:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v0
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v0.1:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v0.1
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v0.2:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v0.2
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v1.0:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v1.0
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v1.1:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v1.1
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v2.0:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v2.0
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v2.999:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v2.999
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinor.txt.v999.999:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v999.999
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinorNoHead.txt.v0:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v0
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinorNoHead.txt.v1:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v1
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinorNoHead.txt.v1.05:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v1.05
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinorNoHead.txt.v1.1:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v1.1
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinorNoHead.txt.v1.12:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v1.12
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/majorMinorNoHead.txt.v2:
--------------------------------------------------------------------------------
1 | The quick brown fox jumps over the lazy dog.
2 |
3 | v2
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/metadataOnly.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is a metadata only file!
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/orphanMetadataVersion.txt.metadata.properties.xml.v4:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 4 of orphanMetadataVersion.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/versionsOfMetadataOnly.txt.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the final version of versionsOfMetadataOnly.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/versionsOfMetadataOnly.txt.metadata.properties.xml.v1:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 1 of versionsOfMetadataOnly.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/versionsOfMetadataOnly.txt.metadata.properties.xml.v2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 2 of versionsOfMetadataOnly.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/versionsOfMetadataOnly.txt.metadata.properties.xml.v3:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 3 of versionsOfMetadataOnly.txt.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/weirdFile1.v:
--------------------------------------------------------------------------------
1 | This is the final version of weirdFile1.v.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/weirdFile1.v.metadata.properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is the final version of weirdFile1.v.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/weirdFile1.v.metadata.properties.xml.v2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This is version 2 of weirdFile1.v.
5 |
6 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/weirdFile1.v.v1:
--------------------------------------------------------------------------------
1 | This is version 1 of weirdFile1.v.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/VersionTests/weirdFile1.v.v2:
--------------------------------------------------------------------------------
1 | This is version 2 of weirdFile1.v.
--------------------------------------------------------------------------------
/test/data/SinglePassTests/cleanTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cd FileFolderVolumeTests/
3 | ./cleanTestData.sh
4 |
5 | cd ../FileNameTests/
6 | ./cleanTestData.sh
7 |
8 | cd ../FileSizeTests/
9 | ./cleanTestData.sh
10 |
11 | cd ../FileVolumeTests/
12 | ./cleanTestData.sh
13 |
14 | cd ../FolderStructureTests/
15 | ./cleanTestData.sh
16 |
17 | cd ../PermissionTests/
18 | ./cleanTestData.sh
19 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/createFiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Validation
4 | if [ -z $1 ]; then
5 | echo "Please specify the number of files to create as the first command line parameter." >&2
6 | exit 1
7 | fi
8 |
9 | if [ -z $2 ]; then
10 | echo "Please specify the target directory in which to write the files as the second command line parameter." >&2
11 | exit 1
12 | fi
13 |
14 | if [ $1 -ge 0 ]; then
15 | echo "" > /dev/null # do nothing - fall through
16 | else
17 | echo "$1 is not a number - please provide a number." >&2
18 | exit 1
19 | fi
20 |
21 | if [ -d "$2" -a -w "$2" ]; then
22 | echo "" > /dev/null # do nothing - fall through
23 | else
24 | echo "$2 is not a writable directory." >&2
25 | exit 1
26 | fi
27 |
28 | # Do it
29 | filenamePrefix="file";
30 | content="The quick brown fox jumped over the lazy dogs.";
31 |
32 | # Counter
33 | i=1;
34 |
35 | # Main loop
36 | while [ $i -le $1 ]; do
37 | echo "${content}" > $2/${filenamePrefix}_${i}.txt
38 | i=$[$i+1]
39 | done
40 |
--------------------------------------------------------------------------------
/test/data/SinglePassTests/createTestData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo "WARNING: this script will create over 150,000 files on your hard drive"
3 | echo " totaling around 4.5GB, and will take quite a while to do so."
4 | echo " It also requires a filesystem that is Unicode capable."
5 | read -p "Press any key to continue or Ctrl+C to quit..."
6 |
7 | cd FileFolderVolumeTests/
8 | ./createTestData.sh SKIPWARNINGS
9 |
10 | cd ../FileNameTests/
11 | ./createTestData.sh SKIPWARNINGS
12 |
13 | cd ../FileSizeTests/
14 | ./createTestData.sh SKIPWARNINGS
15 |
16 | cd ../FileVolumeTests/
17 | ./createTestData.sh SKIPWARNINGS
18 |
19 | cd ../FolderStructureTests/
20 | ./createTestData.sh SKIPWARNINGS
21 |
22 | cd ../PermissionTests/
23 | ./createTestData.sh SKIPWARNINGS
24 |
25 | echo "Done."
26 |
--------------------------------------------------------------------------------
/test/src/test-bulk-import-action.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Peter Monks
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * This file is part of an unsupported extension to Alfresco.
17 | *
18 | */
19 |
20 | /*
21 | * This file tests the "bulk-import" repository action.
22 | */
23 |
24 | var bulkImport = actions.create("bulk-import");
25 |
26 | if (bulkimport == null)
27 | {
28 | throw "Bulk Import action is not available."
29 | }
30 |
31 | if (space === undefined)
32 | {
33 | throw "Bulk Import must be executed in the context of a space."
34 | }
35 |
36 | bulkImport.parameters["import-source-bean-id"] = "bit.fs.source"; // Note: optional - will default if not provided
37 | bulkImport.parameters["target-node-ref"] = space.nodeRef;
38 | bulkImport.parameters["parameters"] =
39 | "{ 'sourceDirectory': '/Users/pmonks/Development/Alfresco/forge/alfresco-bulk-import/test/data/SinglePassTests/MIMETypeTests', \
40 | 'replaceExisting': false, \
41 | 'dryRun': false }";
42 |
43 | bulkImport.execute(null);
44 |
--------------------------------------------------------------------------------