⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i_cmsprojectdriver.java

📁 cms是开源的框架
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 * File   : $Source: /usr/local/cvs/opencms/src/org/opencms/db/I_CmsProjectDriver.java,v $
 * Date   : $Date: 2006/03/27 14:52:27 $
 * Version: $Revision: 1.76 $
 *
 * This library is part of OpenCms -
 * the Open Source Content Mananagement System
 *
 * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * For further information about Alkacon Software GmbH, please see the
 * company website: http://www.alkacon.com
 *
 * For further information about OpenCms, please see the
 * project website: http://www.opencms.org
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package org.opencms.db;

import org.opencms.db.generic.CmsSqlManager;
import org.opencms.file.CmsDataAccessException;
import org.opencms.file.CmsFile;
import org.opencms.file.CmsFolder;
import org.opencms.file.CmsGroup;
import org.opencms.file.CmsProject;
import org.opencms.file.CmsResource;
import org.opencms.file.CmsUser;
import org.opencms.main.CmsException;
import org.opencms.report.I_CmsReport;
import org.opencms.util.CmsUUID;
import org.opencms.workflow.CmsTask;

import java.util.List;
import java.util.Set;

/**
 * Definitions of all required project driver methods. <p>
 * 
 * @author Thomas Weckert 
 * @author Michael Emmerich 
 * 
 * @version $Revision: 1.76 $
 * 
 * @since 6.0.0 
 */
public interface I_CmsProjectDriver {

    /** The type ID to identify project driver implementations. */
    int DRIVER_TYPE_ID = 1;

    /** The name of the temp file project. */
    String TEMP_FILE_PROJECT_NAME = "tempFileProject";

