@Activate @VisibleForExternal public void activate() throws Exception { getOverlayAudit(); activateComponent(PERMIT, this); }
@Override public Version createVersion(Version version) { assertValid(); LOGGER.info("createVersion: {}", version); String versionId = profileRegistry.get().createVersion(version); return getRequiredVersion(versionId); }
@Deactivate void deactivate() { deactivateComponent(PERMIT); }
@Override public Profile updateProfile(Profile profile, boolean force) { assertValid(); LOGGER.info("updateProfile: {}", profile); String profileId = profileRegistry.get().updateProfile(profile, force); return getRequiredProfile(profile.getVersion(), profileId); }
@Override public Profile getOverlayProfile(Profile profile) { assertValid(); Profile overlayProfile; synchronized (this) { Version version = getRequiredVersion(profile.getVersion()); ProfileBuilder builder = ProfileBuilder.Factory.create(profile.getVersion(), profileId); builder.addOptions(new OverlayOptionsProvider(version, profile, environment)); OverlayAudit audit = getOverlayAudit(); synchronized (audit) { Profile lastOverlay = audit.overlayProfiles.get(profileId);
@Override public void deleteVersion(String versionId) { assertValid(); LOGGER.info("deleteVersion: {}", versionId); profileRegistry.get().deleteVersion(versionId); }
@Override public Profile updateProfile(Profile profile) { return updateProfile(profile, false); }
@Override public void deleteProfile(String versionId, String profileId, boolean force) { deleteProfile(null, versionId, profileId, force); }
@Override public Profile createProfile(Profile profile) { assertValid(); LOGGER.info("createProfile: {}", profile); String profileId = profileRegistry.get().createProfile(profile); return getRequiredProfile(profile.getVersion(), profileId); }
@Override public List<String> getVersions() { assertValid(); return profileRegistry.get().getVersionIds(); }
@Override public void deleteProfile(FabricService fabricService, String versionId, String profileId, boolean force) { assertValid(); Profile profile = getRequiredProfile(versionId, profileId); LOGGER.info("deleteProfile: {}", profile);
@Override public Version createVersionFrom(String sourceId, String targetId, Map<String, String> attributes) { assertValid(); LOGGER.info("createVersion: {} => {}", sourceId, targetId); FabricValidations.validateVersionName(targetId); profileRegistry.get().createVersion(sourceId, targetId, attributes); return getRequiredVersion(targetId); }
@Override public boolean hasVersion(String versionId) { assertValid(); return profileRegistry.get().hasVersion(versionId); }
@Override public Profile getRequiredProfile(String versionId, String profileId) { assertValid(); return profileRegistry.get().getRequiredProfile(versionId, profileId); }
@Override public Version getRequiredVersion(String versionId) { assertValid(); return profileRegistry.get().getRequiredVersion(versionId); }
@Override public boolean hasProfile(String versionId, String profileId) { assertValid(); return profileRegistry.get().hasProfile(versionId, profileId); }
@Override public Profile getProfile(String versionId, String profileId) { assertValid(); return profileRegistry.get().getProfile(versionId, profileId); }
@Override public Version getVersion(String versionId) { assertValid(); return profileRegistry.get().getVersion(versionId); }