本文整理了Java中io.fabric8.api.Version.getAttributes()
方法的一些代码示例,展示了Version.getAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getAttributes()
方法的具体详情如下:
包路径:io.fabric8.api.Version
类名称:Version
方法名:getAttributes
[英]Get the version attributes
[中]获取版本属性
代码示例来源:origin: io.fabric8/fabric-api
public Map<String, String> getAttributes() {
return delegate.getAttributes();
}
代码示例来源:origin: jboss-fuse/fabric8
public Map<String, String> getAttributes() {
return delegate.getAttributes();
}
代码示例来源:origin: jboss-fuse/fabric8
@Override
public VersionBuilder from(Version version) {
setAttributes(version.getAttributes());
addProfiles(version.getProfiles());
return this;
}
代码示例来源:origin: io.fabric8/fabric-commands
String description = version.getAttributes().get(Version.DESCRIPTION);
String derivedFrom = null;
boolean defaultVersion = version.getId().equals(fabricService.getDefaultVersionId());
代码示例来源:origin: io.fabric8/fabric-git
public String call(Git git, GitContext context) throws Exception {
String versionId = version.getId();
IllegalStateAssertion.assertNull(checkoutProfileBranch(git, context, versionId, null), "Version already exists: " + versionId);
GitHelpers.checkoutTag(git, GitHelpers.ROOT_TAG);
createOrCheckoutVersion(git, version.getId());
setVersionAttributes(git, context, versionId, version.getAttributes());
context.commitMessage("Create version: " + version);
for (Profile profile : version.getProfiles()) {
createOrUpdateProfile(context, null, profile, new HashSet<String>());
}
return versionId;
}
};
代码示例来源:origin: io.fabric8/fabric-commands
protected void printVersions(Container[] containers, List<String> versions, String defaultVersionId, PrintStream out) {
TablePrinter table = new TablePrinter();
table.columns("version", "default", "# containers", "description");
// they are sorted in the correct order by default
for (String versionId : versions) {
boolean isDefault = versionId.equals(defaultVersionId);
Version version = profileService.getRequiredVersion(versionId);
int active = countContainersByVersion(containers, version);
String description = version.getAttributes().get(Version.DESCRIPTION);
table.row(version.getId(), (isDefault ? "true" : ""), activeContainerCountText(active), description);
}
table.print();
}
代码示例来源:origin: jboss-fuse/fabric8
public String call(Git git, GitContext context) throws Exception {
String versionId = version.getId();
IllegalStateAssertion.assertNull(checkoutProfileBranch(git, context, versionId, null), "Version already exists: " + versionId);
GitHelpers.checkoutTag(git, GitHelpers.ROOT_TAG);
createOrCheckoutVersion(git, version.getId());
setVersionAttributes(git, context, versionId, version.getAttributes());
context.commitMessage("Create version: " + version);
Set<String> alreadyProcessedProfiles = new HashSet<String>();
for (Profile profile : version.getProfiles()) {
createOrUpdateProfile(context, null, profile,alreadyProcessedProfiles);
}
return versionId;
}
};
代码示例来源:origin: jboss-fuse/fabric8
@Override
public String modifyVersionDescription(final Version version, String description) {
GitContext context = newGitWriteContext(version.getId());
final Map<String, String> attributes = version.getAttributes();
attributes.put(Version.DESCRIPTION, description);
IllegalStateAssertion.assertNotNull(version, "version");
LockHandle writeLock = aquireWriteLock();
try {
assertValid();
LOGGER.debug("Updating version: {}", version);
GitOperation<String> gitop = new GitOperation<String>() {
public String call(Git git, GitContext context) throws Exception {
String versionId = version.getId();
GitHelpers.checkoutTag(git, GitHelpers.ROOT_TAG);
createOrCheckoutVersion(git, version.getId());
setVersionAttributes(git, context, versionId, attributes);
context.commitMessage("Create version: " + version);
Set<String> alreadyProcessedProfiles = new HashSet<String>();
for (Profile profile : version.getProfiles()) {
createOrUpdateProfile(context, null, profile,alreadyProcessedProfiles);
}
return versionId;
}
};
return executeInternal(context, null, gitop);
} finally {
writeLock.unlock();
}
}
内容来源于网络,如有侵权,请联系作者删除!