Author: cziegeler
Date: Sat Aug  5 09:50:45 2017
New Revision: 1804185

URL: http://svn.apache.org/viewvc?rev=1804185&view=rev
Log:
Add initial scanner for repoinit

Added:
    
sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/RepoInitScanner.java
   (with props)
Modified:
    
sling/whiteboard/cziegeler/feature-analyser/src/main/resources/META-INF/services/org.apache.sling.feature.scanner.ExtensionScanner

Added: 
sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/RepoInitScanner.java
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/RepoInitScanner.java?rev=1804185&view=auto
==============================================================================
--- 
sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/RepoInitScanner.java
 (added)
+++ 
sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/RepoInitScanner.java
 Sat Aug  5 09:50:45 2017
@@ -0,0 +1,59 @@
+/*
+ * 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.sling.feature.scanner.impl;
+
+import java.io.IOException;
+
+import org.apache.sling.feature.Extension;
+import org.apache.sling.feature.ExtensionType;
+import org.apache.sling.feature.analyser.ContainerDescriptor;
+import org.apache.sling.feature.scanner.ExtensionScanner;
+import org.apache.sling.feature.support.ArtifactManager;
+
+public class RepoInitScanner implements ExtensionScanner {
+
+    @Override
+    public String getId() {
+        return "repoinit";
+    }
+
+    @Override
+    public String getName() {
+        return "Apache Sling Repoinit Scanner";
+    }
+
+    @Override
+    public ContainerDescriptor scan(final Extension extension,
+            final ArtifactManager artifactManager)
+    throws IOException {
+        if (!Extension.NAME_REPOINIT.equals(extension.getName()) ) {
+            return null;
+        }
+        if ( extension.getType() != ExtensionType.TEXT ) {
+            return null;
+        }
+
+        final ContainerDescriptor cd = new ContainerDescriptor() {};
+
+
+        // TODO add requirement for repoinit capability
+
+        cd.lock();
+
+        return cd;
+    }
+}

Propchange: 
sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/RepoInitScanner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/RepoInitScanner.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Modified: 
sling/whiteboard/cziegeler/feature-analyser/src/main/resources/META-INF/services/org.apache.sling.feature.scanner.ExtensionScanner
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-analyser/src/main/resources/META-INF/services/org.apache.sling.feature.scanner.ExtensionScanner?rev=1804185&r1=1804184&r2=1804185&view=diff
==============================================================================
--- 
sling/whiteboard/cziegeler/feature-analyser/src/main/resources/META-INF/services/org.apache.sling.feature.scanner.ExtensionScanner
 (original)
+++ 
sling/whiteboard/cziegeler/feature-analyser/src/main/resources/META-INF/services/org.apache.sling.feature.scanner.ExtensionScanner
 Sat Aug  5 09:50:45 2017
@@ -1,2 +1,3 @@
 org.apache.sling.feature.scanner.impl.ContentPackagesExtensionScanner
+org.apache.sling.feature.scanner.impl.RepoInitScanner
 


Reply via email to