use of io.gravitee.repository.management.model.Entrypoint in project gravitee-management-rest-api by gravitee-io.
the class EntrypointServiceImpl method create.
@Override
public EntrypointEntity create(final NewEntryPointEntity entrypointEntity, String referenceId, EntrypointReferenceType referenceType) {
try {
final Entrypoint entrypoint = convert(entrypointEntity, referenceId, referenceType);
final EntrypointEntity savedEntryPoint = convert(entrypointRepository.create(entrypoint));
auditService.createEnvironmentAuditLog(Collections.singletonMap(ENTRYPOINT, entrypoint.getId()), ENTRYPOINT_CREATED, new Date(), null, entrypoint);
return savedEntryPoint;
} catch (TechnicalException ex) {
LOGGER.error("An error occurs while trying to create entrypoint {}", entrypointEntity.getValue(), ex);
throw new TechnicalManagementException("An error occurs while trying to create entrypoint " + entrypointEntity.getValue(), ex);
}
}
Aggregations