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

br.com.objectos.way.etc.WayEtcResourcesPojo Maven / Gradle / Ivy

The newest version!
/*
 * CopyResources.java criado em 15/12/2013
 * 
 * Propriedade de Objectos Fábrica de Software LTDA.
 * Reprodução parcial ou total proibida.
 */
package br.com.objectos.way.etc;

import br.com.objectos.way.core.io.Directory;

/**
 * @author [email protected] (Marcio Endo)
 */
class WayEtcResourcesPojo
    implements
    WayEtcResources,
    WayEtcResources.EvalWith {

  private final ResourceSet resourceSet;

  public WayEtcResourcesPojo(ResourceSet resourceSet) {
    this.resourceSet = resourceSet;
  }

  @Override
  public WayEtcResources add(String resourceName) {
    resourceSet.add(resourceName);
    return this;
  }

  @Override
  public WayEtcResources addFromListAt(String listName) {
    resourceSet.addFromListAt(listName);
    return this;
  }

  @Override
  public WayEtcResources map(String source, String dest) {
    resourceSet.map(source, dest);
    return this;
  }

  @Override
  public WayEtcResources map(String source, String destTemplate, Object... args) {
    String dest = String.format(destTemplate, args);
    resourceSet.map(source, dest);
    return this;
  }

  @Override
  public WayEtcResources mapFromListAt(String listName) {
    resourceSet.mapFromListAt(listName);
    return this;
  }

  @Override
  public EvalWith evalWith(Object context) {
    resourceSet.evalWith(context);
    return this;
  }

  @Override
  public EvalWith only(String resourceName) {
    resourceSet.only(resourceName);
    return this;
  }

  @Override
  public void copyTo(Directory dir) {
    resourceSet.copyTo(dir);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy