Package hudson.model

Class Api

    • Field Detail

      • bean

        public final Object bean
        Model object to be exposed as XML/JSON/etc.
    • Constructor Detail

      • Api

        public Api​(Object bean)
    • Method Detail

      • getDisplayName

        public String getDisplayName()
      • getSearchUrl

        public String getSearchUrl()
        Description copied from interface: SearchItem
        Returns the URL of this item relative to the parent SearchItem.
        Returns:
        URL like "foo" or "foo/bar". The path can end with '/'. The path that starts with '/' will be interpreted as the absolute path (within the context path of Jenkins.)
      • doXml

        public void doXml​(org.kohsuke.stapler.StaplerRequest req,
                          org.kohsuke.stapler.StaplerResponse rsp,
                          @QueryParameter
                          String xpath,
                          @QueryParameter
                          String wrapper,
                          @QueryParameter
                          String tree,
                          @QueryParameter
                          int depth)
                   throws IOException,
                          javax.servlet.ServletException
        Exposes the bean as XML.
        Throws:
        IOException
        javax.servlet.ServletException
      • doSchema

        public void doSchema​(org.kohsuke.stapler.StaplerRequest req,
                             org.kohsuke.stapler.StaplerResponse rsp)
                      throws IOException,
                             javax.servlet.ServletException
        Generate schema.
        Throws:
        IOException
        javax.servlet.ServletException
      • doJson

        public void doJson​(org.kohsuke.stapler.StaplerRequest req,
                           org.kohsuke.stapler.StaplerResponse rsp)
                    throws IOException,
                           javax.servlet.ServletException
        Exposes the bean as JSON.
        Throws:
        IOException
        javax.servlet.ServletException
      • doPython

        public void doPython​(org.kohsuke.stapler.StaplerRequest req,
                             org.kohsuke.stapler.StaplerResponse rsp)
                      throws IOException,
                             javax.servlet.ServletException
        Exposes the bean as Python literal.
        Throws:
        IOException
        javax.servlet.ServletException
      • setHeaders

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        protected void setHeaders​(org.kohsuke.stapler.StaplerResponse rsp)