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 2021/11/10 10:39:28 UTC

[isis] branch master updated: ISIS-2891: more @ComponentScan removals

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 31a4874  ISIS-2891: more @ComponentScan removals
31a4874 is described below

commit 31a4874d82ada17c4cdbf3d3e22bdbf049973752
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Nov 10 11:39:22 2021 +0100

    ISIS-2891: more @ComponentScan removals
    
    - also split ExcelService into interface and impl.
---
 .../applib/IsisModuleSubdomainsExcelApplib.java    |   8 +-
 .../subdomains/excel/applib/dom/ExcelService.java  | 219 ++++-----------------
 ...{ExcelService.java => ExcelServiceDefault.java} | 102 +++++-----
 .../applib/dom/util/ExcelFileBlobConverter.java    |   3 +-
 .../excel/applib/dom/util/ExcelServiceImpl.java    |  22 +--
 .../excel/applib/dom/util/SheetPivoter.java        |   4 +-
 .../{CellMarshaller.java => _CellMarshaller.java}  |   4 +-
 .../{ExcelConverter.java => _ExcelConverter.java}  |  22 +--
 .../IsisModuleSubdomainsExcelFixtures.java         |   2 +-
 .../ExcelPivotByCategoryAndSubcategoryMenu.java    |   4 +-
 .../IsisModuleSubdomainsFreemarkerApplib.java      |   6 +-
 .../applib/IsisModuleSubdomainsPdfBoxApplib.java   |   6 +-
 .../applib/service/XDocReportServiceDefault.java   |   2 +-
 13 files changed, 134 insertions(+), 270 deletions(-)

diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/IsisModuleSubdomainsExcelApplib.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/IsisModuleSubdomainsExcelApplib.java
index 4ad1352..8ee9b19 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/IsisModuleSubdomainsExcelApplib.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/IsisModuleSubdomainsExcelApplib.java
@@ -18,14 +18,18 @@
  */
 package org.apache.isis.subdomains.excel.applib;
 
-import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+import org.apache.isis.subdomains.excel.applib.dom.ExcelServiceDefault;
 
 /**
  * @since 2.0 {@index}
  */
 @Configuration
