コード例 #1
0
ファイル: TestHelpers.java プロジェクト: maduhu/ceres
 private static ModuleImpl newModuleImpl(String name, String version, ModuleState state)
     throws CoreException {
   ModuleImpl module = null;
   String resource = "xml/" + name + ".xml";
   try {
     module = loadModule(resource);
   } catch (IOException e) {
     e.printStackTrace();
     Assert.fail(resource + ": " + e.getMessage());
   }
   module.setVersion(Version.parseVersion(version));
   module.setState(state);
   return module;
 }
コード例 #2
0
 private RegionFilter createBundleFilter(String bundleSymbolicName, Version bundleVersion)
     throws InvalidSyntaxException {
   String bundleFilter =
       "(&("
           + RegionFilter.VISIBLE_BUNDLE_NAMESPACE
           + '='
           + bundleSymbolicName
           + ')'
           + '('
           + Constants.BUNDLE_VERSION_ATTRIBUTE
           + ">="
           + (bundleVersion == null ? "0" : bundleVersion.toString())
           + "))";
   RegionFilterBuilder builder = digraph.createRegionFilterBuilder();
   return builder.allow(RegionFilter.VISIBLE_BUNDLE_NAMESPACE, bundleFilter).build();
 }