Package org.wso2.carbon.deployment.synchronizer.internal

## Class DeploymentSynchronizerServiceImpl

- java.lang.Object
- - org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerServiceImpl

- All Implemented Interfaces:
    `org.wso2.carbon.core.deployment.DeploymentSynchronizer`, `DeploymentSynchronizerService`

      public class DeploymentSynchronizerServiceImpl
      extends Object
      implements DeploymentSynchronizerService, org.wso2.carbon.core.deployment.DeploymentSynchronizer

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DeploymentSynchronizerServiceImpl()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `checkout​(String filePath)` | Invoke the checkout operation on the specified repository
    `boolean` | `checkout​(String filePath, int depth)` | Deprecated.
    `boolean` | `commit​(int tenantId)` |
    `boolean` | `commit​(String filePath)` | Invoke the commit operation on the specified repository
    `boolean` | `commit​(String rootPath, String filePath)` | Invoke the commit operation on the specified repository at rootPath, with the given filePath to commit.
    `long` | `getLastCheckoutTime​(String filePath)` | Gets the time at which the checkout operation was last invoked on the given repository
    `long` | `getLastCommitTime​(String filePath)` | Gets the time at which the commit operation was last invoked on the given repository
    `boolean` | `isAutoCheckoutOn​(String filePath)` | Check whether auto checkout has been engaged on the specified repository
    `boolean` | `isAutoCommitOn​(String filePath)` | Check whether auto commit has been engaged on the specified repository
    `boolean` | `synchronizerExists​(String filePath)` | Checks whether a deployment synchronizer has been engaged on the specified path
    `boolean` | `update​(int tenantId)` |
    `boolean` | `update​(String rootPath, String filePath, int depth)` | Deprecated.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DeploymentSynchronizerServiceImpl

          public DeploymentSynchronizerServiceImpl()

  - ### Method Detail

    - #### synchronizerExists

          public boolean synchronizerExists​(String filePath)

      Description copied from interface: `DeploymentSynchronizerService`
      Checks whether a deployment synchronizer has been engaged on the specified path
      Specified by:
        `synchronizerExists` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `synchronizerExists` in interface `DeploymentSynchronizerService`
      Parameters:
        `filePath` - Location of the repository in file system
      Returns:
        true if a DeploymentSynchronizer instance has been created on the specified path

    - #### isAutoCommitOn

          public boolean isAutoCommitOn​(String filePath)
                                 throws DeploymentSynchronizerException

      Description copied from interface: `DeploymentSynchronizerService`
      Check whether auto commit has been engaged on the specified repository
      Specified by:
        `isAutoCommitOn` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `isAutoCommitOn` in interface `DeploymentSynchronizerService`
      Parameters:
        `filePath` - Location of the repository in file system
      Returns:
        true if auto commit is enabled on repository and false otherwise
      Throws:
        `DeploymentSynchronizerException` - if a deployment synchronizer does not exist for the specified path

    - #### isAutoCheckoutOn

          public boolean isAutoCheckoutOn​(String filePath)
                                   throws DeploymentSynchronizerException

      Description copied from interface: `DeploymentSynchronizerService`
      Check whether auto checkout has been engaged on the specified repository
      Specified by:
        `isAutoCheckoutOn` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `isAutoCheckoutOn` in interface `DeploymentSynchronizerService`
      Parameters:
        `filePath` - Location of the repository in file system
      Returns:
        true if auto checkout is enabled on repository and false otherwise
      Throws:
        `DeploymentSynchronizerException` - if a deployment synchronizer does not exist for the specified path

    - #### getLastCommitTime

          public long getLastCommitTime​(String filePath)
                                 throws DeploymentSynchronizerException

      Description copied from interface: `DeploymentSynchronizerService`
      Gets the time at which the commit operation was last invoked on the given repository
      Specified by:
        `getLastCommitTime` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `getLastCommitTime` in interface `DeploymentSynchronizerService`
      Parameters:
        `filePath` - Location of the repository in file system
      Returns:
        a long timestamp value
      Throws:
        `DeploymentSynchronizerException` - if a deployment synchronizer does not exist for the specified path

    - #### getLastCheckoutTime

          public long getLastCheckoutTime​(String filePath)
                                   throws DeploymentSynchronizerException

      Description copied from interface: `DeploymentSynchronizerService`
      Gets the time at which the checkout operation was last invoked on the given repository
      Specified by:
        `getLastCheckoutTime` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `getLastCheckoutTime` in interface `DeploymentSynchronizerService`
      Parameters:
        `filePath` - Location of the repository in file system
      Returns:
        a long timestamp value
      Throws:
        `DeploymentSynchronizerException` - if a deployment synchronizer does not exist for the specified path

    - #### update

          public boolean update​(int tenantId)

      Specified by:
        `update` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`

    - #### commit

          public boolean commit​(int tenantId)

      Specified by:
        `commit` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`

    - #### checkout

          public boolean checkout​(String filePath)
                           throws DeploymentSynchronizerException

      Description copied from interface: `DeploymentSynchronizerService`
      Invoke the checkout operation on the specified repository
      Specified by:
        `checkout` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `checkout` in interface `DeploymentSynchronizerService`
      Parameters:
        `filePath` - Location of the repository in file system
      Returns:
        true if files were checked out or updated, false otherwise
      Throws:
        `DeploymentSynchronizerException` - if a deployment synchronizer does not exist for the specified path

    - #### checkout

          @Deprecated
          public boolean checkout​(String filePath,
                                  int depth)
                           throws DeploymentSynchronizerException

      Deprecated.
      This method is deprecated. This was introduced to enable partial update. That feature has been removed. Users should use `checkout(String)` method.
      Specified by:
        `checkout` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `checkout` in interface `DeploymentSynchronizerService`
      Throws:
        `DeploymentSynchronizerException`

    - #### update

          @Deprecated
          public boolean update​(String rootPath,
                                String filePath,
                                int depth)
                         throws DeploymentSynchronizerException

      Deprecated.
      This method is deprecated. This was introduced to enable partial update. That feature has been removed. Users should use `checkout(String)` method.
      Specified by:
        `update` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `update` in interface `DeploymentSynchronizerService`
      Throws:
        `DeploymentSynchronizerException`

    - #### commit

          public boolean commit​(String filePath)
                         throws DeploymentSynchronizerException

      Description copied from interface: `DeploymentSynchronizerService`
      Invoke the commit operation on the specified repository
      Specified by:
        `commit` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `commit` in interface `DeploymentSynchronizerService`
      Parameters:
        `filePath` - Location of the repository in file system
      Returns:
        true if file changes were committed, false otherwise
      Throws:
        `DeploymentSynchronizerException` - if a deployment synchronizer does not exist for the specified path

    - #### commit

          public boolean commit​(String rootPath,
                                String filePath)
                         throws DeploymentSynchronizerException

      Description copied from interface: `DeploymentSynchronizerService`
      Invoke the commit operation on the specified repository at rootPath, with the given filePath to commit. This will only commit the filePath in the given repository.
      Specified by:
        `commit` in interface `org.wso2.carbon.core.deployment.DeploymentSynchronizer`
      Specified by:
        `commit` in interface `DeploymentSynchronizerService`
      Parameters:
        `rootPath` - repo path at which the dep synch is registered
        `filePath` - Location of the repository in file system
      Returns:
        rue if file changes were committed, false otherwise
      Throws:
        `DeploymentSynchronizerException` - if a deployment synchronizer does not exist for the specified path