class ComponentResourceImpl implements ComponentResource {

    @Override
    public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) {
        if (virtualComponents.isExtensionEntity(id)) {
            return config;
        }
        return ofNullable(componentDao.findById(id))
                .orElseThrow(() -> new WebApplicationException(Response
                        .status(Response.Status.NOT_FOUND)
                        .entity(new ErrorPayload(ErrorDictionary.COMPONENT_MISSING, "Didn't find component " + id))
                        .build()))
                .getMigrationHandler()
                .get()
                .migrate(version, config);
    }

}