org.jclouds.scriptbuilder.functionloader.filters
Class LicenseHeaderFilter

java.lang.Object
  extended by org.jclouds.scriptbuilder.functionloader.filters.LicenseHeaderFilter
All Implemented Interfaces:
FunctionLoader

public class LicenseHeaderFilter
extends Object
implements FunctionLoader

FunctionLoader decorator to filters out license header comments from a file.


Constructor Summary
LicenseHeaderFilter(FunctionLoader delegate)
           
 
Method Summary
 String filter(String lines, OsFamily family)
          Filters out license header comments from a file.
 String loadFunction(String function, OsFamily family)
          Loads a function and returns it as String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseHeaderFilter

public LicenseHeaderFilter(FunctionLoader delegate)
Method Detail

loadFunction

public String loadFunction(String function,
                           OsFamily family)
                    throws FunctionNotFoundException
Description copied from interface: FunctionLoader
Loads a function and returns it as String.

Specified by:
loadFunction in interface FunctionLoader
Parameters:
function - The function name to load.
family - This operating system family of the function.
Returns:
The function as String.
Throws:
FunctionNotFoundException

filter

public String filter(String lines,
                     OsFamily family)
Filters out license header comments from a file.

Parameters:
lines - The lines to filter.
family - The OsFamily of the file.
Returns:
The filtered file.


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.