public class Importer
extends java.lang.Object
AbstractImporter
file/directory combinations
1. plain files
+ foo
- test.gif
2. plain files + special folder
+ foo
- .content.xml
+ bar
- test.gif
3. special file
+ foo
- test.gif
- test.gif.dir
- .content.xml
4. special file + sub files
+ foo
- test.gif
- test.gif.dir
- .content.xml
+ _jcr_content
- thumbnail.gif
4. special file + sub special files
+ foo
- test.gif
- test.gif.dir
- .content.xml
+ _jcr_content
- thumbnail.gif
+ thumbnail.gif.dir
- .content.xml
5. file/folder structure
+ foo
+ en
- .content.xml
+ _cq_content
- thumbnail.gif
+ company
- .content.xmlConstructor and Description |
---|
Importer() |
Importer(ImportOptions opts) |
Modifier and Type | Method and Description |
---|---|
void |
applyMemberships(Session session) |
void |
checkinNodes(Session session) |
ImportOptions |
getOptions() |
java.util.List<java.lang.String> |
getSubPackages() |
boolean |
hasErrors() |
void |
run(Archive archive,
Node importRoot)
Runs the importer
|
void |
run(Archive archive,
Session session,
java.lang.String parentPath)
Runs the importer with the given session.
|
void |
setDebugFailAfterSave(int failAfterEach)
Debug settings to allows to produce failures after each
failAfterEach save. |
public Importer()
public Importer(ImportOptions opts)
public ImportOptions getOptions()
public java.util.List<java.lang.String> getSubPackages()
public void setDebugFailAfterSave(int failAfterEach)
failAfterEach
save.failAfterEach
- cardinal indicating when to failpublic void run(Archive archive, Node importRoot) throws java.io.IOException, RepositoryException, ConfigurationException
archive
- the archive to importimportRoot
- the root node to importConfigurationException
- if the importer is not properly configuredjava.io.IOException
- if an I/O error occursRepositoryException
- if an repository error occurspublic void run(Archive archive, Session session, java.lang.String parentPath) throws java.io.IOException, RepositoryException, ConfigurationException
archive
- the archive to importsession
- the session importing the archiveparentPath
- the repository parent path where the archive will be importedjava.io.IOException
- if an I/O error occursRepositoryException
- if a repository error occursConfigurationException
- if the importer is not properly configuredpublic boolean hasErrors()
public void checkinNodes(Session session)
public void applyMemberships(Session session)
Copyright © 2010 - 2020 Adobe. All Rights Reserved