Replaced all tabs with spaces 58/8258/1
authorEd Warnicke <eaw@cisco.com>
Mon, 23 Jun 2014 20:49:42 +0000 (15:49 -0500)
committerEd Warnicke <eaw@cisco.com>
Mon, 23 Jun 2014 20:49:42 +0000 (15:49 -0500)
Otherwise, if someone uses this archetype in a project
that checkstyles for it, things will fail badly.

Change-Id: I824cae2b87d67bcb443093be3b611467802b78a9
Signed-off-by: Ed Warnicke <eaw@cisco.com>
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/consumer/pom.xml
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/consumer/src/main/java/consumer/ConsumerActivator.java
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/generate/pom.xml
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/generate/src/main/template/view.vm
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/generate/src/main/template/yang.vm
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/model/src/main/yang/yang.sample
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/pom.xml
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/web/pom.xml
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/web/src/main/resources/WEB-INF/md-sal-app-servlet.xml
main/archetypes/archetype-md-sal-app-simple/src/main/resources/archetype-resources/web/src/main/resources/WEB-INF/web.xml

index dd9d3d90296b6a0419f4a159532f214e080081a2..0c49fe017b6c3bf4e72664ffdfb54f8dc679d04d 100644 (file)
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <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">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <artifactId>${rootArtifactId}</artifactId>\r
-               <groupId>${groupId}</groupId>\r
-               <version>${version}</version>\r
-       </parent>\r
-       <artifactId>${rootArtifactId}-consumer</artifactId>\r
-       <packaging>bundle</packaging>\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <artifactId>${rootArtifactId}</artifactId>\r
+        <groupId>${groupId}</groupId>\r
+        <version>${version}</version>\r
+    </parent>\r
+    <artifactId>${rootArtifactId}-consumer</artifactId>\r
+    <packaging>bundle</packaging>\r
     <scm>\r
       <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
       <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
       <tag>HEAD</tag>\r
   </scm>\r
 \r
-       <build>\r
-               <plugins>\r
-                       <plugin>\r
-                               <groupId>org.apache.felix</groupId>\r
-                               <artifactId>maven-bundle-plugin</artifactId>\r
-                               <version>${bundle.plugin.version}</version>\r
-                               <extensions>true</extensions>\r
-                               <configuration>\r
+    <build>\r
+        <plugins>\r
+            <plugin>\r
+                <groupId>org.apache.felix</groupId>\r
+                <artifactId>maven-bundle-plugin</artifactId>\r
+                <version>${bundle.plugin.version}</version>\r
+                <extensions>true</extensions>\r
+                <configuration>\r
                     <instructions>\r
                         <Export-Package>org.opendaylight.controller.config.yang.config.${appName}_consumer.impl</Export-Package>\r
                         <Import-Package>*</Import-Package>\r
                     </instructions>\r
-                               </configuration>\r
-                       </plugin>\r
+                </configuration>\r
+            </plugin>\r
             <plugin>\r
                 <groupId>org.opendaylight.yangtools</groupId>\r
                 <artifactId>yang-maven-plugin</artifactId>\r
                     </dependency>\r
                 </dependencies>\r
             </plugin>\r
-               </plugins>\r
-       </build>\r
+        </plugins>\r
+    </build>\r
 \r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>${groupId}</groupId>\r
-                       <artifactId>${rootArtifactId}-model</artifactId>\r
-                       <version>${version}</version>\r
-               </dependency>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>${groupId}</groupId>\r
+            <artifactId>${rootArtifactId}-model</artifactId>\r
+            <version>${version}</version>\r
+        </dependency>\r
         <dependency>\r
             <groupId>org.opendaylight.controller</groupId>\r
             <artifactId>config-api</artifactId>\r
             <artifactId>sal-binding-config</artifactId>\r
             <version>${mdsal.version}</version>\r
         </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-binding-api</artifactId>\r
