Interface TransformationContext

    • Method Detail

      • getTarget

        TransformationTarget getTarget()
        Get the transformation target.
        Returns:
        the transformation target
      • getProcessType

        ProcessType getProcessType()
        Get the type of process in which this operation is executing.
        Returns:
        the process type. Will not be null
      • getRunningMode

        RunningMode getRunningMode()
        Gets the running mode of the process.
        Returns:
        the running mode. Will not be null
      • readResource

        Resource readResource​(PathAddress address)
        Read a model resource.
        Parameters:
        address - the path address
        Returns:
        a read-only resource
      • readResourceFromRoot

        Resource readResourceFromRoot​(PathAddress address)
        Read a model resource from the root.
        Parameters:
        address - the path address
        Returns:
        the read-only resource
      • getLogger

        TransformersLogger getLogger()
        Returns Transformers logger that must be used for reporting any problems with transformation
        Returns:
        TransformersLogger associated with target host
      • getAttachment

        <T> T getAttachment​(OperationContext.AttachmentKey<T> key)
        Retrieves an object that has been attached to this context.
        Type Parameters:
        T - the value type of the attachment.
        Parameters:
        key - the key to the attachment.
        Returns:
        the attachment if found otherwise null.
      • attach

        <T> T attach​(OperationContext.AttachmentKey<T> key,
                     T value)
        Attaches an arbitrary object to this context.
        Type Parameters:
        T - the value type of the attachment.
        Parameters:
        key - they attachment key used to ensure uniqueness and used for retrieval of the value.
        value - the value to store.
        Returns:
        the previous value associated with the key or null if there was no previous value.
      • attachIfAbsent

        <T> T attachIfAbsent​(OperationContext.AttachmentKey<T> key,
                             T value)
        Attaches an arbitrary object to this context only if the object was not already attached. If a value has already been attached with the key provided, the current value associated with the key is returned.
        Type Parameters:
        T - the value type of the attachment.
        Parameters:
        key - they attachment key used to ensure uniqueness and used for retrieval of the value.
        value - the value to store.
        Returns:
        the previous value associated with the key or null if there was no previous value.
      • detach

        <T> T detach​(OperationContext.AttachmentKey<T> key)
        Detaches or removes the value from this context.
        Type Parameters:
        T - the value type of the attachment.
        Parameters:
        key - the key to the attachment.
        Returns:
        the attachment if found otherwise null.