gpt4 book ai didi

ch.sbb.releasetrain.utils.yaml.YamlModelAccessor类的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 12:15:31 28 4
gpt4 key购买 nike

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

YamlModelAccessor介绍

暂无

代码示例

代码示例来源:origin: ch.sbb.releasetrain/status

public ReleaseState read(String releaseIdentifier) {
    try {
      File file = file(releaseIdentifier);

      if (!file.exists()) {
        log.debug("File %s not existing", file);
        return null;
      }

      return converter.convertEntry(FileUtils.readFileToString(file));
    } catch (IOException e) {
      throw new RuntimeException(String.format("Error reading state from file %s", file(releaseIdentifier)), e);
    }
  }
}

代码示例来源:origin: ch.sbb.releasetrain/state

public ReleaseState read(String releaseIdentifier) {
    try {
      File file = file(releaseIdentifier);

      if (!file.exists()) {
        log.debug("File %s not existing", file);
        return null;
      }

      return converter.convertEntry(FileUtils.readFileToString(file));
    } catch (IOException e) {
      throw new RuntimeException(String.format("Error reading state from file %s", file(releaseIdentifier)), e);
    }
  }
}

代码示例来源:origin: ch.sbb.releasetrain/config

@Override
public ReleaseConfig readConfig(String name) {
  if (!name.contains("-type")) {
    name = name + "-type";
  }
  File dir = git.getRepo().directory();
  File file = new File(dir, "/" + name + ".yml");
  if (!file.exists()) {
    return null;
  }
  try {
    return accessorRelease.convertEntry(FileUtils.readFileToString(file));
  } catch (IOException e) {
    log.error(e.getMessage(), e);
  }
  return null;
}

代码示例来源:origin: ch.sbb.releasetrain/status

public void write(final ReleaseState releaseState) {
    try {
      FileUtils.writeStringToFile(file(releaseState.retreiveIdentifier()), converter.convertEntry(releaseState));
    } catch (IOException e) {
      throw new RuntimeException(String.format("Error writing state to file %s", file(releaseState.retreiveIdentifier())), e);
    }
  }
}

代码示例来源:origin: ch.sbb.releasetrain/state

public void write(final ReleaseState releaseState) {
    try {
      FileUtils.writeStringToFile(file(releaseState.retreiveIdentifier()), converter.convertEntry(releaseState));
    } catch (IOException e) {
      throw new RuntimeException(String.format("Error writing state to file %s", file(releaseState.retreiveIdentifier())), e);
    }
  }
}

代码示例来源:origin: ch.sbb.releasetrain/config

@Override
public void writeConfig(String name, ReleaseConfig config) {
  File dir = git.getRepo().directory();
  File file = new File(dir, "/" + name + "-type.yml");
  try {
    FileUtils.writeStringToFile(file, accessorRelease.convertEntry(config));
  } catch (IOException e) {
    log.error(e.getMessage(), e);
  }
  if (this.readCalendar(name) == null) {
    this.writeCalendar(new ReleaseCalendar(), name);
  }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com