-                       <version>${mdsal.version}</version>\r
-               </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-binding-api</artifactId>\r
+            <version>${mdsal.version}</version>\r
+        </dependency>\r
         <dependency>\r
             <groupId>org.opendaylight.controller</groupId>\r
             <artifactId>sal-common-util</artifactId>\r
             <version>${mdsal.version}</version>\r
         </dependency>\r
-               <dependency>\r
+        <dependency>\r
       <groupId>equinoxSDK381</groupId>\r
       <artifactId>org.eclipse.osgi</artifactId>\r
       <version>${equinox.osgi.version}</version>\r
     </dependency>\r
-       </dependencies>\r
+    </dependencies>\r
 </project>\r
index 7bea919b22d6fdf49bec993129274186f4d351ae..726e1ac6dbf4525563c7732430de3ad1e796b4a4 100644 (file)
@@ -1,88 +1,88 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <artifactId>${rootArtifactId}</artifactId>\r
-               <groupId>${groupId}</groupId>\r
-               <version>${version}</version>\r
-       </parent>\r
-       <artifactId>${rootArtifactId}-generate</artifactId>\r
-       <packaging>jar</packaging>\r
-       <scm>\r
-               <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
-               <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
-               <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>\r
-               <tag>HEAD</tag>\r
-       </scm>\r
-       <profiles>\r
-               <profile>\r
-                       <id>generateCode</id>\r
-                       <activation>\r
-                               <property>\r
-                                       <name>gen</name>\r
-                               </property>\r
-                       </activation>\r
-                       <build>\r
-                               <plugins>\r
-                                   <!-- Move your template files under classes folder, so code generator can use them -->\r
-                                       <plugin>\r
-                                               <artifactId>maven-resources-plugin</artifactId>\r
-                                               <version>2.6</version>\r
-                                               <executions>\r
-                                                       <execution>\r
-                                                               <id>copy-resources</id>\r
-                                                               <phase>process-classes</phase>\r
-                                                               <goals>\r
-                                                                       <goal>copy-resources</goal>\r
-                                                               </goals>\r
-                                                               <configuration>\r
-                                                                       <outputDirectory>${basedir}/target/classes</outputDirectory>\r
-                                                                       <resources>\r
-                                                                               <resource>\r
-                                                                                       <directory>src/main/template</directory>\r
-                                                                                       <filtering>true</filtering>\r
-                                                                               </resource>\r
-                                                                       </resources>\r
-                                                               </configuration>\r
-                                                       </execution>\r
-                                               </executions>\r
-                                       </plugin>\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <artifactId>${rootArtifactId}</artifactId>\r
+        <groupId>${groupId}</groupId>\r
+        <version>${version}</version>\r
+    </parent>\r
+    <artifactId>${rootArtifactId}-generate</artifactId>\r
+    <packaging>jar</packaging>\r
+    <scm>\r
+        <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+        <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>\r
+        <tag>HEAD</tag>\r
+    </scm>\r
+    <profiles>\r
+        <profile>\r
+            <id>generateCode</id>\r
+            <activation>\r
+                <property>\r
+                    <name>gen</name>\r
+                </property>\r
+            </activation>\r
+            <build>\r
+                <plugins>\r
+                    <!-- Move your template files under classes folder, so code generator can use them -->\r
+                    <plugin>\r
+                        <artifactId>maven-resources-plugin</artifactId>\r
+                        <version>2.6</version>\r
+                        <executions>\r
+                            <execution>\r
+                                <id>copy-resources</id>\r
+                                <phase>process-classes</phase>\r
+                                <goals>\r
+                                    <goal>copy-resources</goal>\r
+                                </goals>\r
+                                <configuration>\r
+                                    <outputDirectory>${basedir}/target/classes</outputDirectory>\r
+                                    <resources>\r
+                                        <resource>\r
+                                            <directory>src/main/template</directory>\r
+                                            <filtering>true</filtering>\r
+                                        </resource>\r
+                                    </resources>\r
+                                </configuration>\r
+                            </execution>\r
+                        </executions>\r
+                    </plugin>\r
                     <!-- run your code generator only once-->\r
