org.jclouds.scriptbuilder.domain
Class AppendFile

java.lang.Object
  extended by org.jclouds.scriptbuilder.domain.AppendFile
All Implemented Interfaces:
Statement
Direct Known Subclasses:
CreateOrOverwriteFile

public class AppendFile
extends Object
implements Statement

Creates a run script

Author:
Adrian Cole

Nested Class Summary
static class AppendFile.Builder
           
 
Field Summary
protected  String delimeter
           
static String DELIMETER
           
protected  boolean expandVariables
           
protected  Iterable<String> lines
           
protected  String path
           
 
Constructor Summary
protected AppendFile(String path, Iterable<String> lines, String delimeter, boolean expandVariables)
           
 
Method Summary
protected  String appendLineToWindowsFile(String line, String path)
           
protected  String appendToWindowsFile()
           
static AppendFile.Builder builder()
           
static String escapeVarTokens(String toEscape, OsFamily family)
           
 Iterable<String> functionDependencies(OsFamily family)
           
protected  String hereFile()
           
 String render(OsFamily family)
           
 StringBuilder startHereFile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELIMETER

public static final String DELIMETER
See Also:
Constant Field Values

path

protected final String path

lines

protected final Iterable<String> lines

delimeter

protected final String delimeter

expandVariables

protected final boolean expandVariables
Constructor Detail

AppendFile

protected AppendFile(String path,
                     Iterable<String> lines,
                     String delimeter,
                     boolean expandVariables)
Method Detail

builder

public static AppendFile.Builder builder()

escapeVarTokens

public static String escapeVarTokens(String toEscape,
                                     OsFamily family)

functionDependencies

public Iterable<String> functionDependencies(OsFamily family)
Specified by:
functionDependencies in interface Statement

render

public String render(OsFamily family)
Specified by:
render in interface Statement

appendToWindowsFile

protected String appendToWindowsFile()

hereFile

protected String hereFile()

startHereFile

public StringBuilder startHereFile()

appendLineToWindowsFile

protected String appendLineToWindowsFile(String line,
                                         String path)


Copyright © 2009-2012 jclouds. All Rights Reserved.