public class FileBasedJndiLoader extends JndiLoader
| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
LOGGER |
COLON_REPLACE, DELIMITER, environment, FILENAME_TO_CONTEXT| Constructor and Description |
|---|
FileBasedJndiLoader(Hashtable env) |
| Modifier and Type | Method and Description |
|---|---|
void |
load(File fileOrDirectory,
Context ctxt)
Loads all .properties", .ini, .xml files in a directory or a single file into a context.
|
void |
load(File fileOrDirectory,
Context ctxt,
boolean preserveFileNameAsContextName) |
private void |
loadDirectory(File directory,
Context ctxt,
Context parentCtxt,
String subName)
Loads all .properties", .ini, .xml files in a directory into a context.
|
private void |
loadFile(File file,
Context ctxt,
Context parentCtxt,
String subName,
boolean preserveFileNameAsContextName)
Loads any file, not only those files
JndiLoader.isSupportedFile(File) returns true for. |
Properties |
toProperties(File file) |
createSubContexts, extractContextName, extractObjectName, extractTypedProperties, getTypeDefinition, handleColonReplacement, isNotNamespacedTypeDefinition, isSupportedFile, load, load, processType, toCompoundNamepublic FileBasedJndiLoader(Hashtable env)
public void load(File fileOrDirectory, Context ctxt) throws NamingException, IOException
NamingExceptionIOExceptionpublic void load(File fileOrDirectory, Context ctxt, boolean preserveFileNameAsContextName) throws NamingException, IOException
preserveFileNameAsContextName - If fileOrDirectory is a file, the file's name is taken as context name.NamingExceptionIOExceptionprivate void loadDirectory(File directory, Context ctxt, Context parentCtxt, String subName) throws NamingException, IOException
NamingExceptionIOExceptionprivate void loadFile(File file, Context ctxt, Context parentCtxt, String subName, boolean preserveFileNameAsContextName) throws NamingException, IOException
JndiLoader.isSupportedFile(File) returns true for.file - Not a directoryNamingExceptionIOExceptionpublic Properties toProperties(File file) throws IOException
XmlSJProperties. ini file: IniSJProperties. Sonst CustomSJProperties.IOExceptionCopyright © 2020. All rights reserved.