org.jlot.client.executor.SyncCommandExecutor Maven / Gradle / Ivy
package org.jlot.client.executor;
import java.util.Properties;
import javax.inject.Inject;
import org.jlot.client.executor.spi.AbstractCommandExecutor;
import org.jlot.client.remote.rest.RestException;
import org.springframework.stereotype.Component;
@Component
public class SyncCommandExecutor extends AbstractCommandExecutor
{
@Inject
private PushCommandExecutor pushCommandExecutor;
@Inject
private PullCommandExecutor pullCommandExecutor;
@Override
public boolean executeInternal ( Properties properties ) throws RestException
{
boolean success = pushCommandExecutor.execute(properties);
if (success)
{
success = pullCommandExecutor.execute(properties);
}
return success;
}
}