Class CapabilityReferenceRecorder.ResourceCapabilityReferenceRecorder

    • Method Detail

      • addCapabilityRequirements

        public void addCapabilityRequirements​(OperationContext context,
                                              Resource resource,
                                              String attributeName,
                                              String... attributeValues)
        Description copied from interface: CapabilityReferenceRecorder
        Registers capability requirement information to the given context.
        Specified by:
        addCapabilityRequirements in interface CapabilityReferenceRecorder
        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

        public void removeCapabilityRequirements​(OperationContext context,
                                                 Resource resource,
                                                 String attributeName,
                                                 String... attributeValues)
        Description copied from interface: CapabilityReferenceRecorder
        Deregisters capability requirement information from the given context.
        Specified by:
        removeCapabilityRequirements in interface CapabilityReferenceRecorder
        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
      • isDynamicDependent

        public boolean isDynamicDependent()
        Specified by:
        isDynamicDependent in interface CapabilityReferenceRecorder
        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

        public String[] getRequirementPatternSegments​(String dynamicElement,
                                                      PathAddress registrationAddress)
        Description copied from interface: CapabilityReferenceRecorder
        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.
        Specified by:
        getRequirementPatternSegments in interface CapabilityReferenceRecorder
        Parameters:
        dynamicElement - the name of the attribute.
        registrationAddress - 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.