use of io.fabric8.api.ProfileBuilder in project fabric8 by jboss-fuse.
the class FabricManager method deleteConfigurationFiles.
@Override
public void deleteConfigurationFiles(String versionId, List<String> profileIds, List<String> fileNames) {
if (profileIds.size() != fileNames.size()) {
throw new FabricException("Lists of profile IDs and filenames should be the same size");
}
for (int i = 0; i < profileIds.size(); i++) {
String profileId = profileIds.get(i);
String fileName = fileNames.get(i);
Profile profile = profileService.getRequiredProfile(versionId, profileId);
ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile);
builder.deleteFileConfiguration(fileName);
profileService.updateProfile(builder.getProfile());
}
}
use of io.fabric8.api.ProfileBuilder in project fabric8 by jboss-fuse.
the class FabricManager method setProfileRepositories.
@Override
public void setProfileRepositories(String versionId, String profileId, List<String> repositories) {
Profile profile = profileService.getRequiredProfile(versionId, profileId);
ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile);
builder.setRepositories(repositories);
profileService.updateProfile(builder.getProfile());
}
use of io.fabric8.api.ProfileBuilder in project fabric8 by jboss-fuse.
the class FabricManager method setProfileFabs.
@Override
public void setProfileFabs(String versionId, String profileId, List<String> fabs) {
Profile profile = profileService.getRequiredProfile(versionId, profileId);
ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile);
builder.setFabs(fabs);
profileService.updateProfile(builder.getProfile());
}
Aggregations