Class ServerConfigUtils
- java.lang.Object
-
- org.codehaus.cargo.container.liberty.internal.ServerConfigUtils
-
public final class ServerConfigUtils extends Object
A utility class holding useful methods for writing WebSphere Liberty server config files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(PrintStream writer)Closes aserver.xmland writes the closingserverelement.static PrintStreamopen(File xmlFile)Opens a newserver.xmlfor writing and writes the opening server elementstatic voidwriteDataSource(PrintStream writer, DataSource ds)Writes a datasource to the write.static voidwriteLibrary(PrintStream writer, String id, String[] cp)Write a library.
-
-
-
Method Detail
-
open
public static PrintStream open(File xmlFile) throws IOException
Opens a newserver.xmlfor writing and writes the opening server element- Parameters:
xmlFile- the file to write into- Returns:
- a print stream for writing into
- Throws:
IOException- if an exception occurred
-
close
public static void close(PrintStream writer)
Closes aserver.xmland writes the closingserverelement.- Parameters:
writer- the print stream to close
-
writeLibrary
public static void writeLibrary(PrintStream writer, String id, String[] cp)
Write a library.- Parameters:
writer- the writer to write the library toid- the id for the library, if null no id is written.cp- the classpath, must be non null
-
writeDataSource
public static void writeDataSource(PrintStream writer, DataSource ds)
Writes a datasource to the write.- Parameters:
writer- the writer.ds- the datasource.
-
-