Initialize settings from Properties
This commit is contained in:
@@ -4,18 +4,35 @@ import com.muwire.core.hostcache.CrawlerResponse
|
|||||||
|
|
||||||
class MuWireSettings {
|
class MuWireSettings {
|
||||||
|
|
||||||
|
MuWireSettings() {}
|
||||||
|
|
||||||
|
MuWireSettings(Properties props) {
|
||||||
|
isLeaf = Boolean.valueOf(props.get("leaf","false"))
|
||||||
|
allowUntrusted = Boolean.valueOf(props.get("allowUntrusted","true"))
|
||||||
|
crawlerResponse = CrawlerResponse.valueOf(props.get("crawlerResponse","REGISTERED"))
|
||||||
|
}
|
||||||
|
|
||||||
|
final boolean isLeaf
|
||||||
|
boolean allowUntrusted
|
||||||
|
CrawlerResponse crawlerResponse
|
||||||
|
|
||||||
boolean isLeaf() {
|
boolean isLeaf() {
|
||||||
// TODO: implement
|
isLeaf
|
||||||
false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean allowUntrusted() {
|
boolean allowUntrusted() {
|
||||||
// TODO: implement
|
allowUntrusted
|
||||||
true
|
}
|
||||||
|
|
||||||
|
void setAllowUntrusted(boolean allowUntrusted) {
|
||||||
|
this.allowUntrusted = allowUntrusted
|
||||||
}
|
}
|
||||||
|
|
||||||
CrawlerResponse getCrawlerResponse() {
|
CrawlerResponse getCrawlerResponse() {
|
||||||
// TODO: implement
|
crawlerResponse
|
||||||
CrawlerResponse.REGISTERED
|
}
|
||||||
|
|
||||||
|
void setCrawlerResponse(CrawlerResponse crawlerResponse) {
|
||||||
|
this.crawlerResponse = crawlerResponse
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user