本文整理汇总了Java中hudson.scm.EditType类的典型用法代码示例。如果您正苦于以下问题:Java EditType类的具体用法?Java EditType怎么用?Java EditType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EditType类属于hudson.scm包,在下文中一共展示了EditType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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()
);
}
}
示例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;
}
示例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;
}
}
}
}
示例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();
}
示例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;
}
}
示例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());
}
示例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);
}
示例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();
}
}
}
示例9: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
/**
* @return editType which is one of ADD, DELETE, EDIT
*/
public EditType getEditType() {
return this.editType;
}
示例10: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
@Override
public EditType getEditType() {
return action;
}
示例11: GithubAffectedFile
import hudson.scm.EditType; //导入依赖的package包/类
public GithubAffectedFile(EditType editType, String path) {
this.editType = editType;
this.path = path;
}
示例12: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
@Override
public EditType getEditType() {
return this.editType;
}
示例13: getEditType
import hudson.scm.EditType; //导入依赖的package包/类
public EditType getEditType() {
return editType;
}
示例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;
}
示例15: isDeletion
import hudson.scm.EditType; //导入依赖的package包/类
private boolean isDeletion() {
return editType == EditType.DELETE;
}