本文整理汇总了Java中hudson.scm.EditType类的典型用法代码示例。如果您正苦于以下问题:Java EditType类的具体用法?Java EditType怎么用?Java EditType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EditType类属于hudson.scm包,在下文中一共展示了EditType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getFileLink
import hudson.scm.EditType; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public URL getFileLink(Path path) throws IOException {
if (path.getEditType().equals(EditType.DELETE)) {
return diffLink(path);
} else {
return new URL(
UriTemplate.buildFromTemplate(getRepoUrl())
.literal("/src")
.path(UriTemplateBuilder.var("changeSet"))
.path(UriTemplateBuilder.var("path", true))
.build()
.set("changeSet", path.getChangeSet().getId())
.set("path", StringUtils.split(path.getPath(), '/'))
.expand()
);
}
}
开发者ID:jenkinsci,项目名称:gitea-plugin,代码行数:21,代码来源:GiteaBrowser.java
示例2: toString
import hudson.scm.EditType; //导入依赖的package包/类
/**
* Simple toString method.
* @return printable representation of SCLMFileState.
*/
@Override
public String toString()
{
String eType;
SimpleDateFormat df = new SimpleDateFormat(dateFormat);
if(this.editType == EditType.EDIT) {
eType = "EDIT";
} else {
if(this.editType == EditType.DELETE) {
eType = "DELETE";
} else {
if(this.editType == EditType.ADD) {
eType = "ADD";
} else {
eType = "ERROR";
}
}
}
return eType + ": [" + this.getPath() + "] " + this.changeGroup + " <" + df.format(this.changeDate) + "> | " + this.changeUserID + ", ver.:" + this.version;
}
开发者ID:jenkinsci,项目名称:zos-connector-plugin,代码行数:25,代码来源:SCLMFileState.java
示例3: setEditType
import hudson.scm.EditType; //导入依赖的package包/类
/**
* Set EditType.
* @param editType EditType.
*
* @see EditType
*/
public void setEditType(String editType) {
if(editType.equals("DELETE")) {
this.affectedFile.file.editType = EditType.DELETE;
} else {
if(editType.equals("EDIT")) {
this.affectedFile.file.editType = EditType.EDIT;
} else {
if(editType.equals("ADD")) {
this.affectedFile.file.editType = EditType.ADD;
} else {
this.affectedFile.file.editType = null;
}
}
}
}
开发者ID:jenkinsci,项目名称:zos-connector-plugin,代码行数:22,代码来源:LogSet.java
示例4: getMsg
import hudson.scm.EditType; //导入依赖的package包/类
/**
* Get entry message.
* @return Message for entry.
*/
@Override
public String getMsg() {
String editType;
if(this.affectedFile.getEditType() == EditType.ADD) {
editType = "ADD";
} else {
if(this.affectedFile.getEditType() == EditType.EDIT) {
editType = "EDIT";
} else {
if(this.affectedFile.getEditType() == EditType.DELETE) {
editType = "DELETE";
} else {
editType = "ERROR?";
}
}
}
return editType + ": " + this.affectedFile.getPath();
}
开发者ID:jenkinsci,项目名称:zos-connector-plugin,代码行数:23,代码来源:SCLMChangeLogSet.java
示例5: parseFileAction
import hudson.scm.EditType; //导入依赖的package包/类
private EditType parseFileAction(FileAction fileAction) {
switch (fileAction) {
case ADD:
case MOVE_ADD:
return EditType.ADD;
case EDIT:
return EditType.EDIT;
case DELETE:
case MOVE_DELETE:
return EditType.DELETE;
default:
return EditType.EDIT;
}
}
开发者ID:p4paul,项目名称:p4-jenkins,代码行数:18,代码来源:P4AffectedFile.java
示例6: returnsAffectedFiles
import hudson.scm.EditType; //导入依赖的package包/类
@Test
public void returnsAffectedFiles() {
entry.addPundle(addedPundle);
entry.addPundle(editedPundle);
final Collection<? extends ChangeLogSet.AffectedFile> affectedFiles = entry.getAffectedFiles();
ChangeLogSet.AffectedFile[] files = new ChangeLogSet.AffectedFile[affectedFiles.size()];
affectedFiles.toArray(files);
assertEquals(2, files.length);
ChangeLogSet.AffectedFile file1 = files[0];
assertEquals(addedPundle.getDescriptor(), file1.getPath());
assertEquals(EditType.ADD, file1.getEditType());
ChangeLogSet.AffectedFile file2 = files[1];
assertEquals(editedPundle.getDescriptor(), file2.getPath());
assertEquals(EditType.EDIT, file2.getEditType());
}
开发者ID:randycoulman,项目名称:visualworks-store-plugin,代码行数:19,代码来源:StoreChangeLogEntryTest.java
示例7: getDiffLink
import hudson.scm.EditType; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public URL getDiffLink(Path path) throws IOException {
if (path.getEditType() != EditType.EDIT || path.getSrc() == null || path.getDst() == null
|| path.getChangeSet().getParentCommit() == null) {
return null;
}
return diffLink(path);
}
开发者ID:jenkinsci,项目名称:gitea-plugin,代码行数:12,代码来源:GiteaBrowser.java
示例8: removeDeleted
import hudson.scm.EditType; //导入依赖的package包/类
/**
* Remove SCLM files marked as 'DELETED'.
*/
public void removeDeleted() {
Iterator<SCLMFileState> it = this.files.iterator();
while(it.hasNext()) {
SCLMFileState temp = it.next();
if(temp.editType == EditType.DELETE) {
it.remove();
}
}
}
开发者ID:jenkinsci,项目名称:zos-connector-plugin,代码行数:13,代码来源:SCLMSCMRevisionState.java
示例9: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
/**
* @return editType which is one of ADD, DELETE, EDIT
*/
public EditType getEditType() {
return this.editType;
}
开发者ID:rjperrella,项目名称:jenkins-fossil-adapter,代码行数:7,代码来源:FossilAffectedFile.java
示例10: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
@Override
public EditType getEditType() {
return action;
}
开发者ID:p4paul,项目名称:p4-jenkins,代码行数:5,代码来源:P4AffectedFile.java
示例11: GithubAffectedFile
import hudson.scm.EditType; //导入依赖的package包/类
public GithubAffectedFile(EditType editType, String path) {
this.editType = editType;
this.path = path;
}
开发者ID:groupon,项目名称:DotCi,代码行数:5,代码来源:GithubAffectedFile.java
示例12: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
@Override
public EditType getEditType() {
return this.editType;
}
开发者ID:groupon,项目名称:DotCi,代码行数:5,代码来源:GithubAffectedFile.java
示例13: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
public EditType getEditType() {
return editType;
}
开发者ID:randycoulman,项目名称:visualworks-store-plugin,代码行数:4,代码来源:ChangedPundle.java
示例14: toEditType
import hudson.scm.EditType; //导入依赖的package包/类
private EditType toEditType(String action) {
if (action.equals("added")) return EditType.ADD;
if (action.equals("deleted")) return EditType.DELETE;
return EditType.EDIT;
}
开发者ID:randycoulman,项目名称:visualworks-store-plugin,代码行数:7,代码来源:ChangedPundle.java
示例15: isDeletion
import hudson.scm.EditType; //导入依赖的package包/类
private boolean isDeletion() {
return editType == EditType.DELETE;
}
开发者ID:randycoulman,项目名称:visualworks-store-plugin,代码行数:4,代码来源:ChangedPundle.java
示例16: convertsAddedActionToEditTypeADD
import hudson.scm.EditType; //导入依赖的package包/类
@Test
public void convertsAddedActionToEditTypeADD() {
ChangedPundle pundle = new ChangedPundle("added", PundleType.PACKAGE, "pundleName", "42");
assertEquals(EditType.ADD, pundle.getEditType());
}
开发者ID:randycoulman,项目名称:visualworks-store-plugin,代码行数:7,代码来源:ChangedPundleTest.java
示例17: convertsDeletedActionToEditTypeDELETE
import hudson.scm.EditType; //导入依赖的package包/类
@Test
public void convertsDeletedActionToEditTypeDELETE() {
ChangedPundle pundle = new ChangedPundle("deleted", PundleType.PACKAGE, "pundleName");
assertEquals(EditType.DELETE, pundle.getEditType());
}
开发者ID:randycoulman,项目名称:visualworks-store-plugin,代码行数:7,代码来源:ChangedPundleTest.java
示例18: convertsModifiedActionToEditTypeEDIT
import hudson.scm.EditType; //导入依赖的package包/类
@Test
public void convertsModifiedActionToEditTypeEDIT() {
ChangedPundle pundle = new ChangedPundle("edited", PundleType.PACKAGE, "pundleName", "42");
assertEquals(EditType.EDIT, pundle.getEditType());
}
开发者ID:randycoulman,项目名称:visualworks-store-plugin,代码行数:7,代码来源:ChangedPundleTest.java
示例19: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
/**
* Get EditType of the entry.
* @return EditType.
*
* @see EditType
*/
public EditType getEditType() {
return this.affectedFile.getEditType();
}
开发者ID:jenkinsci,项目名称:zos-connector-plugin,代码行数:10,代码来源:SCLMChangeLogSet.java
示例20: FossilAffectedFile
import hudson.scm.EditType; //导入依赖的package包/类
/**
* Represents a file change in a ChangeLogSet
*
* @param editType one of ADD DELETE EDIT
* @param path full file path in the repository
*/
public FossilAffectedFile(EditType editType, String path) {
this.editType = editType;
this.path = path;
}
开发者ID:rjperrella,项目名称:jenkins-fossil-adapter,代码行数:11,代码来源:FossilAffectedFile.java
注:本文中的hudson.scm.EditType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论