    /**
     * Creates a new project.<p>
     * 
     * @param dbc the current database context
     * @param owner the owner of the project
     * @param group the group for the project
     * @param managergroup the managergroup for the project
     * @param task the base workflow task for the project
     * @param name the name of the project to create
     * @param description the description for the project
     * @param flags the flags for the project
     * @param type the type for the project
     * @param reservedParam reserved optional parameter, should be <code>null</code> on standard OpenCms installations
     * 
     * @return the created <code>{@link CmsProject}</code> instance
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsProject createProject(
        CmsDbContext dbc,
        CmsUser owner,
        CmsGroup group,
        CmsGroup managergroup,
        CmsTask task,
        String name,
        String description,
        int flags,
        int type,
        Object reservedParam) throws CmsDataAccessException;

    /**
     * Creates a new projectResource from a given CmsResource object.<p>
     *
     * @param dbc the current database context
     * @param projectId The project in which the resource will be used
     * @param resourceName The resource to be written to the Cms
     * @param reservedParam reserved optional parameter, should be null on standard OpenCms installations
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void createProjectResource(CmsDbContext dbc, int projectId, String resourceName, Object reservedParam)
    throws CmsDataAccessException;

    /**
     * Deletes all entries in the published resource table.<p>
     * 
     * @param dbc the current database context
     * @param currentProject the current project
     * @param linkType the type of resource deleted (0= non-paramter, 1=parameter)
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void deleteAllStaticExportPublishedResources(CmsDbContext dbc, CmsProject currentProject, int linkType)
    throws CmsDataAccessException;

    /**
     * Deletes a project from the cms.<p>
     * 
     * Therefore it deletes all files, resources and properties.
     * 
     * @param dbc the current database context
     * @param project the project to delete
     * @throws CmsDataAccessException if something goes wrong
     */
    void deleteProject(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException;

    /**
     * Delete a projectResource from an given CmsResource object.<p>
     *
     * @param dbc the current database context
     * @param projectId id of the project in which the resource is used
     * @param resourceName name of the resource to be deleted from the Cms
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void deleteProjectResource(CmsDbContext dbc, int projectId, String resourceName) throws CmsDataAccessException;

    /**
     * Deletes a specified project.<p>
     * 
     * @param dbc the current database context
     * @param project the project to be deleted
     *
     * @throws CmsDataAccessException if operation was not succesful
     */
    void deleteProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException;

    /**
     * Deletes all publish history entries with backup tag IDs >=0 and < the specified max. backup tag ID.<p>
     * 
     * @param dbc the current database context
     * @param projectId the ID of the current project
     * @param maxBackupTagId entries with backup tag IDs >=0 and < this max. backup tag ID get deleted
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void deletePublishHistory(CmsDbContext dbc, int projectId, int maxBackupTagId) throws CmsDataAccessException;

    /**
     * Deletes a publish history entry with backup tag IDs >=0 and < the specified max. backup tag ID.<p>
     * 
     * @param dbc the current database context
     * @param projectId the ID of the current project
     * @param publishHistoryId the id of the history to delete the entry from
     * @param publishResource the entry to delete
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void deletePublishHistoryEntry(
        CmsDbContext dbc,
        int projectId,
        CmsUUID publishHistoryId,
        CmsPublishedResource publishResource) throws CmsDataAccessException;

    /**
     * Deletes an entry in the published resource table.<p>
     * 
     * @param dbc the current database context
     * @param currentProject the current project
     * @param resourceName The name of the resource to be deleted in the static export
     * @param linkType the type of resource deleted (0= non-paramter, 1=parameter)
     * @param linkParameter the parameters of the resource
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void deleteStaticExportPublishedResource(
        CmsDbContext dbc,
        CmsProject currentProject,
        String resourceName,
        int linkType,
        String linkParameter) throws CmsDataAccessException;

    /**
     * Destroys this driver.<p>
     * 
     * @throws Throwable if something goes wrong
     */
    void destroy() throws Throwable;

    /**
     * Fills the OpenCms database tables with default values.<p>
     * 
     * @param dbc the current database context
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void fillDefaults(CmsDbContext dbc) throws CmsDataAccessException;

    /**
     * Returns the SqlManager of this driver.<p>
     * 
     * @return the SqlManager of this driver
     */
    CmsSqlManager getSqlManager();

    /**
     * Initializes the SQL manager for this driver.<p>
     * 
     * To obtain JDBC connections from different pools, further 
     * {online|offline|backup} pool Urls have to be specified.<p>
     * 
     * @param classname the classname of the SQL manager
     * 
     * @return the SQL manager for this driver
     */
    org.opencms.db.generic.CmsSqlManager initSqlManager(String classname);

    /**
     * Publishes a deleted folder.<p>
     * 
     * @param dbc the current database context
     * @param report the report to log the output to
     * @param m the number of the folder to publish
     * @param n the number of all folders to publish
     * @param onlineProject the online project
     * @param offlineFolder the offline folder to publish
     * @param backupEnabled flag if backup is enabled
     * @param publishDate the publishing date
     * @param publishHistoryId the publish history id
     * @param backupTagId the backup tag id
     * @param maxVersions the maxmum number of backup versions for each resource
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void publishDeletedFolder(
        CmsDbContext dbc,
        I_CmsReport report,
        int m,
        int n,
        CmsProject onlineProject,
        CmsFolder offlineFolder,
        boolean backupEnabled,
        long publishDate,
        CmsUUID publishHistoryId,
        int backupTagId,
        int maxVersions) throws CmsDataAccessException;

    /**
     * Publishes a new, changed or deleted file.<p>
     * 
     * @param dbc the current database context
     * @param report the report to log the output to
     * @param m the number of the file to publish
     * @param n the number of all files to publish
     * @param onlineProject the online project
     * @param offlineResource the offline file to publish
     * @param publishedContentIds contains the UUIDs of already published content records
     * @param backupEnabled flag if backup is enabled
     * @param publishDate the publishing date
     * @param publishHistoryId the publish history id
     * @param backupTagId the backup tag id
     * @param maxVersions the maxmum number of backup versions for each resource
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void publishFile(
        CmsDbContext dbc,
        I_CmsReport report,
        int m,
        int n,
        CmsProject onlineProject,
        CmsResource offlineResource,
        Set publishedContentIds,
        boolean backupEnabled,
        long publishDate,
        CmsUUID publishHistoryId,
        int backupTagId,
        int maxVersions) throws CmsDataAccessException;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -