diff --git a/app/aem/core/src/main/java/com/cognifide/apm/api/scripts/LaunchEnvironment.java b/app/aem/core/src/main/java/com/cognifide/apm/api/scripts/LaunchEnvironment.java index 8d11c0dff..c69742d71 100644 --- a/app/aem/core/src/main/java/com/cognifide/apm/api/scripts/LaunchEnvironment.java +++ b/app/aem/core/src/main/java/com/cognifide/apm/api/scripts/LaunchEnvironment.java @@ -19,7 +19,7 @@ */ package com.cognifide.apm.api.scripts; -import com.cognifide.apm.api.services.RunModesProvider; +import com.cognifide.apm.core.services.RunModesProvider; import java.util.Arrays; import java.util.Optional; import org.apache.commons.lang3.StringUtils; diff --git a/app/aem/core/src/main/java/com/cognifide/apm/api/services/RunModesProvider.java b/app/aem/core/src/main/java/com/cognifide/apm/api/services/RunModesProvider.java deleted file mode 100644 index 25967a7d4..000000000 --- a/app/aem/core/src/main/java/com/cognifide/apm/api/services/RunModesProvider.java +++ /dev/null @@ -1,28 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * AEM Permission Management - * %% - * Copyright (C) 2013 Wunderman Thompson Technology - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package com.cognifide.apm.api.services; - -import java.util.Set; - -public interface RunModesProvider { - - Set getRunModes(); - -} diff --git a/app/aem/core/src/main/java/com/cognifide/apm/core/launchers/StartupScriptLauncher.java b/app/aem/core/src/main/java/com/cognifide/apm/core/launchers/StartupScriptLauncher.java index 9935ac88f..2660c32b5 100644 --- a/app/aem/core/src/main/java/com/cognifide/apm/core/launchers/StartupScriptLauncher.java +++ b/app/aem/core/src/main/java/com/cognifide/apm/core/launchers/StartupScriptLauncher.java @@ -24,12 +24,12 @@ import com.cognifide.apm.api.scripts.LaunchEnvironment; import com.cognifide.apm.api.scripts.Script; -import com.cognifide.apm.api.services.RunModesProvider; import com.cognifide.apm.api.services.ScriptFinder; import com.cognifide.apm.api.services.ScriptManager; import com.cognifide.apm.core.Property; import com.cognifide.apm.core.services.ModifiedScriptFinder; import com.cognifide.apm.core.services.ResourceResolverProvider; +import com.cognifide.apm.core.services.RunModesProvider; import com.cognifide.apm.core.utils.sling.SlingHelper; import java.util.ArrayList; import java.util.List; diff --git a/app/aem/core/src/main/java/com/cognifide/apm/core/scripts/ScriptFilters.java b/app/aem/core/src/main/java/com/cognifide/apm/core/scripts/ScriptFilters.java index ee6e46eef..8b943dd81 100644 --- a/app/aem/core/src/main/java/com/cognifide/apm/core/scripts/ScriptFilters.java +++ b/app/aem/core/src/main/java/com/cognifide/apm/core/scripts/ScriptFilters.java @@ -22,7 +22,7 @@ import com.cognifide.apm.api.scripts.LaunchEnvironment; import com.cognifide.apm.api.scripts.LaunchMode; import com.cognifide.apm.api.scripts.Script; -import com.cognifide.apm.api.services.RunModesProvider; +import com.cognifide.apm.core.services.RunModesProvider; import java.util.Date; import java.util.Set; import java.util.function.Predicate; diff --git a/app/aem/core/src/main/java/com/cognifide/apm/runmodes/services/RunModesProviderService.java b/app/aem/core/src/main/java/com/cognifide/apm/core/services/RunModesProvider.java similarity index 77% rename from app/aem/core/src/main/java/com/cognifide/apm/runmodes/services/RunModesProviderService.java rename to app/aem/core/src/main/java/com/cognifide/apm/core/services/RunModesProvider.java index eaafa8ba0..8890d2a5f 100644 --- a/app/aem/core/src/main/java/com/cognifide/apm/runmodes/services/RunModesProviderService.java +++ b/app/aem/core/src/main/java/com/cognifide/apm/core/services/RunModesProvider.java @@ -17,23 +17,27 @@ * limitations under the License. * =========================LICENSE_END================================== */ -package com.cognifide.apm.runmodes.services; +package com.cognifide.apm.core.services; -import com.cognifide.apm.api.services.RunModesProvider; +import com.cognifide.apm.core.Property; import java.util.Set; import org.apache.sling.settings.SlingSettingsService; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; -@Component -public class RunModesProviderService implements RunModesProvider { +@Component( + service = RunModesProvider.class, + property = { + Property.DESCRIPTION + "APM Service for providing run modes", + Property.VENDOR + } +) +public class RunModesProvider { @Reference private SlingSettingsService slingSettings; - @Override public Set getRunModes() { return slingSettings.getRunModes(); } - } diff --git a/app/aem/core/src/main/java/com/cognifide/apm/core/services/ScriptsResourceChangeListener.java b/app/aem/core/src/main/java/com/cognifide/apm/core/services/ScriptsResourceChangeListener.java index 78a2f6e08..b071f53e9 100644 --- a/app/aem/core/src/main/java/com/cognifide/apm/core/services/ScriptsResourceChangeListener.java +++ b/app/aem/core/src/main/java/com/cognifide/apm/core/services/ScriptsResourceChangeListener.java @@ -23,7 +23,6 @@ import com.cognifide.apm.api.scripts.LaunchMode; import com.cognifide.apm.api.scripts.Script; -import com.cognifide.apm.api.services.RunModesProvider; import com.cognifide.apm.api.services.ScriptFinder; import com.cognifide.apm.api.services.ScriptManager; import com.cognifide.apm.core.Apm; diff --git a/app/aem/core/src/main/java/com/cognifide/apm/core/tools/ApmInstallHook.java b/app/aem/core/src/main/java/com/cognifide/apm/core/tools/ApmInstallHook.java index b74d395f2..48100a9ac 100644 --- a/app/aem/core/src/main/java/com/cognifide/apm/core/tools/ApmInstallHook.java +++ b/app/aem/core/src/main/java/com/cognifide/apm/core/tools/ApmInstallHook.java @@ -27,12 +27,12 @@ import com.cognifide.apm.api.scripts.Script; import com.cognifide.apm.api.services.ExecutionMode; import com.cognifide.apm.api.services.ExecutionResult; -import com.cognifide.apm.api.services.RunModesProvider; import com.cognifide.apm.api.services.ScriptFinder; import com.cognifide.apm.api.services.ScriptManager; import com.cognifide.apm.api.status.Status; import com.cognifide.apm.core.services.ModifiedScriptFinder; import com.cognifide.apm.core.services.ResourceResolverProvider; +import com.cognifide.apm.core.services.RunModesProvider; import com.cognifide.apm.core.services.event.ApmEvent; import com.cognifide.apm.core.services.event.EventManager; import com.cognifide.apm.core.utils.sling.SlingHelper;