You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2019/01/10 06:47:49 UTC

[isis] branch 2033-IoC updated: cleanup previous merge

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch 2033-IoC
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/2033-IoC by this push:
     new 94aea63  cleanup previous merge
94aea63 is described below

commit 94aea631d57f29a202e3499cd5755b4bcb349040
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Jan 10 07:47:43 2019 +0100

    cleanup previous merge
---
 .../runner/opts/OptionHandlerAppManifest.java      | 78 ----------------------
 .../runner/opts/OptionHandlerConfiguration.java    | 65 ------------------
 2 files changed, 143 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerAppManifest.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerAppManifest.java
deleted file mode 100644
index 1fc7b8f..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerAppManifest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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.
- */
-
-package org.apache.isis.core.runtime.runner.opts;
-
-import static org.apache.isis.core.runtime.runner.Constants.APP_MANIFEST_LONG_OPT;
-import static org.apache.isis.core.runtime.runner.Constants.APP_MANIFEST_OPT;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Options;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.config.ConfigurationConstants;
-import org.apache.isis.config.builder.IsisConfigurationBuilder;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
-import org.apache.isis.core.runtime.runner.Constants;
-
-public class OptionHandlerAppManifest extends OptionHandlerAbstract {
-
-    private static final Logger LOG = LoggerFactory.getLogger(OptionHandlerAppManifest.class);
-    private String appManifestClassName;
-
-    public OptionHandlerAppManifest() {
-        super();
-    }
-
-    @Override
-    @SuppressWarnings("static-access")
-    public void addOption(final Options options) {
-        final Option option = OptionBuilder
-                .withArgName("app manifest").hasArg()
-                .withLongOpt(APP_MANIFEST_LONG_OPT)
-                .withDescription("fully qualified AppManifest class")
-                .create(APP_MANIFEST_OPT);
-        options.addOption(option);
-    }
-
-    @Override
-    public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
-        appManifestClassName = commandLine.getOptionValue(Constants.APP_MANIFEST_OPT);
-        return true;
-    }
-
-    @Override
-    public void prime(final IsisConfigurationBuilder isisConfigurationBuilder) {
-        if (appManifestClassName == null) {
-            return;
-        }
-        prime(isisConfigurationBuilder, ConfigurationConstants.APP_MANIFEST_KEY, appManifestClassName);
-    }
-
-    static void prime(IsisConfigurationBuilder isisConfigurationBuilder, String key, String value) {
-        LOG.info("priming: {}={}", key, value);
-        isisConfigurationBuilder.add(key, value);
-    }
-
-
-}
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerConfiguration.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerConfiguration.java
deleted file mode 100644
index f8c269c..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerConfiguration.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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.
- */
-
-package org.apache.isis.core.runtime.runner.opts;
-
-import static org.apache.isis.core.runtime.runner.Constants.CONFIGURATION_LONG_OPT;
-import static org.apache.isis.core.runtime.runner.Constants.CONFIGURATION_OPT;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Options;
-
-import org.apache.isis.config.IsisConfiguration;
-import org.apache.isis.config.NotFoundPolicy;
-import org.apache.isis.config.builder.IsisConfigurationBuilder;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
-import org.apache.isis.core.runtime.runner.Constants;
-
-public class OptionHandlerConfiguration extends OptionHandlerAbstract {
-
-    private String configurationResource;
-
-    @Override
-    @SuppressWarnings("static-access")
-    public void addOption(final Options options) {
-        final Option option = OptionBuilder.withArgName("config file").hasArg().withLongOpt(CONFIGURATION_LONG_OPT).withDescription("read in configuration file (as well as isis.properties)").create(CONFIGURATION_OPT);
-        options.addOption(option);
-    }
-
-    @Override
-    public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
-        configurationResource = commandLine.getOptionValue(Constants.CONFIGURATION_OPT);
-        return true;
-    }
-
-    @Override
-    public void prime(final IsisConfigurationBuilder isisConfigurationBuilder) {
-        if (configurationResource == null) {
-            return;
-        }
-        isisConfigurationBuilder.addConfigurationResource(
-                configurationResource, 
-                NotFoundPolicy.FAIL_FAST, 
-                IsisConfiguration.ContainsPolicy.IGNORE);
-    }
-
-}