Class ResourceBuilder

java.lang.Object
org.apache.felix.utils.resource.ResourceBuilder

public final class ResourceBuilder extends Object
  • Field Details

  • Method Details

    • build

      public static ResourceImpl build(String uri, Map<String,String> headerMap) throws org.osgi.framework.BundleException
      Throws:
      org.osgi.framework.BundleException
    • build

      public static ResourceImpl build(String uri, Map<String,String> headerMap, boolean removeServiceRequirements) throws org.osgi.framework.BundleException
      Throws:
      org.osgi.framework.BundleException
    • build

      public static ResourceImpl build(ResourceImpl resource, String uri, Map<String,String> headerMap) throws org.osgi.framework.BundleException
      Throws:
      org.osgi.framework.BundleException
    • build

      public static ResourceImpl build(ResourceImpl resource, String uri, Map<String,String> headerMap, boolean removeServiceRequirements) throws org.osgi.framework.BundleException
      Throws:
      org.osgi.framework.BundleException
    • parseRequirement

      public static List<org.osgi.resource.Requirement> parseRequirement(org.osgi.resource.Resource resource, String requirement) throws org.osgi.framework.BundleException
      Throws:
      org.osgi.framework.BundleException
    • parseCapability

      public static List<org.osgi.resource.Capability> parseCapability(org.osgi.resource.Resource resource, String capability) throws org.osgi.framework.BundleException
      Throws:
      org.osgi.framework.BundleException
    • parseDelimitedString

      public static List<String> parseDelimitedString(String value, String delim)
    • parseDelimitedString

      public static List<String> parseDelimitedString(String value, String delim, boolean trim)
      Parses delimited string and returns an array containing the tokens. This parser obeys quotes, so the delimiter character will be ignored if it is inside of a quote. This method assumes that the quote character is not included in the set of delimiter characters.
      Parameters:
      value - the delimited string to parse.
      delim - the characters delimiting the tokens.
      trim - true to trim the string, false else.
      Returns:
      a list of string or an empty list if there are none.