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

📄 i_cmsvfsdriver.java

📁 一个cms内容管理平台
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
     * @param endTime the end of the time range for the last modification date of matching resources or READ_IGNORE_TIME
     * @param releasedAfter the start of the time range for the release date of matching resources
     * @param releasedBefore the end of the time range for the release date of matching resources
     * @param expiredAfter the start of the time range for the expire date of matching resources
     * @param expiredBefore the end of the time range for the expire date of matching resources
     * @param mode additional mode flags:
     *  C_READMODE_INCLUDE_TREE 
     *  C_READMODE_EXCLUDE_TREE
     *  C_READMODE_INCLUDE_PROJECT
     *  C_READMODE_EXCLUDE_TYPE
     *  C_READMODE_EXCLUDE_STATE
     * 
     * @return a list of CmsResource objects matching the given criteria
     * @throws CmsDataAccessException if somethong goes wrong
     */
    List readResourceTree(
        CmsDbContext dbc,
        int projectId,
        String parent,
        int type,
        int state,
        long startTime,
        long endTime,
        long releasedAfter,
        long releasedBefore,
        long expiredAfter,
        long expiredBefore,
        int mode) throws CmsDataAccessException;
    
    /**
     * Reads all siblings that point to the resource record of a specified resource.<p>
     * 
     * @param dbc the current database context
     * @param currentProject the current project
     * @param resource the specified resource
     * @param includeDeleted <code>true</code> if deleted siblings should be included in the result list
     * 
     * @return a list of <code>{@link CmsResource}</code>s that 
     *          are siblings to the specified resource, 
     *          including the specified resource itself.
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    List readSiblings(CmsDbContext dbc, CmsProject currentProject, CmsResource resource, boolean includeDeleted)
    throws CmsDataAccessException;

    /**
     * Removes a file physically in the database.<p>
     * 
     * @param dbc the current database context
     * @param currentProject the current project
     * @param resource the resource
     * @param removeFileContent if true, the content record is also removed; if false, only the structure/resource records are removed
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void removeFile(CmsDbContext dbc, CmsProject currentProject, CmsResource resource, boolean removeFileContent)
    throws CmsDataAccessException;

    /**
     * Removes a folder physically in the database.<p>
     * 
     * @param dbc the current database context
     * @param currentProject the current project
     * @param resource the folder
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void removeFolder(CmsDbContext dbc, CmsProject currentProject, CmsResource resource) throws CmsDataAccessException;

    /**
     * Replaces the content and properties of an existing resource.<p>
     * @param dbc the current database context
     * @param newResource the new resource
     * @param newResourceContent the new content
     * @param newResourceType the resource type
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void replaceResource(CmsDbContext dbc, CmsResource newResource, byte[] newResourceContent, int newResourceType)
    throws CmsDataAccessException;

    /**
     * Transfers the attributes of a resource from to the given users.<p>
     * 
     * @param dbc the current database context
     * @param project the current project
     * @param resource the resource to modify
     * @param createdUser the id of the user to be set as the creator of the resource
     * @param lastModifiedUser the id of the user to be set as the las modificator of the resource
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void transferResource(
        CmsDbContext dbc,
        CmsProject project,
        CmsResource resource,
        CmsUUID createdUser,
        CmsUUID lastModifiedUser) throws CmsDataAccessException;

    /**
     * Validates if the specified resource ID in the tables of the specified project {offline|online} exists.<p>
     * 
     * @param dbc the current database context
     * @param projectId the project id
     * @param resourceId the resource id to test for
     * 
     * @return true if a resource with the given id was found, false otherweise
     * @throws CmsDataAccessException if something goes wrong
     */
    boolean validateResourceIdExists(CmsDbContext dbc, int projectId, CmsUUID resourceId) throws CmsDataAccessException;

    /**
     * Validates if the specified structure ID in the tables of the specified project {offline|online} exists.<p>
     * 
     * @param dbc the current database context
     * @param projectId the ID of current project
     * @param structureId the structure id
     * 
     * @return true, if the specified structure ID in the tables of the specified project {offline|online} exists
     * @throws CmsDataAccessException if something goes wrong
     */
    boolean validateStructureIdExists(CmsDbContext dbc, int projectId, CmsUUID structureId)
    throws CmsDataAccessException;

    /**
     * Writes the resource content with the specified content id.<p>
     * 
     * @param dbc the current database context
     * @param project the current project
     * @param resourceId the id of the resource used to identify the content to update
     * @param content the new content of the file
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void writeContent(CmsDbContext dbc, CmsProject project, CmsUUID resourceId, byte[] content)
    throws CmsDataAccessException;

    /**
     * Writes the "last-modified-in-project" ID of a resource.<p>
     * 
     * @param dbc the current database context
     * @param project the resource record is updated with the ID of this project
     * @param projectId the project id to write into the reource
     * @param resource the resource that gets updated
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void writeLastModifiedProjectId(CmsDbContext dbc, CmsProject project, int projectId, CmsResource resource)
    throws CmsDataAccessException;

    /**
     * Writes a property object to the database mapped to a specified resource.<p>
     * 
     * @param dbc the current database context
     * @param project the current project
     * @param resource the resource where the property should be attached to
     * @param property a CmsProperty object containing both the structure and resource value of the property
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void writePropertyObject(CmsDbContext dbc, CmsProject project, CmsResource resource, CmsProperty property)
    throws CmsDataAccessException;

    /**
     * Writes a list of property objects to the database mapped to a specified resource.<p>
     * 
     * @param dbc the current database context
     * @param project the current project
     * @param resource the resource where the property should be attached to
     * @param properties a list of CmsProperty objects
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void writePropertyObjects(CmsDbContext dbc, CmsProject project, CmsResource resource, List properties)
    throws CmsDataAccessException;

    /**
     * Writes the structure and/or resource record(s) of an existing file.<p>
     * 
     * Common usages of this method are saving the resource information
     * after creating, importing or restoring complete files
     * where all file header attribs are changed. Both the structure and resource 
     * records get written. Thus, using this method affects all siblings of
     * a resource! Use {@link #writeResourceState(CmsDbContext, CmsProject, CmsResource, int)}
     * instead if you just want to update the file state, e.g. of a single sibling.<p>
     * 
     * The file state is set to "changed", unless the current state is "new"
     * or "deleted". The "changed" argument allows to choose whether the structure 
     * or resource state, or none of them, is set to "changed".<p>
     * 
     * The rating of the file state values is as follows:<br>
     * unchanged &lt; changed &lt; new &lt; deleted<p>
     * 
     * Second, the "state" of the resource is the structure state, if the structure state
     * has a higher file state value than the resource state. Otherwise the file state is
     * the resource state.<p>
     * 
     * @param dbc the current database context
     * @param project the current project
     * @param resource the resource to be updated
     * @param changed determines whether the structure or resource state, or none of them, is set to "changed"
     * 
     * @throws CmsDataAccessException if something goes wrong
     * 
     * @see org.opencms.db.CmsDriverManager#UPDATE_RESOURCE_STATE
     * @see org.opencms.db.CmsDriverManager#UPDATE_STRUCTURE_STATE
     * @see org.opencms.db.CmsDriverManager#NOTHING_CHANGED
     * @see #writeResourceState(CmsDbContext, CmsProject, CmsResource, int)
     */
    void writeResource(CmsDbContext dbc, CmsProject project, CmsResource resource, int changed)
    throws CmsDataAccessException;

    /**
     * Writes file state in either the structure or resource record, or both of them.<p>
     * 
     * This method allows to change the resource state to any state by setting the
     * desired state value in the specified CmsResource instance.<p>
     * 
     * This method is frequently used while resources are published to set the file state
     * back to "unchanged".<p>
     * 
     * Only file state attribs. get updated here. Use {@link #writeResource(CmsDbContext, CmsProject, CmsResource, int)}
     * instead to write the complete file header.<p>
     * 
     * Please refer to the javadoc of {@link #writeResource(CmsDbContext, CmsProject, CmsResource, int)} to read
     * how setting resource state values affects the file state.<p>
     * 
     * @param dbc the current database context
     * @param project the current project
     * @param resource the resource to be updated
     * @param changed determines whether the structure or resource state, or none of them, is set to "changed"
     * 
     * @throws CmsDataAccessException if somethong goes wrong
     * 
     * @see org.opencms.db.CmsDriverManager#UPDATE_RESOURCE_STATE
     * @see org.opencms.db.CmsDriverManager#UPDATE_STRUCTURE_STATE
     * @see org.opencms.db.CmsDriverManager#UPDATE_ALL
     */
    void writeResourceState(CmsDbContext dbc, CmsProject project, CmsResource resource, int changed)
    throws CmsDataAccessException;
}

⌨️ 快捷键说明

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