i_cmsvfsdriver.java

来自「找了很久才找到到源代码」· Java 代码 · 共 866 行 · 第 1/3 页

JAVA
866
字号
     * @param projectId the Id of the project
     * @param source the resource to move
     * @param destinationPath the root path of the destination resource
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void moveResource(CmsDbContext dbc, CmsUUID projectId, CmsResource source, String destinationPath)
    throws CmsDataAccessException;

    /**
     * Publishes the structure and resource records of an 
     * offline resource into it's online counterpart.<p>
     * 
     * @param dbc the current database context
     * @param onlineProject the online project
     * @param onlineResource the online resource
     * @param offlineResource the offline resource
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void publishResource(
        CmsDbContext dbc,
        CmsProject onlineProject,
        CmsResource onlineResource,
        CmsResource offlineResource) throws CmsDataAccessException;

    /**
     * Copies the version number from the offline resource to the online resource,
     * this has to be done during publishing, direct after copying the resource itself.<p>
     * 
     * @param dbc the current database context
     * @param resource the resource that has been publish
     * @param firstSibling if this is the first sibling to be publish
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    void publishVersions(CmsDbContext dbc, CmsResource resource, boolean firstSibling) throws CmsDataAccessException;

    /**
     * Reads all child-files and/or child-folders of a specified parent resource.<p>
     * 
     * @param dbc the current database context
     * @param currentProject the current project
     * @param resource the parent folder
     * @param getFolders if true the child folders of the parent folder are returned in the result set
     * @param getFiles if true the child files of the parent folder are returned in the result set
     * 
     * @return a list of all sub folders or sub files
     * @throws CmsDataAccessException if something goes wrong
     */
    List readChildResources(
        CmsDbContext dbc,
        CmsProject currentProject,
        CmsResource resource,
        boolean getFolders,
        boolean getFiles) throws CmsDataAccessException;

    /**
     * Reads the content of a file specified by it's resource ID.<p>
     * 
     * @param dbc the current database context
     * @param projectId the ID of the current project
     * @param resourceId the id of the resource
     * 
     * @return the file content
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    byte[] readContent(CmsDbContext dbc, CmsUUID projectId, CmsUUID resourceId) throws CmsDataAccessException;

    /**
     * Reads a folder specified by it's structure ID.<p>
     *
     * @param dbc the current database context
     * @param projectId the project in which the resource will be used
     * @param folderId the structure id of the folder to be read
     * 
     * @return the read folder
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsFolder readFolder(CmsDbContext dbc, CmsUUID projectId, CmsUUID folderId) throws CmsDataAccessException;

    /**
     * Reads a folder specified by it's resource name.<p>
     * 
     * @param dbc the current database context
     * @param projectId the project in which the resource will be used
     * @param foldername the name of the folder to be read
     * 
     * @return the read folder
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsFolder readFolder(CmsDbContext dbc, CmsUUID projectId, String foldername) throws CmsDataAccessException;

    /**
     * Reads the parent folder of a resource specified by it's structure ID.<p>
     *
     * The parent folder for the root '/' is defined as <code>null</code>.<p>
     * 
     * @param dbc the current database context
     * @param projectId the project in which the resource will be used
     * @param structureId the id of the resource to read the parent folder for
     * 
     * @return the read folder, or <code>null</code>
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsFolder readParentFolder(CmsDbContext dbc, CmsUUID projectId, CmsUUID structureId) throws CmsDataAccessException;

    /**
     * Reads a property definition for the specified resource type.<p>
     * 
     * If no property definition with the given name is found, 
     * <code>null</code> is returned.<p>
     * 
     * @param dbc the current database context
     * @param name the name of the property definition to read
     * @param projectId the id of the project
     * 
     * @return the property definition that was read, 
     *          or <code>null</code> if there is no property definition with the given name.
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsPropertyDefinition readPropertyDefinition(CmsDbContext dbc, String name, CmsUUID projectId)
    throws CmsDataAccessException;

    /**
     * Reads all property definitions for the specified mapping type.<p>
     *
     * @param dbc the current database context
     * @param projectId the id of the project
     * 
     * @return a list with the <code>{@link CmsPropertyDefinition}</code> objects (may be empty)
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    List readPropertyDefinitions(CmsDbContext dbc, CmsUUID projectId) throws CmsDataAccessException;

    /**
     * Reads a property object from the database specified by it's key name mapped to a resource.<p>
     * 
     * The implementation must return {@link CmsProperty#getNullProperty()} if the property is not found.<p>
     * 
     * @param dbc the current database context
     * @param key the key of the property
     * @param project the current project
     * @param resource the resource where the property is attached to
     * 
     * @return a CmsProperty object containing both the structure and resource value of the property
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsProperty readPropertyObject(CmsDbContext dbc, String key, CmsProject project, CmsResource resource)
    throws CmsDataAccessException;

    /**
     * Reads all property objects mapped to a specified resource from the database.<p>
     * 
     * The implementation must return an empty list if no properties are found at all.<p>
     * 
     * @param dbc the current database context
     * @param project the current project
     * @param resource the resource where the property is attached to
     * 
     * @return a list with CmsProperty objects containing both the structure and resource value of the property
     * @throws CmsDataAccessException if something goes wrong
     */
    List readPropertyObjects(CmsDbContext dbc, CmsProject project, CmsResource resource) throws CmsDataAccessException;

    /**
     * Reads all relations with the given filter for the given resource.<p>
     * 
     * @param dbc the current database context
     * @param projectId the id of the project to execute the query in
     * @param resource the resource to read the relations for, may be <code>null</code> for all
     * @param filter the filter to restrict the relations to retrieve
     * 
     * @return the read relations
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    List readRelations(CmsDbContext dbc, CmsUUID projectId, CmsResource resource, CmsRelationFilter filter)
    throws CmsDataAccessException;

    /**
     * Reads a resource specified by it's structure ID.<p>
     * 
     * @param dbc the current database context
     * @param projectId the Id of the project
     * @param structureId the Id of the resource
     * @param includeDeleted true if already deleted files are included
     *
     * @return the resource that was read
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsResource readResource(CmsDbContext dbc, CmsUUID projectId, CmsUUID structureId, boolean includeDeleted)
    throws CmsDataAccessException;

    /**
     * Reads a resource specified by it's resource name.<p>
     * 
     * @param dbc the current database context
     * @param projectId the Id of the project in which the resource will be used
     * @param filename the name of the file
     * @param includeDeleted true if already deleted files are included
     * 
     * @return the resource that was read
     * @throws CmsDataAccessException if something goes wrong
     */
    CmsResource readResource(CmsDbContext dbc, CmsUUID projectId, String filename, boolean includeDeleted)
    throws CmsDataAccessException;

    /**
     * Reads all resources inside a given project and with a given state.<p>
     * 
     * @param dbc the current database context
     * @param currentProject the current project
     * @param state the state to match
     * @param mode flag signaling the read mode
     *  
     * @return a list with all resources that where read
     * @throws CmsDataAccessException if something goes wrong
     */
    List readResources(CmsDbContext dbc, CmsUUID currentProject, CmsResourceState state, int mode)
    throws CmsDataAccessException;

    /**
     * Returns all resources associated to a given principal via an ACE.<p> 
     * 
     * @param dbc the current database context
     * @param project the to read the entries from
     * @param principalId the id of the principal

     * @return a list of <code>{@link org.opencms.file.CmsResource}</code> objects
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    List readResourcesForPrincipalACE(CmsDbContext dbc, CmsProject project, CmsUUID principalId)
    throws CmsDataAccessException;

    /**
     * Returns all resources associated to a given principal through some of following attributes.<p> 
     * 
     * <ul>
     *    <li>User Created</li>
     *    <li>User Last Modified</li>
     * </ul><p>
     * 
     * @param dbc the current database context
     * @param project the to read the entries from
     * @param principalId the id of the principal

     * @return a list of <code>{@link org.opencms.file.CmsResource}</code> objects
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    List readResourcesForPrincipalAttr(CmsDbContext dbc, CmsProject project, CmsUUID principalId)
    throws CmsDataAccessException;

    /**
     * Reads all resources that have a value (containing the specified value) 
     * set for the specified property (definition), in the given path.<p>
     * 
     * Both individual and shared properties of a resource are checked.<p>
     *
     * If the <code>value</code> parameter is <code>null</code>, all resources having the
     * given property set are returned.<p>
     * 
     * @param dbc the current database context
     * @param projectId the id of the project
     * @param propertyDefinition the id of the property definition
     * @param path the folder to get the resources with the property from
     * @param value the string to search in the value of the property
     * 
     * @return a list of all <code>{@link CmsResource}</code> objects 
     *          that have a value set for the specified property.
     * 
     * @throws CmsDataAccessException if something goes wrong
     */
    List readResourcesWithProperty(
        CmsDbContext dbc,
        CmsUUID projectId,
        CmsUUID propertyDefinition,
        String path,
        String value) throws CmsDataAccessException;

    /**
     * Reads all resources inside a given project matching the criteria specified by parameter values.<p>

⌨️ 快捷键说明

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