Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.gemini.blueprint.extender.internal.blueprint.activator.support
Class BlueprintConfigUtils

    java.lang.Object
      org.eclipse.gemini.blueprint.extender.internal.blueprint.activator.support.BlueprintConfigUtils

    public class BlueprintConfigUtils

extends Object

RFC124-version of `ConfigUtils` class. Basically a small util class that handles the retrieval of relevant headers from the any given bundle.

Author:
  Costin Leau

Field Summary
`static String` | `BLUEPRINT_GRACE_PERIOD` Standard wait for dependencies header
`static String` | `BLUEPRINT_HEADER` Manifest entry name for configuring Blueprint modules
`static String` | `BLUEPRINT_TIMEOUT` Standard timeout header
`static String` | `EXTENDER_VERSION`

Constructor Summary
`BlueprintConfigUtils()`

Method Summary
`static String` | `getBlueprintHeader(Dictionary headers)` Returns the "Bundle-Blueprint" if present from the given dictionary.
`static String[]` | `getBlueprintHeaderLocations(Dictionary headers)` Returns the location headers (if any) specified by the Blueprint-Bundle header (if available).
`static boolean` | `getCreateAsync(Dictionary headers)` Shortcut for finding the boolean value for `#DIRECTIVE_CREATE_ASYNCHRONOUSLY` directive using the given headers.
`static boolean` | `getPublishContext(Dictionary headers)` Shortcut for finding the boolean value for `#DIRECTIVE_PUBLISH_CONTEXT` directive using the given headers.
`static String` | `getSymNameHeader(Dictionary headers)`
`static long` | `getTimeOut(Dictionary headers)` Shortcut for finding the boolean value for `BLUEPRINT_TIMEOUT` directive using the given headers.
`static boolean` | `getWaitForDependencies(Dictionary headers)` Shortcut for finding the boolean value for `BLUEPRINT_GRACE_PERIOD` directive using the given headers.
`static boolean` | `hasTimeout(Dictionary headers)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BLUEPRINT_HEADER

    public static final String BLUEPRINT_HEADER

  Manifest entry name for configuring Blueprint modules

  See Also:
    Constant Field Values

### BLUEPRINT_GRACE_PERIOD

    public static final String BLUEPRINT_GRACE_PERIOD

  Standard wait for dependencies header

  See Also:
    Constant Field Values

### BLUEPRINT_TIMEOUT

    public static final String BLUEPRINT_TIMEOUT

  Standard timeout header

  See Also:
    Constant Field Values

### EXTENDER_VERSION

    public static final String EXTENDER_VERSION

See Also:
  Constant Field Values

Constructor Detail

### BlueprintConfigUtils

    public BlueprintConfigUtils()

Method Detail

### getBlueprintHeader

    public static String getBlueprintHeader(Dictionary headers)

  Returns the "Bundle-Blueprint" if present from the given dictionary.

  Parameters:
    `headers` -
  Returns:

### getSymNameHeader

    public static String getSymNameHeader(Dictionary headers)

### hasTimeout

    public static boolean hasTimeout(Dictionary headers)

### getTimeOut

    public static long getTimeOut(Dictionary headers)

  Shortcut for finding the boolean value for `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.

  Parameters:
    `headers` -
  Returns:

### getWaitForDependencies

    public static boolean getWaitForDependencies(Dictionary headers)

  Shortcut for finding the boolean value for `BLUEPRINT_GRACE_PERIOD` directive using the given headers. Assumes the headers belong to a Spring powered bundle.

  Parameters:
    `headers` -
  Returns:

### getPublishContext

    public static boolean getPublishContext(Dictionary headers)

  Shortcut for finding the boolean value for `#DIRECTIVE_PUBLISH_CONTEXT` directive using the given headers. Assumes the headers belong to a Spring powered bundle.

  Parameters:
    `headers` -
  Returns:

### getCreateAsync

    public static boolean getCreateAsync(Dictionary headers)

  Shortcut for finding the boolean value for `#DIRECTIVE_CREATE_ASYNCHRONOUSLY` directive using the given headers. Assumes the headers belong to a Spring powered bundle.

  Parameters:
    `headers` -
  Returns:

### getBlueprintHeaderLocations

    public static String[] getBlueprintHeaderLocations(Dictionary headers)

  Returns the location headers (if any) specified by the Blueprint-Bundle header (if available). The returned Strings can be sent to a `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.

  Parameters:
    `headers` - bundle headers
  Returns:
    array of locations specified (if any)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2012. All Rights Reserved.