@Override public void addEventClassFamilyVersion(String eventClassFamilyId, EventClassFamilyVersionDto eventClassFamilyVersion, String createdUsername) throws ControlServiceException { eventClassService.addEventClassFamilyVersion(eventClassFamilyId, eventClassFamilyVersion, createdUsername); }
@Override public EventClassDto getEventClassById(String eventClassId) throws ControlServiceException { return eventClassService.findEventClassById(eventClassId); }
@Override public List<EventClassFamilyDto> getEventClassFamiliesByTenantId(String tenantId) throws ControlServiceException { return eventClassService.findEventClassFamiliesByTenantId(tenantId); }
efm.setVersion(aefMap.getVersion()); efm.setEventMaps(aefMap.getEventMaps()); EventClassFamilyDto ecf = eventClassService.findEventClassFamilyById(aefMap.getEcfId()); efm.setEcfName(ecf.getName()); efm.setEcfNamespace(ecf.getNamespace()); efm.setEcfClassName(ecf.getClassName()); List<EventClassFamilyVersionDto> ecfSchemas = eventClassService .findEventClassFamilyVersionsByEcfId(aefMap.getEcfId()); for (EventClassFamilyVersionDto ecfSchema : ecfSchemas) { if (ecfSchema.getVersion() == efm.getVersion()) { List<EventClassDto> records = eventClassService .findEventClassesByFamilyIdVersionAndType(ecf.getId(), ecfSchema.getVersion(), null); efm.setRecords(records);
@Override public String compute(EventClassFqnKey key) { LOG.debug("Fetching result for getEventClassFamilyIdByEventClassFqn using key {}", key); List<EventClassDto> eventClasses = eventClassService.findEventClassByTenantIdAndFqn( key.getTenantId(), key.getFqn()); if (eventClasses != null && !eventClasses.isEmpty()) { String ecfvId = eventClasses.get(0).getEcfvId(); return eventClassService.findEventClassFamilyByEcfvId(ecfvId).getId(); } else { LOG.warn("Fetching result for getEcfvId using key {} Failed!", key); return null; } }
LOG.debug("Fetching result for getRouteKeys using key {}", key); Set<RouteTableKey> routeKeys = new HashSet<>(); EventClassDto eventClass = eventClassService.findEventClassByTenantIdAndFqnAndVersion( key.getTenantId(), key.getFqn(), key.getVersion()); String ecfId = eventClassService.findEventClassFamilyByEcfvId(ecfvId).getId();
@Override public EventClassFamilyDto getEventClassFamily(String eventClassFamilyId) throws ControlServiceException { return eventClassService.findEventClassFamilyById(eventClassFamilyId); }
@Override public List<EventClassFamilyVersionDto> getEventClassFamilyVersions(String eventClassFamilyId) throws ControlServiceException { return eventClassService.findEventClassFamilyVersionsByEcfId(eventClassFamilyId); }
@Override public List<EventClassDto> getEventClassesByFamilyIdVersionAndType( String ecfId, int version, EventClassType type) throws ControlServiceException { return eventClassService.findEventClassesByFamilyIdVersionAndType(ecfId, version, type); }
@Override public String compute(EventClassFamilyIdKey key) { LOG.debug("Fetching result for getEcfvId using key {}", key); EventClassFamilyDto ecf = eventClassService.findEventClassFamilyByTenantIdAndName( key.getTenantId(), key.getName()); if (ecf != null) { return ecf.getId(); } else { LOG.error("failed to find ecf by tenantId [{}] and name {}", key.getTenantId(), key.getName()); return null; } } });