Exemplo n.º 1
0
  private static String mapObrPropertyToR5(String namespace, String propName) {
    if (BundleNamespace.BUNDLE_NAMESPACE.equals(namespace)) {
      if ("symbolicname".equals(propName)) return BundleNamespace.BUNDLE_NAMESPACE;
      if ("version".equals(propName)) return BundleNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE;
    }

    if (PackageNamespace.PACKAGE_NAMESPACE.equals(namespace)) {
      if ("package".equals(propName)) return PackageNamespace.PACKAGE_NAMESPACE;
    }

    if (ServiceNamespace.SERVICE_NAMESPACE.equals(namespace)) {
      if ("service".equals(propName)) return ServiceNamespace.SERVICE_NAMESPACE;
    }

    return propName;
  }
Exemplo n.º 2
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;
  }
Exemplo n.º 3
0
 public boolean isService() {
   return ServiceNamespace.SERVICE_NAMESPACE.equals(getNamespace());
 }