Interface CapabilityReferenceRecorder

    • Method Detail

      • addCapabilityRequirements

        void addCapabilityRequirements​(OperationContext context,
                                       Resource resource,
                                       String attributeName,
                                       String... attributeValues)
        Registers capability requirement information to the given context.
        Parameters:
        context - the context
        resource - the resource on which requirements are gathered
        attributeName - the name of the attribute
        attributeValues - the values of the attribute, which may contain null
      • removeCapabilityRequirements

        void removeCapabilityRequirements​(OperationContext context,
                                          Resource resource,
                                          String attributeName,
                                          String... attributeValues)
        Deregisters capability requirement information from the given context.
        Parameters:
        context - the context
        resource - the resource on which requirements are gathered
        attributeName - the name of the attribute
        attributeValues - the values of the attribute, which may contain null
      • getBaseDependentName

        @Deprecated
        String getBaseDependentName()
        Deprecated.
        No longer required and may throw UnsupportedOperationException
        Returns:
        base name of dependant, usually name of the attribute that provides reference to capability
      • getBaseRequirementName

        String getBaseRequirementName()
        Returns:
        requirement name of the capability this reference depends on
      • isDynamicDependent

        @Deprecated
        default boolean isDynamicDependent()
        Deprecated.
        No longer required and may throw UnsupportedOperationException
        Returns:
        tells is reference is dynamic or static, in case where it is dynamic it uses base name + name of dependent attribute to construct name of capability
      • getRequirementPatternSegments

        default String[] getRequirementPatternSegments​(String name,
                                                       PathAddress address)
        Returns the elements to be added to the baseRequirementName to build the capability name pattern. It will return an array of the form `segment[.segment]` where each segment represents either the name of one of the resource's attributes or one of the keys in the resource's address. In the actual name the attribute name or address key will be replaced by the value associated with that attribute or key.
        Parameters:
        name - the name of the attribute.
        address - the registration address of the resource definition that has the capability and its requirement.
        Returns:
        the elements to be added to the baseRequirementName to build the capability name pattern.