-                                       <plugin>\r
-                                               <groupId>org.codehaus.mojo</groupId>\r
-                                               <artifactId>exec-maven-plugin</artifactId>\r
-                                               <version>1.2.1</version>\r
-                                               <executions>\r
-                                                       <execution>\r
-                                                               <phase>process-classes</phase>\r
-                                                               <goals>\r
-                                                                       <goal>java</goal>\r
-                                                               </goals>\r
-                                                               <configuration>\r
-                                                                       <mainClass>${package}.generate.CodeGenerator</mainClass>\r
-                                                                       <arguments>\r
-                                                                               <argument>${appName}</argument>\r
-                                                                               <argument>${modelFields}</argument>\r
-                                                                       </arguments>\r
-                                                               </configuration>\r
-                                                       </execution>\r
-                                               </executions>\r
-                                       </plugin>\r
-                               </plugins>\r
-                       </build>\r
-               </profile>\r
-       </profiles>\r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>org.apache.velocity</groupId>\r
-                       <artifactId>velocity</artifactId>\r
-                       <version>1.6.4</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>com.googlecode.json-simple</groupId>\r
-                       <artifactId>json-simple</artifactId>\r
-                       <version>1.1</version>\r
-               </dependency>\r
-       </dependencies>\r
+                    <plugin>\r
+                        <groupId>org.codehaus.mojo</groupId>\r
+                        <artifactId>exec-maven-plugin</artifactId>\r
+                        <version>1.2.1</version>\r
+                        <executions>\r
+                            <execution>\r
+                                <phase>process-classes</phase>\r
+                                <goals>\r
+                                    <goal>java</goal>\r
+                                </goals>\r
+                                <configuration>\r
+                                    <mainClass>${package}.generate.CodeGenerator</mainClass>\r
+                                    <arguments>\r
+                                        <argument>${appName}</argument>\r
+                                        <argument>${modelFields}</argument>\r
+                                    </arguments>\r
+                                </configuration>\r
+                            </execution>\r
+                        </executions>\r
+                    </plugin>\r
+                </plugins>\r
+            </build>\r
+        </profile>\r
+    </profiles>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.apache.velocity</groupId>\r
+            <artifactId>velocity</artifactId>\r
+            <version>1.6.4</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>com.googlecode.json-simple</groupId>\r
+            <artifactId>json-simple</artifactId>\r
+            <version>1.1</version>\r
+        </dependency>\r
+    </dependencies>\r
 </project>\r
index 9f932da33b85c5cd461f4ecc1ee154e6e1d6b417..aaf49756205f9e1f26d596d929385e29575b50d9 100644 (file)
@@ -18,8 +18,8 @@
   <body>
   <div class="container">
     <h2>${app} application</h2>
-       <div class="actions" style="padding:15px 0px;">
-       <button class="btn btn-primary" data-toggle="modal" data-target="#myModal">
+    <div class="actions" style="padding:15px 0px;">
+    <button class="btn btn-primary" data-toggle="modal" data-target="#myModal">
       Add entry
     </button>
     </div>
             <h4 class="modal-title" id="myModalLabel">Add entry</h4>
           </div>
           <div class="modal-body">
-                   <form id="addEntry" role="form">
-                     #foreach( $field in $fields )
-                       <div class="form-group">
+            <form id="addEntry" role="form">
+              #foreach( $field in $fields )
+                <div class="form-group">
                 <label for="${field}">${field}</label>
                 <input type="text" class="form-control" name="${field}" id="${field}">
               </div>
