Actionable.getAllActions
Code IndexAdd Codota to your IDE (free)

Best code snippets using hudson.model.Actionable.getAllActions(Showing top 12 results out of 315)

origin: org.jenkins-ci.main/jenkins-core

public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
  for (Action a : getAllActions()) {
    if(a==null)
      continue;   // be defensive
    String urlName = a.getUrlName();
    if(urlName==null)
      continue;
    if(urlName.equals(token))
      return a;
  }
  return null;
}
origin: org.jenkins-ci.plugins/cloudbees-folder

  @Override public Set<String> call() throws Exception {
    Set<String> remaining = new TreeSet<String>();
    for (Item i : Jenkins.getActiveInstance().getAllItems()) {
      remaining.add(i.getFullName());
      if (i instanceof Actionable) {
        ((Actionable) i).getAllActions();
      }
    }
    return remaining;
  }
}).get());
origin: kohsuke/jenkins

/**
 * Gets all actions of a specified type that contributed to this object.
 *
 * @param type The type of action to return.
 * @return
 *      may be empty but never null.
 * @see #getAction(Class)
 */
public <T extends Action> List<T> getActions(Class<T> type) {
  return Util.filter(getAllActions(), type);
}
origin: kohsuke/jenkins

/**
 * Gets the action (first instance to be found) of a specified type that contributed to this build.
 *
 * @param type
 * @return The action or <code>null</code> if no such actions exist.
 * @see #getActions(Class)
 */
public <T extends Action> T getAction(Class<T> type) {
  for (Action a : getAllActions())
    if (type.isInstance(a))
      return type.cast(a);
  return null;
}
origin: org.jenkins-ci.main/jenkins-core

  public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest request, StaplerResponse response, String view) throws JellyException, IOException {
    WebApp webApp = WebApp.getCurrent();
    final Script s = webApp.getMetaClass(self).getTearOff(JellyClassTearOff.class).findScript(view);
    if (s!=null) {
      JellyFacet facet = webApp.getFacet(JellyFacet.class);
      request.setAttribute("taskTags",this); // <l:task> will look for this variable and populate us
      request.setAttribute("mode","side-panel");
      // run sidepanel but ignore generated HTML
      facet.scriptInvoker.invokeScript(request,response,new Script() {
        public Script compile() throws JellyException {
          return this;
        }
        public void run(JellyContext context, XMLOutput output) throws JellyTagException {
          Functions.initPageVariables(context);
          s.run(context,output);
        }
      },self,new XMLOutput(new DefaultHandler()));
    } else
    if (self instanceof Actionable) {
      // fallback
      this.addAll(((Actionable)self).getAllActions());
    }

    return this;
  }
}
origin: org.jenkins-ci.main/jenkins-core

public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
  for (Action a : getAllActions()) {
    if(a==null)
      continue;   // be defensive
    String urlName = a.getUrlName();
    if(urlName==null)
      continue;
    if(urlName.equals(token))
      return a;
  }
  return null;
}
origin: kohsuke/jenkins

public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
  for (Action a : getAllActions()) {
    if(a==null)
      continue;   // be defensive
    String urlName = a.getUrlName();
    if(urlName==null)
      continue;
    if(urlName.equals(token))
      return a;
  }
  return null;
}
origin: org.jenkins-ci.main/jenkins-core

