package com.siirush.localwiki.configuration;

public class LocalwikiConfiguration {
	private Path path = new Path();
	private Server server = new Server();
	
	public Path getPath() {
		return path;
	}
	public void setPath(Path path) {
		this.path = path;
	}
	public Server getServer() {
		return server;
	}
	public void setServer(Server server) {
		this.server = server;
	}
	
	public static class Path {
		private String baseDir;
		private String errorDir;
		private String apiDir;
		
		public String getBaseDir() {
			return baseDir;
		}
		public void setBaseDir(String baseDir) {
			this.baseDir = baseDir;
		}
		public String getApiDir() {
			return apiDir;
		}
		public void setApiDir(String apiDir) {
			this.apiDir = apiDir;
		}
		public String getErrorDir() {
			return errorDir;
		}
		public void setErrorDir(String errorDir) {
			this.errorDir = errorDir;
		}
	}
	
	public static class Server {
		private SearchIndex searchIndex = new SearchIndex();
		private Integer port;

		public Integer getPort() {
			return port;
		}
		public void setPort(Integer port) {
			this.port = port;
		}
		public SearchIndex getSearchIndex() {
			return searchIndex;
		}
		public void setSearchIndex(SearchIndex searchIndex) {
			this.searchIndex = searchIndex;
		}

		public static class SearchIndex {
			private String filePattern;
			private Integer maxDepth;
			
			public String getFilePattern() {
				return filePattern;
			}
			public void setFilePattern(String filePattern) {
				this.filePattern = filePattern;
			}
			public Integer getMaxDepth() {
				return maxDepth;
			}
			public void setMaxDepth(Integer maxDepth) {
				this.maxDepth = maxDepth;
			}
		}
	}
}
@@ -469,24 +469,32 @@
 tring apiDir
+ = %22api%22
 ;%0A%09%09%0A%09%09publi
@@ -982,16 +982,23 @@
 ger port
+ = 8080
 ;%0A%0A%09%09pub
@@ -1328,24 +1328,36 @@
  filePattern
+ = %22.*%5C%5C.md%22
 ;%0A%09%09%09private
@@ -1369,24 +1369,28 @@
 ger maxDepth
+ = 0
 ;%0A%09%09%09%0A%09%09%09pub

Add defaults for config.json.