-                     #end
+              #end
               <div class="form-group">
                 <button type="submit" class="btn btn-primary">Save</button>
               </div>
 <script type="text/javascript">
 jQuery(document).ready(function(){
   jQuery.ajax({
-         url: window.location.origin +"/restconf/operational/${app}:${app}",
-         dataType: "json",
-         success: function(data) { 
-           jQuery.each(data.${app}.entry, 
-                 function(){ 
-               var rowEntry = "<tr><td>" +
-                       this['entry-id']+"</td>"
-                       #foreach( $field in $fields )
-                         + "<td>" + this.${field} + "</td>"
-               #end
-                       
-                       +"</tr>";
-               console.log(rowEntry);
-               jQuery(".table tbody").append(rowEntry);
-           });
-         },
-         error : function(){ console.log("no data found");}
+      url: window.location.origin +"/restconf/operational/${app}:${app}",
+      dataType: "json",
+      success: function(data) { 
+        jQuery.each(data.${app}.entry, 
+          function(){ 
+            var rowEntry = "<tr><td>" +
+            this['entry-id']+"</td>"
+            #foreach( $field in $fields )
+              + "<td>" + this.${field} + "</td>"
+            #end
+            
+            +"</tr>";
+            console.log(rowEntry);
+            jQuery(".table tbody").append(rowEntry);
+        });
+      },
+      error : function(){ console.log("no data found");}
   });
 });
 
 jQuery("form").on( "submit", function( event ) {
-         event.preventDefault();
-         var entryId = Math.random()*100000000000000000;
-         var formData = '{"input":{"entryField":[' 
-         #foreach( $field in $fields )
-          + '{"key":"${field}", "value":"'+ jQuery("input[name='${field}']").val()+ '"}'
-           #if($velocityCount != $fields.size()) 
-             +','
-           #end
-         #end
-         +'], "entryId" : "'+entryId+'" } }';
-         console.log( jQuery( this ).serialize() );
-         jQuery.ajax({
-                 url: window.location.origin +"/restconf/operations/${app}:saveEntry",
-                 type: "POST",
-                 headers: { 
-                       'Accept': 'application/json',
-                       'Content-Type': 'application/json' 
-                 },
-                 data: formData,
-                 dataType: "json",
-                 success: function(data) { 
-                         location.reload(true);
-                 },
-                 error : function(){ console.log("Error");}
-         });
-         
-       });
+      event.preventDefault();
+      var entryId = Math.random()*100000000000000000;
+      var formData = '{"input":{"entryField":[' 
+      #foreach( $field in $fields )
+       + '{"key":"${field}", "value":"'+ jQuery("input[name='${field}']").val()+ '"}'
+        #if($velocityCount != $fields.size()) 
+          +','
+        #end
+      #end
+      +'], "entryId" : "'+entryId+'" } }';
+      console.log( jQuery( this ).serialize() );
+      jQuery.ajax({
+          url: window.location.origin +"/restconf/operations/${app}:saveEntry",
+          type: "POST",
+          headers: { 
+                'Accept': 'application/json',
+                'Content-Type': 'application/json' 
+          },
+          data: formData,
+          dataType: "json",
+          success: function(data) { 
+              location.reload(true);
+          },
+          error : function(){ console.log("Error");}
+      });
+      
+    });
 </script>
     
   </body>
