use of io.fabric8.api.ProfileBuilder in project fabric8 by jboss-fuse.
the class FabricManager method changeProfileParents.
@Override
public Map<String, Object> changeProfileParents(String versionId, String profileId, List<String> parents) {
Profile profile = profileService.getRequiredProfile(versionId, profileId);
ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile).setParents(parents);
profile = profileService.updateProfile(builder.getProfile());
return getProfile(versionId, profile.getId());
}
use of io.fabric8.api.ProfileBuilder in project fabric8 by jboss-fuse.
the class FabricManager method createProfile.
@Override
// Creates a profile with empty content. Is this meaningful?
@Deprecated
public Map<String, Object> createProfile(String versionId, String profileId) {
ProfileBuilder builder = ProfileBuilder.Factory.create(versionId, profileId);
Profile profile = profileService.createProfile(builder.getProfile());
return getProfile(versionId, profile.getId());
}
use of io.fabric8.api.ProfileBuilder in project fabric8 by jboss-fuse.
the class FabricManager method setProfileAttribute.
@Override
public void setProfileAttribute(String versionId, String profileId, String attributeId, String value) {
Profile profile = profileService.getRequiredProfile(versionId, profileId);
ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile);
builder.addAttribute(attributeId, value);
profileService.updateProfile(builder.getProfile());
}
use of io.fabric8.api.ProfileBuilder in project fabric8 by jboss-fuse.
the class FabricManager method deleteConfigurationFile.
@Override
public void deleteConfigurationFile(String versionId, String profileId, String fileName) {
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 createProfile.
@Override
public Map<String, Object> createProfile(String versionId, String profileId, List<String> parents) {
ProfileBuilder builder = ProfileBuilder.Factory.create(versionId, profileId).addParents(parents);
Profile profile = profileService.createProfile(builder.getProfile());
return getProfile(versionId, profile.getId());
}
Aggregations