|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<java.lang.String,java.lang.Object> velosurf.context.DBReference velosurf.Velosurf
public class Velosurf
This class is the Velosurf main entry class if you do not use the toolbox.xml mechanism. Unless you specify the model file to use, it will successively search for a model file :
from the java property "config.velosurf" (like in 'java -Dconfig.velosurf=/.../velosurf.xml ...' )
from the Velocity property "config.velosurf" (entry of the velocity.properties file)
as './velosurf.xml', './conf/velosurf.xml', './WEB-INF/velosurf.xml', './cfg/velosurf.xml'
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Field Summary | |
---|---|
private java.io.File |
configFile
Configuration file. |
private boolean |
initialized
Initialization flag. |
Fields inherited from class velosurf.context.DBReference |
---|
db |
Constructor Summary | |
---|---|
Velosurf()
Empty constructor. |
|
Velosurf(java.io.File configFile)
Constructor taking a File object as model configuration file. |
|
Velosurf(java.io.InputStream config)
Deprecated. use others constructor |
|
Velosurf(java.lang.String config)
Constructor taking a File object as model configuration file. |
Method Summary | |
---|---|
java.lang.String |
deobfuscate(java.lang.Object value)
De-obfuscate the given value. |
private void |
findConfig()
Tries to find a model configuration file using some default locations. |
java.lang.Object |
get(java.lang.Object key)
Generic getter. |
Database |
getDatabase()
Allows to access the underlying velosurf.sql.Database object |
java.lang.String |
getSchema()
Schema name getter. |
private void |
init()
Lazzy initialization. |
private void |
init(java.io.InputStream config)
Lazzy initialization. |
private void |
initLogging()
Initializes the logger. |
java.lang.String |
obfuscate(java.lang.Object value)
Obfuscate the given value. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Generic setter. |
void |
setConfigFile(java.lang.String config)
Explicitely set the model configuration file. |
Methods inherited from class velosurf.context.DBReference |
---|
getEntity, getError, getUserContext, getWithParams, init, setUserContext, toString |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
private boolean initialized
private java.io.File configFile
Constructor Detail |
---|
public Velosurf()
public Velosurf(java.lang.String config) throws java.io.IOException, java.sql.SQLException
configFile
- model configuration file
java.io.IOException
java.sql.SQLException
public Velosurf(java.io.File configFile) throws java.io.IOException, java.sql.SQLException
configFile
- model configuration file
java.io.IOException
java.sql.SQLException
public Velosurf(java.io.InputStream config) throws java.io.IOException, java.sql.SQLException
config
-
java.io.IOException
java.sql.SQLException
Method Detail |
---|
public void setConfigFile(java.lang.String config)
config
- model configuration pathnameprivate void initLogging()
private void findConfig()
private void init(java.io.InputStream config) throws java.sql.SQLException, java.io.IOException
config
- model configuration file input stream
java.sql.SQLException
java.io.IOException
private void init() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public Database getDatabase()
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,java.lang.Object>
get
in class DBReference
key
-
public java.lang.Object put(java.lang.String key, java.lang.Object value)
put
in interface java.util.Map<java.lang.String,java.lang.Object>
put
in class DBReference
key
- value
-
public java.lang.String getSchema()
getSchema
in class DBReference
public java.lang.String obfuscate(java.lang.Object value)
obfuscate
in class DBReference
value
- value to obfuscate
public java.lang.String deobfuscate(java.lang.Object value)
deobfuscate
in class DBReference
value
- value to de-obfuscate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |