[hg] main-silver: BugtrackingConnector as interface

  • From: Tomas Stupka < >
  • To:
  • Subject: [hg] main-silver: BugtrackingConnector as interface
  • Date: Fri, 11 Oct 2013 11:22:39 -0700

changeset d7e614fa160b in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/d7e614fa160b
description:
        BugtrackingConnector as interface

diffstat:

 
bugtracking.bridge/test/unit/src/org/netbeans/modules/bugtracking/vcs/HookConnector.java
          |   2 +-
 
bugtracking.kenai/test/unit/src/org/netbeans/modules/bugtracking/kenai/IssueAccessorTest.java
     |   2 +-
 bugtracking/src/org/netbeans/modules/bugtracking/DelegatingConnector.java    
                     |   4 +-
 bugtracking/src/org/netbeans/modules/bugtracking/jira/JiraUpdater.java       
                     |   2 +-
 
bugtracking/src/org/netbeans/modules/bugtracking/spi/BugtrackingConnector.java
                    |  15 ++++++---
 
bugtracking/src/org/netbeans/modules/bugtracking/team/spi/TeamBugtrackingConnector.java
           |   2 +-
 bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ManagerTest.java  
                     |   2 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RecentIssuesTest.java
                  |   2 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RepositoryRegistryTest.java
            |   2 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
              |   2 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/dummies/DummyBugtrackingConnector.java
 |   2 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/query/QTCTestHidden.java
            |   2 +-
 localtasks/src/org/netbeans/modules/localtasks/LocalTaskConnector.java       
                     |   2 +-
 13 files changed, 23 insertions(+), 18 deletions(-)

diffs (190 lines):

diff --git 
a/bugtracking.bridge/test/unit/src/org/netbeans/modules/bugtracking/vcs/HookConnector.java
 
b/bugtracking.bridge/test/unit/src/org/netbeans/modules/bugtracking/vcs/HookConnector.java
--- 
a/bugtracking.bridge/test/unit/src/org/netbeans/modules/bugtracking/vcs/HookConnector.java
+++ 
b/bugtracking.bridge/test/unit/src/org/netbeans/modules/bugtracking/vcs/HookConnector.java
@@ -57,7 +57,7 @@
     displayName=HookConnector.ID,
     tooltip=HookConnector.ID
 )    