index cd35b85aa181e8d7c3b9da97ebd8c2a98cd53173..552457128a6d95e5707050a2a09e41a74382b163 100644 (file)
@@ -6,8 +6,8 @@ module $app {
 
     prefix $app;
 
-       import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
-       
+    import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
+    
     organization "Netconf Central";
 
     contact
@@ -30,7 +30,7 @@ module $app {
       description
         "Top-level container for all application database objects.";
       list entry {
-       key "entry-id";
+        key "entry-id";
         leaf entry-id {
           type entry-id;
           description "identifier of single list of entries.";
index cc90784eaa10856ddcabeb85d5cabfc659bbb2b1..99de1b37c9cdb16893578cf96f9d0c240b1d15a4 100644 (file)
@@ -6,8 +6,8 @@ module task {
 
     prefix task;
 
-       import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
-       
+    import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
+    
     organization "Netconf Central";
 
     contact
@@ -30,7 +30,7 @@ module task {
       description
         "Top-level container for all application database objects.";
       list entry {
-       key "entry-id";
+        key "entry-id";
         leaf entry-id {
           type entry-id;
           description "identifier of single list of entries.";
index 01ba656496eadaa296ab8e4a8437a76316b78845..8cb2a3082474a7706ed37b1f65444e7edc1266d3 100644 (file)
@@ -18,9 +18,9 @@
     <mdsal.version>1.1-SNAPSHOT</mdsal.version>
     <equinox.osgi.version>3.8.1.v20120830-144521</equinox.osgi.version>
     <ietf-inet-types.version>2010.09.24.4-SNAPSHOT</ietf-inet-types.version>
-       <ietf-yang-types.version>2010.09.24.4-SNAPSHOT</ietf-yang-types.version>
+    <ietf-yang-types.version>2010.09.24.4-SNAPSHOT</ietf-yang-types.version>
     <spring.version>3.1.3.RELEASE</spring.version>
-       <jackson.version>1.9.10</jackson.version>
+    <jackson.version>1.9.10</jackson.version>
     <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
     <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
     <config.version>0.2.5-SNAPSHOT</config.version>
index d8e4bc586447b3767358160838dcf7ec1f6f3085..efb4e82fcd4410f09c80a7ca8857e38a2e8a5169 100644 (file)
     </plugins>
   </build>
   <dependencies>
-       <!-- Spring 3 dependencies -->
-               <dependency>
-                       <groupId>org.springframework</groupId>
-                       <artifactId>spring-core</artifactId>
-                       <version>${spring.version}</version>
-               </dependency>
+    <!-- Spring 3 dependencies -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
  
-               <dependency>
-                       <groupId>org.springframework</groupId>
-                       <artifactId>spring-web</artifactId>
-                       <version>${spring.version}</version>
-               </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
  
-               <dependency>
-                       <groupId>org.springframework</groupId>
-                       <artifactId>spring-webmvc</artifactId>
-                       <version>${spring.version}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.codehaus.jackson</groupId>
-                       <artifactId>jackson-mapper-asl</artifactId>
-                       <version>${jackson.version}</version>
-               </dependency>
-               </dependencies>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        </dependencies>
   </project>
index ee81d11ea2e35304c581b608de93fabb4116dd2f..ef7c255a857c3981447440e309ffe16c5fbaf53c 100644 (file)
@@ -7,22 +7,22 @@
                       http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
                       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
  
-       <context:component-scan base-package="org.opendaylight.controller.app.web" />
+    <context:component-scan base-package="org.opendaylight.controller.app.web" />
 
     <mvc:resources mapping="/js/**" location="/js/" />
   <mvc:resources mapping="/css/**" location="/css/" />
   <mvc:resources mapping="/img/**" location="/img/" />
 
-       <mvc:annotation-driven />
-       
-       <bean
-               class="org.springframework.web.servlet.view.InternalResourceViewResolver">
-               <property name="prefix">
-                       <value>/WEB-INF/pages/</value>
-               </property>
-               <property name="suffix">
-                       <value>.jsp</value>
-               </property>
-       </bean>
+    <mvc:annotation-driven />
+    
+    <bean
+        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+        <property name="prefix">
+            <value>/WEB-INF/pages/</value>
+        </property>
+        <property name="suffix">
+            <value>.jsp</value>
+        </property>
+    </bean>
  
 </beans>
\ No newline at end of file
index 9d3b19bf3dede662e76974206e374b149552b08e..93365b725bc09de4d043e09463916bca515de984 100644 (file)
@@ -4,17 +4,17 @@
   <display-name>MD-SAL Application</display-name>
   
   <servlet>
-               <servlet-name>md-sal-app</servlet-name>
-               <servlet-class>
-                       org.springframework.web.servlet.DispatcherServlet
-               </servlet-class>
-               <load-on-startup>1</load-on-startup>
-       </servlet>
+        <servlet-name>md-sal-app</servlet-name>
+        <servlet-class>
+            org.springframework.web.servlet.DispatcherServlet
+        </servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
  
-       <servlet-mapping>
-               <servlet-name>md-sal-app</servlet-name>
-               <url-pattern>/</url-pattern>
-       </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>md-sal-app</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
  
-       
+    
 </web-app>