@Test public void testGetFeatureHighestAvailable() throws Exception { FeaturesServiceImpl impl = featuresServiceWithFeatures(feature("transaction", "1.0.0"), feature("transaction", "2.0.0")); assertNotNull(impl.getFeatures("transaction", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION)); assertEquals("2.0.0", impl.getFeatures("transaction", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION)[0].getVersion()); }
@Override public Feature[] getFeatures(String nameOrId) throws Exception { return getFeatures(FeatureReq.parseNameAndRange(nameOrId)); }
FeaturesServiceImpl implements FeaturesService, Deployer.DeployCallback { @Override public Feature[] getFeatures(String nameOrId) throws Exception { return getFeatures(FeatureReq.parseNameAndRange(nameOrId)); } }
FeaturesServiceImpl implements FeaturesService, Deployer.DeployCallback { @Override public Feature[] getFeatures(String nameOrId) throws Exception { return getFeatures(FeatureReq.parseNameAndRange(nameOrId)); } FeaturesServiceImpl(StateStorage storage,
                               FeatureRepoFinder featureFinder,
                               ConfigurationAdmin configurationAdmin,
                               Resolver resolver,
                               BundleInstallSupport installSupport,
                               org.osgi.service.repository.Repository globalRepository,
                               FeaturesServiceConfig cfg); }
FeaturesServiceImpl implements FeaturesService, Deployer.DeployCallback { @Override public Feature[] getFeatures(String nameOrId) throws Exception { return getFeatures(FeatureReq.parseNameAndRange(nameOrId)); } FeaturesServiceImpl(StateStorage storage,
                               FeatureRepoFinder featureFinder,
                               ConfigurationAdmin configurationAdmin,
                               Resolver resolver,
                               BundleInstallSupport installSupport,
                               org.osgi.service.repository.Repository globalRepository,
                               FeaturesServiceConfig cfg); void stop(); @Override void registerListener(FeaturesListener listener); @Override void unregisterListener(FeaturesListener listener); @Override void registerListener(DeploymentListener listener); @Override void unregisterListener(DeploymentListener listener); @Override void callListeners(FeatureEvent event); @Override void callListeners(DeploymentEvent event); @Override URI getRepositoryUriFor(String name, String version); @Override String[] getRepositoryNames(); @Override Feature[] repositoryProvidedFeatures(URI uri); @Override void validateRepository(URI uri); @Override boolean isRepositoryUriBlacklisted(URI uri); @Override void addRepository(URI uri); @Override void addRepository(URI uri, boolean install); @Override void removeRepository(URI uri); @Override void removeRepository(URI uri, boolean uninstall); @Override void restoreRepository(URI uri); @Override void refreshRepository(URI uri); @Override void refreshRepositories(Set<URI> uris); @Override Repository[] listRepositories(); @Override Repository[] listRequiredRepositories(); @Override Repository getRepository(String name); @Override Repository getRepository(URI uri); @Override String getRepositoryName(URI uri); @Override Feature getFeature(String name); @Override Feature getFeature(String name, String version); @Override Feature[] getFeatures(String nameOrId); @Override Feature[] getFeatures(String name, String version); @Override Feature[] listFeatures(); @Override Feature[] listInstalledFeatures(); @Override Feature[] listRequiredFeatures(); @Override boolean isInstalled(Feature f); @Override FeatureState getState(String featureId); @Override boolean isRequired(Feature f); @Override void installFeature(String name); @Override void installFeature(String name, String version); @Override void installFeature(String name, EnumSet<Option> options); @Override void installFeature(String name, String version, EnumSet<Option> options); @Override void installFeature(Feature feature, EnumSet<Option> options); @Override void installFeatures(Set<String> features, EnumSet<Option> options); @Override void uninstallFeature(String name, String version); @Override void uninstallFeature(String name, String version, EnumSet<Option> options); @Override void uninstallFeature(String name); @Override void uninstallFeature(String name, EnumSet<Option> options); @Override void uninstallFeatures(Set<String> features, EnumSet<Option> options); @Override void setResolutionOutputFile(String outputFile); @Override void installFeatures(Set<String> featuresIn, String region, EnumSet<Option> options); @Override void uninstallFeatures(Set<String> featuresIn, String region, EnumSet<Option> options); @Override void updateFeaturesState(Map<String, Map<String, FeatureState>> stateChanges, EnumSet<Option> options); @Override void addRequirements(Map<String, Set<String>> requirements, EnumSet<Option> options); @Override void removeRequirements(Map<String, Set<String>> requirements, EnumSet<Option> options); @Override void updateReposAndRequirements(Set<URI> repos, Map<String, Set<String>> requirements, EnumSet<Option> options); @Override Repository createRepository(URI uri); @Override Map<String, Set<String>> listRequirements(); @Override void print(String message, boolean verbose); void saveState(State state); @Override void persistResolveRequest(Deployer.DeploymentRequest request); @Override void refreshPackages(Collection<Bundle> bundles); @Override Bundle installBundle(String region, String uri, InputStream is); @Override void updateBundle(Bundle bundle, String uri, InputStream is); @Override void uninstall(Bundle bundle); @Override void startBundle(Bundle bundle); @Override void stopBundle(Bundle bundle, int options); @Override void setBundleStartLevel(Bundle bundle, int startLevel); @Override void resolveBundles(Set<Bundle> bundles, Map<Resource, List<Wire>> wiring, Map<Resource, Bundle> resToBnd); @Override void replaceDigraph(Map<String, Map<String, Map<String, Set<String>>>> policies, Map<String, Set<Long>> bundles); @Override void installConfigs(Feature feature); @Override void deleteConfigs(Feature feature); @Override void installLibraries(Feature feature); @Override void bundleBlacklisted(BundleInfo bundleInfo); @Override String getFeatureXml(Feature feature); @Override void refreshFeatures(EnumSet<Option> options); }
