/** * Adds a import version class name to the configuration.<p> * * @param importVersionClass the import version class name to add */ public void addImportVersionClass(I_CmsImport importVersionClass) { if (LOG.isDebugEnabled()) { LOG.debug( Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_ADDED_IMPORT_VERSION_1, importVersionClass)); } m_importVersionClasses.add(importVersionClass); }
/** * Adds an import/export handler to the list of configured handlers.<p> * * @param handler the import/export handler to add */ public void addImportExportHandler(I_CmsImportExportHandler handler) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_ADDED_IMPORTEXPORT_HANDLER_1, handler)); } m_importExportHandlers.add(handler); }
/** * Adds a property name to the list of properties that should be removed from imported resources.<p> * * @param propertyName a property name */ public void addIgnoredProperty(String propertyName) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_IGNORING_PROPERTY_1, propertyName)); } m_ignoredProperties.add(propertyName); }
/** * Adds an import/export handler to the list of configured handlers.<p> * * @param handler the import/export handler to add */ public void addImportExportHandler(I_CmsImportExportHandler handler) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_ADDED_IMPORTEXPORT_HANDLER_1, handler)); } m_importExportHandlers.add(handler); }
/** * Adds a property name to the list of properties that should be removed from imported resources.<p> * * @param propertyName a property name */ public void addIgnoredProperty(String propertyName) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_IGNORING_PROPERTY_1, propertyName)); } m_ignoredProperties.add(propertyName); }
/** * Adds a import version class name to the configuration.<p> * * @param importVersionClass the import version class name to add */ public void addImportVersionClass(I_CmsImport importVersionClass) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key( Messages.LOG_IMPORTEXPORT_ADDED_IMPORT_VERSION_1, importVersionClass)); } m_importVersionClasses.add(importVersionClass); }
/** * Sets if imported pages should be converted into XML pages.<p> * * @param convertToXmlPage true, if imported pages should be converted into XML pages. */ public void setConvertToXmlPage(boolean convertToXmlPage) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key( Messages.LOG_IMPORTEXPORT_SET_CONVERT_PARAMETER_1, Boolean.toString(convertToXmlPage))); } m_convertToXmlPage = convertToXmlPage; }
/** * Creates a new instance for the import/export manager, will be called by the import/export configuration manager. */ public CmsImportExportManager() { if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.INIT_IMPORTEXPORT_INITIALIZING_0)); } m_importExportHandlers = new ArrayList(); m_immutableResources = new ArrayList(); m_ignoredProperties = new ArrayList(); m_convertToXmlPage = true; m_importGroupTranslations = new HashMap(); m_importUserTranslations = new HashMap(); m_overwriteCollidingResources = true; m_importVersionClasses = new ArrayList(); }
/** * Sets if imported pages should be converted into XML pages.<p> * * @param convertToXmlPage true, if imported pages should be converted into XML pages. */ public void setConvertToXmlPage(boolean convertToXmlPage) { if (LOG.isDebugEnabled()) { LOG.debug( Messages.get().getBundle().key( Messages.LOG_IMPORTEXPORT_SET_CONVERT_PARAMETER_1, Boolean.toString(convertToXmlPage))); } m_convertToXmlPage = convertToXmlPage; }
/** * Adds a resource to the list of immutable resources that should remain * unchanged when resources are imported.<p> * * @param immutableResource a resources uri in the OpenCms VFS */ public void addImmutableResource(String immutableResource) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key( Messages.LOG_IMPORTEXPORT_ADDED_IMMUTABLE_RESOURCE_1, immutableResource)); } m_immutableResources.add(immutableResource); }
/** * Creates a new instance for the import/export manager, will be called by the import/export configuration manager. */ public CmsImportExportManager() { if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.INIT_IMPORTEXPORT_INITIALIZING_0)); } m_importExportHandlers = new ArrayList<I_CmsImportExportHandler>(); m_immutableResources = new ArrayList<String>(); m_ignoredProperties = new ArrayList<String>(); m_convertToXmlPage = true; m_importGroupTranslations = new HashMap<String, String>(); m_importUserTranslations = new HashMap<String, String>(); m_overwriteCollidingResources = true; m_importVersionClasses = new ArrayList<I_CmsImport>(); m_defaultTimestampModes = new HashMap<String, TimestampMode>(); m_resourcetypes = new ArrayList<String>(); }
/** * Adds a resource to the list of immutable resources that should remain * unchanged when resources are imported.<p> * * @param immutableResource a resources uri in the OpenCms VFS */ public void addImmutableResource(String immutableResource) { if (LOG.isDebugEnabled()) { LOG.debug( Messages.get().getBundle().key( Messages.LOG_IMPORTEXPORT_ADDED_IMMUTABLE_RESOURCE_1, immutableResource)); } m_immutableResources.add(immutableResource); }
/** * Sets the URL of a 4.x OpenCms app. (e.g. http://localhost:8080/opencms/opencms/) * from which content was exported.<p> * * This setting is required to import content of 4.x OpenCms apps. correct into 5.x OpenCms apps.<p> * * @param webAppUrl a URL of the a OpenCms app. (e.g. http://localhost:8080/opencms/opencms/) */ public void setOldWebAppUrl(String webAppUrl) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_SET_OLD_WEBAPP_URL_1, webAppUrl)); } m_webAppUrl = webAppUrl; }
/** * Sets the content Age.<p> * * @param contentAge the content Age to set */ public void setContentAge(long contentAge) { if (contentAge < 0) { String ageString = Long.toString(contentAge); throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_CONTENT_AGE_1, ageString)); } m_contentAge = contentAge; }
/** * Sets the content Age.<p> * * @param contentAge the content Age to set */ public void setContentAge(long contentAge) { if (contentAge < 0) { String ageString = Long.toString(contentAge); throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_CONTENT_AGE_1, ageString)); } m_contentAge = contentAge; }
/** * Sets the URL of a 4.x OpenCms app. (e.g. http://localhost:8080/opencms/opencms/) * from which content was exported.<p> * * This setting is required to import content of 4.x OpenCms apps. correct into 5.x OpenCms apps.<p> * * @param webAppUrl a URL of the a OpenCms app. (e.g. http://localhost:8080/opencms/opencms/) */ public void setOldWebAppUrl(String webAppUrl) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_SET_OLD_WEBAPP_URL_1, webAppUrl)); } m_webAppUrl = webAppUrl; }
/** * Sets the timestamp to limit the resources to be exported by date.<p> * * Only resources that have been modified after this date will be exported.<p> * * @param contentAge the timestamp to limit the resources to be exported by date * * @deprecated use {@link #setExportParams(CmsExportParameters)} instead */ @Deprecated public void setContentAge(long contentAge) { if (contentAge < 0) { String ageString = Long.toString(contentAge); throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_CONTENT_AGE_1, ageString)); } m_contentAge = contentAge; }
/** * Sets the file path, should be a zip file.<p> * * @param path the file path */ public void setPath(String path) { if (CmsStringUtil.isEmpty(path) || !path.trim().equals(path)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_FILE_NAME_1, path)); } m_path = path; }
/** * Creates a new VFS import/export handler.<p> */ public CmsVfsImportExportHandler() { super(); m_description = Messages.get().getBundle().key(Messages.GUI_CMSIMPORTHANDLER_DEFAULT_DESC_0); }
/** * Creates a new Cms module import/export handler.<p> */ public CmsModuleImportExportHandler() { super(); m_description = org.opencms.importexport.Messages.get().getBundle().key( org.opencms.importexport.Messages.GUI_CMSIMPORTHANDLER_DEFAULT_DESC_0); }