-public class HookConnector extends BugtrackingConnector {
+public class HookConnector implements BugtrackingConnector {
     public static final String ID = "HookTestConnector";
     
     private static HookConnector instance;
diff --git 
a/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugtracking/kenai/IssueAccessorTest.java
 
b/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugtracking/kenai/IssueAccessorTest.java
--- 
a/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugtracking/kenai/IssueAccessorTest.java
+++ 
b/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugtracking/kenai/IssueAccessorTest.java
@@ -285,7 +285,7 @@
             tooltip=IATestConnector.ID,
             id=IATestConnector.ID
     )
-    public static class IATestConnector extends BugtrackingConnector {
+    public static class IATestConnector implements BugtrackingConnector {
         public final static String ID = "KenaiCconector";
         static Repository kolibaRepository;
 //        static TestRepository goldenProjectRepository;
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/DelegatingConnector.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/DelegatingConnector.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/DelegatingConnector.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/DelegatingConnector.java
@@ -54,13 +54,13 @@
  *
  * @author Tomas Stupka
  */
-public class DelegatingConnector extends BugtrackingConnector {
+public class DelegatingConnector implements BugtrackingConnector {
     
     private static final boolean OVERRIDE_REPOSITORY_MANAGEMENT = 
Boolean.getBoolean("org.netbeans.modules.bugtracking.connector.overrrideRepositoryManagement");
 // NOI18N
     
     private final Map<?, ?> map;
     private final String tooltip;
-    private Image image;
+    private final Image image;
     private final String id;
     private final String displayName;
     private final boolean providesRepositoryManagement;
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/jira/JiraUpdater.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/jira/JiraUpdater.java
--- a/bugtracking/src/org/netbeans/modules/bugtracking/jira/JiraUpdater.java
+++ b/bugtracking/src/org/netbeans/modules/bugtracking/jira/JiraUpdater.java
@@ -219,7 +219,7 @@
         return panel;
     }
     
-    private class JiraProxyConector extends BugtrackingConnector {
+    private class JiraProxyConector implements BugtrackingConnector {
         private BugtrackingFactory<Object, Object, Object> f = new 
BugtrackingFactory<Object, Object, Object>();
         @Override
         public Repository createRepository() {
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/spi/BugtrackingConnector.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/spi/BugtrackingConnector.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/spi/BugtrackingConnector.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/spi/BugtrackingConnector.java
@@ -54,25 +54,30 @@
  * @author Tomas Stupka
  */
 // XXX provide commit hook support instead of addComment() and 
addAttachent() in Issue
-public abstract class BugtrackingConnector {
+public interface BugtrackingConnector {
 
     /**
+     * Creates a {@link Repository} instance.
      * 
-     * @param info
-     * @return 
+     * @param info repository information based on which the repository 
should be created
+     * 
+     * @return a {@link Repository} instance.
+     * @see BugtrackingFactory
      */
-    public abstract Repository createRepository(RepositoryInfo info);  
+    public Repository createRepository(RepositoryInfo info);  
     
     /**
      * Creates a new repository instance.
      * 
      * @return the created repository
+     * @see BugtrackingFactory
      */
-    public abstract Repository createRepository();
+    public Repository createRepository();
 
     @Retention(RetentionPolicy.SOURCE)
     @Target({ElementType.TYPE, ElementType.METHOD})
     public @interface Registration {    
+        
         /**
          * Returns a unique ID for this connector
          *
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/team/spi/TeamBugtrackingConnector.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/team/spi/TeamBugtrackingConnector.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/team/spi/TeamBugtrackingConnector.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/team/spi/TeamBugtrackingConnector.java
@@ -50,7 +50,7 @@
  * 
  * @author tomas
  */
-public abstract class TeamBugtrackingConnector extends BugtrackingConnector {
+public abstract class TeamBugtrackingConnector implements 
BugtrackingConnector {
     
     public enum BugtrackingType {
         BUGZILLA,
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ManagerTest.java 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ManagerTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ManagerTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ManagerTest.java
@@ -93,7 +93,7 @@
         displayName="ManagerTestConector",
         tooltip="ManagerTestConector"
     )    
-    public static class MyConnector extends BugtrackingConnector {
+    public static class MyConnector implements BugtrackingConnector {
         public MyConnector() {
         }
 
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RecentIssuesTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RecentIssuesTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RecentIssuesTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RecentIssuesTest.java
@@ -262,7 +262,7 @@
         }
     }
 
-    private class RITestConector extends BugtrackingConnector {
+    private class RITestConector implements BugtrackingConnector {
         @Override
         public Repository createRepository(RepositoryInfo info) {
             throw new UnsupportedOperationException("Not supported yet.");
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RepositoryRegistryTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RepositoryRegistryTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RepositoryRegistryTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/RepositoryRegistryTest.java
@@ -238,7 +238,7 @@
     
     private static final String ID_CONNECTOR1 = 
"RepositoryRegistryTestConector1";
     @BugtrackingConnector.Registration 
(id=ID_CONNECTOR1,displayName=ID_CONNECTOR1,tooltip=ID_CONNECTOR1)    
-    public static class MyConnector1 extends BugtrackingConnector {
+    public static class MyConnector1 implements BugtrackingConnector {
         public MyConnector1() {
         }
 
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
@@ -71,7 +71,7 @@
     id=APITestConnector.ID_CONNECTOR,
     displayName=APITestConnector.ID_CONNECTOR,
     tooltip=APITestConnector.ID_CONNECTOR)    
-public class APITestConnector extends BugtrackingConnector {
+public class APITestConnector implements BugtrackingConnector {
     
     private static final BugtrackingFactory<APITestRepository, APITestQuery, 
APITestIssue> factory = 
             new BugtrackingFactory<APITestRepository, APITestQuery, 
APITestIssue>();
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/dummies/DummyBugtrackingConnector.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/dummies/DummyBugtrackingConnector.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/dummies/DummyBugtrackingConnector.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/dummies/DummyBugtrackingConnector.java
@@ -61,7 +61,7 @@
     displayName=DummyBugtrackingConnector.DISPLAY_NAME,
     tooltip=DummyBugtrackingConnector.TOOLTIP
 )    
-public class DummyBugtrackingConnector extends BugtrackingConnector {
+public class DummyBugtrackingConnector implements BugtrackingConnector {
     public static final String ID = "DummyBugtrackingConnector";
     public static final String DISPLAY_NAME = "Dummy bugtracking connector";
     public static final String TOOLTIP = "bugtracking connector created for 
testing purposes";
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/query/QTCTestHidden.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/query/QTCTestHidden.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/query/QTCTestHidden.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/query/QTCTestHidden.java
@@ -296,7 +296,7 @@
         displayName="Dummy bugtracking connector",
         tooltip="bugtracking connector created for testing purposes"
     )
-    public static class MyConnector extends BugtrackingConnector {
+    public static class MyConnector implements BugtrackingConnector {
         final static String ID = "QTCconector";
 
         public MyConnector() {
diff --git 
a/localtasks/src/org/netbeans/modules/localtasks/LocalTaskConnector.java 
b/localtasks/src/org/netbeans/modules/localtasks/LocalTaskConnector.java
--- a/localtasks/src/org/netbeans/modules/localtasks/LocalTaskConnector.java
+++ b/localtasks/src/org/netbeans/modules/localtasks/LocalTaskConnector.java
@@ -56,7 +56,7 @@
         tooltip = "#LBL_ConnectorTooltip",
         providesRepositoryManagement = false
 )
-public class LocalTaskConnector extends BugtrackingConnector {
+public class LocalTaskConnector implements BugtrackingConnector {
     public static final String CONNECTOR_NAME = "NB_LOCAL_TASKS";
 
     @Override

[hg] main-silver: BugtrackingConnector as interface

Tomas Stupka 10/11/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close