org.apache.felix.utils.resource

## Class ResourceBuilder

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

    public final class ResourceBuilder
    extends Object

### Field Summary

Fields
`static String` `RESOLUTION_DYNAMIC`

### Method Summary

All Methods Static Methods Concrete Methods
`static ResourceImpl` `build(ResourceImpl resource, String uri, Map<String,String> headerMap)`
`static ResourceImpl` `build(ResourceImpl resource, String uri, Map<String,String> headerMap, boolean removeServiceRequirements)`
`static ResourceImpl` `build(String uri, Map<String,String> headerMap)`
`static ResourceImpl` `build(String uri, Map<String,String> headerMap, boolean removeServiceRequirements)`
`static List<org.osgi.resource.Capability>` `parseCapability(org.osgi.resource.Resource resource, String capability)`
`static List<String>` `parseDelimitedString(String value, String delim)`
`static List<String>` `parseDelimitedString(String value, String delim, boolean trim)` Parses delimited string and returns an array containing the tokens.
`static List<org.osgi.resource.Requirement>` `parseRequirement(org.osgi.resource.Resource resource, String requirement)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### RESOLUTION_DYNAMIC

    public static final String RESOLUTION_DYNAMIC

See Also:
  Constant Field Values

### Method Detail

#### 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.