/** * Publishes the current project, printing messages to a shell report.<p> * * @param cms the cms request context * @return the publish history id of the published project * * @throws Exception if something goes wrong * * @see CmsShellReport */ public CmsUUID publishProject(CmsObject cms) throws Exception { return publishProject(cms, new CmsShellReport(cms.getRequestContext().getLocale())); }
/** * Constructs a new export.<p> * * @param cms the cmsObject to work with * @param exportFile the file or folder to export to * @param resourcesToExport the paths of folders and files to export * @param includeSystem if <code>true</code>, the system folder is included * @param includeUnchanged <code>true</code>, if unchanged files should be included * * @throws CmsImportExportException if something goes wrong * @throws CmsRoleViolationException if the current user has not the required role * * @deprecated use the {@link CmsExportParameters} constructor instead */ public CmsExport( CmsObject cms, String exportFile, List resourcesToExport, boolean includeSystem, boolean includeUnchanged) throws CmsImportExportException, CmsRoleViolationException { this(cms, exportFile, resourcesToExport, includeSystem, includeUnchanged, null, false, 0, new CmsShellReport( cms.getRequestContext().getLocale())); }
/** * Publishes the current project, printing messages to a shell report.<p> * * @param cms the cms request context * @return the publish history id of the published project * * @throws Exception if something goes wrong * * @see CmsShellReport */ public CmsUUID publishProject(CmsObject cms) throws Exception { return publishProject(cms, new CmsShellReport(cms.getRequestContext().getLocale())); }
/** * Deletes the versions from the history tables that are older then the given number of versions.<p> * * @param versionsToKeep number of versions to keep, is ignored if negative * @param versionsDeleted number of versions to keep for deleted resources, is ignored if negative * @param timeDeleted deleted resources older than this will also be deleted, is ignored if negative * * @throws Exception if something goes wrong * * @see CmsObject#deleteHistoricalVersions( int, int, long, I_CmsReport) */ public void deleteHistoricalVersions(int versionsToKeep, int versionsDeleted, long timeDeleted) throws Exception { m_cms.deleteHistoricalVersions(versionsToKeep, versionsDeleted, timeDeleted, new CmsShellReport( m_cms.getRequestContext().getLocale())); }
/** * Publishes a single resource, printing messages to a shell report.<p> * * The siblings of the resource will not be published.<p> * * @param cms the cms request context * @param resourcename the name of the resource to be published * * @return the publish history id of the published project * * @throws Exception if something goes wrong * * @see CmsShellReport */ public CmsUUID publishResource(CmsObject cms, String resourcename) throws Exception { return publishResource(cms, resourcename, false, new CmsShellReport(cms.getRequestContext().getLocale())); }
/** * Publishes a single resource, printing messages to a shell report.<p> * * The siblings of the resource will not be published.<p> * * @param cms the cms request context * @param resourcename the name of the resource to be published * * @return the publish history id of the published project * * @throws Exception if something goes wrong * * @see CmsShellReport */ public CmsUUID publishResource(CmsObject cms, String resourcename) throws Exception { return publishResource(cms, resourcename, false, new CmsShellReport(cms.getRequestContext().getLocale())); }
/** * Rebuilds (if required creates) the given search index.<p> * * @param index name of the index to update * @throws Exception if something goes wrong * @see org.opencms.search.CmsSearchManager#rebuildIndex(String, org.opencms.report.I_CmsReport) */ public void rebuildIndex(String index) throws Exception { OpenCms.getSearchManager().rebuildIndex(index, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
/** * Rebuilds (if required creates) all configured search indexes.<p> * * @throws Exception if something goes wrong * * @see org.opencms.search.CmsSearchManager#rebuildAllIndexes(org.opencms.report.I_CmsReport) */ public void rebuildAllIndexes() throws Exception { I_CmsReport report = new CmsShellReport(m_cms.getRequestContext().getLocale()); OpenCms.getSearchManager().rebuildAllIndexes(report); }
/** * Deletes the versions from the history tables that are older then the given number of versions.<p> * * @param versionsToKeep number of versions to keep, is ignored if negative * @param versionsDeleted number of versions to keep for deleted resources, is ignored if negative * @param timeDeleted deleted resources older than this will also be deleted, is ignored if negative * * @throws Exception if something goes wrong * * @see CmsObject#deleteHistoricalVersions( int, int, long, I_CmsReport) */ public void deleteHistoricalVersions(int versionsToKeep, int versionsDeleted, long timeDeleted) throws Exception { m_cms.deleteHistoricalVersions( versionsToKeep, versionsDeleted, timeDeleted, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
m_cms, vfsExportHandler, new CmsShellReport(m_cms.getRequestContext().getLocale()));
/** * Rebuilds (if required creates) all configured search indexes.<p> * * @throws Exception if something goes wrong * * @see org.opencms.search.CmsSearchManager#rebuildAllIndexes(org.opencms.report.I_CmsReport) */ public void rebuildAllIndexes() throws Exception { I_CmsReport report = new CmsShellReport(m_cms.getRequestContext().getLocale()); OpenCms.getSearchManager().rebuildAllIndexes(report); }
/** * Deletes a module.<p> * * @param moduleName the name of the module * @throws Exception if something goes wrong */ public void deleteModule(String moduleName) throws Exception { OpenCms.getModuleManager().deleteModule( m_cms, moduleName, false, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
m_cms, vfsExportHandler, new CmsShellReport(m_cms.getRequestContext().getLocale()));
/** * Rebuilds (if required creates) the given search index.<p> * * @param index name of the index to update * @throws Exception if something goes wrong * @see org.opencms.search.CmsSearchManager#rebuildIndex(String, org.opencms.report.I_CmsReport) */ public void rebuildIndex(String index) throws Exception { OpenCms.getSearchManager().rebuildIndex(index, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
m_cms, vfsExportHandler, new CmsShellReport(m_cms.getRequestContext().getLocale()));
/** * Deletes a module.<p> * * @param moduleName the name of the module * @throws Exception if something goes wrong */ public void deleteModule(String moduleName) throws Exception { OpenCms.getModuleManager().deleteModule( m_cms, moduleName, false, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
m_cms, vfsExportHandler, new CmsShellReport(m_cms.getRequestContext().getLocale()));
I_CmsReport report = new CmsShellReport(m_cms.getRequestContext().getLocale());
/** * Exports all resources from the current site root to a ZIP file.<p> * * @param exportFile the name (absolute path) of the ZIP file to export to * @throws Exception if something goes wrong */ public void exportAllResources(String exportFile) throws Exception { List exportPaths = new ArrayList(1); exportPaths.add("/"); CmsVfsImportExportHandler vfsExportHandler = new CmsVfsImportExportHandler(); CmsExportParameters params = new CmsExportParameters( exportFile, null, true, false, false, exportPaths, true, true, 0, true, false); vfsExportHandler.setExportParams(params); OpenCms.getImportExportManager().exportData( m_cms, vfsExportHandler, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
/** * Imports a module.<p> * * @param importFile the absolute path of the import module file * * @throws Exception if something goes wrong * * @see org.opencms.importexport.CmsImportExportManager#importData(CmsObject, I_CmsReport, CmsImportParameters) */ public void importModule(String importFile) throws Exception { CmsImportParameters params = new CmsImportParameters(importFile, "/", true); OpenCms.getImportExportManager().importData( m_cms, new CmsShellReport(m_cms.getRequestContext().getLocale()), params); }