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

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

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

AbstractItem.save介绍

[英]Save the settings to a file.
[中]将设置保存到文件中。

代码示例

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

@Override
public synchronized void save() throws IOException {
  super.save();
  holdOffBuildUntilSave = holdOffBuildUntilUserSave;
}

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

/**
 * Sets the project description HTML.
 */
public void setDescription(String description) throws IOException {
  this.description = description;
  save();
  ItemListener.fireOnUpdated(this);
}

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

public void setDisplayName(String displayName) throws IOException {
  this.displayName = Util.fixEmptyAndTrim(displayName);
  save();
}

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

/**
 * Sets the project description HTML.
 */
public void setDescription(String description) throws IOException {
  this.description = description;
  save();
}

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

/**
 * Sets the project description HTML.
 */
public void setDescription(String description) throws IOException {
  this.description = description;
  save();
}

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

@Override
public synchronized void save() throws IOException {
  super.save();
  holdOffBuildUntilSave = holdOffBuildUntilUserSave;
}

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

/**
 * Sets the project description HTML.
 */
public void setDescription(String description) throws IOException {
  this.description = description;
  save();
}

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

/**
 * Sets the project description HTML.
 */
public void setDescription(String description) throws IOException {
  this.description = description;
  save();
}

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

public void setDisplayName(String displayName) throws IOException {
  this.displayName = Util.fixEmptyAndTrim(displayName);
  save();
}

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

/**
 * Sets the project description HTML.
 */
public void setDescription(String description) throws IOException {
  this.description = description;
  save();
  ItemListener.fireOnUpdated(this);
}

代码示例来源:origin: stackoverflow.com

AbstractItem item= (AbstractItem) Jenkins.getInstance().getItemByFullName(itemName)
Source streamSource = new StreamSource(new StringReader(config))
item.updateByXml(streamSource);
item.save();

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

@Override
public synchronized void save() throws IOException {
  if (isAllowSave()) {
    super.save();
    holdOffBuildUntilSave = false;
  }
}

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

@Override
public synchronized void save() throws IOException {
  if (null == allowSave) {
    initAllowSave();
  }
  if (isAllowSave()) {
    super.save();
    holdOffBuildUntilSave = false;
  }
}

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

@Override
public synchronized void save() throws IOException {
  if (null == allowSave) {
    initAllowSave();
  }
  if (isAllowSave()) {
    super.save();
    holdOffBuildUntilSave = false;
  }
}

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

@Override
public synchronized void save() throws IOException {
  if (null == allowSave) {
    initAllowSave();
  }
  if (isAllowSave()) {
    super.save();
    holdOffBuildUntilSave = false;
  }
}

代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder

/**
 * {@inheritDoc}
 */
@Override
public synchronized void save() throws IOException {
  if (folderViews != null) {
    folderViews.invalidateCaches();
  }
  if (BulkChange.contains(this)) {
    return;
  }
  super.save();
  // TODO should this not just be done in AbstractItem?
  ItemListener.fireOnUpdated(this);
}

代码示例来源:origin: jenkinsci/cloudbees-folder-plugin

/**
 * {@inheritDoc}
 */
@Override
public synchronized void save() throws IOException {
  if (folderViews != null) {
    folderViews.invalidateCaches();
  }
  if (BulkChange.contains(this)) {
    return;
  }
  super.save();
  // TODO should this not just be done in AbstractItem?
  ItemListener.fireOnUpdated(this);
}

代码示例来源:origin: jenkinsci/jobConfigHistory-plugin

/**
 * Action when 'restore' button is pressed: Replace current config file by
 * older version.
 *
 * @param req
 *            Incoming StaplerRequest
 * @param rsp
 *            Outgoing StaplerResponse
 * @throws IOException
 *             If something goes wrong
 */
public final void doRestore(StaplerRequest req, StaplerResponse rsp)
    throws IOException {
  checkConfigurePermission();
  final String timestamp = req.getParameter("timestamp");
  final XmlFile xmlFile = getHistoryDao().getOldRevision(project,
      timestamp);
  final InputStream is = new ByteArrayInputStream(
      xmlFile.asString().getBytes("UTF-8"));
  project.updateByXml((Source) new StreamSource(is));
  project.save();
  rsp.sendRedirect(getJenkins().getRootUrl() + project.getUrl());
}

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

save();

相关文章