public void DeleteConfigurationManagementService(Guid organizationId, Guid organizationCMSId) { Organization organization = FindOrganizationById(organizationId); if (organization == null) { throw new ApplicationException($"The organization with id {organizationId} does not exists"); } OrganizationCMS organizationCMS = organization.GetConfigurationManagementServiceById(organizationCMSId); if (organizationCMS == null) { throw new ApplicationException($"The organization configuration management service with id {organizationCMSId} does not exists"); } organizationCMS.Delete(this.Id); }
public void UpdateConfigurationManagementService(Guid organizationId, Guid organizationCMSId, string accessId, string accessSecret) { Organization organization = FindOrganizationById(organizationId); if (organization == null) { throw new ApplicationException($"The organization with id {organizationId} does not exists"); } OrganizationCMS organizationCMS = organization.GetConfigurationManagementServiceById(organizationCMSId); if (organizationCMS == null) { throw new ApplicationException($"The organization configuration management service with id {organizationCMSId} does not exists"); } organizationCMS.UpdateCredentials(accessId, accessSecret); organizationCMS.Audit(this.Id); }