diff --git a/app/src/main/java/net/moasdawiki/app/AndroidSettings.java b/app/src/main/java/net/moasdawiki/app/AndroidSettings.java index 67836c3..0fe8789 100644 --- a/app/src/main/java/net/moasdawiki/app/AndroidSettings.java +++ b/app/src/main/java/net/moasdawiki/app/AndroidSettings.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticator.java b/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticator.java index 962adb0..3d39771 100644 --- a/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticator.java +++ b/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticator.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticatorService.java b/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticatorService.java index 3750a66..62080ef 100644 --- a/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticatorService.java +++ b/app/src/main/java/net/moasdawiki/app/CalendarAccountAuthenticatorService.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/CalendarContentProvider.java b/app/src/main/java/net/moasdawiki/app/CalendarContentProvider.java index 9196d70..ed65c55 100644 --- a/app/src/main/java/net/moasdawiki/app/CalendarContentProvider.java +++ b/app/src/main/java/net/moasdawiki/app/CalendarContentProvider.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapter.java b/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapter.java index 0ebcb84..69dfeeb 100644 --- a/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapter.java +++ b/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapter.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapterService.java b/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapterService.java index c244dc2..5381a1d 100644 --- a/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapterService.java +++ b/app/src/main/java/net/moasdawiki/app/CalendarSyncAdapterService.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/Constants.java b/app/src/main/java/net/moasdawiki/app/Constants.java index 1c8adbd..21f8c44 100644 --- a/app/src/main/java/net/moasdawiki/app/Constants.java +++ b/app/src/main/java/net/moasdawiki/app/Constants.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/MainActivity.java b/app/src/main/java/net/moasdawiki/app/MainActivity.java index 4174053..318bec9 100644 --- a/app/src/main/java/net/moasdawiki/app/MainActivity.java +++ b/app/src/main/java/net/moasdawiki/app/MainActivity.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published @@ -64,7 +64,6 @@ import org.jetbrains.annotations.Nullable; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.InetAddress; import java.net.URLDecoder; import java.util.Arrays; import java.util.Calendar; @@ -171,14 +170,8 @@ public class MainActivity extends AppCompatActivity { } // dispatch URL path - HttpRequest httpRequest = new HttpRequest(); - httpRequest.clientIP = InetAddress.getLocalHost(); - httpRequest.httpHeader = Collections.emptyMap(); - httpRequest.method = "GET"; - httpRequest.url = urlPath; - httpRequest.urlPath = urlPath; - httpRequest.urlParameters = convertParameters(uri); - httpRequest.httpBody = new byte[0]; + HttpRequest httpRequest = new HttpRequest(Collections.emptyMap(), + "GET", urlPath, urlPath, convertParameters(uri), new byte[0]); HttpResponse response = requestDispatcher.handleRequest(httpRequest); // send wiki content to browser diff --git a/app/src/main/java/net/moasdawiki/app/SettingsActivity.java b/app/src/main/java/net/moasdawiki/app/SettingsActivity.java index 7a50c2a..2672efc 100644 --- a/app/src/main/java/net/moasdawiki/app/SettingsActivity.java +++ b/app/src/main/java/net/moasdawiki/app/SettingsActivity.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/SettingsFragment.java b/app/src/main/java/net/moasdawiki/app/SettingsFragment.java index 07cfc2a..767ca1e 100644 --- a/app/src/main/java/net/moasdawiki/app/SettingsFragment.java +++ b/app/src/main/java/net/moasdawiki/app/SettingsFragment.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/SynchronizeWikiClient.java b/app/src/main/java/net/moasdawiki/app/SynchronizeWikiClient.java index 0351615..afcac43 100644 --- a/app/src/main/java/net/moasdawiki/app/SynchronizeWikiClient.java +++ b/app/src/main/java/net/moasdawiki/app/SynchronizeWikiClient.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published diff --git a/app/src/main/java/net/moasdawiki/app/WikiEngineApplication.java b/app/src/main/java/net/moasdawiki/app/WikiEngineApplication.java index 390a2a5..b5820f7 100644 --- a/app/src/main/java/net/moasdawiki/app/WikiEngineApplication.java +++ b/app/src/main/java/net/moasdawiki/app/WikiEngineApplication.java @@ -1,6 +1,6 @@ /* * MoasdaWiki App - * Copyright (C) 2008 - 2021 Herbert Reiter (herbert@moasdawiki.net) + * Copyright (C) 2008 - 2022 Herbert Reiter (herbert@moasdawiki.net) * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 as published @@ -28,6 +28,8 @@ import net.moasdawiki.service.handler.SearchHandler; import net.moasdawiki.service.handler.ViewPageHandler; import net.moasdawiki.service.render.HtmlService; import net.moasdawiki.service.repository.RepositoryService; +import net.moasdawiki.service.search.SearchIgnoreList; +import net.moasdawiki.service.search.SearchIndex; import net.moasdawiki.service.search.SearchService; import net.moasdawiki.service.transform.IncludePageTransformer; import net.moasdawiki.service.transform.KontaktseiteTransformer; @@ -67,11 +69,13 @@ public class WikiEngineApplication extends Application { File internalStorageRepositoryRoot = new File(getFilesDir(), REPOSITORY_ROOT_PATH_DEFAULT); // basic services - repositoryService = new RepositoryService(logger, internalStorageRepositoryRoot, false); + repositoryService = new RepositoryService(logger, internalStorageRepositoryRoot, null, false); settings = new AndroidSettings(logger, repositoryService, Settings.getConfigFileApp()); messages = new Messages(logger, settings, repositoryService); wikiService = new WikiService(logger, repositoryService, false); - searchService = new SearchService(logger, repositoryService, wikiService, false); + SearchIgnoreList searchIgnoreList = new SearchIgnoreList(logger, repositoryService); + SearchIndex searchIndex = new SearchIndex(logger, repositoryService, wikiService, searchIgnoreList, true); + searchService = new SearchService(logger, wikiService, searchIgnoreList, searchIndex, false); // App: use SynchronizeWikiClient instead of SynchronizationService synchronizeWikiClient = new SynchronizeWikiClient(this, logger, settings, repositoryService);