public interface ImportExportService
| Modifier and Type | Field and Description |
|---|---|
static String |
DATE_FORMAT |
static String |
FROM |
static String |
INCLUDE_ALL_FILES |
static String |
INCLUDE_DEFINITIONS |
static String |
INCLUDE_LIVE_EXPORT |
static String |
INCLUDE_MOUNTS |
static String |
INCLUDE_ROLES |
static String |
INCLUDE_SITE_INFOS |
static String |
INCLUDE_TEMPLATES |
static String |
INCLUDE_USERS |
static String |
JAHIA_URI |
static String |
NO_RECURSE |
static String |
SERVER_DIRECTORY |
static String |
SKIP_BINARY |
static String |
SYSTEM_VIEW |
static String |
TO |
static String |
VIEW_ACL |
static String |
VIEW_CONTENT |
static String |
VIEW_JAHIALINKS |
static String |
VIEW_METADATA |
static String |
VIEW_PID |
static String |
VIEW_VERSION |
static String |
VIEW_WORKFLOW |
static String |
XSL_PATH |
| Modifier and Type | Method and Description |
|---|---|
void |
exportAll(OutputStream out,
Map<String,Object> params)
Performs the full repository export into the provided output stream using the specified parameters.
|
void |
exportNode(JCRNodeWrapper node,
JCRNodeWrapper exportRoot,
OutputStream out,
Map<String,Object> params)
Export JCR node as xml
|
void |
exportSites(OutputStream outputStream,
Map<String,Object> params,
List<JCRSiteNode> sites)
Export complete sites
|
void |
exportZip(JCRNodeWrapper node,
JCRNodeWrapper exportRoot,
OutputStream out,
Map<String,Object> params)
Export JCR content along with binaries into a zip
|
void |
importCategories(Category rootCategory,
InputStream is)
Performs the import of categories from the provided import stream into the specified root category.
|
void |
importSiteZip(File file,
JCRSessionWrapper session)
Import the sitee from the specified file.
|
void |
importSiteZip(JCRNodeWrapper nodeWrapper)
Import the site from the specified file node.
|
void |
importSiteZip(org.springframework.core.io.Resource resource)
Import the site from the specified resource.
|
void |
importSiteZip(org.springframework.core.io.Resource file,
JahiaSite site,
Map<Object,Object> infos)
Import a full site zip into a newly created site.
|
void |
importSiteZip(org.springframework.core.io.Resource file,
JahiaSite site,
Map<Object,Object> infos,
org.springframework.core.io.Resource legacyMappingFilePath,
org.springframework.core.io.Resource legacyDefinitionsFilePath)
Import a full site zip into a newly created site.
|
void |
importSiteZip(org.springframework.core.io.Resource resource,
JCRSessionWrapper session)
Import the site from the specified resource using the provided JCR session.
|
List<String[]> |
importUsers(File file)
Performs a batch import of users from the provided file
|
void |
importXML(String parentNodePath,
InputStream content,
int rootBehavior)
Performs an import of the XML content, detecting its type: users,
categories or general JCR content.
|
void |
importZip(String parentNodePath,
org.springframework.core.io.Resource file,
int rootBehavior)
Performs an import of the ZIP file.
|
void |
importZip(String parentNodePath,
org.springframework.core.io.Resource file,
int rootBehavior,
JCRSessionWrapper session)
Performs an import of the ZIP file.
|
void |
importZip(String parentNodePath,
org.springframework.core.io.Resource file,
int rootBehaviour,
JCRSessionWrapper session,
Set<String> filesToIgnore,
boolean useReferenceKeeper)
Performs an import of the ZIP file.
|
ValidationResults |
validateImportFile(JCRSessionWrapper session,
InputStream is,
String contentType,
List<String> installedModules)
Validates a JCR content import file in document format and returns expected failures.
|
static final String DATE_FORMAT
static final String JAHIA_URI
static final String FROM
static final String TO
static final String INCLUDE_TEMPLATES
static final String INCLUDE_SITE_INFOS
static final String INCLUDE_ALL_FILES
static final String INCLUDE_DEFINITIONS
static final String INCLUDE_LIVE_EXPORT
static final String INCLUDE_USERS
static final String INCLUDE_ROLES
static final String INCLUDE_MOUNTS
static final String VIEW_CONTENT
static final String VIEW_VERSION
static final String VIEW_METADATA
static final String VIEW_JAHIALINKS
static final String VIEW_ACL
static final String VIEW_WORKFLOW
static final String VIEW_PID
static final String XSL_PATH
static final String NO_RECURSE
static final String SKIP_BINARY
static final String SYSTEM_VIEW
static final String SERVER_DIRECTORY
void exportAll(OutputStream out, Map<String,Object> params) throws JahiaException, javax.jcr.RepositoryException, SAXException, IOException, TransformerException
out - the output stream to write exported content intoparams - the export optionsJahiaException - in case of processing errorsjavax.jcr.RepositoryException - for JCR-related errorsSAXException - in case of a parsing exceptionsIOException - I/O communication errorsTransformerException - XSLT transformation errorsvoid exportSites(OutputStream outputStream, Map<String,Object> params, List<JCRSiteNode> sites) throws javax.jcr.RepositoryException, IOException, SAXException, TransformerException
outputStream - params - sites - JahiaExceptionjavax.jcr.RepositoryException - in case of JCR-related errorsIOExceptionSAXExceptionTransformerExceptionvoid exportNode(JCRNodeWrapper node, JCRNodeWrapper exportRoot, OutputStream out, Map<String,Object> params) throws javax.jcr.RepositoryException, SAXException, IOException, TransformerException
node - node to exportexportRoot - out - outputstreamparams - @throws JahiaExceptionjavax.jcr.RepositoryException - in case of JCR-related errorsSAXExceptionIOExceptionTransformerExceptionvoid exportZip(JCRNodeWrapper node, JCRNodeWrapper exportRoot, OutputStream out, Map<String,Object> params) throws javax.jcr.RepositoryException, SAXException, IOException, TransformerException
node - node to exportexportRoot - out - outputstreamparams - @throws JahiaExceptionjavax.jcr.RepositoryException - in case of JCR-related errorsSAXExceptionIOExceptionTransformerExceptionvoid importXML(String parentNodePath, InputStream content, int rootBehavior) throws IOException, javax.jcr.RepositoryException, JahiaException
parentNodePath - the path of the parent node, where the content should be
importedcontent - the XML content streamrootBehavior - Ignore root xml element - can be used to import multiple nodes in the same node, using one single
importIOException - in case of read/write errorsjavax.jcr.RepositoryException - in case of repository operation errorsJahiaException - in case of errors during categories importvoid importZip(String parentNodePath, org.springframework.core.io.Resource file, int rootBehavior) throws IOException, javax.jcr.RepositoryException
parentNodePath - file - rootBehavior - Ignore root xml element - can be used to import multiple nodes in the same node, using one single
importIOExceptionjavax.jcr.RepositoryException - in case of JCR-related errorsJahiaExceptionvoid importZip(String parentNodePath, org.springframework.core.io.Resource file, int rootBehavior, JCRSessionWrapper session) throws IOException, javax.jcr.RepositoryException
parentNodePath - file - rootBehavior - Ignore root xml element - can be used to import multiple nodes in the same node, using one single
importIOExceptionjavax.jcr.RepositoryException - in case of JCR-related errorsJahiaExceptionvoid importZip(String parentNodePath, org.springframework.core.io.Resource file, int rootBehaviour, JCRSessionWrapper session, Set<String> filesToIgnore, boolean useReferenceKeeper) throws IOException, javax.jcr.RepositoryException
parentNodePath - file - rootBehaviour - Ignore root xml element - can be used to import multiple nodes in the same node, using one single
importfilesToIgnore - Files to ignorereferences - References mapIOExceptionjavax.jcr.RepositoryException - in case of JCR-related errorsJahiaExceptionValidationResults validateImportFile(JCRSessionWrapper session, InputStream is, String contentType, List<String> installedModules)
session - current JCR session instanceis - the input stream with a JCR content in document formatcontentType - the content type for the contentinstalledModules - the list of installed modules, where the first element is a template set namevoid importSiteZip(JCRNodeWrapper nodeWrapper) throws javax.jcr.RepositoryException, IOException, JahiaException
nodeWrapper - the file node to read content of the imported site fromjavax.jcr.RepositoryException - in case of a JCR errorIOException - in case of an I/O exceptionJahiaException - if a processing error happensvoid importSiteZip(File file, JCRSessionWrapper session) throws javax.jcr.RepositoryException, IOException, JahiaException
file - the file to read content of the imported site fromsession - current JCR session instancejavax.jcr.RepositoryException - in case of a JCR errorIOException - in case of an I/O exceptionJahiaException - if a processing error happensvoid importSiteZip(org.springframework.core.io.Resource resource)
throws javax.jcr.RepositoryException,
IOException,
JahiaException
resource - the resource to read content of the imported site fromjavax.jcr.RepositoryException - in case of a JCR errorIOException - in case of an I/O exceptionJahiaException - if a processing error happensvoid importSiteZip(org.springframework.core.io.Resource resource,
JCRSessionWrapper session)
throws javax.jcr.RepositoryException,
IOException,
JahiaException
resource - the resource to read content of the imported site fromsession - current JCR session to use for the importjavax.jcr.RepositoryException - in case of a JCR errorIOException - in case of an I/O exceptionJahiaException - if a processing error happensvoid importSiteZip(org.springframework.core.io.Resource file,
JahiaSite site,
Map<Object,Object> infos)
throws javax.jcr.RepositoryException,
IOException
file - Zip filesite - The new site where to importinfos - site infosjavax.jcr.RepositoryException - in case of JCR-related errorsIOExceptionvoid importSiteZip(org.springframework.core.io.Resource file,
JahiaSite site,
Map<Object,Object> infos,
org.springframework.core.io.Resource legacyMappingFilePath,
org.springframework.core.io.Resource legacyDefinitionsFilePath)
throws javax.jcr.RepositoryException,
IOException
file - Zip filesite - The new site where to importinfos - site infoslegacyMappingFilePath - path to the legacy mappingslegacyDefinitionsFilePath - path for the legacy definitionsjavax.jcr.RepositoryException - in case of JCR-related errorsIOExceptionvoid importCategories(Category rootCategory, InputStream is)
rootCategory - the root category to useis - the input stream to read import content fromList<String[]> importUsers(File file) throws IOException, javax.jcr.RepositoryException
file - a file to read user data fromIOException - in case of a reading/parsing errorjavax.jcr.RepositoryExceptionCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.