public void toJson(Map json, Revision revision) { json.put("folder", getFolder() == null ? "" : getFolder()); json.put("scmType", getTypeForDisplay()); json.put("location", getLocation()); if (!CaseInsensitiveString.isBlank(getName())) { json.put("materialName", CaseInsensitiveString.str(getName())); } json.put("action", "Modified"); }
public String getDescription() { return getUriForDisplay(); }
public String getUriForDisplay() { return getUrlArgument().forDisplay(); }
public void emailContent(StringBuilder content, Modification modification) { content.append(getTypeForDisplay() + ": " + getLocation()).append('\n').append( String.format("revision: %s, modified by %s on %s", modification.getRevision(), modification.getUserName(), modification.getModifiedTime())) .append('\n') .append(Optional.ofNullable(modification.getComment()).orElse("")); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } HgMaterial that = (HgMaterial) o; if (url != null ? !url.equals(that.url) : that.url != null) { return false; } return true; }
@Override void populateXmlForModifications(Modifications modifications, XmlWriterContext writerContext, Element modificationsTag) { for (Modification modification : modifications) { Element changeset = modificationsTag.addElement("changeset"); changeset.addAttribute("changesetUri", ScmMaterial.changesetUrl(modification, writerContext.getBaseUrl(), material.getId())); changeset.addElement("user").addCDATA(modification.getUserDisplayName()); changeset.addElement("checkinTime").addText(DateUtils.formatISO8601(modification.getModifiedTime())); changeset.addElement("revision").addCDATA(modification.getRevision()); changeset.addElement("message").addCDATA(modification.getComment()); } } }
protected void setVariableWithName(EnvironmentVariableContext environmentVariableContext, String value, String propertyName) { String materialNameForEnvironmentVariable = getMaterialNameForEnvironmentVariable(); if (StringUtils.isNotBlank(materialNameForEnvironmentVariable)) { environmentVariableContext.setProperty(propertyName + "_" + materialNameForEnvironmentVariable, value, false); } else { environmentVariableContext.setProperty(propertyName, value, false); } }
public final MatchedRevision createMatchedRevision(Modification modification, String searchString) { return new MatchedRevision(searchString, getShortRevision(modification.getRevision()), modification.getRevision(), modification.getUserName(), modification.getModifiedTime(), modification.getComment()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } SvnMaterial that = (SvnMaterial) o; if (checkExternals != that.checkExternals) { return false; } if (url != null ? !url.equals(that.url) : that.url != null) { return false; } if (userName != null ? !userName.equals(that.userName) : that.userName != null) { return false; } return true; }
@Override void populateXmlForModifications(Modifications modifications, XmlWriterContext writerContext, Element modificationsTag) { for (Modification modification : modifications) { Element changeset = modificationsTag.addElement("changeset"); changeset.addAttribute("changesetUri", ScmMaterial.changesetUrl(modification, writerContext.getBaseUrl(), material.getId())); changeset.addElement("user").addCDATA(modification.getUserDisplayName()); changeset.addElement("checkinTime").addText(DateUtils.formatISO8601(modification.getModifiedTime())); changeset.addElement("revision").addCDATA(modification.getRevision()); changeset.addElement("message").addCDATA(modification.getComment()); List<ModifiedFile> modifiedFiles = modification.getModifiedFiles(); for (ModifiedFile modifiedFile : modifiedFiles) { changeset.addElement("file").addAttribute("name", modifiedFile.getFileName()).addAttribute("action", modifiedFile.getAction().toString()); } } } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } GitMaterial that = (GitMaterial) o; if (branch != null ? !branch.equals(that.branch) : that.branch != null) { return false; } if (submoduleFolder != null ? !submoduleFolder.equals(that.submoduleFolder) : that.submoduleFolder != null) { return false; } if (url != null ? !url.equals(that.url) : that.url != null) { return false; } return true; }
public String getDisplayName() { return name == null ? getUriForDisplay() : CaseInsensitiveString.str(name); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } P4Material that = (P4Material) o; if (serverAndPort != null ? !serverAndPort.equals(that.serverAndPort) : that.serverAndPort != null) { return false; } if (useTickets != null ? !useTickets.equals(that.useTickets) : that.useTickets != null) { return false; } if (userName != null ? !userName.equals(that.userName) : that.userName != null) { return false; } if (view != null ? !view.equals(that.view) : that.view != null) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } TfsMaterial material = (TfsMaterial) o; if (projectPath != null ? !projectPath.equals(material.projectPath) : material.projectPath != null) { return false; } if (url != null ? !url.equals(material.url) : material.url != null) { return false; } if (userName != null ? !userName.equals(material.userName) : material.userName != null) { return false; } if (domain != null ? !domain.equals(material.domain) : material.domain != null) { return false; } return true; }