Beispiel #1
0
  private static String translateObrFilter(String namespace, String filter, LogService log) {
    filter = ObrUtil.processFilter(filter, log);

    if (PackageNamespace.PACKAGE_NAMESPACE.equals(namespace))
      return filter.replaceAll("\\(package", "(" + PackageNamespace.PACKAGE_NAMESPACE);

    if (ServiceNamespace.SERVICE_NAMESPACE.equals(namespace))
      return filter.replaceAll("\\(service", "(" + ServiceNamespace.SERVICE_NAMESPACE);

    if (BundleNamespace.BUNDLE_NAMESPACE.equals(namespace)) {
      filter = filter.replaceAll("\\(symbolicname", "(" + BundleNamespace.BUNDLE_NAMESPACE);
      return filter.replaceAll(
          "\\(version", "(" + BundleNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
    }

    if (ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE.equals(namespace))
      return filter.replaceAll(
          "\\(ee", "(" + ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);

    return filter;
  }
Beispiel #2
0
 public boolean isEE() {
   return ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE.equals(getNamespace());
 }