Merge "Remove unused imports"
authorTony Tkacik <ttkacik@cisco.com>
Fri, 7 Nov 2014 14:30:18 +0000 (14:30 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 7 Nov 2014 14:30:18 +0000 (14:30 +0000)
29 files changed:
opendaylight/commons/opendaylight/pom.xml
opendaylight/config/config-artifacts/pom.xml [new file with mode: 0644]
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DependencyResolverManagerTest.java
opendaylight/config/config-netty-config/pom.xml
opendaylight/config/config-persister-directory-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/directory/xml/XmlDirectoryPersister.java
opendaylight/config/config-persister-directory-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/directory/xml/XmlDirectoryStorageAdapter.java
opendaylight/config/config-persister-directory-xml-adapter/src/test/java/org/opendaylight/controller/config/persist/storage/directory/xml/DirectoryStorageAdapterTest.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java
opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/LookupTest.java
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/LogbackConfigurationLoaderTest.java
opendaylight/config/logback-config-loader/src/test/resources/logback-test.xml
opendaylight/config/logback-config-loader/src/test/resources/logback.d/logback-alt.xml
opendaylight/config/logback-config-loader/src/test/resources/logback.d/logback-alt2.xml
opendaylight/config/logback-config-loader/src/test/resources/logback.d/logback-alt3.xml
opendaylight/config/netconf-config-dispatcher/src/main/java/org/opendaylight/controller/config/yang/config/netconf/client/dispatcher/NetconfClientDispatcherModule.java
opendaylight/config/pom.xml
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/TemplateFactory.java
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/gofactory/AbsModuleGeneratedObjectFactory.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/Dependency.java
opendaylight/md-sal/sal-dom-xsql/pom.xml
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultNetconfOperation.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStartExi.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStopExi.java
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/exi/EXIParameters.java
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/startExi.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/stopExi.xml

index 198d17a..ae37f4a 100644 (file)
     <dependencies>
 
        <!-- project specific dependencies -->
+      <dependency>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>config-artifacts</artifactId>
+        <version>${config.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>netconf-artifacts</artifactId>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
+
       <dependency>
         <groupId>org.apache.sshd</groupId>
         <artifactId>sshd-core</artifactId>
       </dependency>
 
       <!-- config-->
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-api</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-manager</artifactId>
-        <version>${config.version}</version>
-        <type>test-jar</type>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-manager</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-persister-api</artifactId>
-        <version>${config.version}</version>
-        <type>test-jar</type>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-persister-api</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-persister-directory-xml-adapter</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-persister-file-xml-adapter</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-persister-feature-adapter</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-util</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-util</artifactId>
-        <version>${config.version}</version>
-        <type>test-jar</type>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>configuration</artifactId>
         <artifactId>liblldp</artifactId>
         <version>${sal.version}</version>
       </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>logback-config</artifactId>
-        <version>${config.version}</version>
-      </dependency>
       <!-- Debug and logging -->
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <version>${dummy-console.version}</version>
       </dependency>
 
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>netty-config-api</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>netty-event-executor-config</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>netty-threadgroup-config</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>netty-timer-config</artifactId>
-        <version>${config.version}</version>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>networkconfig.bridgedomain.northbound</artifactId>
         <artifactId>sal-rest-connector-config</artifactId>
         <version>${mdsal.version}</version>
       </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-netty-config</artifactId>
-        <version>${config.version}</version>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>md-sal-config</artifactId>
         <version>${karaf.security.version}</version>
       </dependency>
 
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>shutdown-api</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>shutdown-impl</artifactId>
-        <version>${config.version}</version>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>statistics.northbound</artifactId>
         <version>${switchmanager.northbound.version}</version>
       </dependency>
 
-      <!-- threadpool -->
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>threadpool-config-api</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>threadpool-config-impl</artifactId>
-        <version>${config.version}</version>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>topology.northbound</artifactId>
         <artifactId>web</artifactId>
         <version>${web.version}</version>
       </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>yang-jmx-generator</artifactId>
-        <version>${config.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>yang-jmx-generator</artifactId>
-        <version>${config.version}</version>
-        <type>test-jar</type>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>yang-test</artifactId>
-        <version>${config.version}</version>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller.md</groupId>
         <artifactId>forwardingrules-manager</artifactId>
         <type>xml</type>
         <scope>runtime</scope>
       </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>features-config-netty</artifactId>
-        <version>${config.version}</version>
-        <classifier>features</classifier>
-        <type>xml</type>
-        <scope>runtime</scope>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>features-flow</artifactId>
         <version>${mdsal.version}</version>
         <scope>test</scope>
       </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>features-config</artifactId>
-        <version>${config.version}</version>
-        <classifier>features</classifier>
-        <type>xml</type>
-        <scope>runtime</scope>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>features-protocol-framework</artifactId>
         <type>xml</type>
         <scope>runtime</scope>
       </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>features-config-persister</artifactId>
-        <version>${config.version}</version>
-        <classifier>features</classifier>
-        <type>xml</type>
-        <scope>runtime</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>config-netty-features</artifactId>
-        <version>${config.version}</version>
-        <classifier>features</classifier>
-        <type>xml</type>
-        <scope>runtime</scope>
-      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>features-base</artifactId>
diff --git a/opendaylight/config/config-artifacts/pom.xml b/opendaylight/config/config-artifacts/pom.xml
new file mode 100644 (file)
index 0000000..430d6b4
--- /dev/null
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+    Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v1.0 which accompanies this distribution,
+    and is available at http://www.eclipse.org/legal/epl-v10.html
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>config-artifacts</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-manager</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-manager</artifactId>
+                <version>${project.version}</version>
+                <type>test-jar</type>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-module-archetype</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-netty-config</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-api</artifactId>
+                <version>${project.version}</version>
+                <type>test-jar</type>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-directory-adapter</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-directory-autodetect-adapter</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-directory-xml-adapter</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-feature-adapter</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-file-adapter</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-persister-file-xml-adapter</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-plugin-parent</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-util</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-util</artifactId>
+                <version>${project.version}</version>
+                <type>test-jar</type>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>logback-config</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>logback-config-loader</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>netty-config-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>netty-event-executor-config</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>netty-threadgroup-config</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>netty-timer-config</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>shutdown-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>shutdown-impl</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>threadpool-config-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>threadpool-config-impl</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>yang-jmx-generator</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>yang-jmx-generator</artifactId>
+                <version>${project.version}</version>
+                <type>test-jar</type>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>yang-jmx-generator-plugin</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>yang-store-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>yang-store-impl</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>yang-test</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>features-config</artifactId>
+                <version>${project.version}</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+                <scope>runtime</scope>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>features-config-netty</artifactId>
+                <version>${project.version}</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+                <scope>runtime</scope>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>features-config-persister</artifactId>
+                <version>${project.version}</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+                <scope>runtime</scope>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>config-netty-features</artifactId>
+                <version>${project.version}</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+                <scope>runtime</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>
+
index 48d7de0..83ee87c 100644 (file)
@@ -100,10 +100,10 @@ public class DependencyResolverManagerTest extends AbstractLockedPlatformMBeanSe
 
         tested.put(moduleIdentifier,
         mockedModule(),
-         moduleFactory,
-         maybeOldInternalInfo,
-         transactionModuleJMXRegistration,
-         isDefaultBean, mock(BundleContext.class));
+        moduleFactory,
+        maybeOldInternalInfo,
+        transactionModuleJMXRegistration,
+        isDefaultBean, mock(BundleContext.class));
     }
 
     private static Module mockedModule() {
index 257c367..1e7a027 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
 <!--
  Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
 
@@ -8,39 +9,39 @@
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>config-subsystem</artifactId>
-    <version>0.3.0-SNAPSHOT</version>
-  </parent>
-  <artifactId>config-netty-config</artifactId>
-  <description>Configuration files for sal-rest-connector</description>
-  <packaging>jar</packaging>
-  <build>
-       <plugins>
-               <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-artifacts</id>
-            <goals>
-              <goal>attach-artifact</goal>
-            </goals>
-            <phase>package</phase>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>${project.build.directory}/classes/initial/00-netty.xml</file>
-                  <type>xml</type>
-                  <classifier>config</classifier>
-                </artifact>
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>config-subsystem</artifactId>
+        <version>0.3.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>config-netty-config</artifactId>
+    <description>Configuration files for sal-rest-connector</description>
+    <packaging>jar</packaging>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/classes/initial/00-netty.xml</file>
+                                    <type>xml</type>
+                                    <classifier>config</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
index 7f8ebd7..92bf080 100644 (file)
@@ -7,17 +7,9 @@
  */
 package org.opendaylight.controller.config.persist.storage.directory.xml;
 
+import static com.google.common.base.Preconditions.checkArgument;
 import com.google.common.base.Optional;
 import com.google.common.io.Files;
-import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder;
-import org.opendaylight.controller.config.persist.api.Persister;
-import org.opendaylight.controller.config.persist.storage.file.xml.model.ConfigSnapshot;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
 import java.io.File;
 import java.io.FilenameFilter;
 import java.io.IOException;
@@ -27,11 +19,17 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 import java.util.SortedSet;
-
-import static com.google.common.base.Preconditions.checkArgument;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder;
+import org.opendaylight.controller.config.persist.api.Persister;
+import org.opendaylight.controller.config.persist.storage.file.xml.model.ConfigSnapshot;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class XmlDirectoryPersister implements Persister {
-    private static final Logger logger = LoggerFactory.getLogger(XmlDirectoryPersister.class);
+    private static final Logger LOG = LoggerFactory.getLogger(XmlDirectoryPersister.class);
 
     private final File storage;
     private final Optional<FilenameFilter> extensionsFilter;
@@ -39,25 +37,25 @@ public class XmlDirectoryPersister implements Persister {
     /**
      * Creates XmlDirectoryPersister that picks up all files in specified folder
      */
-    public XmlDirectoryPersister(File storage) {
+    public XmlDirectoryPersister(final File storage) {
         this(storage, Optional.<FilenameFilter>absent());
     }
 
     /**
      * Creates XmlDirectoryPersister that picks up files only with specified file extension
      */
-    public XmlDirectoryPersister(File storage, Set<String> fileExtensions) {
+    public XmlDirectoryPersister(final File storage, final Set<String> fileExtensions) {
         this(storage, Optional.of(getFilter(fileExtensions)));
     }
 
-    private XmlDirectoryPersister(File storage, Optional<FilenameFilter> extensionsFilter) {
+    private XmlDirectoryPersister(final File storage, final Optional<FilenameFilter> extensionsFilter) {
         checkArgument(storage.exists() && storage.isDirectory(), "Storage directory does not exist: " + storage);
         this.storage = storage;
         this.extensionsFilter = extensionsFilter;
     }
 
     @Override
-    public void persistConfig(ConfigSnapshotHolder holder) throws IOException {
+    public void persistConfig(final ConfigSnapshotHolder holder) throws IOException {
         throw new UnsupportedOperationException("This adapter is read only. Please set readonly=true on " + getClass());
     }
 
@@ -70,11 +68,11 @@ public class XmlDirectoryPersister implements Persister {
         List<File> sortedFiles = new ArrayList<>(Arrays.asList(filesArray));
         Collections.sort(sortedFiles);
         // combine all found files
-        logger.debug("Reading files in following order: {}", sortedFiles);
+        LOG.debug("Reading files in following order: {}", sortedFiles);
 
         List<ConfigSnapshotHolder> result = new ArrayList<>();
         for (File file : sortedFiles) {
-            logger.trace("Adding file '{}' to combined result", file);
+            LOG.trace("Adding file '{}' to combined result", file);
             Optional<ConfigSnapshotHolder> h = fromXmlSnapshot(file);
             // Ignore non valid snapshot
             if(h.isPresent() == false) {
@@ -86,12 +84,12 @@ public class XmlDirectoryPersister implements Persister {
         return result;
     }
 
-    private Optional<ConfigSnapshotHolder> fromXmlSnapshot(File file) {
+    private Optional<ConfigSnapshotHolder> fromXmlSnapshot(final File file) {
         try {
             return Optional.of(loadLastConfig(file));
         } catch (JAXBException e) {
             // In case of parse error, issue a warning, ignore and continue
-            logger.warn(
+            LOG.warn(
                     "Unable to parse configuration snapshot from {}. Initial config from {} will be IGNORED in this run. " +
                     "Note that subsequent config files may fail due to this problem. " +
                     "Xml markup in this file needs to be fixed, for detailed information see enclosed exception.",
@@ -101,7 +99,7 @@ public class XmlDirectoryPersister implements Persister {
         return Optional.absent();
     }
 
-    public static ConfigSnapshotHolder loadLastConfig(File file) throws JAXBException {
+    public static ConfigSnapshotHolder loadLastConfig(final File file) throws JAXBException {
         JAXBContext jaxbContext = JAXBContext.newInstance(ConfigSnapshot.class);
         Unmarshaller um = jaxbContext.createUnmarshaller();
 
@@ -132,7 +130,7 @@ public class XmlDirectoryPersister implements Persister {
 
         return new FilenameFilter() {
             @Override
-            public boolean accept(File dir, String name) {
+            public boolean accept(final File dir, final String name) {
                 String ext = Files.getFileExtension(name);
                 return fileExtensions.contains(ext);
             }
index 40f8c28..42ab93b 100644 (file)
@@ -11,21 +11,20 @@ package org.opendaylight.controller.config.persist.storage.directory.xml;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Splitter;
 import com.google.common.collect.Sets;
+import java.io.File;
+import java.util.Set;
 import org.opendaylight.controller.config.persist.api.Persister;
 import org.opendaylight.controller.config.persist.api.PropertiesProvider;
 import org.opendaylight.controller.config.persist.api.StorageAdapter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.util.Set;
-
 /**
  * StorageAdapter that retrieves initial configuration from a directory. If multiple files are present, snapshot and
  * required capabilities will be merged together. Writing to this persister is not supported.
  */
 public class XmlDirectoryStorageAdapter implements StorageAdapter {
-    private static final Logger logger = LoggerFactory.getLogger(XmlDirectoryStorageAdapter.class);
+    private static final Logger LOG = LoggerFactory.getLogger(XmlDirectoryStorageAdapter.class);
 
     public static final String DIRECTORY_STORAGE_PROP = "directoryStorage";
     public static final String INCLUDE_EXT_PROP = "includeExtensions";
@@ -33,23 +32,23 @@ public class XmlDirectoryStorageAdapter implements StorageAdapter {
 
 
     @Override
-    public Persister instantiate(PropertiesProvider propertiesProvider) {
+    public Persister instantiate(final PropertiesProvider propertiesProvider) {
         String fileStorageProperty = propertiesProvider.getProperty(DIRECTORY_STORAGE_PROP);
         Preconditions.checkNotNull(fileStorageProperty, "Unable to find " + propertiesProvider.getFullKeyForReporting(DIRECTORY_STORAGE_PROP));
         File storage  = new File(fileStorageProperty);
         String fileExtensions = propertiesProvider.getProperty(INCLUDE_EXT_PROP);
 
-        logger.debug("Using storage: {}", storage);
+        LOG.debug("Using storage: {}", storage);
 
         if(fileExtensions != null) {
-            logger.debug("Using extensions: {}", fileExtensions);
+            LOG.debug("Using extensions: {}", fileExtensions);
             return new XmlDirectoryPersister(storage, splitExtensions(fileExtensions));
         } else {
             return new XmlDirectoryPersister(storage);
         }
     }
 
-    private Set<String> splitExtensions(String fileExtensions) {
+    private Set<String> splitExtensions(final String fileExtensions) {
         return Sets.newHashSet(Splitter.on(EXTENSIONS_SEPARATOR).trimResults().omitEmptyStrings()
                 .split(fileExtensions));
     }
index 7af06bd..11c7e12 100644 (file)
@@ -12,13 +12,12 @@ import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-
+import com.google.common.base.Optional;
 import java.io.File;
 import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 import java.util.SortedSet;
-
 import org.junit.Test;
 import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder;
 import org.opendaylight.controller.config.persist.api.Persister;
@@ -27,13 +26,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
 
-import com.google.common.base.Optional;
-
 public class DirectoryStorageAdapterTest {
+    private static final Logger LOG = LoggerFactory.getLogger(DirectoryStorageAdapterTest.class);
     Persister tested;
-    Logger logger = LoggerFactory.getLogger(DirectoryStorageAdapterTest.class.toString());
 
-    private Persister instantiatePersisterFromAdapter(File file, Optional<String> extensions){
+    private Persister instantiatePersisterFromAdapter(final File file, final Optional<String> extensions){
         PropertiesProviderTest pp = new PropertiesProviderTest();
         pp.addProperty(XmlDirectoryStorageAdapter.DIRECTORY_STORAGE_PROP,file.getPath());
         if(extensions.isPresent()) {
@@ -44,7 +41,7 @@ public class DirectoryStorageAdapterTest {
         return dsa.instantiate(pp);
     }
 
-    private Persister instantiatePersisterFromAdapter(File file){
+    private Persister instantiatePersisterFromAdapter(final File file){
         return instantiatePersisterFromAdapter(file, Optional.<String>absent());
     }
 
@@ -74,7 +71,7 @@ public class DirectoryStorageAdapterTest {
         }
     }
 
-    private File getFolder(String folderName) {
+    private File getFolder(final String folderName) {
         File result = new File(("src/test/resources/" +
                 folderName).replace("/", File.separator));
         assertTrue(result + " is not a directory", result.isDirectory());
@@ -86,7 +83,7 @@ public class DirectoryStorageAdapterTest {
         File folder = getFolder("oneFile");
         tested = instantiatePersisterFromAdapter(folder, Optional.of("xml"));
 
-        logger.info("Testing : " + tested.toString());
+        LOG.info("Testing : {}", tested);
         List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
         assertEquals(1, results.size());
         ConfigSnapshotHolder result = results.get(0);
@@ -97,10 +94,10 @@ public class DirectoryStorageAdapterTest {
     public void testOneFileWrongExtension() throws Exception {
         File folder = getFolder("oneFile");
         tested = instantiatePersisterFromAdapter(folder, Optional.of("aa, bb"));
-        logger.info("Testing : " + tested.toString());
+        LOG.info("Testing : {}", tested);
     }
 
-    private void assertResult(ConfigSnapshotHolder result, String s, String... caps) throws SAXException, IOException {
+    private void assertResult(final ConfigSnapshotHolder result, final String s, final String... caps) throws SAXException, IOException {
         assertXMLEqual(s, result.getConfigSnapshot());
         int i = 0;
         for (String capFromSnapshot : result.getCapabilities()) {
@@ -112,7 +109,7 @@ public class DirectoryStorageAdapterTest {
     public void testTwoFilesAllExtensions() throws Exception {
         File folder = getFolder("twoFiles");
         tested = instantiatePersisterFromAdapter(folder);
-        logger.info("Testing : " + tested.toString());
+        LOG.info("Testing : {}", tested);
         List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
         assertEquals(2, results.size());
 
@@ -124,7 +121,7 @@ public class DirectoryStorageAdapterTest {
     public void testTwoFilesTwoExtensions() throws Exception {
         File folder = getFolder("twoFiles");
         tested = instantiatePersisterFromAdapter(folder, Optional.of("xml, xml2"));
-        logger.info("Testing : " + tested.toString());
+        LOG.info("Testing : {}", tested);
         assertEquals(2, tested.loadLastConfigs().size());
     }
 
@@ -132,7 +129,7 @@ public class DirectoryStorageAdapterTest {
     public void testTwoFilesOnlyOneExtension() throws Exception {
         File folder = getFolder("twoFiles");
         tested = instantiatePersisterFromAdapter(folder, Optional.of("xml"));
-        logger.info("Testing : " + tested.toString());
+        LOG.info("Testing : ", tested);
         List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
         assertEquals(1, results.size());
 
@@ -143,7 +140,7 @@ public class DirectoryStorageAdapterTest {
     public void testTwoFilesOneInvalid() throws Exception {
         File folder = getFolder("twoFiles_corrupt");
         tested = instantiatePersisterFromAdapter(folder, Optional.of("xml"));
-        logger.info("Testing : " + tested.toString());
+        LOG.info("Testing : {}", tested);
         List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
         assertEquals(1, results.size());
 
index abb1dbe..52bca76 100644 (file)
@@ -17,14 +17,14 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class ConfigPusherCustomizer implements ServiceTrackerCustomizer<ConfigPusher, ConfigPusher>, AutoCloseable {
-    private static final Logger LOGGER = LoggerFactory.getLogger(ConfigPusherCustomizer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConfigPusherCustomizer.class);
     private ConfigFeaturesListener configFeaturesListener = null;
     private FeatureServiceCustomizer featureServiceCustomizer = null;
     private ServiceTracker<FeaturesService,FeaturesService> fsst = null;
 
     @Override
     public ConfigPusher addingService(ServiceReference<ConfigPusher> configPusherServiceReference) {
-        LOGGER.trace("Got ConfigPusherCustomizer.addingService {}", configPusherServiceReference);
+        LOG.trace("Got ConfigPusherCustomizer.addingService {}", configPusherServiceReference);
         BundleContext bc = configPusherServiceReference.getBundle().getBundleContext();
         ConfigPusher cpService = bc.getService(configPusherServiceReference);
         featureServiceCustomizer = new FeatureServiceCustomizer(cpService);
index b0e64b8..1a40bb3 100644 (file)
@@ -40,14 +40,14 @@ public class ConfigPushingRunnable implements Runnable {
         while(true) {
             try {
                 if(!interuppted) {
-                        if(toInstall.isEmpty()) {
-                            event = queue.take();
-                        } else {
-                            event = queue.poll(POLL_TIME, TimeUnit.MILLISECONDS);
-                        }
-                        if(event != null && event.getFeature() !=null) {
-                            processFeatureEvent(event,toInstall);
-                        }
+                    if(toInstall.isEmpty()) {
+                        event = queue.take();
+                    } else {
+                        event = queue.poll(POLL_TIME, TimeUnit.MILLISECONDS);
+                    }
+                    if(event != null && event.getFeature() !=null) {
+                        processFeatureEvent(event,toInstall);
+                    }
                 } else if(toInstall.isEmpty()) {
                     LOGGER.error("ConfigPushingRunnable - exiting");
                     return;
index 5c50612..7b90580 100644 (file)
@@ -7,11 +7,11 @@
  */
 package org.opendaylight.controller.configpusherfeature.internal;
 
+import com.google.common.collect.LinkedHashMultimap;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.LinkedHashSet;
 import java.util.List;
-
 import org.apache.karaf.features.Feature;
 import org.apache.karaf.features.FeaturesService;
 import org.opendaylight.controller.config.persist.api.ConfigPusher;
@@ -19,13 +19,11 @@ import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.LinkedHashMultimap;
-
 /*
  * Simple class to push configs to the config subsystem from Feature's configfiles
  */
 public class FeatureConfigPusher {
-    private static final Logger LOGGER = LoggerFactory.getLogger(FeatureConfigPusher.class);
+    private static final Logger LOG = LoggerFactory.getLogger(FeatureConfigPusher.class);
     private static final int MAX_RETRIES=100;
     private static final int RETRY_PAUSE_MILLIS=1;
     private FeaturesService featuresService = null;
@@ -46,7 +44,7 @@ public class FeatureConfigPusher {
     /*
      * @param p - ConfigPusher to push ConfigSnapshotHolders
      */
-    public FeatureConfigPusher(ConfigPusher p, FeaturesService f) {
+    public FeatureConfigPusher(final ConfigPusher p, final FeaturesService f) {
         pusher = p;
         featuresService = f;
     }
@@ -59,7 +57,7 @@ public class FeatureConfigPusher {
      * If a Feature is not in the returned LinkedHashMultimap then we couldn't push its configs
      * (Ususally because it was not yet installed)
      */
-    public LinkedHashMultimap<Feature,FeatureConfigSnapshotHolder> pushConfigs(List<Feature> features) throws Exception, InterruptedException {
+    public LinkedHashMultimap<Feature,FeatureConfigSnapshotHolder> pushConfigs(final List<Feature> features) throws Exception, InterruptedException {
         LinkedHashMultimap<Feature,FeatureConfigSnapshotHolder> pushedFeatures = LinkedHashMultimap.create();
         for(Feature feature: features) {
             LinkedHashSet<FeatureConfigSnapshotHolder> configSnapShots = pushConfig(feature);
@@ -70,7 +68,7 @@ public class FeatureConfigPusher {
         return pushedFeatures;
     }
 
-    private LinkedHashSet<FeatureConfigSnapshotHolder> pushConfig(Feature feature) throws Exception, InterruptedException {
+    private LinkedHashSet<FeatureConfigSnapshotHolder> pushConfig(final Feature feature) throws Exception, InterruptedException {
         LinkedHashSet<FeatureConfigSnapshotHolder> configs = new LinkedHashSet<FeatureConfigSnapshotHolder>();
         if(isInstalled(feature)) {
             ChildAwareFeatureWrapper wrappedFeature = new ChildAwareFeatureWrapper(feature,featuresService);
@@ -83,20 +81,20 @@ public class FeatureConfigPusher {
         return configs;
     }
 
-    private boolean isInstalled(Feature feature) {
+    private boolean isInstalled(final Feature feature) {
         for(int retries=0;retries<MAX_RETRIES;retries++) {
             try {
                 List<Feature> installedFeatures = Arrays.asList(featuresService.listInstalledFeatures());
                 if(installedFeatures.contains(feature)) {
                     return true;
                 } else {
-                    LOGGER.warn("Karaf featuresService.listInstalledFeatures() has not yet finished installing feature (retry {}) {} {}",retries,feature.getName(),feature.getVersion());
+                    LOG.warn("Karaf featuresService.listInstalledFeatures() has not yet finished installing feature (retry {}) {} {}",retries,feature.getName(),feature.getVersion());
                 }
             } catch (Exception e) {
                 if(retries < MAX_RETRIES) {
-                    LOGGER.warn("Karaf featuresService.listInstalledFeatures() has thrown an exception, retry {}, Exception {}", retries,e);
+                    LOG.warn("Karaf featuresService.listInstalledFeatures() has thrown an exception, retry {}", retries, e);
                 } else {
-                    LOGGER.error("Giving up on Karaf featuresService.listInstalledFeatures() which has thrown an exception, retry {}, Exception {}", retries,e);
+                    LOG.error("Giving up on Karaf featuresService.listInstalledFeatures() which has thrown an exception, retry {}", retries, e);
                     throw e;
                 }
             }
@@ -106,11 +104,11 @@ public class FeatureConfigPusher {
                 throw new IllegalStateException(e1);
             }
         }
-        LOGGER.error("Giving up (after {} retries) on Karaf featuresService.listInstalledFeatures() which has not yet finished installing feature {} {}",MAX_RETRIES,feature.getName(),feature.getVersion());
+        LOG.error("Giving up (after {} retries) on Karaf featuresService.listInstalledFeatures() which has not yet finished installing feature {} {}",MAX_RETRIES,feature.getName(),feature.getVersion());
         return false;
     }
 
-    private LinkedHashSet<FeatureConfigSnapshotHolder> pushConfig(LinkedHashSet<FeatureConfigSnapshotHolder> configs) throws InterruptedException {
+    private LinkedHashSet<FeatureConfigSnapshotHolder> pushConfig(final LinkedHashSet<FeatureConfigSnapshotHolder> configs) throws InterruptedException {
         LinkedHashSet<FeatureConfigSnapshotHolder> configsToPush = new LinkedHashSet<FeatureConfigSnapshotHolder>(configs);
         configsToPush.removeAll(pushedConfigs);
         if(!configsToPush.isEmpty()) {
index d1a92eb..5ab5c95 100644 (file)
@@ -106,16 +106,15 @@ public class FeatureConfigSnapshotHolder implements ConfigSnapshotHolder {
 
     @Override
     public String toString() {
-       StringBuilder b = new StringBuilder();
-       Path p = Paths.get(fileInfo.getFinalname());
-       b.append(p.getFileName())
-           .append("(")
-           .append(getCauseFeature())
-           .append(",")
-           .append(getFeature())
-           .append(")");
-       return b.toString();
-
+        StringBuilder b = new StringBuilder();
+        Path p = Paths.get(fileInfo.getFinalname());
+        b.append(p.getFileName())
+            .append("(")
+            .append(getCauseFeature())
+            .append(",")
+            .append(getFeature())
+            .append(")");
+        return b.toString();
     }
 
     @Override
index 4489762..3bc362b 100644 (file)
@@ -93,8 +93,7 @@ public class LookupTest {
     public void testLookupConfigBeans2() throws Exception {
         Method method = LookupRegistry.class.getMethod("lookupConfigBeans",
                 String.class, String.class);
-        Object[] args = new Object[] { TestingConfigRegistry.moduleName1,
-                TestingConfigRegistry.instName1 };
+        Object[] args = new Object[] { TestingConfigRegistry.moduleName1, TestingConfigRegistry.instName1 };
         test(method, args);
     }
 
@@ -102,8 +101,7 @@ public class LookupTest {
     public void testLookupConfigBean() throws Exception {
         Method method = LookupRegistry.class.getMethod("lookupConfigBean",
                 String.class, String.class);
-        Object[] args = new Object[] { TestingConfigRegistry.moduleName1,
-                TestingConfigRegistry.instName1 };
+        Object[] args = new Object[] { TestingConfigRegistry.moduleName1, TestingConfigRegistry.instName1 };
         test(method, args);
     }
 
index 2e9bf1d..adbb9f4 100644 (file)
@@ -58,23 +58,22 @@ public class LogbackConfigurationLoaderTest {
 
         // check logs
         String[] expectedLogs = new String[] {
-                "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.LogbackConfigurationLoaderTest: LOGBACK ready -> about to use it",
-                "LoggingEvent -> [TRACE] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: tracing",
-                "LoggingEvent -> [DEBUG] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: debugging",
-                "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: infoing",
-                "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: warning",
-                "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: erroring",
-                "LoggingEvent -> [DEBUG] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: debugging",
-                "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: infoing",
-                "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: warning",
-                "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: erroring",
-                "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.logwork.Informer: infoing",
-                "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Informer: warning",
-                "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Informer: erroring",
-                "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Warner: warning",
-                "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Warner: erroring",
-                "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Errorer: erroring"
-
+            "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.LogbackConfigurationLoaderTest: LOGBACK ready -> about to use it",
+            "LoggingEvent -> [TRACE] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: tracing",
+            "LoggingEvent -> [DEBUG] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: debugging",
+            "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: infoing",
+            "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: warning",
+            "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Tracer: erroring",
+            "LoggingEvent -> [DEBUG] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: debugging",
+            "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: infoing",
+            "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: warning",
+            "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Debugger: erroring",
+            "LoggingEvent -> [INFO] org.opendaylight.controller.logback.config.loader.test.logwork.Informer: infoing",
+            "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Informer: warning",
+            "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Informer: erroring",
+            "LoggingEvent -> [WARN] org.opendaylight.controller.logback.config.loader.test.logwork.Warner: warning",
+            "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Warner: erroring",
+            "LoggingEvent -> [ERROR] org.opendaylight.controller.logback.config.loader.test.logwork.Errorer: erroring"
         };
 
         List<String> logSnapshot = new ArrayList<>(TestAppender.getLogRecord());
index 7fb760a..52f2521 100755 (executable)
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<configuration debug="true">\r
-\r
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">\r
-    <encoder>\r
-      <pattern>%date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{36} - %msg%n</pattern>\r
-    </encoder>\r
-  </appender>\r
-\r
-  <root level="INFO">\r
-    <appender-ref ref="STDOUT" />\r
-  </root>\r
-\r
-  <!--  Base log level  -->\r
-  <logger name="org.opendaylight.controller.logback.config.loader" level="DEBUG"/>\r
-\r
-</configuration>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="true">
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{36} - %msg%n</pattern>
+    </encoder>
+  </appender>
+
+  <root level="INFO">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+  <!--  Base log level  -->
+  <logger name="org.opendaylight.controller.logback.config.loader" level="DEBUG"/>
+
+</configuration>
index ca489d5..e4f8dfc 100755 (executable)
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<configuration debug="false">\r
-\r
-  <appender name="TEST" class="org.opendaylight.controller.logback.config.loader.test.TestAppender"/>\r
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">\r
-    <encoder>\r
-      <pattern>%date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{36} - %msg%n</pattern>\r
-    </encoder>\r
-  </appender>\r
-\r
-  <root level="INFO">\r
-    <appender-ref ref="TEST" />\r
-    <appender-ref ref="STDOUT" />\r
-  </root>\r
-\r
-  <!--  Base log level  -->\r
-  <logger name="org.opendaylight.controller.logback.config.loader" level="INFO"/>\r
-\r
-</configuration>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="false">
+
+  <appender name="TEST" class="org.opendaylight.controller.logback.config.loader.test.TestAppender"/>
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{36} - %msg%n</pattern>
+    </encoder>
+  </appender>
+
+  <root level="INFO">
+    <appender-ref ref="TEST" />
+    <appender-ref ref="STDOUT" />
+  </root>
+
+  <!--  Base log level  -->
+  <logger name="org.opendaylight.controller.logback.config.loader" level="INFO"/>
+
+</configuration>
index 89f82c5..83557f6 100755 (executable)
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<configuration debug="false">\r
-\r
-  <!--  Base log level  -->\r
-  <logger name="org.opendaylight.controller.logback.config.loader" level="DEBUG"/>\r
-  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Tracer" level="TRACE"/>\r
-<!--   <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Debugger" level="DEBUG"/> -->\r
-  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Informer" level="DEBUG"/>\r
-  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Warner" level="ERROR"/>\r
-  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Errorer" level="ERROR"/>\r
-\r
-</configuration>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="false">
+
+  <!--  Base log level  -->
+  <logger name="org.opendaylight.controller.logback.config.loader" level="DEBUG"/>
+  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Tracer" level="TRACE"/>
+<!--   <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Debugger" level="DEBUG"/> -->
+  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Informer" level="DEBUG"/>
+  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Warner" level="ERROR"/>
+  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Errorer" level="ERROR"/>
+
+</configuration>
index a37b6f7..a944cc2 100755 (executable)
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<configuration debug="false">\r
-  <root level="INFO">\r
-    <appender-ref ref="TEST" />\r
-  </root>\r
-\r
-  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Informer" level="INFO"/>\r
-  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Warner" level="WARN"/>\r
-\r
-  <logger name="org.opendaylight.controller.logback.config.loader.test.LogbackConfigurationLoaderTest" level="TRACE"/>\r
-</configuration>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="false">
+  <root level="INFO">
+    <appender-ref ref="TEST" />
+  </root>
+
+  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Informer" level="INFO"/>
+  <logger name="org.opendaylight.controller.logback.config.loader.test.logwork.Warner" level="WARN"/>
+
+  <logger name="org.opendaylight.controller.logback.config.loader.test.LogbackConfigurationLoaderTest" level="TRACE"/>
+</configuration>
index 344ef3d..0a10c2d 100644 (file)
@@ -12,8 +12,7 @@ import org.opendaylight.controller.netconf.client.NetconfClientDispatcherImpl;
 /**
 *
 */
-public final class NetconfClientDispatcherModule extends org.opendaylight.controller.config.yang.config.netconf.client.dispatcher.AbstractNetconfClientDispatcherModule
- {
+public final class NetconfClientDispatcherModule extends org.opendaylight.controller.config.yang.config.netconf.client.dispatcher.AbstractNetconfClientDispatcherModule {
 
     public NetconfClientDispatcherModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(identifier, dependencyResolver);
index ea7b243..ad2607a 100644 (file)
@@ -41,6 +41,8 @@
     <module>netconf-config-dispatcher</module>
     <module>config-module-archetype</module>
     <module>config-netty-config</module>
+
+    <module>config-artifacts</module>
   </modules>
 
   <dependencies>
index f8f5cd6..ca1e823 100644 (file)
@@ -607,9 +607,8 @@ public class TemplateFactory {
 
                 String varName = BindingGeneratorUtil
                         .parseToValidParamName(attrEntry.getKey());
-                {
-                ModuleField field;
 
+                ModuleField field;
                 if (isIdentity) {
                     String identityBaseClass = getInnerTypeFromIdentity(((TypedAttribute) attributeIfc).getType());
                     IdentityRefModuleField identityField = new IdentityRefModuleField(type, varName,
@@ -641,7 +640,8 @@ public class TemplateFactory {
                             nullableDefaultWrapped, isDependency, dependency, isListOfDependencies, needsDepResolver);
                 }
                 moduleFields.add(field);
-                }
+
+
                 String getterName = "get"
                         + attributeIfc.getUpperCaseCammelCase();
                 MethodDefinition getter = new MethodDefinition(type,
index 33546b1..2378fac 100644 (file)
@@ -318,11 +318,11 @@ public class AbsModuleGeneratedObjectFactory {
                             .append("}\n");
                 } else {
                     result.append(format(
-                    "private %s %sDependency;\n"+
-                    "protected final %s get%sDependency(){\n"+
-                        "return %sDependency;\n"+
-                    "}",
-                    osgi, moduleField.getName(), osgi, moduleField.getAttributeName(), moduleField.getName()));
+                        "private %s %sDependency;\n"+
+                        "protected final %s get%sDependency(){\n"+
+                            "return %sDependency;\n"+
+                        "}",
+                        osgi, moduleField.getName(), osgi, moduleField.getAttributeName(), moduleField.getName()));
                 }
             }
         }
index b3e7b90..6ea2ea1 100644 (file)
@@ -10,43 +10,43 @@ package org.opendaylight.controller.config.yangjmxgenerator.attribute;
 import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry;
 
 public class Dependency {
-        private final ServiceInterfaceEntry sie;
-        private final boolean mandatory;
+    private final ServiceInterfaceEntry sie;
+    private final boolean mandatory;
 
-        public Dependency(ServiceInterfaceEntry sie, boolean mandatory) {
-            this.sie = sie;
-            this.mandatory = mandatory;
-        }
+    public Dependency(ServiceInterfaceEntry sie, boolean mandatory) {
+        this.sie = sie;
+        this.mandatory = mandatory;
+    }
 
-        public ServiceInterfaceEntry getSie() {
-            return sie;
-        }
+    public ServiceInterfaceEntry getSie() {
+        return sie;
+    }
 
-        public boolean isMandatory() {
-            return mandatory;
-        }
+    public boolean isMandatory() {
+        return mandatory;
+    }
 
-        @Override
-        public boolean equals(Object o) {
-            if (this == o)
-                return true;
-            if (o == null || getClass() != o.getClass())
-                return false;
+    @Override
+    public boolean equals(Object o) {
+        if (this == o)
+            return true;
+        if (o == null || getClass() != o.getClass())
+            return false;
 
-            Dependency that = (Dependency) o;
+        Dependency that = (Dependency) o;
 
-            if (mandatory != that.mandatory)
-                return false;
-            if (!sie.equals(that.sie))
-                return false;
+        if (mandatory != that.mandatory)
+            return false;
+        if (!sie.equals(that.sie))
+            return false;
 
-            return true;
-        }
-
-        @Override
-        public int hashCode() {
-            int result = sie.hashCode();
-            result = 31 * result + (mandatory ? 1 : 0);
-            return result;
-        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = sie.hashCode();
+        result = 31 * result + (mandatory ? 1 : 0);
+        return result;
     }
+}
index f5898a2..c7fd202 100644 (file)
@@ -35,7 +35,6 @@
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>yang-jmx-generator-plugin</artifactId>
-      <version>${config.version}</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
index 13d4ab2..2646b7e 100644 (file)
@@ -1,14 +1,14 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.netconf.impl.mapping.operations;\r
-\r
-import org.opendaylight.controller.netconf.impl.NetconfServerSession;\r
-\r
-public interface DefaultNetconfOperation {\r
-    void setNetconfSession(NetconfServerSession s);\r
-}\r
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.netconf.impl.mapping.operations;
+
+import org.opendaylight.controller.netconf.impl.NetconfServerSession;
+
+public interface DefaultNetconfOperation {
+    void setNetconfSession(NetconfServerSession s);
+}
index cccb1a3..6de185a 100644 (file)
@@ -1,71 +1,71 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.netconf.impl.mapping.operations;\r
-\r
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;\r
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorSeverity;\r
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorTag;\r
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorType;\r
-import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;\r
-import org.opendaylight.controller.netconf.api.NetconfMessage;\r
-import org.opendaylight.controller.netconf.impl.NetconfServerSession;\r
-import org.opendaylight.controller.netconf.mapping.api.NetconfOperationChainedExecution;\r
-import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;\r
-import org.opendaylight.controller.netconf.util.xml.XmlElement;\r
-import org.opendaylight.controller.netconf.util.xml.XmlUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.w3c.dom.Document;\r
-import org.w3c.dom.Element;\r
-public class DefaultStartExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {\r
-    public static final String START_EXI = "start-exi";\r
-\r
-    private static final Logger logger = LoggerFactory.getLogger(DefaultStartExi.class);\r
-    private NetconfServerSession netconfSession;\r
-\r
-    public DefaultStartExi(String netconfSessionIdForReporting) {\r
-        super(netconfSessionIdForReporting);\r
-    }\r
-\r
-    @Override\r
-    public Document handle(Document message,\r
-                           NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {\r
-        logger.debug("Received start-exi message {} ", XmlUtil.toString(message));\r
-\r
-        try {\r
-            netconfSession.startExiCommunication(new NetconfMessage(message));\r
-        } catch (IllegalArgumentException e) {\r
-            throw new NetconfDocumentedException("Failed to parse EXI parameters", ErrorType.protocol,\r
-                    ErrorTag.operation_failed, ErrorSeverity.error);\r
-        }\r
-\r
-        return super.handle(message, subsequentOperation);\r
-    }\r
-\r
-    @Override\r
-    protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException {\r
-        Element getSchemaResult = document.createElementNS( XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, XmlNetconfConstants.OK);\r
-        logger.trace("{} operation successful", START_EXI);\r
-        return getSchemaResult;\r
-    }\r
-\r
-    @Override\r
-    protected String getOperationName() {\r
-        return START_EXI;\r
-    }\r
-\r
-    @Override\r
-    protected String getOperationNamespace() {\r
-        return XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_EXI_1_0;\r
-    }\r
-\r
-    @Override\r
-    public void setNetconfSession(NetconfServerSession s) {\r
-        netconfSession = s;\r
-    }\r
-}\r
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.netconf.impl.mapping.operations;
+
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorSeverity;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorTag;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException.ErrorType;
+import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
+import org.opendaylight.controller.netconf.api.NetconfMessage;
+import org.opendaylight.controller.netconf.impl.NetconfServerSession;
+import org.opendaylight.controller.netconf.mapping.api.NetconfOperationChainedExecution;
+import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;
+import org.opendaylight.controller.netconf.util.xml.XmlElement;
+import org.opendaylight.controller.netconf.util.xml.XmlUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+public class DefaultStartExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {
+    public static final String START_EXI = "start-exi";
+
+    private static final Logger logger = LoggerFactory.getLogger(DefaultStartExi.class);
+    private NetconfServerSession netconfSession;
+
+    public DefaultStartExi(String netconfSessionIdForReporting) {
+        super(netconfSessionIdForReporting);
+    }
+
+    @Override
+    public Document handle(Document message,
+                           NetconfOperationChainedExecution subsequentOperation) throws NetconfDocumentedException {
+        logger.debug("Received start-exi message {} ", XmlUtil.toString(message));
+
+        try {
+            netconfSession.startExiCommunication(new NetconfMessage(message));
+        } catch (IllegalArgumentException e) {
+            throw new NetconfDocumentedException("Failed to parse EXI parameters", ErrorType.protocol,
+                    ErrorTag.operation_failed, ErrorSeverity.error);
+        }
+
+        return super.handle(message, subsequentOperation);
+    }
+
+    @Override
+    protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException {
+        Element getSchemaResult = document.createElementNS( XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, XmlNetconfConstants.OK);
+        logger.trace("{} operation successful", START_EXI);
+        return getSchemaResult;
+    }
+
+    @Override
+    protected String getOperationName() {
+        return START_EXI;
+    }
+
+    @Override
+    protected String getOperationNamespace() {
+        return XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_EXI_1_0;
+    }
+
+    @Override
+    public void setNetconfSession(NetconfServerSession s) {
+        netconfSession = s;
+    }
+}
index 2a24ae3..233638d 100644 (file)
@@ -1,58 +1,58 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.netconf.impl.mapping.operations;\r
-\r
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;\r
-import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;\r
-import org.opendaylight.controller.netconf.impl.NetconfServerSession;\r
-import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;\r
-import org.opendaylight.controller.netconf.util.xml.XmlElement;\r
-import org.opendaylight.controller.netconf.util.xml.XmlUtil;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.w3c.dom.Document;\r
-import org.w3c.dom.Element;\r
-\r
-public class DefaultStopExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {\r
-\r
-    public static final String STOP_EXI = "stop-exi";\r
-    private NetconfServerSession netconfSession;\r
-\r
-    private static final Logger logger = LoggerFactory\r
-            .getLogger(DefaultStartExi.class);\r
-\r
-    public DefaultStopExi(String netconfSessionIdForReporting) {\r
-        super(netconfSessionIdForReporting);\r
-    }\r
-\r
-    @Override\r
-    protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException {\r
-        logger.debug("Received stop-exi message {} ", XmlUtil.toString(operationElement));\r
-\r
-        netconfSession.stopExiCommunication();\r
-\r
-        Element getSchemaResult = document.createElementNS( XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, XmlNetconfConstants.OK);\r
-        logger.trace("{} operation successful", STOP_EXI);\r
-        return getSchemaResult;\r
-    }\r
-\r
-    @Override\r
-    protected String getOperationName() {\r
-        return STOP_EXI;\r
-    }\r
-\r
-    @Override\r
-    protected String getOperationNamespace() {\r
-        return XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_EXI_1_0;\r
-    }\r
-\r
-    @Override\r
-    public void setNetconfSession(NetconfServerSession s) {\r
-        this.netconfSession = s;\r
-    }\r
-}\r
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.netconf.impl.mapping.operations;
+
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
+import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
+import org.opendaylight.controller.netconf.impl.NetconfServerSession;
+import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;
+import org.opendaylight.controller.netconf.util.xml.XmlElement;
+import org.opendaylight.controller.netconf.util.xml.XmlUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class DefaultStopExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {
+
+    public static final String STOP_EXI = "stop-exi";
+    private NetconfServerSession netconfSession;
+
+    private static final Logger logger = LoggerFactory
+            .getLogger(DefaultStartExi.class);
+
+    public DefaultStopExi(String netconfSessionIdForReporting) {
+        super(netconfSessionIdForReporting);
+    }
+
+    @Override
+    protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException {
+        logger.debug("Received stop-exi message {} ", XmlUtil.toString(operationElement));
+
+        netconfSession.stopExiCommunication();
+
+        Element getSchemaResult = document.createElementNS( XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, XmlNetconfConstants.OK);
+        logger.trace("{} operation successful", STOP_EXI);
+        return getSchemaResult;
+    }
+
+    @Override
+    protected String getOperationName() {
+        return STOP_EXI;
+    }
+
+    @Override
+    protected String getOperationNamespace() {
+        return XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_EXI_1_0;
+    }
+
+    @Override
+    public void setNetconfSession(NetconfServerSession s) {
+        this.netconfSession = s;
+    }
+}
index 531ba3c..ccd7dea 100644 (file)
@@ -48,18 +48,18 @@ public final class EXIParameters {
             final String alignmentTextContent = alignmentElement.getTextContent().trim();
 
             switch (alignmentTextContent) {
-                case EXI_PARAMETER_BIT_PACKED:
-                    options.setAlignmentType(AlignmentType.bitPacked);
-                    break;
-                case EXI_PARAMETER_BYTE_ALIGNED:
-                    options.setAlignmentType(AlignmentType.byteAligned);
-                    break;
-                case EXI_PARAMETER_COMPRESSED:
-                    options.setAlignmentType(AlignmentType.compress);
-                    break;
-                case EXI_PARAMETER_PRE_COMPRESSION:
-                    options.setAlignmentType(AlignmentType.preCompress);
-                    break;
+            case EXI_PARAMETER_BIT_PACKED:
+                options.setAlignmentType(AlignmentType.bitPacked);
+                break;
+            case EXI_PARAMETER_BYTE_ALIGNED:
+                options.setAlignmentType(AlignmentType.byteAligned);
+                break;
+            case EXI_PARAMETER_COMPRESSED:
+                options.setAlignmentType(AlignmentType.compress);
+                break;
+            case EXI_PARAMETER_PRE_COMPRESSION:
+                options.setAlignmentType(AlignmentType.preCompress);
+                break;
             }
         }
 
index e7a483e..5e94ac6 100644 (file)
@@ -1,9 +1,9 @@
-<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" a="64" message-id="a">\r
-<start-exi xmlns="urn:ietf:params:xml:ns:netconf:exi:1.0">\r
-<alignment>pre-compression</alignment>\r
-<fidelity>\r
-<dtd/>\r
-<lexical-values/>\r
-</fidelity>\r
-</start-exi>\r
-</rpc>
\ No newline at end of file
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" a="64" message-id="a">
+<start-exi xmlns="urn:ietf:params:xml:ns:netconf:exi:1.0">
+<alignment>pre-compression</alignment>
+<fidelity>
+<dtd/>
+<lexical-values/>
+</fidelity>
+</start-exi>
+</rpc>
index 6c0524a..170c753 100644 (file)
@@ -1,3 +1,3 @@
-<rpc message-id="a" a="64" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">\r
-    <stop-exi xmlns="urn:ietf:params:xml:ns:netconf:exi:1.0"/>\r
-</rpc>
\ No newline at end of file
+<rpc message-id="a" a="64" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+    <stop-exi xmlns="urn:ietf:params:xml:ns:netconf:exi:1.0"/>
+</rpc>