/** * Gets the {@link Resource} that represents the workspace of this project. * Useful for locking and mutual exclusion control. * * @deprecated as of 1.319 * Projects no longer have a fixed workspace, ands builds will find an available workspace via * {@link WorkspaceList} for each build (furthermore, that happens after a build is started.) * So a {@link Resource} representation for a workspace at the project level no longer makes sense. * * <p> * If you need to lock a workspace while you do some computation, see the source code of * {@link #pollSCMChanges(TaskListener)} for how to obtain a lock of a workspace through {@link WorkspaceList}. */ @Deprecated public Resource getWorkspaceResource() { return new Resource(getFullDisplayName()+" workspace"); }
/** * {@inheritDoc} */ @Override public void writeBody(PrintWriter w) { w.println("Scheduled polling of " + project.getFullDisplayName()); } }
public UnsupportedProjectException( final AbstractProject project, final String moreDetail ) { super(String.format( "Unsupported project '%s' of type %s : %s.", project.getFullDisplayName(), project.getClass(), moreDetail)); this.project = project; }
public UnsupportedProjectException(final AbstractProject project, final String moreDetail) { super(String.format("Unsupported project '%s' of type %s : %s.", project.getFullDisplayName(), project.getClass(), moreDetail)); this.project = project; }
public UnsupportedProjectException( final AbstractProject project ) { super(String.format( "Unsupported project '%s' of type %s.", project.getFullDisplayName(), project.getClass())); this.project = project; }
public UnsupportedProjectException( final AbstractProject project ) { super(String.format( "Unsupported project '%s' of type %s.", project.getFullDisplayName(), project.getClass())); this.project = project; }
public UnsupportedProjectException( final AbstractProject project, final String moreDetail ) { super(String.format( "Unsupported project '%s' of type %s : %s.", project.getFullDisplayName(), project.getClass(), moreDetail)); this.project = project; }
public UnsupportedProjectException(final AbstractProject project) { super(String.format("Unsupported project '%s' of type %s.", project.getFullDisplayName(), project.getClass())); this.project = project; }
/** * Returns the name of the project the build belongs to in a human readable * format. */ public static String getProjectName(AbstractBuild<?, ?> build) { return build.getProject().getFullDisplayName(); } }
/** * Returns the name of the project the build belongs to in a human readable * format. */ public static String getProjectName(AbstractBuild<?, ?> build) { return build.getProject().getFullDisplayName(); } }
public String getFullDisplayName() { return getDelegate().getFullDisplayName(); }
public String getFullDisplayName() { return getDelegate().getFullDisplayName(); }
public String getFullDisplayName() { return getDelegate().getFullDisplayName(); }
private String getProjectListAsString(List<AbstractProject> projectList){ StringBuffer projectListString = new StringBuffer(); for (Iterator iterator = projectList.iterator(); iterator.hasNext();) { AbstractProject project = (AbstractProject) iterator.next(); projectListString.append(HyperlinkNote.encodeTo('/'+ project.getUrl(), project.getFullDisplayName())); if(iterator.hasNext()){ projectListString.append(", "); } } return projectListString.toString(); }
public static void handleTemplateDeleted(AbstractProject templateProject, TemplateProperty property) throws IOException { LOG.info(String.format("Template [%s] was deleted.", templateProject.getFullDisplayName())); for (AbstractProject impl : property.getImplementations()) { LOG.info(String.format("Removing template from [%s].", impl.getFullDisplayName())); TemplateImplementationProperty implProperty = (TemplateImplementationProperty) impl.getProperty(TemplateImplementationProperty.class); impl.removeProperty(TemplateImplementationProperty.class); ProjectUtils.silentSave(impl); } }
public static void handleTemplateRename(AbstractProject templateProject, TemplateProperty property, String oldFullName, String newFullName) throws IOException { LOG.info(String.format("Template [%s] was renamed. Updating implementations.", templateProject.getFullDisplayName())); for (AbstractProject impl : TemplateProperty.getImplementations(oldFullName)) { LOG.info(String.format("Updating template in [%s].", impl.getFullDisplayName())); TemplateImplementationProperty implProperty = (TemplateImplementationProperty) impl.getProperty(TemplateImplementationProperty.class); if (oldFullName.equals(implProperty.getTemplateJobName())) { implProperty.setTemplateJobName(newFullName); ProjectUtils.silentSave(impl); } } }
public static void handleTemplateSaved(AbstractProject templateProject, TemplateProperty property) throws IOException { LOG.info(String.format("Template [%s] was saved. Syncing implementations.", templateProject.getFullDisplayName())); for (AbstractProject impl : property.getImplementations()) { TemplateImplementationProperty implProperty = (TemplateImplementationProperty) impl.getProperty(TemplateImplementationProperty.class); handleTemplateImplementationSaved(impl, implProperty); } }
public List<JiraIssueParameterDefinition.Result> getIssues() throws IOException, ServiceException { AbstractProject<?, ?> context = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class); JiraSite site = JiraSite.get(context); if (site==null) throw new IllegalStateException("JIRA site needs to be configured in the project "+context.getFullDisplayName()); JiraSession session = site.createSession(); if (session==null) throw new IllegalStateException("Remote SOAP access for JIRA isn't configured in Hudson"); RemoteIssue[] issues = session.getIssuesFromJqlSearch(jiraIssueFilter); List<Result> issueValues = new ArrayList<Result>(); for (RemoteIssue issue : fixNull(asList(issues))) { issueValues.add(new Result(issue)); } return issueValues; }
public List<JiraVersionParameterDefinition.Result> getVersions() throws IOException, ServiceException { AbstractProject<?, ?> context = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class); JiraSite site = JiraSite.get(context); if (site==null) throw new IllegalStateException("JIRA site needs to be configured in the project "+context.getFullDisplayName()); JiraSession session = site.createSession(); if (session==null) throw new IllegalStateException("Remote SOAP access for JIRA isn't configured in Hudson"); RemoteVersion[] versions = session.getVersions(projectKey); List<Result> projectVersions = new ArrayList<Result>(); for (RemoteVersion version : fixNull(asList(versions))) { if(match(version)) projectVersions.add(new Result(version)); } return projectVersions; }
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { rsp.setStatus(SC_OK); rsp.setContentType("text/plain"); for (AbstractProject<?, ?> p : projects) { rsp.addHeader("Triggered", p.getAbsoluteUrl()); } PrintWriter w = rsp.getWriter(); for (AbstractProject<?, ?> p : projects) { w.println("Scheduled polling of "+p.getFullDisplayName()); } if (msg!=null) w.println(msg); } };