use of com.sequenceiq.cloudbreak.workspace.controller.WorkspaceEntityType in project cloudbreak by hortonworks.
the class LegacyStructuredEventFilter method initializePathRepositoryMap.
@PostConstruct
public void initializePathRepositoryMap() {
Map<String, Object> workspaceEntityTypes = listableBeanFactory.getBeansWithAnnotation(WorkspaceEntityType.class);
for (Object workspaceEntityType : workspaceEntityTypes.values()) {
Path pathAnnotation = AnnotationUtils.findAnnotation(workspaceEntityType.getClass().getSuperclass(), Path.class);
WorkspaceEntityType entityTypeAnnotation = AnnotationUtils.findAnnotation(workspaceEntityType.getClass(), WorkspaceEntityType.class);
if (pathAnnotation != null) {
String pathValue = pathAnnotation.value();
Class<?> entityClass = entityTypeAnnotation.value();
WorkspaceResourceRepository<?, ?> repository = repositoryLookupService.getRepositoryForEntity(entityClass);
pathRepositoryMap.put(pathValue, repository);
}
}
}
Aggregations