Interface JCRLocalDropboxDrive.Changes

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void apply​(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile changedFile)
      Process locally applied file (it can be any extra operations including the gathering of effected files/stats or chunk saving in JCR).
      default boolean canApply​(String parentId, String fileId)
      Answers if given file ID under its parent (by ID) already applied locally.
      default boolean removed​(String path)
      Adds the removed path to the scope of changes.
      default void undo​(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile changedFile)
      Undo locally applied file or remove existing.
    • Method Detail

      • apply

        default void apply​(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile changedFile)
                    throws javax.jcr.RepositoryException,
                           org.exoplatform.services.cms.clouddrives.CloudDriveException
        Process locally applied file (it can be any extra operations including the gathering of effected files/stats or chunk saving in JCR).
        Parameters:
        changedFile - JCRLocalCloudFile changed file
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • undo

        default void undo​(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile changedFile)
                   throws javax.jcr.RepositoryException,
                          org.exoplatform.services.cms.clouddrives.CloudDriveException
        Undo locally applied file or remove existing.
        Parameters:
        changedFile - the changed file
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • removed

        default boolean removed​(String path)
                         throws javax.jcr.RepositoryException,
                                org.exoplatform.services.cms.clouddrives.CloudDriveException
        Adds the removed path to the scope of changes. For a command JCRLocalCloudDrive.AbstractCommand it effectively should add the path to its removed list.
        Parameters:
        path - the path
        Returns:
        true, if successful
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • canApply

        default boolean canApply​(String parentId,
                                 String fileId)
        Answers if given file ID under its parent (by ID) already applied locally.
        Parameters:
        parentId - String
        fileId - String
        Returns:
        boolean, true if file was already applied, false otherwise.