move NuGet trigger stub class to proper package
authorEugene.Petrenko <eugene.petrenko@gmail.com>
Mon, 11 Jul 2011 15:09:20 +0000 (19:09 +0400)
committerEugene.Petrenko <eugene.petrenko@gmail.com>
Wed, 13 Jul 2011 16:50:44 +0000 (20:50 +0400)
nuget-server/src/META-INF/build-server-plugin-nuget.xml
nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetTrigger.java [new file with mode: 0644]

index 45c055a0443ff08dfc6647fcc37cb67bda793cd2..e8ffa2c6a9d62c6aca5652b1c6dab5920c8514ac 100644 (file)
@@ -8,7 +8,7 @@
   <bean class="jetbrains.buildServer.nuget.server.NuGetPublishRunType"/>\r
   <bean class="jetbrains.buildServer.nuget.server.NuGetDownloadedPackagesTab"/>\r
   <bean class="jetbrains.buildServer.nuget.server.NuGetDownloadFeature"/>\r
-  <bean class="jetbrains.buildServer.nuget.server.NuGetTrigger"/>\r
+  <bean class="jetbrains.buildServer.nuget.server.trigger.NuGetTrigger"/>\r
 -->\r
 \r
   <bean class="jetbrains.buildServer.nuget.server.install.PackageInstallerRunTypeRegistrar"/>\r
diff --git a/nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetTrigger.java b/nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetTrigger.java
new file mode 100644 (file)
index 0000000..685d0cb
--- /dev/null
@@ -0,0 +1,50 @@
+package jetbrains.buildServer.nuget.server.trigger;\r
+\r
+import jetbrains.buildServer.buildTriggers.*;\r
+import jetbrains.buildServer.web.openapi.PluginDescriptor;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+/**\r
+ * @author Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ *         Date: 03.05.11 15:25\r
+ */\r
+public class NuGetTrigger extends BuildTriggerService {\r
+  private final PluginDescriptor myDescriptor;\r
+\r
+  public NuGetTrigger(final PluginDescriptor descriptor) {\r
+    myDescriptor = descriptor;\r
+  }\r
+\r
+  @NotNull\r
+  @Override\r
+  public String getName() {\r
+    return "NuGet";\r
+  }\r
+\r
+  @NotNull\r
+  @Override\r
+  public String getDisplayName() {\r
+    return "NuGet Dependency Trigger";\r
+  }\r
+\r
+  @NotNull\r
+  @Override\r
+  public String describeTrigger(@NotNull final BuildTriggerDescriptor trigger) {\r
+    return "Trigger build on NuGet dependency change";\r
+  }\r
+\r
+  @NotNull\r
+  @Override\r
+  public BuildTriggeringPolicy getBuildTriggeringPolicy() {\r
+    return new PolledBuildTrigger() {\r
+      @Override\r
+      public void triggerBuild(@NotNull final PolledTriggerContext context) throws BuildTriggerException {\r
+      }\r
+    };\r
+  }\r
+\r
+  @Override\r
+  public String getEditParametersUrl() {\r
+    return myDescriptor.getPluginResourcesPath("NuGetTrigger.jsp");\r
+  }\r
+}\r