-@ComponentScan
+@Import({
+    ExcelServiceDefault.class
+})
 public class IsisModuleSubdomainsExcelApplib {
 
     public static final String NAMESPACE = "isis.sub.excel";
diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelService.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelService.java
index 3f3a44d..adeb9f2 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelService.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelService.java
@@ -1,80 +1,18 @@
-/*
- *  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.subdomains.excel.applib.dom;
 
-import org.apache.isis.applib.annotation.PriorityPrecedence;
+import java.io.InputStream;
+import java.util.List;
+
 import org.apache.isis.applib.exceptions.RecoverableException;
-import org.apache.isis.applib.services.inject.ServiceInjector;
 import org.apache.isis.applib.value.Blob;
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.subdomains.excel.applib.dom.util.ExcelServiceImpl;
 import org.apache.isis.subdomains.excel.applib.dom.util.Mode;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Priority;
-import javax.inject.Inject;
-import javax.inject.Named;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
 
 /**
  * @since 2.0 {@index}
  */
-@Service
-@Named("isis.sub.excel.ExcelService")
-@Priority(PriorityPrecedence.MIDPOINT)
-@Qualifier("Default")
-public class ExcelService {
-
-    public static class Exception extends RecoverableException {
-
-        private static final long serialVersionUID = 1L;
-
-        public Exception(final String msg, final Throwable ex) {
-            super(msg, ex);
-        }
-
-        public Exception(final Throwable ex) {
-            super(ex);
-        }
-    }
-
-    public static final String XSLX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+public interface ExcelService {
 
-    private ExcelServiceImpl excelServiceImpl;
-
-    public ExcelService() {
-    }
-
-    @PostConstruct
-    public void init() {
-        excelServiceImpl = new ExcelServiceImpl();
-        serviceInjector.injectServicesInto(excelServiceImpl);
-    }
-
-    // //////////////////////////////////////
+    String XSLX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
 
     /**
      * Creates a Blob holding a spreadsheet of the domain objects.
@@ -89,76 +27,30 @@ public class ExcelService {
      *
      * @param sheetName - must be 31 chars or less
      */
-    public <T> Blob toExcel(
-            final List<T> domainObjects,
-            final Class<T> cls,
-            final String sheetName,
-            final String fileName) throws ExcelService.Exception {
-        return excelServiceImpl.toExcel(domainObjects, cls, sheetName, fileName);
-    }
+    <T> Blob toExcel(List<T> domainObjects, Class<T> cls, String sheetName, String fileName)
+            throws ExcelServiceDefault.Exception;
 
-    public <T> Blob toExcel(
-            final List<T> domainObjects,
-            final Class<T> cls,
-            final String sheetName,
-            final String fileName,
-            final InputStream in) throws ExcelService.Exception {
-        return excelServiceImpl.toExcel(domainObjects, cls, sheetName, fileName, in);
-    }
+    <T> Blob toExcel(List<T> domainObjects, Class<T> cls, String sheetName, String fileName, InputStream in)
+            throws ExcelServiceDefault.Exception;
 
-    public <T> Blob toExcel(
-            final WorksheetContent worksheetContent,
-            final String fileName) throws ExcelService.Exception {
-        return excelServiceImpl.toExcel(worksheetContent, fileName);
-    }
+    <T> Blob toExcel(WorksheetContent worksheetContent, String fileName) throws ExcelServiceDefault.Exception;
 
-    public <T> Blob toExcel(
-            final WorksheetContent worksheetContent,
-            final String fileName,
-            final InputStream in) throws ExcelService.Exception {
-        return excelServiceImpl.toExcel(worksheetContent, fileName, in);
-    }
+    <T> Blob toExcel(WorksheetContent worksheetContent, String fileName, InputStream in)
+            throws ExcelServiceDefault.Exception;
 
-    public Blob toExcel(
-            final List<WorksheetContent> worksheetContents,
-            final String fileName) throws ExcelService.Exception {
-        return excelServiceImpl.toExcel(worksheetContents, fileName);
-    }
+    Blob toExcel(List<WorksheetContent> worksheetContents, String fileName) throws ExcelServiceDefault.Exception;
 
-    public Blob toExcel(
-            final List<WorksheetContent> worksheetContents,
-            final String fileName,
-            final InputStream in) throws ExcelService.Exception {
-        return excelServiceImpl.toExcel(worksheetContents, fileName, in);
-    }
+    Blob toExcel(List<WorksheetContent> worksheetContents, String fileName, InputStream in)
+            throws ExcelServiceDefault.Exception;
 
-    public <T> Blob toExcelPivot(
-            final List<T> domainObjects,
-            final Class<T> cls,
-            final String fileName) throws ExcelService.Exception {
-        return excelServiceImpl.toExcelPivot(domainObjects, cls, fileName);
-    }
+    <T> Blob toExcelPivot(List<T> domainObjects, Class<T> cls, String fileName) throws ExcelServiceDefault.Exception;
 
-    public <T> Blob toExcelPivot(
-            final List<T> domainObjects,
-            final Class<T> cls,
-            final String sheetName,
-            final String fileName) throws ExcelService.Exception {
-        return excelServiceImpl.toExcelPivot(domainObjects, cls, sheetName, fileName);
-    }
+    <T> Blob toExcelPivot(List<T> domainObjects, Class<T> cls, String sheetName, String fileName)
+            throws ExcelServiceDefault.Exception;
 
-    public <T> Blob toExcelPivot(
-            final WorksheetContent worksheetContent,
-            final String fileName) throws ExcelService.Exception {
-        return excelServiceImpl.toExcelPivot(worksheetContent, fileName);
-    }
-
-    public Blob toExcelPivot(
-            final List<WorksheetContent> worksheetContents,
-            final String fileName) throws ExcelService.Exception {
+    <T> Blob toExcelPivot(WorksheetContent worksheetContent, String fileName) throws ExcelServiceDefault.Exception;
 
-        return excelServiceImpl.toExcelPivot(worksheetContents, fileName);
-    }
+    Blob toExcelPivot(List<WorksheetContent> worksheetContents, String fileName) throws ExcelServiceDefault.Exception;
 
     /**
      * Returns a list of objects for each line in the spreadsheet, of the specified type.
@@ -168,68 +60,31 @@ public class ExcelService {
      *     view model memento); otherwise the objects will be simple transient objects.
      * </p>
      */
-    public <T> List<T> fromExcel(
-            final Blob excelBlob,
-            final Class<T> cls,
-            final String sheetName) throws ExcelService.Exception {
-        return fromExcel(excelBlob, new WorksheetSpec(cls, sheetName));
-    }
+    <T> List<T> fromExcel(Blob excelBlob, Class<T> cls, String sheetName) throws ExcelServiceDefault.Exception;
 
-    public <T> List<T> fromExcel(
-            final Blob excelBlob,
-            final Class<T> cls,
-            final String sheetName,
-            final Mode mode) throws ExcelService.Exception {
-        return fromExcel(excelBlob, new WorksheetSpec(cls, sheetName, mode));
-    }
+    <T> List<T> fromExcel(Blob excelBlob, Class<T> cls, String sheetName, Mode mode)
+            throws ExcelServiceDefault.Exception;
 
-    public <T> List<T> fromExcel(
-            final Blob excelBlob,
-            final WorksheetSpec worksheetSpec) throws ExcelService.Exception {
-        return excelServiceImpl.fromExcel(excelBlob, worksheetSpec);
-    }
+    <T> List<T> fromExcel(Blob excelBlob, WorksheetSpec worksheetSpec) throws ExcelServiceDefault.Exception;
 
-    public List<List<?>> fromExcel(
-            final Blob excelBlob,
-            final List<WorksheetSpec> worksheetSpecs) throws ExcelService.Exception {
-        return excelServiceImpl.fromExcel(excelBlob, worksheetSpecs);
-    }
+    List<List<?>> fromExcel(Blob excelBlob, List<WorksheetSpec> worksheetSpecs) throws ExcelServiceDefault.Exception;
 
-    public List<List<?>> fromExcel(
-            final Blob excelBlob,
-            final WorksheetSpec.Matcher matcher) throws ExcelService.Exception {
+    List<List<?>> fromExcel(Blob excelBlob, WorksheetSpec.Matcher matcher) throws ExcelServiceDefault.Exception;
 
-        return fromExcel(excelBlob, matcher, null);
-    }
+    List<List<?>> fromExcel(Blob excelBlob, WorksheetSpec.Matcher matcher, WorksheetSpec.Sequencer sequencer)
+            throws ExcelServiceDefault.Exception;
 
-    public List<List<?>> fromExcel(
-            final Blob excelBlob,
-            final WorksheetSpec.Matcher matcher,
-            final WorksheetSpec.Sequencer sequencer) throws ExcelService.Exception {
-
-        List<WorksheetSpec> worksheetSpecs = _Lists.newArrayList();
-        try (ByteArrayInputStream bais = new ByteArrayInputStream(excelBlob.getBytes())) {
-            try (final Workbook wb = org.apache.poi.ss.usermodel.WorkbookFactory.create(bais)) {
-                final int numberOfSheets = wb.getNumberOfSheets();
-                for (int i = 0; i < numberOfSheets; i++) {
-                    final Sheet sheet = wb.getSheetAt(i);
-                    WorksheetSpec worksheetSpec = matcher.fromSheet(sheet.getSheetName());
-                    if(worksheetSpec != null) {
-                        worksheetSpecs.add(worksheetSpec);
-                    }
-                }
-            }
-        } catch (IOException e) {
-            throw new ExcelService.Exception(e);
-        }
+    public static class Exception extends RecoverableException {
+
+        private static final long serialVersionUID = 1L;
 
-        if(sequencer != null) {
-            worksheetSpecs = sequencer.sequence(worksheetSpecs);
+        public Exception(final String msg, final Throwable ex) {
+            super(msg, ex);
         }
 
-        return fromExcel(excelBlob, worksheetSpecs);
+        public Exception(final Throwable ex) {
+            super(ex);
+        }
     }
 
-    @Inject private ServiceInjector serviceInjector;
-
-}
+}
\ No newline at end of file
diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelService.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelServiceDefault.java
similarity index 82%
copy from subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelService.java
copy to subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelServiceDefault.java
index 3f3a44d..b866604 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelService.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/ExcelServiceDefault.java
@@ -18,54 +18,38 @@
  */
 package org.apache.isis.subdomains.excel.applib.dom;
 
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Priority;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Service;
+
 import org.apache.isis.applib.annotation.PriorityPrecedence;
-import org.apache.isis.applib.exceptions.RecoverableException;
 import org.apache.isis.applib.services.inject.ServiceInjector;
 import org.apache.isis.applib.value.Blob;
 import org.apache.isis.commons.internal.collections._Lists;
 import org.apache.isis.subdomains.excel.applib.dom.util.ExcelServiceImpl;
 import org.apache.isis.subdomains.excel.applib.dom.util.Mode;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
 
-import javax.annotation.PostConstruct;
-import javax.annotation.Priority;
-import javax.inject.Inject;
-import javax.inject.Named;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
 
-/**
- * @since 2.0 {@index}
- */
 @Service
-@Named("isis.sub.excel.ExcelService")
+@Named("isis.sub.excel.ExcelServiceDefault")
 @Priority(PriorityPrecedence.MIDPOINT)
 @Qualifier("Default")
-public class ExcelService {
-
-    public static class Exception extends RecoverableException {
-
-        private static final long serialVersionUID = 1L;
-
-        public Exception(final String msg, final Throwable ex) {
-            super(msg, ex);
-        }
-
-        public Exception(final Throwable ex) {
-            super(ex);
-        }
-    }
-
-    public static final String XSLX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+public class ExcelServiceDefault implements ExcelService {
 
     private ExcelServiceImpl excelServiceImpl;
 
-    public ExcelService() {
+    public ExcelServiceDefault() {
     }
 
     @PostConstruct
@@ -89,73 +73,83 @@ public class ExcelService {
      *
      * @param sheetName - must be 31 chars or less
      */
+    @Override
     public <T> Blob toExcel(
             final List<T> domainObjects,
             final Class<T> cls,
             final String sheetName,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcel(domainObjects, cls, sheetName, fileName);
     }
 
+    @Override
     public <T> Blob toExcel(
             final List<T> domainObjects,
             final Class<T> cls,
             final String sheetName,
             final String fileName,
-            final InputStream in) throws ExcelService.Exception {
+            final InputStream in) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcel(domainObjects, cls, sheetName, fileName, in);
     }
 
+    @Override
     public <T> Blob toExcel(
             final WorksheetContent worksheetContent,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcel(worksheetContent, fileName);
     }
 
+    @Override
     public <T> Blob toExcel(
             final WorksheetContent worksheetContent,
             final String fileName,
-            final InputStream in) throws ExcelService.Exception {
+            final InputStream in) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcel(worksheetContent, fileName, in);
     }
 
+    @Override
     public Blob toExcel(
             final List<WorksheetContent> worksheetContents,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcel(worksheetContents, fileName);
     }
 
+    @Override
     public Blob toExcel(
             final List<WorksheetContent> worksheetContents,
             final String fileName,
-            final InputStream in) throws ExcelService.Exception {
+            final InputStream in) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcel(worksheetContents, fileName, in);
     }
 
+    @Override
     public <T> Blob toExcelPivot(
             final List<T> domainObjects,
             final Class<T> cls,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcelPivot(domainObjects, cls, fileName);
     }
 
+    @Override
     public <T> Blob toExcelPivot(
             final List<T> domainObjects,
             final Class<T> cls,
             final String sheetName,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcelPivot(domainObjects, cls, sheetName, fileName);
     }
 
+    @Override
     public <T> Blob toExcelPivot(
             final WorksheetContent worksheetContent,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.toExcelPivot(worksheetContent, fileName);
     }
 
+    @Override
     public Blob toExcelPivot(
             final List<WorksheetContent> worksheetContents,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
 
         return excelServiceImpl.toExcelPivot(worksheetContents, fileName);
     }
@@ -168,44 +162,50 @@ public class ExcelService {
      *     view model memento); otherwise the objects will be simple transient objects.
      * </p>
      */
+    @Override
     public <T> List<T> fromExcel(
             final Blob excelBlob,
             final Class<T> cls,
-            final String sheetName) throws ExcelService.Exception {
+            final String sheetName) throws ExcelServiceDefault.Exception {
         return fromExcel(excelBlob, new WorksheetSpec(cls, sheetName));
     }
 
+    @Override
     public <T> List<T> fromExcel(
             final Blob excelBlob,
             final Class<T> cls,
             final String sheetName,
-            final Mode mode) throws ExcelService.Exception {
+            final Mode mode) throws ExcelServiceDefault.Exception {
         return fromExcel(excelBlob, new WorksheetSpec(cls, sheetName, mode));
     }
 
+    @Override
     public <T> List<T> fromExcel(
             final Blob excelBlob,
-            final WorksheetSpec worksheetSpec) throws ExcelService.Exception {
+            final WorksheetSpec worksheetSpec) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.fromExcel(excelBlob, worksheetSpec);
     }
 
+    @Override
     public List<List<?>> fromExcel(
             final Blob excelBlob,
-            final List<WorksheetSpec> worksheetSpecs) throws ExcelService.Exception {
+            final List<WorksheetSpec> worksheetSpecs) throws ExcelServiceDefault.Exception {
         return excelServiceImpl.fromExcel(excelBlob, worksheetSpecs);
     }
 
+    @Override
     public List<List<?>> fromExcel(
             final Blob excelBlob,
-            final WorksheetSpec.Matcher matcher) throws ExcelService.Exception {
+            final WorksheetSpec.Matcher matcher) throws ExcelServiceDefault.Exception {
 
         return fromExcel(excelBlob, matcher, null);
     }
 
+    @Override
     public List<List<?>> fromExcel(
             final Blob excelBlob,
             final WorksheetSpec.Matcher matcher,
-            final WorksheetSpec.Sequencer sequencer) throws ExcelService.Exception {
+            final WorksheetSpec.Sequencer sequencer) throws ExcelServiceDefault.Exception {
 
         List<WorksheetSpec> worksheetSpecs = _Lists.newArrayList();
         try (ByteArrayInputStream bais = new ByteArrayInputStream(excelBlob.getBytes())) {
@@ -220,7 +220,7 @@ public class ExcelService {
                 }
             }
         } catch (IOException e) {
-            throw new ExcelService.Exception(e);
+            throw new ExcelServiceDefault.Exception(e);
         }
 
         if(sequencer != null) {
diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelFileBlobConverter.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelFileBlobConverter.java
index e21eaa6..5681ca0 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelFileBlobConverter.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelFileBlobConverter.java
@@ -29,6 +29,7 @@ import org.apache.poi.util.IOUtils;
 import org.apache.isis.applib.value.Blob;
 import org.apache.isis.commons.internal.base._Bytes;
 import org.apache.isis.subdomains.excel.applib.dom.ExcelService;
+import org.apache.isis.subdomains.excel.applib.dom.ExcelServiceDefault;
 
 import lombok.val;
 
@@ -46,7 +47,7 @@ public class ExcelFileBlobConverter {
             IOUtils.copy(fis, baos);
             return new Blob(name, ExcelService.XSLX_MIME_TYPE, baos.toByteArray());
         } catch (IOException ex) {
-            throw new ExcelService.Exception(ex);
+            throw new ExcelServiceDefault.Exception(ex);
         } finally {
             IOUtils.closeQuietly(fis);
             IOUtils.closeQuietly(baos);
diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelServiceImpl.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelServiceImpl.java
index d6eb091..2016055 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelServiceImpl.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelServiceImpl.java
@@ -33,7 +33,7 @@ import org.apache.isis.applib.value.Blob;
 import org.apache.isis.commons.internal.base._Casts;
 import org.apache.isis.core.metamodel.objectmanager.ObjectManager;
 import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-import org.apache.isis.subdomains.excel.applib.dom.ExcelService;
+import org.apache.isis.subdomains.excel.applib.dom.ExcelServiceDefault;
 import org.apache.isis.subdomains.excel.applib.dom.PivotColumn;
 import org.apache.isis.subdomains.excel.applib.dom.PivotRow;
 import org.apache.isis.subdomains.excel.applib.dom.PivotValue;
@@ -111,7 +111,7 @@ public class ExcelServiceImpl {
             final File file = newExcelConverter().appendSheet(worksheetContents, new XSSFWorkbook());
             return excelFileBlobConverter.toBlob(fileName, file);
         } catch (final IOException ex) {
-            throw new ExcelService.Exception(ex);
+            throw new ExcelServiceDefault.Exception(ex);
         }
     }
 
@@ -123,7 +123,7 @@ public class ExcelServiceImpl {
             final File file = newExcelConverter().appendSheet(worksheetContents, new XSSFWorkbook(in));
             return excelFileBlobConverter.toBlob(fileName, file);
         } catch (final IOException ex) {
-            throw new ExcelService.Exception(ex);
+            throw new ExcelServiceDefault.Exception(ex);
         }
     }
 
@@ -151,7 +151,7 @@ public class ExcelServiceImpl {
     public <T> Blob toExcelPivot(
             final List<T> domainObjects,
             final Class<T> cls,
-            final String fileName) throws ExcelService.Exception {
+            final String fileName) throws ExcelServiceDefault.Exception {
         return toExcelPivot(domainObjects, cls, null, fileName);
     }
 
@@ -172,7 +172,7 @@ public class ExcelServiceImpl {
             final File file = newExcelConverter().appendPivotSheet(worksheetContents);
             return excelFileBlobConverter.toBlob(fileName, file);
         } catch (final IOException ex) {
-            throw new ExcelService.Exception(ex);
+            throw new ExcelServiceDefault.Exception(ex);
         }
     }
 
@@ -194,7 +194,7 @@ public class ExcelServiceImpl {
     public <T> List<T> fromExcel(
             final Blob excelBlob,
             final Class<T> cls,
-            final String sheetName) throws ExcelService.Exception {
+            final String sheetName) throws ExcelServiceDefault.Exception {
         final WorksheetSpec worksheetSpec = new WorksheetSpec(cls, sheetName);
         return fromExcel(excelBlob, worksheetSpec);
     }
@@ -205,7 +205,7 @@ public class ExcelServiceImpl {
      */
     public <T> List<T> fromExcel(
             final Blob excelBlob,
-            final WorksheetSpec worksheetSpec) throws ExcelService.Exception {
+            final WorksheetSpec worksheetSpec) throws ExcelServiceDefault.Exception {
         final List<List<?>> listOfList =
                 fromExcel(excelBlob, Collections.singletonList(worksheetSpec));
         return _Casts.uncheckedCast(listOfList.get(0));
@@ -217,17 +217,17 @@ public class ExcelServiceImpl {
      */
     public List<List<?>> fromExcel(
             final Blob excelBlob,
-            final List<WorksheetSpec> worksheetSpecs) throws ExcelService.Exception {
+            final List<WorksheetSpec> worksheetSpecs) throws ExcelServiceDefault.Exception {
         try {
             return newExcelConverter().fromBytes(worksheetSpecs, excelBlob.getBytes());
         } catch (final IOException | InvalidFormatException e) {
-            throw new ExcelService.Exception(e);
+            throw new ExcelServiceDefault.Exception(e);
         }
     }
 
     @SneakyThrows
-    private ExcelConverter newExcelConverter() {
-        return new ExcelConverter(specificationLoader, objectManager, bookmarkService, serviceInjector);
+    private _ExcelConverter newExcelConverter() {
+        return new _ExcelConverter(specificationLoader, objectManager, bookmarkService, serviceInjector);
     }
 
 
diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/SheetPivoter.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/SheetPivoter.java
index c3bb610..c3828ca 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/SheetPivoter.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/SheetPivoter.java
@@ -35,7 +35,7 @@ import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.util.CellReference;
 
 import org.apache.isis.subdomains.excel.applib.dom.AggregationType;
-import org.apache.isis.subdomains.excel.applib.dom.ExcelService;
+import org.apache.isis.subdomains.excel.applib.dom.ExcelServiceDefault;
 
 import lombok.val;
 
@@ -200,7 +200,7 @@ public class SheetPivoter {
         decoRowOffsetX = SourceLayOut.numberOfRowAnnotationsInSource;
     }
 
-    private void validateAndAdaptSourceDataIfNeeded() throws ExcelService.Exception {
+    private void validateAndAdaptSourceDataIfNeeded() throws ExcelServiceDefault.Exception {
 
         val sourceNotValid = sourceNotValid();
         if (sourceNotValid!=null){
diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/CellMarshaller.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/_CellMarshaller.java
similarity index 99%
rename from subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/CellMarshaller.java
rename to subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/_CellMarshaller.java
index 39a3fd0..ce14470 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/CellMarshaller.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/_CellMarshaller.java
@@ -46,13 +46,13 @@ import org.apache.isis.core.metamodel.spec.ManagedObject;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 
-final class CellMarshaller {
+final class _CellMarshaller {
 
     private final CellStyle dateCellStyle;
     private final CellStyle defaultCellStyle;
     private final BookmarkService bookmarkService;
 
-    CellMarshaller(
+    _CellMarshaller(
             final BookmarkService bookmarkService,
             final CellStyle dateCellStyle,
             final CellStyle defaultCellStyle){
diff --git a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelConverter.java b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/_ExcelConverter.java
similarity index 96%
rename from subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelConverter.java
rename to subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/_ExcelConverter.java
index da36a5a..58fbeae 100644
--- a/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/ExcelConverter.java
+++ b/subdomains/excel/applib/src/main/java/org/apache/isis/subdomains/excel/applib/dom/util/_ExcelConverter.java
@@ -65,7 +65,7 @@ import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
 import org.apache.isis.subdomains.excel.applib.dom.AggregationType;
 import org.apache.isis.subdomains.excel.applib.dom.ExcelMetaDataEnabled;
-import org.apache.isis.subdomains.excel.applib.dom.ExcelService;
+import org.apache.isis.subdomains.excel.applib.dom.ExcelServiceDefault;
 import org.apache.isis.subdomains.excel.applib.dom.HyperLink;
 import org.apache.isis.subdomains.excel.applib.dom.PivotColumn;
 import org.apache.isis.subdomains.excel.applib.dom.PivotDecoration;
@@ -78,7 +78,7 @@ import org.apache.isis.subdomains.excel.applib.dom.WorksheetSpec;
 import lombok.ToString;
 import lombok.val;
 
-class ExcelConverter {
+class _ExcelConverter {
 
     private static final String XLSX_SUFFIX = ".xlsx";
 
@@ -106,7 +106,7 @@ class ExcelConverter {
     private final BookmarkService bookmarkService;
     private final ServiceInjector serviceInjector;
 
-    ExcelConverter(
+    _ExcelConverter(
             final SpecificationLoader specificationLoader,
             final ObjectManager objectManager,
             final BookmarkService bookmarkService,
@@ -135,7 +135,7 @@ class ExcelConverter {
         }
 
         final File tempFile =
-                File.createTempFile(ExcelConverter.class.getName(), UUID.randomUUID().toString() + XLSX_SUFFIX);
+                File.createTempFile(_ExcelConverter.class.getName(), UUID.randomUUID().toString() + XLSX_SUFFIX);
         try(final FileOutputStream fos = new FileOutputStream(tempFile)) {
 
             for (WorksheetContent worksheetContent : worksheetContents) {
@@ -184,7 +184,7 @@ class ExcelConverter {
             cell.setCellValue(property.getCanonicalFriendlyName());
         }
 
-        final CellMarshaller cellMarshaller = newCellMarshaller(workbook);
+        final _CellMarshaller cellMarshaller = newCellMarshaller(workbook);
 
         // detail rows
         for (final ManagedObject objectAdapter : adapters) {
@@ -230,7 +230,7 @@ class ExcelConverter {
 
         try(final XSSFWorkbook workbook = new XSSFWorkbook()) {
             final File tempFile =
-                    File.createTempFile(ExcelConverter.class.getName(), UUID.randomUUID().toString() + XLSX_SUFFIX);
+                    File.createTempFile(_ExcelConverter.class.getName(), UUID.randomUUID().toString() + XLSX_SUFFIX);
             try(final FileOutputStream fos = new FileOutputStream(tempFile)) {
 
                 for (WorksheetContent worksheetContent : worksheetContents) {
@@ -401,7 +401,7 @@ class ExcelConverter {
 
         final List<T> importedItems = _Lists.newArrayList();
 
-        final CellMarshaller cellMarshaller = this.newCellMarshaller(workbook);
+        final _CellMarshaller cellMarshaller = this.newCellMarshaller(workbook);
 
         final Sheet sheet = lookupSheet(cls, sheetName, workbook);
 
@@ -431,7 +431,7 @@ class ExcelConverter {
                         case RELAXED:
                             // ignore
                         default:
-                            throw new ExcelService.Exception(String.format("Error processing Excel row nr. %d. Message: %s", row.getRowNum(), e.getMessage()), e);
+                            throw new ExcelServiceDefault.Exception(String.format("Error processing Excel row nr. %d. Message: %s", row.getRowNum(), e.getMessage()), e);
                         }
                     }
 
@@ -479,7 +479,7 @@ class ExcelConverter {
                             // ignore
                             break;
                         default:
-                            throw new ExcelService.Exception(String.format("Error processing Excel row nr. %d. Message: %s", row.getRowNum(), e.getMessage()), e);
+                            throw new ExcelServiceDefault.Exception(String.format("Error processing Excel row nr. %d. Message: %s", row.getRowNum(), e.getMessage()), e);
 
                         }
                     }
@@ -605,10 +605,10 @@ class ExcelConverter {
 
     // //////////////////////////////////////
 
-    protected CellMarshaller newCellMarshaller(final Workbook wb) {
+    protected _CellMarshaller newCellMarshaller(final Workbook wb) {
         final CellStyle dateCellStyle = createDateFormatCellStyle(wb);
         final CellStyle defaultCellStyle = defaultCellStyle(wb);
-        final CellMarshaller cellMarshaller = new CellMarshaller(bookmarkService, dateCellStyle, defaultCellStyle);
+        final _CellMarshaller cellMarshaller = new _CellMarshaller(bookmarkService, dateCellStyle, defaultCellStyle);
         return cellMarshaller;
     }
 
diff --git a/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/IsisModuleSubdomainsExcelFixtures.java b/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/IsisModuleSubdomainsExcelFixtures.java
index 3a53e00..12fb728 100644
--- a/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/IsisModuleSubdomainsExcelFixtures.java
+++ b/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/IsisModuleSubdomainsExcelFixtures.java
@@ -33,7 +33,7 @@ import org.apache.isis.testing.fixtures.applib.modules.ModuleWithFixtures;
         IsisModuleSubdomainsExcelApplib.class,
         IsisModuleTestingFixturesApplib.class
 })
-@ComponentScan
+@ComponentScan //TODO eventually create a concrete list of Components to import
 public class IsisModuleSubdomainsExcelFixtures implements ModuleWithFixtures {
 
     @Override public FixtureScript getTeardownFixture() {
diff --git a/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/demomodule/dom/pivot/ExcelPivotByCategoryAndSubcategoryMenu.java b/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/demomodule/dom/pivot/ExcelPivotByCategoryAndSubcategoryMenu.java
index 5a3c86b..0bfe79d 100644
--- a/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/demomodule/dom/pivot/ExcelPivotByCategoryAndSubcategoryMenu.java
+++ b/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/demomodule/dom/pivot/ExcelPivotByCategoryAndSubcategoryMenu.java
@@ -31,7 +31,7 @@ import org.apache.isis.applib.annotation.PriorityPrecedence;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.services.repository.RepositoryService;
 import org.apache.isis.applib.value.Blob;
-import org.apache.isis.subdomains.excel.applib.dom.ExcelService;
+import org.apache.isis.subdomains.excel.applib.dom.ExcelServiceDefault;
 import org.apache.isis.subdomains.excel.fixtures.demoapp.todomodule.dom.ExcelDemoToDoItem;
 
 @DomainService(
@@ -67,7 +67,7 @@ public class ExcelPivotByCategoryAndSubcategoryMenu {
         return repositoryService.allInstances(ExcelDemoToDoItem.class);
     }
 
-    @Inject ExcelService excelService;
+    @Inject ExcelServiceDefault excelService;
     @Inject RepositoryService repositoryService;
 
 }
diff --git a/subdomains/freemarker/applib/src/main/java/org/apache/isis/subdomains/freemarker/applib/IsisModuleSubdomainsFreemarkerApplib.java b/subdomains/freemarker/applib/src/main/java/org/apache/isis/subdomains/freemarker/applib/IsisModuleSubdomainsFreemarkerApplib.java
index 866b0d4..d8e2930 100644
--- a/subdomains/freemarker/applib/src/main/java/org/apache/isis/subdomains/freemarker/applib/IsisModuleSubdomainsFreemarkerApplib.java
+++ b/subdomains/freemarker/applib/src/main/java/org/apache/isis/subdomains/freemarker/applib/IsisModuleSubdomainsFreemarkerApplib.java
@@ -18,11 +18,13 @@
  */
 package org.apache.isis.subdomains.freemarker.applib;
 
-import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
 
 @Configuration
-@ComponentScan
+@Import({
+
+})
 public class IsisModuleSubdomainsFreemarkerApplib {
 
 }
diff --git a/subdomains/pdfbox/applib/src/main/java/org/apache/isis/subdomains/pdfbox/applib/IsisModuleSubdomainsPdfBoxApplib.java b/subdomains/pdfbox/applib/src/main/java/org/apache/isis/subdomains/pdfbox/applib/IsisModuleSubdomainsPdfBoxApplib.java
index 68fa12d..445d87d 100644
--- a/subdomains/pdfbox/applib/src/main/java/org/apache/isis/subdomains/pdfbox/applib/IsisModuleSubdomainsPdfBoxApplib.java
+++ b/subdomains/pdfbox/applib/src/main/java/org/apache/isis/subdomains/pdfbox/applib/IsisModuleSubdomainsPdfBoxApplib.java
@@ -18,11 +18,13 @@
  */
 package org.apache.isis.subdomains.pdfbox.applib;
 
-import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
 
 @Configuration
-@ComponentScan
+@Import({
+
+})
 public class IsisModuleSubdomainsPdfBoxApplib {
 
 }
diff --git a/subdomains/xdocreport/applib/src/main/java/org/apache/isis/subdomains/xdocreport/applib/service/XDocReportServiceDefault.java b/subdomains/xdocreport/applib/src/main/java/org/apache/isis/subdomains/xdocreport/applib/service/XDocReportServiceDefault.java
index dc4845c..91e3240 100644
--- a/subdomains/xdocreport/applib/src/main/java/org/apache/isis/subdomains/xdocreport/applib/service/XDocReportServiceDefault.java
+++ b/subdomains/xdocreport/applib/src/main/java/org/apache/isis/subdomains/xdocreport/applib/service/XDocReportServiceDefault.java
@@ -45,7 +45,7 @@ import fr.opensagres.xdocreport.template.TemplateEngineKind;
 import fr.opensagres.xdocreport.template.formatter.FieldsMetadata;
 
 @Service
-@Named("isis.sub.zip.XDocReportServiceDefault")
+@Named("isis.sub.xdocreport.XDocReportServiceDefault")
 @Priority(PriorityPrecedence.MIDPOINT)
 @Qualifier("Default")
 public class XDocReportServiceDefault implements XDocReportService {