public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
  for (Action a : getAllActions()) {
    if(a==null)
      continue;   // be defensive
    String urlName = a.getUrlName();
    if(urlName==null)
      continue;
    if(urlName.equals(token))
      return a;
  }
  return null;
}
origin: org.jenkins-ci.plugins/cloudbees-folder

  @Override public Set<String> call() throws Exception {
    Set<String> remaining = new TreeSet<String>();
    for (Item i : Jenkins.getActiveInstance().getAllItems()) {
      remaining.add(i.getFullName());
      if (i instanceof Actionable) {
        ((Actionable) i).getAllActions();
      }
    }
    return remaining;
  }
}).get());
origin: org.jenkins-ci.main/jenkins-core

  public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest request, StaplerResponse response, String view) throws JellyException, IOException {
    WebApp webApp = WebApp.getCurrent();
    final Script s = webApp.getMetaClass(self).getTearOff(JellyClassTearOff.class).findScript(view);
    if (s!=null) {
      JellyFacet facet = webApp.getFacet(JellyFacet.class);
      request.setAttribute("taskTags",this); // <l:task> will look for this variable and populate us
      request.setAttribute("mode","side-panel");
      // run sidepanel but ignore generated HTML
      facet.scriptInvoker.invokeScript(request,response,new Script() {
        public Script compile() throws JellyException {
          return this;
        }
        public void run(JellyContext context, XMLOutput output) throws JellyTagException {
          Functions.initPageVariables(context);
          s.run(context,output);
        }
      },self,new XMLOutput(new DefaultHandler()));
    } else
    if (self instanceof Actionable) {
      // fallback
      this.addAll(((Actionable)self).getAllActions());
    }

    return this;
  }
}
origin: org.jenkins-ci.main/jenkins-core

  public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest request, StaplerResponse response, String view) throws JellyException, IOException {
    WebApp webApp = WebApp.getCurrent();
    final Script s = webApp.getMetaClass(self).getTearOff(JellyClassTearOff.class).findScript(view);
    if (s!=null) {
      JellyFacet facet = webApp.getFacet(JellyFacet.class);
      request.setAttribute("taskTags",this); // <l:task> will look for this variable and populate us
      request.setAttribute("mode","side-panel");
      // run sidepanel but ignore generated HTML
      facet.scriptInvoker.invokeScript(request,response,new Script() {
        public Script compile() throws JellyException {
          return this;
        }
        public void run(JellyContext context, XMLOutput output) throws JellyTagException {
          Functions.initPageVariables(context);
          s.run(context,output);
        }
      },self,new XMLOutput(new DefaultHandler()));
    } else
    if (self instanceof Actionable) {
      // fallback
      this.addAll(((Actionable)self).getAllActions());
    }

    return this;
  }
}
origin: kohsuke/jenkins

  public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest request, StaplerResponse response, String view) throws JellyException, IOException {
    WebApp webApp = WebApp.getCurrent();
    final Script s = webApp.getMetaClass(self).getTearOff(JellyClassTearOff.class).findScript(view);
    if (s!=null) {
      JellyFacet facet = webApp.getFacet(JellyFacet.class);
      request.setAttribute("taskTags",this); // <l:task> will look for this variable and populate us
      request.setAttribute("mode","side-panel");
      // run sidepanel but ignore generated HTML
      facet.scriptInvoker.invokeScript(request,response,new Script() {
        public Script compile() throws JellyException {
          return this;
        }
        public void run(JellyContext context, XMLOutput output) throws JellyTagException {
          Functions.initPageVariables(context);
          s.run(context,output);
        }
      },self,new XMLOutput(new DefaultHandler()));
    } else
    if (self instanceof Actionable) {
      // fallback
      this.addAll(((Actionable)self).getAllActions());
    }

    return this;
  }
}
hudson.modelActionablegetAllActions

Javadoc

Gets all actions, transient or persistent. #getActions is supplemented with anything contributed by TransientActionFactory.

Popular methods of Actionable

  • getActions
    Gets all actions of a specified type that contributed to this object.
  • addAction
    Adds a new action. Note: calls to #getAllActions() that happen before calls to this method may not s
  • getAction
    Gets the action (first instance to be found) of a specified type that contributed to this build.
  • addOrReplaceAction
    Add an action, replacing any existing actions of the (exact) same class. Note: calls to #getAllActio
  • createFor
  • getDisplayName

Popular classes and methods

  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • getSupportFragmentManager (FragmentActivity)
  • FlowLayout (java.awt)
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)