Supports multiple declaration resolution.

This case can happen when a component tries to resolve twice the same
object declaration.

This is unlikely to happen without any decorator support because all the
heap interactions are going on in one place and it's easy to refactor the
code to only resolve a declaration once.

But when decorators comes into play, it's no more easy to share resolved
objects references around.

git-svn-id: https://svn.forgerock.org/openig/trunk@634 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
OPENIG-340 (CR-4904) Introduce heap object decorators.

Decorators have the unique capability of transforming heap objects: they
can encapsulate the original object into another compatible one (they
still have to share the same interface), they can post-configure
instances, ...

Two levels of decorations are supported: per-instance and global.

Global decoration allows to share widely a decoration for all objects
managed inside of a Heap. This is very useful to avoid writing the same
decoration over and over for each heap object.

Per-instance decoration permits to selectively apply decoration on some
instances. That can be very useful if you want to focus on a given heap
object, without impacting others.

Here is an example of decoration configuration for an instance:

    {
      "name": "Handler",
      "type": "ClientHandler",
      "capture": "request" <-- the decoration
    }

An arbitrary number of decorations can be applied on any instance.

The attribute name has to match a heap object name of the wanted decorator.
The attribute value is the configuration that will be passed to the
decorator when asked to decorate the heap object instance.

Decorators have to be declared in the /heap/objects list, just like
any other heap objects. The name of a decorator is the key that will be
used to lookup the right decorator in the heap when decorations are
processed.

Global decorations are Heap-scoped decorations: all heap objects
provided/managed by a given Heap will be decorated with that special
decorator. They are inherited between heaps.

Global decorations are enabled when a /heap/decorations object in the
JSON configuration (system config or route config) is found. Each
attributes of that object are representing a decoration configuration
to be applied on heap objects.

Example of global decoration configuration:

    {
      "heap": {
        "objects": [ ... ],
        "decorations": {
          "decorator-name": a JSON node representing the decoration config
          ...
        }
      }
    }

Notice that, in order to prevent infinite recursions, decorators cannot
be decorated themselves.

git-svn-id: https://svn.forgerock.org/openig/trunk@635 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
Introduce Json.ofEnum(Class<T> enumType) to transform JsonValue list to list of Enums

git-svn-id: https://svn.forgerock.org/openig/trunk@636 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
OPENIG-299 (CR-4904) Add capture decoration for Filter/Handler

This decorator can be applied on any Filters or Handlers whose
input/outputs needs to be observed.

This decorator prints the message's values in the observed
component's logSink or in its own configurable logSink (if one
was specified).

Multiple observation points can be specified depending on what you're
interested in.

Observation points for Filter:
                            ---
          -- (request) ->  |   | -- (filtered-request) ->
                           | F |
 <- (filtered-response) -- |   | <- (response) --
                            ---

Observation points for Handler:
                   ---
 -- (request) ->  |   |
                  | H |
 <- (response) -- |   |
                   ---

git-svn-id: https://svn.forgerock.org/openig/trunk@637 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
Style only

git-svn-id: https://svn.forgerock.org/openig/trunk@638 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
OPENIG-299 Provide a default 'capture' decorator instance

git-svn-id: https://svn.forgerock.org/openig/trunk@639 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
OPENIG-347 CaptureFilter is now deprecated in favor of "capture" decoration

git-svn-id: https://svn.forgerock.org/openig/trunk@640 dbb9e58e-28e6-4ce0-90e8-f11d9605b710