/** * Deletes the publish list assigned to a publish job.<p> * * @param dbc the current database context * @param publishHistoryId the history id identifying the publish job * @throws CmsException if something goes wrong */ public void deletePublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException { getProjectDriver(dbc).deletePublishList(dbc, publishHistoryId); }
/** * Reads the publish report assigned to a publish job.<p> * * @param dbc the current database context * @param publishHistoryId the history id identifying the publish job * @return the content of the assigned publish report * @throws CmsException if something goes wrong */ public byte[] readPublishReportContents(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException { return getProjectDriver(dbc).readPublishReportContents(dbc, publishHistoryId); }
/** * Creates a new publish job.<p> * * @param dbc the current database context * @param publishJob the publish job to create * * @throws CmsException if something goes wrong */ public void createPublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException { getProjectDriver(dbc).createPublishJob(dbc, publishJob); }
/** * Deletes a publish job identified by its history id.<p> * * @param dbc the current database context * @param publishHistoryId the history id identifying the publish job * * @throws CmsException if something goes wrong */ public void deletePublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException { getProjectDriver(dbc).deletePublishJob(dbc, publishHistoryId); }
/** * Reads a single publish job identified by its publish history id.<p> * * @param dbc the current database context * @param publishHistoryId unique id to identify the publish job in the publish history * @return an object of type <code>{@link CmsPublishJobInfoBean}</code> * * @throws CmsException if something goes wrong */ public CmsPublishJobInfoBean readPublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException { return getProjectDriver(dbc).readPublishJob(dbc, publishHistoryId); }
/** * Deletes all entries in the published resource table.<p> * * @param dbc the current database context * @param linkType the type of resource deleted (0= non-paramter, 1=parameter) * * @throws CmsException if something goes wrong */ public void deleteAllStaticExportPublishedResources(CmsDbContext dbc, int linkType) throws CmsException { getProjectDriver(dbc).deleteAllStaticExportPublishedResources(dbc, linkType); }
/** * Reads the publish list assigned to a publish job.<p> * * @param dbc the current database context * @param publishHistoryId the history id identifying the publish job * @return the assigned publish list * @throws CmsException if something goes wrong */ public CmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException { return getProjectDriver(dbc).readPublishList(dbc, publishHistoryId); }
/** * Updates a publish job.<p> * * @param dbc the current database context * @param publishJob the publish job to update * * @throws CmsException if something goes wrong */ public void writePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException { getProjectDriver(dbc).writePublishJob(dbc, publishJob); }
/** * Returns the parameters of a resource in the table of all published template resources.<p> * * @param dbc the current database context * @param rfsName the rfs name of the resource * * @return the parameter string of the requested resource * * @throws CmsException if something goes wrong */ public String readStaticExportPublishedResourceParameters(CmsDbContext dbc, String rfsName) throws CmsException { return getProjectDriver(dbc).readStaticExportPublishedResourceParameters(dbc, rfsName); }
/** * Returns the list of all resource names that define the "view" of the given project.<p> * * @param dbc the current database context * @param project the project to get the project resources for * * @return the list of all resources, as <code>{@link String}</code> objects * that define the "view" of the given project. * * @throws CmsException if something goes wrong */ public List<String> readProjectResources(CmsDbContext dbc, CmsProject project) throws CmsException { return getProjectDriver(dbc).readProjectResources(dbc, project); }
/** * Reads all available publish jobs.<p> * * @param dbc the current database context * @param startTime the start of the time range for finish time * @param endTime the end of the time range for finish time * @return a list of objects of type <code>{@link CmsPublishJobInfoBean}</code> * * @throws CmsException if something goes wrong */ public List<CmsPublishJobInfoBean> readPublishJobs(CmsDbContext dbc, long startTime, long endTime) throws CmsException { return getProjectDriver(dbc).readPublishJobs(dbc, startTime, endTime); }
/** * Returns a list of all template resources which must be processed during a static export.<p> * * @param dbc the current database context * @param parameterResources flag for reading resources with parameters (1) or without (0) * @param timestamp for reading the data from the db * * @return a list of template resources as <code>{@link String}</code> objects * * @throws CmsException if something goes wrong */ public List<String> readStaticExportResources(CmsDbContext dbc, int parameterResources, long timestamp) throws CmsException { return getProjectDriver(dbc).readStaticExportResources(dbc, parameterResources, timestamp); }
/** * Deletes an entry in the published resource table.<p> * * @param dbc the current database context * @param resourceName The name of the resource to be deleted in the static export * @param linkType the type of resource deleted (0= non-parameter, 1=parameter) * @param linkParameter the parameters of the resource * * @throws CmsException if something goes wrong */ public void deleteStaticExportPublishedResource( CmsDbContext dbc, String resourceName, int linkType, String linkParameter) throws CmsException { getProjectDriver(dbc).deleteStaticExportPublishedResource(dbc, resourceName, linkType, linkParameter); }
/** * Reads the latest saved locks from the database and installs them to * this lock manager.<p> * * @param dbc the current database context * * @throws CmsException if something goes wrong */ public void readLocks(CmsDbContext dbc) throws CmsException { if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_3_SHELL_ACCESS) { // read the locks only if the wizard is not enabled Map lockCache = new HashMap(); List locks = m_driverManager.getProjectDriver().readLocks(dbc); Iterator itLocks = locks.iterator(); while (itLocks.hasNext()) { CmsLock lock = (CmsLock)itLocks.next(); internalLockResource(lock, lockCache); } OpenCms.getMemoryMonitor().flushLocks(lockCache); m_runningInServlet = true; } }
/** * Writes an already existing project.<p> * * The project id has to be a valid OpenCms project id.<br> * * The project with the given id will be completely overridden * by the given data.<p> * * @param dbc the current database context * @param project the project that should be written * * @throws CmsException if operation was not successful */ public void writeProject(CmsDbContext dbc, CmsProject project) throws CmsException { m_monitor.uncacheProject(project); getProjectDriver(dbc).writeProject(dbc, project); m_monitor.cacheProject(project); }
/** * Reads a project.<p> * * Important: Since a project name can be used multiple times, this is NOT the most efficient * way to read the project. This is only a convenience for front end developing. * Reading a project by name will return the first project with that name. * All core classes must use the id version {@link #readProject(CmsDbContext, CmsUUID)} to ensure the right project is read.<p> * * @param dbc the current database context * @param name the name of the project * * @return the project read * * @throws CmsException if something goes wrong */ public CmsProject readProject(CmsDbContext dbc, String name) throws CmsException { CmsProject project = null; project = m_monitor.getCachedProject(name); if (project == null) { project = getProjectDriver(dbc).readProject(dbc, name); m_monitor.cacheProject(project); } return project; }
/** * Writes the publish report for a publish job.<p> * * @param dbc the current database context * @param publishJob the publish job * @throws CmsException if something goes wrong */ public void writePublishReport(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException { CmsPublishReport report = (CmsPublishReport)publishJob.removePublishReport(); if (report != null) { getProjectDriver(dbc).writePublishReport(dbc, publishJob.getPublishHistoryId(), report.getContents()); } }
/** * Reads a project given the projects id.<p> * * @param dbc the current database context * @param id the id of the project * * @return the project read * * @throws CmsDataAccessException if something goes wrong */ public CmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException { CmsProject project = null; project = m_monitor.getCachedProject(id.toString()); if (project == null) { project = getProjectDriver(dbc).readProject(dbc, id); m_monitor.cacheProject(project); } return project; }
/** * Writes the locks that are currently stored in-memory to the database to allow restoring them in * later startups.<p> * * This overwrites the locks previously stored in the underlying database table.<p> * * @param dbc the current database context * * @throws CmsException if something goes wrong */ public void writeLocks(CmsDbContext dbc) throws CmsException { if (m_isDirty // only if something changed && m_runningInServlet // only if started in run level 4 && OpenCms.getMemoryMonitor().requiresPersistency()) { // only if persistency is required List<CmsLock> locks = OpenCms.getMemoryMonitor().getAllCachedLocks(); m_driverManager.getProjectDriver(dbc).writeLocks(dbc, locks); m_isDirty = false; } }
/** * Writes the locks that are currently stored in-memory to the database to allow restoring them in * later startups.<p> * * This overwrites the locks previously stored in the underlying database table.<p> * * @param dbc the current database context * * @throws CmsException if something goes wrong */ public void writeLocks(CmsDbContext dbc) throws CmsException { if (m_isDirty // only if something changed && m_runningInServlet // only if started in run level 4 && OpenCms.getMemoryMonitor().requiresPersistency()) { // only if persistency is required List locks = OpenCms.getMemoryMonitor().getAllCachedLocks(); m_driverManager.getProjectDriver().writeLocks(dbc, locks); m_isDirty = false; } }