001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software GmbH & Co. KG, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.db;
029
030import org.opencms.db.generic.CmsPublishHistoryCleanupFilter;
031import org.opencms.db.log.CmsLogEntry;
032import org.opencms.db.log.CmsLogFilter;
033import org.opencms.db.userpublishlist.CmsUserPublishListEntry;
034import org.opencms.file.CmsDataAccessException;
035import org.opencms.file.CmsFile;
036import org.opencms.file.CmsFolder;
037import org.opencms.file.CmsGroup;
038import org.opencms.file.CmsProject;
039import org.opencms.file.CmsProject.CmsProjectType;
040import org.opencms.file.CmsResource;
041import org.opencms.file.CmsUser;
042import org.opencms.lock.CmsLock;
043import org.opencms.main.CmsException;
044import org.opencms.publish.CmsPublishJobInfoBean;
045import org.opencms.report.I_CmsReport;
046import org.opencms.util.CmsUUID;
047
048import java.util.List;
049import java.util.Set;
050
051/**
052 * Definitions of all required project driver methods. <p>
053 *
054 * @since 6.0.0
055 */
056public interface I_CmsProjectDriver {
057
058    /** The type ID to identify project driver implementations. */
059    int DRIVER_TYPE_ID = 1;
060
061    /** Name of the setup project. */
062    String SETUP_PROJECT_NAME = "_setupProject";
063
064    /** The name of the temp file project. */
065    String TEMP_FILE_PROJECT_NAME = "tempFileProject";
066
067    /**
068     * Cleans up the publish history entries according to the given filter.
069     *
070     * @param dbc the DB context
071     * @param filter the filter to describe what to clean up
072     *
073     * @return the number of removed entries
074     *
075     * @throws CmsDataAccessException if something goes wrong
076     */
077    int cleanupPublishHistory(CmsDbContext dbc, CmsPublishHistoryCleanupFilter filter) throws CmsDataAccessException;
078
079    /**
080     * Creates a new project.<p>
081     *
082     * @param dbc the current database context
083     * @param id the project id
084     * @param owner the owner of the project
085     * @param group the group for the project
086     * @param managergroup the manager group for the project
087     * @param name the name of the project to create
088     * @param description the description for the project
089     * @param flags the flags for the project
090     * @param type the type for the project
091     *
092     * @return the created <code>{@link CmsProject}</code> instance
093     *
094     * @throws CmsDataAccessException if something goes wrong
095     */
096    CmsProject createProject(
097        CmsDbContext dbc,
098        CmsUUID id,
099        CmsUser owner,
100        CmsGroup group,
101        CmsGroup managergroup,
102        String name,
103        String description,
104        int flags,
105        CmsProjectType type)
106    throws CmsDataAccessException;
107
108    /**
109     * Creates a new projectResource from a given CmsResource object.<p>
110     *
111     * @param dbc the current database context
112     * @param projectId The project in which the resource will be used
113     * @param resourceName The resource to be written to the Cms
114     *
115     * @throws CmsDataAccessException if something goes wrong
116     */
117    void createProjectResource(CmsDbContext dbc, CmsUUID projectId, String resourceName) throws CmsDataAccessException;
118
119    /**
120     * Inserts an entry for a publish job .<p>
121     *
122     * @param dbc the current database context
123     * @param publishJob the publish job data
124     *
125     * @throws CmsDataAccessException if something goes wrong
126     */
127    void createPublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsDataAccessException;
128
129    /**
130     * Deletes all entries in the published resource table.<p>
131     *
132     * @param dbc the current database context
133     * @param linkType the type of resource deleted (0= non-paramter, 1=parameter)
134     *
135     * @throws CmsDataAccessException if something goes wrong
136     */
137    void deleteAllStaticExportPublishedResources(CmsDbContext dbc, int linkType) throws CmsDataAccessException;
138
139    /**
140     * Deletes log entries matching the given filter.<p>
141     *
142     * @param dbc the database context
143     * @param filter the log entry filter
144     *
145     * @throws CmsDataAccessException if something goes wrong
146     */
147    void deleteLog(CmsDbContext dbc, CmsLogFilter filter) throws CmsDataAccessException;
148
149    /**
150     * Deletes a project from the cms.<p>
151     *
152     * Therefore it deletes all files, resources and properties.
153     *
154     * @param dbc the current database context
155     * @param project the project to delete
156     * @throws CmsDataAccessException if something goes wrong
157     */
158    void deleteProject(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException;
159
160    /**
161     * Delete a projectResource from an given CmsResource object.<p>
162     *
163     * @param dbc the current database context
164     * @param projectId id of the project in which the resource is used
165     * @param resourceName name of the resource to be deleted from the Cms
166     *
167     * @throws CmsDataAccessException if something goes wrong
168     */
169    void deleteProjectResource(CmsDbContext dbc, CmsUUID projectId, String resourceName) throws CmsDataAccessException;
170
171    /**
172     * Deletes a specified project.<p>
173     *
174     * @param dbc the current database context
175     * @param project the project to be deleted
176     *
177     * @throws CmsDataAccessException if operation was not succesful
178     */
179    void deleteProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException;
180
181    /**
182     * Deletes all publish history entries with publish tags >=0 and < the specified max. publish tag.<p>
183     *
184     * @param dbc the current database context
185     * @param projectId the ID of the current project
186     * @param maxPublishTag entries with publish tags >=0 and < this max. publish tag get deleted
187     *
188     * @throws CmsDataAccessException if something goes wrong
189     */
190    void deletePublishHistory(CmsDbContext dbc, CmsUUID projectId, int maxPublishTag) throws CmsDataAccessException;
191
192    /**
193     * Deletes a publish history entry with publish tags >=0 and < the specified max. publish tag.<p>
194     *
195     * @param dbc the current database context
196     * @param publishHistoryId the id of the history to delete the entry from
197     * @param publishResource the entry to delete
198     *
199     * @throws CmsDataAccessException if something goes wrong
200     */
201    void deletePublishHistoryEntry(CmsDbContext dbc, CmsUUID publishHistoryId, CmsPublishedResource publishResource)
202    throws CmsDataAccessException;
203
204    /**
205     * Deletes a publish job identified by its history id.<p>
206     *
207     * @param dbc the current database context
208     * @param publishHistoryId the history id identifying the publish job
209     * @throws CmsDataAccessException if something goes wrong
210     */
211    void deletePublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException;
212
213    /**
214     * Deletes the publish list assigned to a publish job.<p>
215     *
216     * @param dbc the current database context
217     * @param publishHistoryId the history id identifying the publish job
218     * @throws CmsDataAccessException if something goes wrong
219     */
220    void deletePublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException;
221
222    /**
223     * Deletes an entry in the published resource table.<p>
224     *
225     * @param dbc the current database context
226     * @param resourceName The name of the resource to be deleted in the static export
227     * @param linkType the type of resource deleted (0= non-paramter, 1=parameter)
228     * @param linkParameter the parameters of the resource
229     *
230     * @throws CmsDataAccessException if something goes wrong
231     */
232    void deleteStaticExportPublishedResource(CmsDbContext dbc, String resourceName, int linkType, String linkParameter)
233    throws CmsDataAccessException;
234
235    /**
236     * Deletes multiple publish list entries from the database.<p>
237     *
238     * @param dbc the current database context
239     * @param publishListDeletions the publish list entries to remove from the database
240     * @throws CmsDataAccessException if something goes wrong
241     */
242    void deleteUserPublishListEntries(CmsDbContext dbc, List<CmsUserPublishListEntry> publishListDeletions)
243    throws CmsDataAccessException;
244
245    /**
246     * Destroys this driver.<p>
247     *
248     * @throws Throwable if something goes wrong
249     */
250    void destroy() throws Throwable;
251
252    /**
253     * Fills the OpenCms database tables with default values.<p>
254     *
255     * @param dbc the current database context
256     *
257     * @throws CmsDataAccessException if something goes wrong
258     */
259    void fillDefaults(CmsDbContext dbc) throws CmsDataAccessException;
260
261    /**
262     * Returns the SqlManager of this driver.<p>
263     *
264     * @return the SqlManager of this driver
265     */
266    CmsSqlManager getSqlManager();
267
268    /**
269     * Returns the given user's publish list.<p>
270     *
271     * @param dbc the database context
272     * @param userId the user's id
273     *
274     * @return the given user's publish list
275     *
276     * @throws CmsDataAccessException if something goes wrong
277     */
278    List<CmsResource> getUsersPubList(CmsDbContext dbc, CmsUUID userId) throws CmsDataAccessException;
279
280    /**
281     * Initializes the SQL manager for this driver.<p>
282     *
283     * To obtain JDBC connections from different pools, further
284     * {online|offline|history} pool Urls have to be specified.<p>
285     *
286     * @param classname the classname of the SQL manager
287     *
288     * @return the SQL manager for this driver
289     */
290    CmsSqlManager initSqlManager(String classname);
291
292    /**
293     * Logs the given log entries.<p>
294     *
295     * @param dbc the database context
296     * @param logEntries the log entries to write
297     *
298     * @throws CmsDataAccessException if something goes wrong
299     */
300    void log(CmsDbContext dbc, List<CmsLogEntry> logEntries) throws CmsDataAccessException;
301
302    /**
303     * Publishes a deleted folder.<p>
304     *
305     * @param dbc the current database context
306     * @param report the report to log the output to
307     * @param m the number of the folder to publish
308     * @param n the number of all folders to publish
309     * @param onlineProject the online project
310     * @param offlineFolder the offline folder to publish
311     * @param publishHistoryId the publish history id
312     * @param publishTag the publish tag
313     *
314     * @throws CmsDataAccessException if something goes wrong
315     */
316    void publishDeletedFolder(
317        CmsDbContext dbc,
318        I_CmsReport report,
319        int m,
320        int n,
321        CmsProject onlineProject,
322        CmsFolder offlineFolder,
323        CmsUUID publishHistoryId,
324        int publishTag)
325    throws CmsDataAccessException;
326
327    /**
328     * Publishes a new, changed or deleted file.<p>
329     *
330     * @param dbc the current database context
331     * @param report the report to log the output to
332     * @param m the number of the file to publish
333     * @param n the number of all files to publish
334     * @param onlineProject the online project
335     * @param offlineResource the offline file to publish
336     * @param publishedContentIds contains the UUIDs of already published content records
337     * @param publishHistoryId the publish history id
338     * @param publishTag the publish tag
339     *
340     * @throws CmsDataAccessException if something goes wrong
341     */
342    void publishFile(
343        CmsDbContext dbc,
344        I_CmsReport report,
345        int m,
346        int n,
347        CmsProject onlineProject,
348        CmsResource offlineResource,
349        Set<CmsUUID> publishedContentIds,
350        CmsUUID publishHistoryId,
351        int publishTag)
352    throws CmsDataAccessException;
353
354    /**
355     * Publishes the content record of a file.<p>
356     *
357     * The content record is only published unless it's UUID is not contained in publishedContentIds.
358     * The calling method has to take care about whether an existing content record has to be deleted
359     * before or not.<p>
360     *
361     * The intention of this method is to get overloaded in a project driver
362     * for a specific DB server to shift the binary content from the offline into the online table
363     * in a more sophisticated way than in the generic ANSI-SQL implementation of this interface.
364     *
365     * @param dbc the current database context
366     * @param offlineProject the offline project to read data
367     * @param onlineProject the online project to write data
368     * @param offlineFileHeader the offline header of the file of which the content gets published
369     * @param publishedResourceIds a Set with the UUIDs of the already published content records
370     * @param needToUpdateContent <code>true</code> if the content record has to be updated
371     * @param publishTag the publish tag
372     *
373     * @return the published file (online)
374     *
375     * @throws CmsDataAccessException if something goes wrong
376     */
377    CmsFile publishFileContent(
378        CmsDbContext dbc,
379        CmsProject offlineProject,
380        CmsProject onlineProject,
381        CmsResource offlineFileHeader,
382        Set<CmsUUID> publishedResourceIds,
383        boolean needToUpdateContent,
384        int publishTag)
385    throws CmsDataAccessException;
386
387    /**
388     * Publishes a new or changed folder.<p>
389     *
390     * @param dbc the current database context
391     * @param report the report to log the output to
392     * @param m the number of the folder to publish
393     * @param n the number of all folders to publish
394     * @param onlineProject the online project
395     * @param currentFolder the offline folder to publish
396     * @param publishHistoryId the publish history id
397     * @param publishTag the publish tag
398     *
399     * @throws CmsDataAccessException if something goes wrong
400     */
401    void publishFolder(
402        CmsDbContext dbc,
403        I_CmsReport report,
404        int m,
405        int n,
406        CmsProject onlineProject,
407        CmsFolder currentFolder,
408        CmsUUID publishHistoryId,
409        int publishTag)
410    throws CmsDataAccessException;
411
412    /**
413     * Publishes a specified project to the online project.<p>
414     *
415     * @param dbc the current database context
416     * @param report an I_CmsReport instance to print output messages
417     * @param onlineProject the online project
418     * @param publishList a Cms publish list
419     * @param publishTag the publish tag
420     *
421     * @throws CmsException if something goes wrong
422     */
423    void publishProject(
424        CmsDbContext dbc,
425        I_CmsReport report,
426        CmsProject onlineProject,
427        CmsPublishList publishList,
428        int publishTag)
429    throws CmsException;
430
431    /**
432     * Reads the <code>{@link List}&lt{@link org.opencms.lock.CmsLock};&gt; </code>
433     * that were saved to the database in the previous run of OpenCms.<p>
434     *
435     * @param dbc the current database context
436     *
437     * @return the <code>{@link List}&lt{@link org.opencms.lock.CmsLock};&gt; </code>
438     *      that were saved to the database in the previous run of OpenCms.
439     *
440     * @throws CmsDataAccessException if something goes wrong
441     */
442    List<CmsLock> readLocks(CmsDbContext dbc) throws CmsDataAccessException;
443
444    /**
445     * Reads log entries matching the given filter.<p>
446     *
447     * @param dbc the database context
448     * @param filter the log entry filter
449     *
450     * @return the list of log entries
451     *
452     * @throws CmsDataAccessException if something goes wrong
453     */
454    List<CmsLogEntry> readLog(CmsDbContext dbc, CmsLogFilter filter) throws CmsDataAccessException;
455
456    /**
457     * Reads a project given the projects id.<p>
458     *
459     * @param dbc the current database context
460     * @param id the id of the project
461     *
462     * @return the project read
463     *
464     * @throws CmsDataAccessException if something goes wrong
465     */
466    CmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException;
467
468    /**
469     * Reads a project.<p>
470     *
471     * @param dbc the current database context
472     * @param name the name of the project
473     *
474     * @return the project with the given name
475     * @throws CmsDataAccessException if something goes wrong
476     */
477    CmsProject readProject(CmsDbContext dbc, String name) throws CmsDataAccessException;
478
479    /**
480     * Reads the project resource path for a given project and resource path,
481     * to validate if a resource path for a given project already exists.<p>
482     *
483     * @param dbc the current database context
484     * @param projectId the ID of the project for which the resource path is read
485     * @param resourcename the project's resource path
486     *
487     * @return String the project's resource path
488     * @throws CmsDataAccessException if something goes wrong
489     */
490    String readProjectResource(CmsDbContext dbc, CmsUUID projectId, String resourcename) throws CmsDataAccessException;
491
492    /**
493     * Reads the project resources for a specified project.<p>
494     *
495     * @param dbc the current database context
496     * @param project the project for which the resource path is read
497     *
498     * @return a list of all project resource paths
499     *
500     * @throws CmsDataAccessException if something goes wrong
501     */
502    List<String> readProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException;
503
504    /**
505     * Returns all projects in the given organizational unit.<p>
506     *
507     * @param dbc the current database context
508     * @param ouFqn the fully qualified name of the organizational unit to get the projects for
509     *
510     * @return a list of objects of type <code>{@link CmsProject}</code>
511     *
512     * @throws CmsDataAccessException if something goes wrong
513     */
514    List<CmsProject> readProjects(CmsDbContext dbc, String ouFqn) throws CmsDataAccessException;
515
516    /**
517     * Returns all projects, which are accessible by a group.<p>
518     *
519     * @param dbc the current database context
520     * @param group the requesting group
521     *
522     * @return a Vector of projects
523     * @throws CmsDataAccessException if something goes wrong
524     */
525    List<CmsProject> readProjectsForGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException;
526
527    /**
528     * Returns all projects, which are manageable by a group.<p>
529     *
530     * @param dbc the current database context
531     * @param group The requesting group
532     * @return a Vector of projects
533     *
534     * @throws CmsDataAccessException if something goes wrong
535     */
536    List<CmsProject> readProjectsForManagerGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException;
537
538    /**
539     * Reads all projects which are owned by a specified user.<p>
540     *
541     * @param dbc the current database context
542     * @param user the user
543     *
544     * @return a list of objects of type <code>{@link CmsProject}</code>
545     *
546     * @throws CmsDataAccessException if something goes wrong
547     */
548    List<CmsProject> readProjectsForUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException;
549
550    /**
551     * Reads the resources that were published during a publish process for a given publish history ID.<p>
552     *
553     * @param dbc the current database context
554     * @param publishHistoryId unique int ID to identify the publish process in the publish history
555     *
556     * @return a list of <code>{@link org.opencms.db.CmsPublishedResource}</code> objects
557     *
558     * @throws CmsDataAccessException if something goes wrong
559     */
560    List<org.opencms.db.CmsPublishedResource> readPublishedResources(CmsDbContext dbc, CmsUUID publishHistoryId)
561    throws CmsDataAccessException;
562
563    /**
564     * Reads a single publish job identified by its publish history id.<p>
565     *
566     * @param dbc the current database context
567     * @param publishHistoryId unique id to identify the publish job in the publish history
568     * @return an object of type <code>{@link CmsPublishJobInfoBean}</code>
569     *
570     * @throws CmsDataAccessException if something goes wrong
571     */
572    CmsPublishJobInfoBean readPublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException;
573
574    /**
575     * Reads all publish jobs finished in the given time range.<p>
576     * If <code>(0L, 0L)</code> is passed as time range, all pending jobs are returned.
577     *
578     * @param dbc the current database context
579     * @param startTime the start of the time range for finish time
580     * @param endTime the end of the time range for finish time
581     * @return a list of objects of type <code>{@link CmsPublishJobInfoBean}</code>
582     *
583     * @throws CmsDataAccessException if something goes wrong
584     */
585    List<CmsPublishJobInfoBean> readPublishJobs(CmsDbContext dbc, long startTime, long endTime)
586    throws CmsDataAccessException;
587
588    /**
589     * Reads the publish list assigned to a publish job.<p>
590     *
591     * @param dbc the current database context
592     * @param publishHistoryId the history id identifying the publish job
593     * @return the assigned publish list
594     * @throws CmsDataAccessException if something goes wrong
595     */
596    CmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException;
597
598    /**
599     * Reads the publish report assigned to a publish job.<p>
600     *
601     * @param dbc the current database context
602     * @param publishHistoryId the history id identifying the publish job
603     * @return the content of the assigned publish report
604     * @throws CmsDataAccessException if something goes wrong
605     */
606    byte[] readPublishReportContents(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException;
607
608    /**
609     * Returns the parameters of a resource in the table of all published template resources.<p>
610     *
611     * @param dbc the current database context
612     * @param rfsName the rfs name of the resource
613     *
614     * @return the paramter string of the requested resource
615     *
616     * @throws CmsDataAccessException if something goes wrong
617     */
618    String readStaticExportPublishedResourceParameters(CmsDbContext dbc, String rfsName) throws CmsDataAccessException;
619
620    /**
621     * Returns a list of all template resources which must be processed during a static export.<p>
622     *
623     * @param dbc the current database context
624     * @param parameterResources flag for reading resources with parameters (1) or without (0)
625     * @param timestamp the time stamp information
626     *
627     * @return a list of template resources as <code>{@link String}</code> objects
628     *
629     * @throws CmsDataAccessException if something goes wrong
630     */
631    List<String> readStaticExportResources(CmsDbContext dbc, int parameterResources, long timestamp)
632    throws CmsDataAccessException;
633
634    /**
635     * Sets the driver manager for this driver if possible.<p>
636     *
637     * @param driverManager the new driver manager
638     */
639    void setDriverManager(CmsDriverManager driverManager);
640
641    /**
642     * Sets the SQL manager for this driver if possible.<p>
643     *
644     * @param sqlManager the new SQL manager
645     */
646    void setSqlManager(CmsSqlManager sqlManager);
647
648    /**
649     * Removes the project id from all resources within a project.<p>
650     *
651     * This must be done when a project will deleted
652     *
653     * @param dbc the current database context
654     * @param project the project to delete
655     * @throws CmsDataAccessException if something goes wrong
656     */
657    void unmarkProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException;
658
659    /**
660     * Writes the <code>{@link List}&lt{@link org.opencms.lock.CmsLock};&gt; </code>
661     * to the database for reuse in the next run of OpenCms.<p>
662     *
663     * This method must only be called at startup or the in-memory locking will overwritten.<p>
664     *
665     * @param dbc the current database context
666     *
667     * @param locks the <code>{@link List}&lt{@link org.opencms.lock.CmsLock};&gt;</code> that
668     *      currently exist in OpenCms ({@link org.opencms.lock.CmsLockManager})
669     *
670     * @throws CmsDataAccessException if something goes wrong
671     */
672    void writeLocks(CmsDbContext dbc, List<CmsLock> locks) throws CmsDataAccessException;
673
674    /**
675     * Writes an already existing project.<p>
676     *
677     * The project id has to be a valid OpenCms project id.<br>
678     *
679     * The project with the given id will be completely overriden
680     * by the given data.<p>
681     *
682     * @param dbc the current database context
683     * @param project the project that should be written
684     *
685     * @throws CmsDataAccessException if operation was not successful
686     */
687    void writeProject(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException;
688
689    /**
690     * Inserts an entry in the publish history for a published VFS resource.<p>
691     *
692     * @param dbc the current database context
693     * @param publishId the ID of the current publishing process
694     * @param resource the state of the resource *before* it was published
695     *
696     * @throws CmsDataAccessException if something goes wrong
697     */
698    void writePublishHistory(CmsDbContext dbc, CmsUUID publishId, CmsPublishedResource resource)
699    throws CmsDataAccessException;
700
701    /**
702     * Writes a publish job.<p>
703     *
704     * @param dbc the current database context
705     * @param publishJob the publish job to write
706     * @throws CmsDataAccessException if something goes wrong
707     */
708    void writePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsDataAccessException;
709
710    /**
711     * Writes a publish report for a publish job.<p>
712     *
713     * @param dbc the current database context
714     * @param publishId the ID of the current publishing process
715     * @param content the report output
716     * @throws CmsDataAccessException if something goes wrong
717     */
718    void writePublishReport(CmsDbContext dbc, CmsUUID publishId, byte[] content) throws CmsDataAccessException;
719
720    /**
721     * Inserts an entry in the published resource table.<p>
722     *
723     * This is done during static export.<p>
724     *
725     * @param dbc the current database context
726     * @param resourceName The name of the resource to be added to the static export
727     * @param linkType the type of resource exported (0= non-paramter, 1=parameter)
728     * @param linkParameter the parameters added to the resource
729     * @param timestamp a timestamp for writing the data into the db
730     *
731     * @throws CmsDataAccessException if something goes wrong
732     */
733    void writeStaticExportPublishedResource(
734        CmsDbContext dbc,
735        String resourceName,
736        int linkType,
737        String linkParameter,
738        long timestamp)
739    throws CmsDataAccessException;
740
741    /**
742     * Writes multiple user publish list entries to the database.<p>
743     *
744     * @param dbc the current database context
745     * @param publishListAdditions the user publish list entries to write
746     * @throws CmsDataAccessException if something goes wrong
747     */
748    void writeUserPublishListEntries(CmsDbContext dbc, List<CmsUserPublishListEntry> publishListAdditions)
749    throws CmsDataAccessException;
750}