FeaturesServiceImpl implements FeaturesService, Deployer.DeployCallback { @Override public Feature[] getFeatures(String nameOrId) throws Exception { return getFeatures(FeatureReq.parseNameAndRange(nameOrId)); } FeaturesServiceImpl(StateStorage storage,
                               FeatureRepoFinder featureFinder,
                               ConfigurationAdmin configurationAdmin,
                               Resolver resolver,
                               BundleInstallSupport installSupport,
                               org.osgi.service.repository.Repository globalRepository,
                               FeaturesServiceConfig cfg); void stop(); @Override void registerListener(FeaturesListener listener); @Override void unregisterListener(FeaturesListener listener); @Override void registerListener(DeploymentListener listener); @Override void unregisterListener(DeploymentListener listener); @Override void callListeners(FeatureEvent event); @Override void callListeners(DeploymentEvent event); @Override URI getRepositoryUriFor(String name, String version); @Override String[] getRepositoryNames(); @Override Feature[] repositoryProvidedFeatures(URI uri); @Override void validateRepository(URI uri); @Override boolean isRepositoryUriBlacklisted(URI uri); @Override void addRepository(URI uri); @Override void addRepository(URI uri, boolean install); @Override void removeRepository(URI uri); @Override void removeRepository(URI uri, boolean uninstall); @Override void restoreRepository(URI uri); @Override void refreshRepository(URI uri); @Override void refreshRepositories(Set<URI> uris); @Override Repository[] listRepositories(); @Override Repository[] listRequiredRepositories(); @Override Repository getRepository(String name); @Override Repository getRepository(URI uri); @Override String getRepositoryName(URI uri); @Override Feature getFeature(String name); @Override Feature getFeature(String name, String version); @Override Feature[] getFeatures(String nameOrId); @Override Feature[] getFeatures(String name, String version); @Override Feature[] listFeatures(); @Override Feature[] listInstalledFeatures(); @Override Feature[] listRequiredFeatures(); @Override boolean isInstalled(Feature f); @Override FeatureState getState(String featureId); @Override boolean isRequired(Feature f); @Override void installFeature(String name); @Override void installFeature(String name, String version); @Override void installFeature(String name, EnumSet<Option> options); @Override void installFeature(String name, String version, EnumSet<Option> options); @Override void installFeature(Feature feature, EnumSet<Option> options); @Override void installFeatures(Set<String> features, EnumSet<Option> options); @Override void uninstallFeature(String name, String version); @Override void uninstallFeature(String name, String version, EnumSet<Option> options); @Override void uninstallFeature(String name); @Override void uninstallFeature(String name, EnumSet<Option> options); @Override void uninstallFeatures(Set<String> features, EnumSet<Option> options); @Override void setResolutionOutputFile(String outputFile); @Override void installFeatures(Set<String> featuresIn, String region, EnumSet<Option> options); @Override void uninstallFeatures(Set<String> featuresIn, String region, EnumSet<Option> options); @Override void updateFeaturesState(Map<String, Map<String, FeatureState>> stateChanges, EnumSet<Option> options); @Override void addRequirements(Map<String, Set<String>> requirements, EnumSet<Option> options); @Override void removeRequirements(Map<String, Set<String>> requirements, EnumSet<Option> options); @Override void updateReposAndRequirements(Set<URI> repos, Map<String, Set<String>> requirements, EnumSet<Option> options); @Override Repository createRepository(URI uri); @Override Map<String, Set<String>> listRequirements(); @Override void print(String message, boolean verbose); void saveState(State state); @Override void persistResolveRequest(Deployer.DeploymentRequest request); @Override void refreshPackages(Collection<Bundle> bundles); @Override Bundle installBundle(String region, String uri, InputStream is); @Override void updateBundle(Bundle bundle, String uri, InputStream is); @Override void uninstall(Bundle bundle); @Override void startBundle(Bundle bundle); @Override void stopBundle(Bundle bundle, int options); @Override void setBundleStartLevel(Bundle bundle, int startLevel); @Override void resolveBundles(Set<Bundle> bundles, Map<Resource, List<Wire>> wiring, Map<Resource, Bundle> resToBnd); @Override void replaceDigraph(Map<String, Map<String, Map<String, Set<String>>>> policies, Map<String, Set<Long>> bundles); @Override void installConfigs(Feature feature); @Override void deleteConfigs(Feature feature); @Override void installLibraries(Feature feature); @Override void bundleBlacklisted(BundleInfo bundleInfo); @Override String getFeatureXml(Feature feature); @Override void refreshFeatures(EnumSet<Option> options);  }