Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-2687

Expose the current step operation's name and parameters via the OperationContext

XMLWordPrintable

      Remove the need to pass the 'operation' ModelNode to a method for it to be able to learn about the currently effective operation.

      OperationContext already exposes getCurrentAddress(). Add getCurrentOperationName() and getCurrentOperationParameter(String name).

      The latter returns null if !operation.has(name) otherwise it returns whatever the node was. Or perhaps return undefined with an overloaded variant with a boolean param that lets the caller turn on getting null.

      The getCurrentOperationParameter should reject 'operation', 'address', 'operation-headers' etc as legal param names; only expose true parameters.

      EDIT: I removed 'name' from the list of illegal param names. It's not a special key in an operation model node. I added 'operation', which is a special key. I suspect when I wrote this I confused myself because the value of 'operation' key is the name of the operation.

            lvydra Lukas Vydra
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: