All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hudsontrayapp.PluginImpl Maven / Gradle / Ivy

The newest version!
package hudsontrayapp;

import java.io.IOException;
import java.io.Writer;

import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;

import hudson.Plugin;
import hudson.model.Hudson;

/**
 * Entry point of a plugin.
 *
 * 

* There must be one {@link Plugin} class in each plugin. * See javadoc of {@link Plugin} for more about what can be done on this class. * * @author Kohsuke Kawaguchi * @plugin hudsontrayapp */ public class PluginImpl extends Plugin { public void doLaunch(StaplerRequest req, StaplerResponse res) throws IOException { res.setHeader("Content-Disposition", "filename=launch.jnlp"); res.setContentType("application/x-java-jnlp-file"); Writer w = res.getWriter(); w.write(""); w.write(""); w.write(""); w.write("Hudson Tray Application"); w.write("David Hayes"); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write("server="); w.write(req.getRootPath()); w.write("/"); w.write(""); w.write(""); w.close(); } public void doJdic(StaplerRequest req, StaplerResponse res) throws IOException { res.setHeader("Content-Disposition", "filename=jdic.jnlp"); res.setContentType("application/x-java-jnlp-file"); Writer w = res.getWriter(); w.write(""); w.write(""); w.write(""); w.write("JDesktop Integration Components"); w.write("Hudson Tray Application"); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.write(""); w.close(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy