initialize(); m_cms = cms; m_importPath = params.getDestinationPath(); importGroups(); importUsers(); readResourcesFromManifest(); convertPointerToSiblings(); rewriteParseables(); importRelations(); } catch (IOException ioe) { CmsMessageContainer msg = Messages.get().container( } finally { helper.closeFile(); cleanUp();
/** * @see org.opencms.importexport.A_CmsImport#importUser(String, String, String, String, String, String, long, Map, List) */ @Override protected void importUser( String name, String flags, String password, String firstname, String lastname, String email, long dateCreated, Map userInfo, List userGroups) throws CmsImportExportException { boolean convert = false; Map config = OpenCms.getPasswordHandler().getConfiguration(); if ((config != null) && config.containsKey(I_CmsPasswordHandler.CONVERT_DIGEST_ENCODING)) { convert = Boolean.valueOf((String)config.get(I_CmsPasswordHandler.CONVERT_DIGEST_ENCODING)).booleanValue(); } if (convert) { password = convertDigestEncoding(password); } super.importUser(name, flags, password, firstname, lastname, email, dateCreated, userInfo, userGroups); }
while (itRelations.hasNext()) { Element relationElement = (Element)itRelations.next(); String structureID = getChildElementTextValue(relationElement, A_CmsImport.N_RELATION_ATTRIBUTE_ID); String targetPath = getChildElementTextValue(relationElement, A_CmsImport.N_RELATION_ATTRIBUTE_PATH); String relationType = getChildElementTextValue(relationElement, A_CmsImport.N_RELATION_ATTRIBUTE_TYPE); CmsUUID targetId = new CmsUUID(structureID); CmsRelationType type = CmsRelationType.valueOf(relationType);
source = getChildElementTextValue(currentElement, A_CmsImport.N_SOURCE); destination = getChildElementTextValue(currentElement, A_CmsImport.N_DESTINATION); String typeName = getChildElementTextValue(currentElement, A_CmsImport.N_TYPE); I_CmsResourceType type; try { uuidstructure = getChildElementTextValue(currentElement, A_CmsImport.N_UUIDSTRUCTURE); uuidresource = getChildElementTextValue(currentElement, A_CmsImport.N_UUIDRESOURCE); } else { uuidresource = null; timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATELASTMODIFIED); if (timestamp != null) { datelastmodified = convertTimestamp(timestamp); } else { datelastmodified = System.currentTimeMillis(); userlastmodified = getChildElementTextValue(currentElement, A_CmsImport.N_USERLASTMODIFIED); userlastmodified = OpenCms.getImportExportManager().translateUser(userlastmodified); timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATECREATED); if (timestamp != null) { datecreated = convertTimestamp(timestamp); } else { datecreated = System.currentTimeMillis();
/** * @see org.opencms.importexport.I_CmsImport#importResources(org.opencms.file.CmsObject, java.lang.String, org.opencms.report.I_CmsReport, java.io.File, java.util.zip.ZipFile, org.dom4j.Document) * * @deprecated use {@link #importData(CmsObject, I_CmsReport, CmsImportParameters)} instead */ public void importResources( CmsObject cms, String importPath, I_CmsReport report, File importResource, ZipFile importZip, Document docXml) throws CmsImportExportException { CmsImportParameters params = new CmsImportParameters(importResource != null ? importResource.getAbsolutePath() : importZip.getName(), importPath, false); try { importData(cms, report, params); } catch (CmsXmlException e) { throw new CmsImportExportException(e.getMessageContainer(), e); } }
content = getFileBytes(source);
source = getChildElementTextValue(currentElement, A_CmsImport.N_SOURCE); destination = getChildElementTextValue(currentElement, A_CmsImport.N_DESTINATION); String typeName = getChildElementTextValue(currentElement, A_CmsImport.N_TYPE); I_CmsResourceType type; try { uuidstructure = getChildElementTextValue(currentElement, A_CmsImport.N_UUIDSTRUCTURE); uuidresource = getChildElementTextValue(currentElement, A_CmsImport.N_UUIDRESOURCE); } else { uuidresource = null; timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATELASTMODIFIED); if (timestamp != null) { datelastmodified = convertTimestamp(timestamp); } else { datelastmodified = System.currentTimeMillis(); userlastmodified = getChildElementTextValue(currentElement, A_CmsImport.N_USERLASTMODIFIED); userlastmodified = OpenCms.getImportExportManager().translateUser(userlastmodified); timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATECREATED); if (timestamp != null) { datecreated = convertTimestamp(timestamp); } else { datecreated = System.currentTimeMillis();
/** * @see org.opencms.importexport.I_CmsImport#importResources(org.opencms.file.CmsObject, java.lang.String, org.opencms.report.I_CmsReport, java.io.File, java.util.zip.ZipFile, org.dom4j.Document) * * @deprecated use {@link #importData(CmsObject, I_CmsReport, CmsImportParameters)} instead */ @Deprecated public void importResources( CmsObject cms, String importPath, I_CmsReport report, File importResource, ZipFile importZip, Document docXml) throws CmsImportExportException { CmsImportParameters params = new CmsImportParameters( importResource != null ? importResource.getAbsolutePath() : importZip.getName(), importPath, false); try { importData(cms, report, params); } catch (CmsXmlException e) { throw new CmsImportExportException(e.getMessageContainer(), e); } }
content = getFileBytes(source);
initialize(); m_cms = cms; m_importPath = params.getDestinationPath(); importGroups(); importUsers(); readResourcesFromManifest(); convertPointerToSiblings(); rewriteParseables(); importRelations(); } catch (IOException ioe) { CmsMessageContainer msg = Messages.get().container( } finally { helper.closeFile(); cleanUp();
/** * @see org.opencms.importexport.A_CmsImport#importUser(String, String, String, String, String, String, long, Map, List) */ @Override protected void importUser( String name, String flags, String password, String firstname, String lastname, String email, long dateCreated, Map<String, Object> userInfo, List<String> userGroups) throws CmsImportExportException { boolean convert = false; CmsParameterConfiguration config = OpenCms.getPasswordHandler().getConfiguration(); if ((config != null) && config.containsKey(I_CmsPasswordHandler.CONVERT_DIGEST_ENCODING)) { convert = config.getBoolean(I_CmsPasswordHandler.CONVERT_DIGEST_ENCODING, false); } if (convert) { password = convertDigestEncoding(password); } super.importUser(name, flags, password, firstname, lastname, email, dateCreated, userInfo, userGroups); }
while (itRelations.hasNext()) { Element relationElement = (Element)itRelations.next(); String structureID = getChildElementTextValue(relationElement, A_CmsImport.N_RELATION_ATTRIBUTE_ID); String targetPath = getChildElementTextValue(relationElement, A_CmsImport.N_RELATION_ATTRIBUTE_PATH); String relationType = getChildElementTextValue(relationElement, A_CmsImport.N_RELATION_ATTRIBUTE_TYPE); CmsUUID targetId = new CmsUUID(structureID); CmsRelationType type = CmsRelationType.valueOf(relationType);