Interface ResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>

    • Method Detail

      • withRuntimeHandler

        C withRuntimeHandler​(ResourceOperationRuntimeHandler runtimeHandler)
        Applies the specified runtime handler to the operations of this resource.
        Parameters:
        runtimeHandler - a runtime handler.
        Returns:
        a reference to this configurator
      • withAddOperationRestartFlag

        C withAddOperationRestartFlag​(OperationEntry.Flag restartFlag)
        Overrides the default restart flag for the "add" operation of this resource.
        Parameters:
        restartFlag - a restart flag
        Returns:
        a reference to this configurator
      • withRemoveOperationRestartFlag

        C withRemoveOperationRestartFlag​(OperationEntry.Flag restartFlag)
        Overrides the default restart flag for the "remove" operation of this resource.
        Parameters:
        restartFlag - a restart flag
        Returns:
        a reference to this configurator
      • addAttributes

        C addAttributes​(Collection<AttributeDefinition> attributes)
        Adds the specified attributes to this resource descriptor.
        Parameters:
        attributes - a collection of attributes
        Returns:
        a reference to this configurator
      • addModelOnlyAttributes

        C addModelOnlyAttributes​(Collection<AttributeDefinition> attributes)
        Adds the specified model-only attributes (i.e. with no runtime handling) to this resource descriptor.
        Parameters:
        attributes - a collection of attributes
        Returns:
        a reference to this configurator
      • addReadOnlyAttributes

        C addReadOnlyAttributes​(Collection<AttributeDefinition> attributes)
        Adds the specified read-only attributes to this resource descriptor.
        Parameters:
        attributes - a collection of attributes
        Returns:
        a reference to this configurator
      • renameAttribute

        default C renameAttribute​(AttributeDefinition attribute,
                                  AttributeDefinition targetAttribute)
        Specifies an attribute alias to another attribute of this resource.
        Parameters:
        attribute - the alias attribute
        targetAttribute - the target attribute
        Returns:
        a reference to this configurator
      • translateAttribute

        C translateAttribute​(AttributeDefinition attribute,
                             AttributeTranslation translation)
        Specifies an attribute alias to another attribute of a potentially different resource.
        Parameters:
        attribute - the alias attribute
        translation - a description of the attribute translation
        Returns:
        a reference to this configurator
      • addCapability

        default C addCapability​(RuntimeCapability<?> capability)
        Adds the specified runtime capability to this resource.
        Parameters:
        capability - a runtime capability
        Returns:
        a reference to this configurator
      • addCapability

        C addCapability​(RuntimeCapability<?> capability,
                        BiPredicate<OperationContext,​Resource> filter)
        Adds the specified conditionally-registered runtime capability to this resource
        Parameters:
        capability - a runtime capability
        filter - a predicate used to determine when the specified capability should be registered
        Returns:
        a reference to this configurator
      • addCapabilities

        default C addCapabilities​(Collection<RuntimeCapability<?>> capabilities)
        Adds the specified runtime capabilities to this resource.
        Parameters:
        capabilities - a collection of runtime capabilities
        Returns:
        a reference to this configurator
      • addCapabilities

        C addCapabilities​(Collection<RuntimeCapability<?>> capabilities,
                          BiPredicate<OperationContext,​Resource> filter)
        Adds the specified runtime capabilities to this resource.
        Parameters:
        capabilities - a collection of runtime capabilities
        filter - a predicate used to determine when the specified capability should be registered
        Returns:
        a reference to this configurator
      • requireChild

        default C requireChild​(PathElement path)
        Defines a required child of this resource. Required children will be automatically added, if no child resource exists with the specified path.
        Parameters:
        path - the path of the required child resource
        Returns:
        a reference to this configurator
      • requireChildren

        C requireChildren​(Set<PathElement> paths)
        Defines a set of required children of this resource. Required children will be automatically added, if no child resource exists with the specified path.
        Parameters:
        paths - a set of paths of the required child resources
        Returns:
        a reference to this configurator
      • requireSingletonChild

        default C requireSingletonChild​(PathElement path)
        Defines a required singleton child of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.
        Parameters:
        path - the path of the required singleton child resource
        Returns:
        a reference to this configurator
      • requireSingletonChildren

        C requireSingletonChildren​(Set<PathElement> paths)
        Defines a set of required singleton children of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.
        Parameters:
        paths - a set of paths of the required singleton child resources
        Returns:
        a reference to this configurator
      • addResourceCapabilityReference

        default C addResourceCapabilityReference​(ResourceCapabilityReferenceRecorder<?> reference)
        Adds a capability reference that records a requirement for this resource.
        Parameters:
        reference - a capability reference recorder
        Returns:
        a reference to this configurator
      • addResourceCapabilityReferences

        C addResourceCapabilityReferences​(Collection<ResourceCapabilityReferenceRecorder<?>> references)
        Adds a number of capability references that records requirements for this resource.
        Parameters:
        references - a collection of capability reference recorders
        Returns:
        a reference to this configurator
      • withAddResourceOperationTransformation

        C withAddResourceOperationTransformation​(UnaryOperator<OperationStepHandler> transformation)
        Applies the specified transformation to the "add" operation of this resource.
        Parameters:
        transformation - an operation handler transformation
        Returns:
        a reference to this configurator
      • withOperationTransformation

        C withOperationTransformation​(UnaryOperator<OperationStepHandler> transformation)
        Applies the specified transformation to the "remove" and all global operations of this resource.
        Parameters:
        transformation - an operation handler transformation
        Returns:
        a reference to this configurator
      • withResourceTransformation

        C withResourceTransformation​(UnaryOperator<Resource> transformation)
        Applies the specified transformation to the Resource created by this resource's "add" operation.
        Parameters:
        transformation - an operation handler transformation
        Returns:
        a reference to this configurator
      • withDeploymentChainContributor

        C withDeploymentChainContributor​(Consumer<DeploymentProcessorTarget> contributor)
        Applies the specified deployment chain contributor to this resource's "add" operation.
        Parameters:
        contributor - a deployment chain contribution
        Returns:
        a reference to this configurator
      • provideAttributes

        <P extends Supplier<AttributeDefinition>> C provideAttributes​(Collection<P> providers)
        Adds the specified attribute providers to this resource descriptor.
        Parameters:
        providers - a collection of attribute providers
        Returns:
        a reference to this configurator
      • provideModelOnlyAttributes

        <P extends Supplier<AttributeDefinition>> C provideModelOnlyAttributes​(Collection<P> providers)
        Adds the specified model-only attribute providers to this resource descriptor.
        Parameters:
        providers - a collection of attribute providers
        Returns:
        a reference to this configurator
      • provideReadOnlyAttributes

        <P extends Supplier<AttributeDefinition>> C provideReadOnlyAttributes​(Collection<P> providers)
        Adds the specified read-only attribute providers to this resource descriptor.
        Parameters:
        providers - a collection of attribute providers
        Returns:
        a reference to this configurator
      • provideCapabilities

        default <P extends Supplier<RuntimeCapability<?>>> C provideCapabilities​(Collection<P> providers)
        Adds the specified runtime capability providers to this resource descriptor.
        Parameters:
        providers - a collection of runtime capability providers
        Returns:
        a reference to this configurator
      • provideCapabilities

        <P extends Supplier<RuntimeCapability<?>>> C provideCapabilities​(Collection<P> providers,
                                                                         BiPredicate<OperationContext,​Resource> filter)
        Adds the specified conditionally-registered runtime capability providers to this resource descriptor.
        Parameters:
        providers - a collection of runtime capability providers
        filter - a predicate used to determine when the specified capability should be registered
        Returns:
        a reference to this configurator
      • provideRequiredChildren

        <P extends Supplier<PathElement>> C provideRequiredChildren​(Collection<P> providers)
        Defines a set of required children of this resource. Required children will be automatically added, if no child resource exists with the specified path.
        Parameters:
        providers - a set of providers of the required child resource paths
        Returns:
        a reference to this configurator
      • provideRequiredSingletonChildren

        <P extends Supplier<PathElement>> C provideRequiredSingletonChildren​(Collection<P> providers)
        Defines a set of required singleton children of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.
        Parameters:
        providers - a set of providers of the required singleton child resource paths
        Returns:
        a reference to this configurator