public String save(IFramePerspectiveConfiguration configuration) {
serviceSecurity.checkSecurityIsAdmin();
RulesRepository repository = getRepository();
if (isNewConfiguration(configuration)) {
IFramePerspectiveConfigurationItem perspectiveConfigurationItem = repository.createPerspectivesConfiguration(configuration.getName(), configuration.getUrl());
return perspectiveConfigurationItem.getUuid();
} else {
String uuid = configuration.getUuid();
IFramePerspectiveConfigurationItem perspectiveConfigurationItem = repository.loadPerspectivesConfiguration(uuid);
perspectiveConfigurationItem.setName(configuration.getName());
perspectiveConfigurationItem.setUrl(configuration.getUrl());
repository.save();
return uuid;
}
}