Class ResourceBuilder


  • public final class ResourceBuilder
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String RESOLUTION_DYNAMIC  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ResourceImpl build​(java.lang.String uri, java.util.Map<java.lang.String,​java.lang.String> headerMap)  
      static ResourceImpl build​(java.lang.String uri, java.util.Map<java.lang.String,​java.lang.String> headerMap, boolean removeServiceRequirements)  
      static ResourceImpl build​(ResourceImpl resource, java.lang.String uri, java.util.Map<java.lang.String,​java.lang.String> headerMap)  
      static ResourceImpl build​(ResourceImpl resource, java.lang.String uri, java.util.Map<java.lang.String,​java.lang.String> headerMap, boolean removeServiceRequirements)  
      static java.util.List<org.osgi.resource.Capability> parseCapability​(org.osgi.resource.Resource resource, java.lang.String capability)  
      static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value, java.lang.String delim)  
      static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value, java.lang.String delim, boolean trim)
      Parses delimited string and returns an array containing the tokens.
      static java.util.List<org.osgi.resource.Requirement> parseRequirement​(org.osgi.resource.Resource resource, java.lang.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 java.lang.String RESOLUTION_DYNAMIC
        See Also:
        Constant Field Values
    • Method Detail

      • build

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

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

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

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

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

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

        public static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value,
                                                                            java.lang.String delim)
      • parseDelimitedString

        public static java.util.List<java.lang.String> parseDelimitedString​(java.lang.String value,
                                                                            java.lang.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.