All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.objectos.rio.ForwardingRioCommand Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2014 Objectos, Fábrica de Software LTDA.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package br.com.objectos.rio;

import java.io.File;
import java.util.List;

import br.com.objectos.rio.core.os.ChmodAt;
import br.com.objectos.rio.core.os.ChownAt;
import br.com.objectos.rio.core.os.TarAt;
import br.com.objectos.rio.core.os.UntarFile;

import br.com.objectos.way.core.io.Directory;
import br.com.objectos.way.etc.WayEtcResources;
import br.com.objectos.way.ssh.ScpUpload;
import br.com.objectos.way.ssh.SshBuilder.HostBuider;

import com.google.common.collect.ForwardingObject;

/**
 * @author [email protected] (Marcio Endo)
 */
public abstract class ForwardingRioCommand extends ForwardingObject {

  @Override
  protected abstract AbstractRioCommand delegate();

  // command delegates

  protected ChmodAt chmod(Directory directory) {
    return delegate().chmod(directory);
  }

  protected ChownAt chown(Directory directory) {
    return delegate().chown(directory);
  }

  protected void copy(File from, File to) {
    delegate().copy(from, to);
  }

  protected RioDownload download(HttpServer server) {
    return delegate().download(server);
  }

  protected RioInstall install(Directory source) {
    return delegate().install(source);
  }

  protected void mk2fs(String device) {
    delegate().mk2fs(device);
  }

  protected void mk4fs(String device) {
    delegate().mk4fs(device);
  }

  protected void mkswap(String device) {
    delegate().mkswap(device);
  }

  protected RioMount mount(String source) {
    return delegate().mount(source);
  }

  protected WayEtcResources resourcesAt(String baseDir) {
    return delegate().resourcesAt(baseDir);
  }

  protected List resourceToLines(String resourceName) {
    return delegate().resourceToLines(resourceName);
  }

  protected String resourceToPrintf(String resourceName) {
    return delegate().resourceToPrintf(resourceName);
  }

  protected String resourceToString(String resourceName) {
    return delegate().resourceToString(resourceName);
  }

  protected void swapon(String device) {
    delegate().swapon(device);
  }

  protected ScpUpload scpFile(File file) {
    return delegate().scpFile(file);
  }

  protected HostBuider ssh(String host) {
    return delegate().ssh(host);
  }

  protected TarAt tar(Directory dir) {
    return delegate().tar(dir);
  }

  protected void umount(Directory target) {
    delegate().umount(target);
  }

  protected UntarFile untar(File file) {
    return delegate().untar(file);
  }

  protected void initMessages() {
    delegate().initMessages();
  }

  protected void infoAction(String actionName) {
    delegate().infoAction(actionName);
  }

  protected void info() {
    delegate().info();
  }

  protected void info(String info) {
    delegate().info(info);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy