public class BlueprintConfigUtils
extends java.lang.Object
ConfigUtils class. Basically a small util class that handles the retrieval of relevant
headers from the any given bundle.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BLUEPRINT_GRACE_PERIOD
Standard wait for dependencies header
|
static java.lang.String |
BLUEPRINT_HEADER
Manifest entry name for configuring Blueprint modules
|
static java.lang.String |
BLUEPRINT_TIMEOUT
Standard timeout header
|
private static java.lang.String |
COMMA |
private static java.lang.String |
EQUALS |
static java.lang.String |
EXTENDER_VERSION |
private static java.lang.String |
SEMI_COLON |
| Constructor and Description |
|---|
BlueprintConfigUtils() |
| Modifier and Type | Method and Description |
|---|---|
private static java.lang.String |
getBlueprintDirectiveValue(java.util.Dictionary headers,
java.lang.String directiveName)
Shortcut method for retrieving the directive values.
|
static java.lang.String |
getBlueprintHeader(java.util.Dictionary headers)
Returns the "Bundle-Blueprint" if present from the given dictionary.
|
static java.lang.String[] |
getBlueprintHeaderLocations(java.util.Dictionary headers)
Returns the location headers (if any) specified by the Blueprint-Bundle header (if available).
|
static boolean |
getCreateAsync(java.util.Dictionary headers)
Shortcut for finding the boolean value for
#DIRECTIVE_CREATE_ASYNCHRONOUSLY directive using the given
headers. |
private static java.lang.String |
getDirectiveValue(java.util.Dictionary headers,
java.lang.String directiveName)
Shortcut method to retrieve directive values.
|
static boolean |
getPublishContext(java.util.Dictionary headers)
Shortcut for finding the boolean value for
#DIRECTIVE_PUBLISH_CONTEXT directive using the given headers. |
static java.lang.String |
getSymNameHeader(java.util.Dictionary headers) |
static long |
getTimeOut(java.util.Dictionary headers)
Shortcut for finding the boolean value for
BLUEPRINT_TIMEOUT directive using the given headers. |
static boolean |
getWaitForDependencies(java.util.Dictionary headers)
Shortcut for finding the boolean value for
BLUEPRINT_GRACE_PERIOD directive using the given headers. |
static boolean |
hasTimeout(java.util.Dictionary headers) |
private static final java.lang.String EQUALS
private static final java.lang.String SEMI_COLON
private static final java.lang.String COMMA
public static final java.lang.String BLUEPRINT_HEADER
public static final java.lang.String BLUEPRINT_GRACE_PERIOD
public static final java.lang.String BLUEPRINT_TIMEOUT
public static final java.lang.String EXTENDER_VERSION
public static java.lang.String getBlueprintHeader(java.util.Dictionary headers)
headers - public static java.lang.String getSymNameHeader(java.util.Dictionary headers)
private static java.lang.String getDirectiveValue(java.util.Dictionary headers,
java.lang.String directiveName)
directiveName - private static java.lang.String getBlueprintDirectiveValue(java.util.Dictionary headers,
java.lang.String directiveName)
getDirectiveValue(Dictionary, String) since it looks at the Bundle-Symbolic header and not at
Spring-Context.headers - directiveName - public static boolean hasTimeout(java.util.Dictionary headers)
public static long getTimeOut(java.util.Dictionary headers)
BLUEPRINT_TIMEOUT directive using the given headers.
Assumes the headers belong to a Spring powered bundle. Returns the timeout (in milliseconds) for which the application
context should wait to have its dependencies satisfied.headers - public static boolean getWaitForDependencies(java.util.Dictionary headers)
BLUEPRINT_GRACE_PERIOD directive using the given headers.
Assumes the headers belong to a Spring powered bundle.headers - public static boolean getPublishContext(java.util.Dictionary headers)
#DIRECTIVE_PUBLISH_CONTEXT directive using the given headers.
Assumes the headers belong to a Spring powered bundle.headers - public static boolean getCreateAsync(java.util.Dictionary headers)
#DIRECTIVE_CREATE_ASYNCHRONOUSLY directive using the given
headers.
Assumes the headers belong to a Spring powered bundle.headers - public static java.lang.String[] getBlueprintHeaderLocations(java.util.Dictionary headers)
ResourceLoader for loading the configurations.
Different from ConfigUtils.getLocationsFromHeader(String, String) since "," is used for separating
clauses while ; is used inside a clause to allow parameters or directives besides paths.
Since the presence of the header, disables any processing this method will return null if the header is not
specified, an empty array if it's empty (disabled) or a populated array otherwise.headers - bundle headers