Table of Contents
A class to provide general tools for the project.
public final class Tools {public static String replaceVariables(MetaRecord metaRecord,
String content,
UIConfig config)
throws IOException;public static String readResource(String resource)
throws IOException;public static String readFile(String filename)
throws IOException;public static IconCreator iconCreator(UIConfig config);
public static Object sequenceToArray(net.tmorris.adt.sequence.Sequence s,
java.lang.Class c);
}
Methods inherited from java.lang.Object:
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
Inheritance Path. java.lang.Object-> org.kaiwitte.workbench.tools.Tools
Synopsis: public static String readFile(java.lang.String filename) throws java.io.IOException;
Parameters
filename
the name of the source file
the content
Exceptions
IOException
iff an I/O error occurs
Reads a file to a String
.
Synopsis: public static String readResource(java.lang.String resource) throws java.io.IOException;
Parameters
resource
the source
the content
Exceptions
IOException
iff an I/O error occurs
Reads a resouce to a String
.
Synopsis: public static String replaceVariables(org.kaiwitte.workbench.data\ .MetaRecord metaRecord, java.lang.String content, org.kaiwitte.workbench.ui.U\ IConfig config) throws java.io.IOException;
Parameters
metaRecord
the record with the values
content
the template text
the modified text
Replaces all variables with the format
{recordname.columnname}in
content
with the according value in metaRecord
.