Search in sources :

Example 1 with RSync

use of org.jboss.tools.openshift.core.server.RSync in project jbosstools-openshift by jbosstools.

the class OpenShiftEapModulesController method syncDown.

/**
 * RSyncs the pods to the local folder.
 *
 * @param monitor
 * @return
 * @throws CoreException
 */
private MultiStatus syncDown(IProgressMonitor monitor) throws CoreException {
    final RSync rsync = OpenShiftServerUtils.createRSync(getServer(), monitor);
    final File localDeploymentDirectory = new File(getDeploymentOptions().getDeploymentsRootFolder(true));
    return rsync.syncPodsToDirectory(localDeploymentDirectory, ServerConsoleModel.getDefault().getConsoleWriter());
}
Also used : RSync(org.jboss.tools.openshift.core.server.RSync) File(java.io.File)

Example 2 with RSync

use of org.jboss.tools.openshift.core.server.RSync in project jbosstools-openshift by jbosstools.

the class OpenShiftPublishController method syncPodsToDirectory.

protected void syncPodsToDirectory(final File localFolder, IProgressMonitor monitor) throws CoreException {
    RSync rsync = createRsync(getServer(), monitor);
    MultiStatus status = rsync.syncPodsToDirectory(localFolder, ServerConsoleModel.getDefault().getConsoleWriter());
    if (!status.isOK()) {
        throw new CoreException(status);
    }
}
Also used : CoreException(org.eclipse.core.runtime.CoreException) RSync(org.jboss.tools.openshift.core.server.RSync) MultiStatus(org.eclipse.core.runtime.MultiStatus)

Example 3 with RSync

use of org.jboss.tools.openshift.core.server.RSync in project jbosstools-openshift by jbosstools.

the class OpenShiftPublishController method syncDirectoryToPods.

protected void syncDirectoryToPods(final File localFolder, IProgressMonitor monitor) throws CoreException {
    RSync rsync = createRsync(getServer(), monitor);
    MultiStatus status = rsync.syncDirectoryToPods(localFolder, ServerConsoleModel.getDefault().getConsoleWriter());
    if (!status.isOK()) {
        throw new CoreException(status);
    }
}
Also used : CoreException(org.eclipse.core.runtime.CoreException) RSync(org.jboss.tools.openshift.core.server.RSync) MultiStatus(org.eclipse.core.runtime.MultiStatus)

Example 4 with RSync

use of org.jboss.tools.openshift.core.server.RSync in project jbosstools-openshift by jbosstools.

the class OpenShiftEapModulesController method syncUp.

/**
 * RSyncs the local folders to the pods.
 *
 * @param monitor
 * @return
 * @throws CoreException
 */
protected MultiStatus syncUp(IProgressMonitor monitor) throws CoreException {
    final RSync rsync = OpenShiftServerUtils.createRSync(getServer(), monitor);
    final File localDeploymentDirectory = new File(getDeploymentOptions().getDeploymentsRootFolder(true));
    return rsync.syncDirectoryToPods(localDeploymentDirectory, ServerConsoleModel.getDefault().getConsoleWriter());
}
Also used : RSync(org.jboss.tools.openshift.core.server.RSync) File(java.io.File)

Aggregations

RSync (org.jboss.tools.openshift.core.server.RSync)4 File (java.io.File)2 CoreException (org.eclipse.core.runtime.CoreException)2 MultiStatus (org.eclipse.core.runtime.MultiStatus)2