Class JCRLocalDropboxDrive.Connect

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected DropboxAPI api
      The api.
      • Fields inherited from interface org.exoplatform.services.cms.clouddrives.CloudDrive.Command

        COMPLETE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Connect()
      Instantiates a new connect.
    • Constructor Detail

      • Connect

        protected Connect()
                   throws javax.jcr.RepositoryException,
                          org.exoplatform.services.cms.clouddrives.DriveRemovedException
        Instantiates a new connect.
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.DriveRemovedException - the drive removed exception
    • Method Detail

      • fetchFiles

        protected void fetchFiles()
                           throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                  javax.jcr.RepositoryException
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
      • execLocal

        protected void execLocal()
                          throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                 javax.jcr.RepositoryException
        Execute Connect from current thread.
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
        javax.jcr.RepositoryException - the repository exception
      • apply

        public void apply​(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile local)
                   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).
        Specified by:
        apply in interface JCRLocalDropboxDrive.Changes
        Parameters:
        local - JCRLocalCloudFile changed file
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • undo

        public void undo​(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile local)
                  throws javax.jcr.RepositoryException,
                         org.exoplatform.services.cms.clouddrives.CloudDriveException
        Undo locally applied file or remove existing.
        Specified by:
        undo in interface JCRLocalDropboxDrive.Changes
        Parameters:
        local - the changed file
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • canApply

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