default ExtensionFeatureDescription getFeatureDescription() { return new ExtensionFeatureDescription( getId(), getName(), getDescription(), getVersion(), getOptions() ); }
/** * Extension feature description */ public ExtensionFeatureDescription getFeature() { return decorator.getFeature().getFeatureDescription(); }
/** * Startup: loads the extensions & features from the application context. * <p> * This cannot be done at construction time because of dependency cycle between * some extensions that need access to the extension manager. */ @Override public void start() { logger.info("[extensions] Loading the extensions"); extensions = applicationContext.getBeansOfType(Extension.class).values(); Collection<? extends ExtensionFeature> extensionFeatures = applicationContext.getBeansOfType(ExtensionFeature.class).values(); logger.info("[extensions] Number of loaded extension features: {}", extensionFeatures.size()); logger.info("[extensions] Number of loaded extensions: {}", extensions.size()); logger.info("[extensions] Extension features:"); for (ExtensionFeature feature : extensionFeatures) { logger.info("[extensions] * {} [{}]", feature.getName(), feature.getId()); } // Detects cycles getExtensionList(); }
/** * Adds a dependency */ public ExtensionFeatureOptions withDependency(ExtensionFeature feature) { Set<String> existing = this.dependencies; Set<String> newDependencies; if (existing == null) { newDependencies = new HashSet<>(); } else { newDependencies = new HashSet<>(existing); } newDependencies.add(feature.getId()); return withDependencies(newDependencies); }
/** * Given an action with a relative URI, gets a new Action with a fully resolved URI */ default Action resolveActionWithExtension(Extension extension, Action action) { return action.withUri( String.format("extension/%s/%s", extension.getFeature().getId(), action.getUri()) ); } }
/** * Extension feature */ public ExtensionFeatureDescription getFeature() { return extension.getFeature().getFeatureDescription(); }
public static <T> PropertyTypeDescriptor of(PropertyType<T> type) { return new PropertyTypeDescriptor( type.getFeature().getFeatureDescription(), type.getClass().getName(), type.getName(), type.getDescription() ); }