Interface AutoWirer<N extends Node>

  • All Known Implementing Classes:
    AutoWirerImpl

    public interface AutoWirer<N extends Node>
    Auto wirer.
    Author:
    Daniel Sagenschneider
    • Method Detail

      • addAutoWireTarget

        void addAutoWireTarget​(N targetNode,
                               AutoWire... targetAutoWires)
        Adds an AutoWire target for selection.
        Parameters:
        targetNode - Target Node.
        targetAutoWires - Target AutoWire instances supported by the Node.
      • addAutoWireTarget

        void addAutoWireTarget​(java.util.function.Function<OfficeNode,​? extends N> targetNodeFactory,
                               AutoWire... targetAutoWires)
        Adds an AutoWire target for selection.
        Parameters:
        targetNodeFactory - Function to create the target Node. This enables dynamically adding the target Node only if it is selected for linking. The OfficeNode is available to configure the ManagingOfficeNode for the ManagedObjectSourceNode.
        targetAutoWires - Target AutoWire instances supported by the Node.
      • getAutoWireLinks

        <S extends NodeAutoWireLink<S,​N>[] getAutoWireLinks​(S sourceNode,
                                                                    AutoWire... sourceAutoWires)
        Selects the appropriate AutoWireLink instances.
        Type Parameters:
        S - Source Node type.
        Parameters:
        sourceNode - Source Node to link target.
        sourceAutoWires - Source AutoWire instances to match against target AutoWire instances.
        Returns:
        Matching AutoWireLink instances.
      • findAutoWireLinks

        <S extends NodeAutoWireLink<S,​N>[] findAutoWireLinks​(S sourceNode,
                                                                     AutoWire... sourceAutoWires)
        Selects the appropriate AutoWireLink instances, and does not flag issue if no matching AutoWireLink is found.
        Type Parameters:
        S - Source Node type.
        Parameters:
        sourceNode - Source Node to link target.
        sourceAutoWires - Source AutoWire instances to match against target AutoWire instances.
        Returns:
        Matching AutoWireLink instances.
      • createScopeAutoWirer

        AutoWirer<N> createScopeAutoWirer()

        Creates an AutoWirer for a new scope that takes priority over existing AutoWire targets.

        Targets are first looked for in the returned scoped AutoWirer. If no matching target is found, then this AutoWire is checked.

        Returns:
        Scoped AutoWirer.