|
Regain 2.1.0-STABLE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.regain.ui.desktop.config.XmlDesktopConfig
public class XmlDesktopConfig
Reads the configuration of the desktop search from a XML file.
| Field Summary | |
|---|---|
private String |
mBrowser
The executable of the browser. |
private long |
mConfigFileLastModified
The timestamp when the config file was last modified. |
private boolean |
mExternalAccessAllowed
Flag whether external access is allowed. |
private int |
mInterval
The index update interval. |
private static org.apache.log4j.Logger |
mLog
The logger for this class |
private Map<String,String> |
mNamespaces
Namespaces that should be registered for the simple server. |
private int |
mPort
The port of the webserver. |
private File |
mXmlFile
The XML file to read the configuration from. |
| Fields inherited from interface net.sf.regain.ui.desktop.DesktopConstants |
|---|
AUTH_PROPS_FILE, CONFIG_DIR, CRAWLER_CONFIG_FILE, DEFAULT_CONFIG_DIR, DEFAULT_CRAWLER_CONFIG_FILE, DEFAULT_DESKTOP_CONFIG_FILE, DEFAULT_INTERVAL, DEFAULT_PORT, DESKTOP_CONFIG_FILE, INDEX_DIR, LASTUPDATE_FILE, LOG_DIR, NEEDSUPDATE_FILE, TAGLIB_DIR |
| Constructor Summary | |
|---|---|
XmlDesktopConfig(File xmlFile)
Creates a new instance of XmlDesktopConfig. |
|
| Method Summary | |
|---|---|
String |
getBrowser()
Gets the executable of the browser that should be used for showing web pages. |
boolean |
getExternalAccessAllowed()
Gets the setting wheter external access to the instance is allowed or not. |
int |
getInterval()
Gets the index update interval from the desktop configuration. |
int |
getPort()
Gets the port of the webserver. |
Map<String,String> |
getSimpleNamespaces()
Gets Tag namespaces that should be registered so they can be used in the JSP-File. |
private void |
loadConfig()
Loads the config if the config was not yet loaded or if the file has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static org.apache.log4j.Logger mLog
private File mXmlFile
private long mConfigFileLastModified
private int mInterval
private int mPort
private boolean mExternalAccessAllowed
private String mBrowser
null if the browser should
be auto-detected.
private Map<String,String> mNamespaces
| Constructor Detail |
|---|
public XmlDesktopConfig(File xmlFile)
xmlFile - The XML file to read the configuration from.| Method Detail |
|---|
public int getInterval()
throws RegainException
getInterval in interface DesktopConfigRegainException - If loading the config failed.
public int getPort()
throws RegainException
getPort in interface DesktopConfigRegainException - If loading the config failed.
public String getBrowser()
throws RegainException
null if the browser should be auto-detected.
getBrowser in interface DesktopConfigRegainException - If loading the config failed.
public boolean getExternalAccessAllowed()
throws RegainException
getExternalAccessAllowed in interface DesktopConfigRegainException - If loading the config failed.
private void loadConfig()
throws RegainException
RegainException - If loading the config failed.
public Map<String,String> getSimpleNamespaces()
throws RegainException
getSimpleNamespaces in interface DesktopConfigRegainException - If loading the config failed.
|
Regain 2.1.0-STABLE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||