private void buildAvailableSchemas(final String key) { List<String> configurationSchemas = new ConfRestClient().list().stream(). map(Attr::getSchema).collect(Collectors.toList()); new AnyTypeClassRestClient().list().stream(). filter(item -> key == null || !item.getKey().equals(key)). forEach(item -> { availablePlainSchemas.removeAll(item.getPlainSchemas()); availableDerSchemas.removeAll(item.getDerSchemas()); availableVirSchemas.removeAll(item.getVirSchemas()); }); availablePlainSchemas.removeAll(configurationSchemas); availablePlainSchemas.removeAll(LAYOUT_PARAMETERS); } }
@Override public AnyTypeClassTO getAnyTypeClassTO(final AnyTypeClass anyTypeClass) { AnyTypeClassTO anyTypeClassTO = new AnyTypeClassTO(); anyTypeClassTO.setKey(anyTypeClass.getKey()); anyTypeClassTO.getInUseByTypes().addAll( anyTypeDAO.findByTypeClass(anyTypeClass).stream().map(Entity::getKey).collect(Collectors.toList())); anyTypeClassTO.getPlainSchemas().addAll( anyTypeClass.getPlainSchemas().stream().map(Entity::getKey).collect(Collectors.toList())); anyTypeClassTO.getDerSchemas().addAll( anyTypeClass.getDerSchemas().stream().map(Entity::getKey).collect(Collectors.toList())); anyTypeClassTO.getVirSchemas().addAll( anyTypeClass.getVirSchemas().stream().map(Entity::getKey).collect(Collectors.toList())); return anyTypeClassTO; }
choices.addAll(anyTypeClassTO.getDerSchemas()); choices.addAll(anyTypeClassTO.getVirSchemas()); });
anyTypeClassTO.getDerSchemas().forEach(schemaName -> { DerSchema schema = derSchemaDAO.find(schemaName); if (schema == null || schema.getAnyTypeClass() != null) {
this.dSchemaNames = new ArrayList<>(); AnyDirectoryPanelBuilder.class.cast(builder).getAnyTypeClassTOs().forEach(anyTypeClassTO -> { this.dSchemaNames.addAll(anyTypeClassTO.getDerSchemas()); });
allowedSchemas.getPlainSchemas().addAll(anyTypeClass.getPlainSchemas().stream(). map(Entity::getKey).collect(Collectors.toList())); allowedSchemas.getDerSchemas().addAll(anyTypeClass.getDerSchemas().stream(). map(Entity::getKey).collect(Collectors.toList())); allowedSchemas.getVirSchemas().addAll(anyTypeClass.getVirSchemas().stream().
allowedSchemas.getPlainSchemas().addAll(anyTypeClass.getPlainSchemas().stream(). map(Entity::getKey).collect(Collectors.toList())); allowedSchemas.getDerSchemas().addAll(anyTypeClass.getDerSchemas().stream(). map(Entity::getKey).collect(Collectors.toList())); allowedSchemas.getVirSchemas().addAll(anyTypeClass.getVirSchemas().stream().
allowed = allowedSchemas.getDerSchemas().contains(intAttrName.getSchemaName()); break;
allowed = allowedSchemas.getDerSchemas().contains(intAttrName.getSchemaName()); break;
allowedSchemas.getPlainSchemas().addAll(anyTypeClass.getPlainSchemas().stream(). map(Entity::getKey).collect(Collectors.toList())); allowedSchemas.getDerSchemas().addAll(anyTypeClass.getDerSchemas().stream(). map(Entity::getKey).collect(Collectors.toList())); allowedSchemas.getVirSchemas().addAll(anyTypeClass.getVirSchemas().stream().
allowed = allowedSchemas.getDerSchemas().contains(intAttrName.getSchemaName()); break;