hudson.model.AbstractItem.onCopiedFrom()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中hudson.model.AbstractItem.onCopiedFrom()方法的一些代码示例,展示了AbstractItem.onCopiedFrom()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractItem.onCopiedFrom()方法的具体详情如下:
包路径:hudson.model.AbstractItem
类名称:AbstractItem
方法名:onCopiedFrom

AbstractItem.onCopiedFrom介绍

[英]When a Item is copied from existing one, the files are first copied on the file system, then it will be loaded, then this method will be invoked to perform any implementation-specific work.
[中]从现有项目复制项目时,首先在文件系统上复制文件,然后加载该项目,然后调用此方法以执行任何特定于实现的工作。

代码示例

代码示例来源:origin: jenkinsci/jenkins

@Override
public void onCopiedFrom(Item src) {
  super.onCopiedFrom(src);
  synchronized (this) {
    this.nextBuildNumber = 1; // reset the next build number
    this.holdOffBuildUntilUserSave = true;
    this.holdOffBuildUntilSave = this.holdOffBuildUntilUserSave;
  }
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

@Override
public void onCopiedFrom(Item src) {
  super.onCopiedFrom(src);
  synchronized (this) {
    this.nextBuildNumber = 1; // reset the next build number
    this.holdOffBuildUntilUserSave = true;
    this.holdOffBuildUntilSave = this.holdOffBuildUntilUserSave;
  }
}

代码示例来源:origin: hudson/hudson-2.x

@Override
public void onCopiedFrom(Item src) {
  super.onCopiedFrom(src);
  synchronized (this) {
    this.nextBuildNumber = 1; // reset the next build number
    this.holdOffBuildUntilSave = true;
    this.creationTime = new GregorianCalendar().getTimeInMillis();
    User user = User.current();
    if (user != null){
      this.createdBy = user.getId();
      grantProjectMatrixPermissions(user);
    }
  }
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public void onCopiedFrom(Item src) {
  super.onCopiedFrom(src);
  synchronized (this) {
    this.nextBuildNumber = 1; // reset the next build number
    this.holdOffBuildUntilSave = true;
    this.creationTime = new GregorianCalendar().getTimeInMillis();
    User user = User.current();
    if (user != null) {
      this.createdBy = user.getId();
      grantProjectMatrixPermissions(user);
    }
  }
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

@Override
public void onCopiedFrom(Item src) {
  super.onCopiedFrom(src);
  synchronized (this) {
    this.nextBuildNumber = 1; // reset the next build number
    this.holdOffBuildUntilSave = true;
    this.creationTime = new GregorianCalendar().getTimeInMillis();
    User user = User.current();
    if (user != null){
      this.createdBy = user.getId();
      grantProjectMatrixPermissions(user);
    }
  }
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

@Override
public void onCopiedFrom(Item src) {
  super.onCopiedFrom(src);
  synchronized (this) {
    this.nextBuildNumber = 1; // reset the next build number
    this.holdOffBuildUntilSave = true;
    this.creationTime = new GregorianCalendar().getTimeInMillis();
    User user = User.current();
    if (user != null){
      this.createdBy = user.getId();
      grantProjectMatrixPermissions(user);
    }
  }
}

代码示例来源:origin: jenkinsci/jenkins-test-harness

@Override public void onCopiedFrom(Item src) {
  super.onCopiedFrom(src);
  for (TopLevelItem item : ((MockFolder) src).getItems()) {
    try {
      copy(item, item.getName());
    } catch (IOException x) {
      assert false : x;
    }
  }
}

相关文章