Interface ResourceReferenceDelegate<R>

All Known Implementing Classes:
DefaultResourceReferenceDelegate, ExtensionPointReferenceDelegate

public interface ResourceReferenceDelegate<R>
Part of a ResourceTypeMeta that provides a way to find references to other resources.
  • Method Details

    • getResourceReferences

      Collection<ResourceReferences<R>> getResourceReferences(ConfigurationManager manager, ResourcePath targetResource)
      Finds any properties of any instance(s) of this resource type that reference the given resource.

      This is called for every registered resource type whenever a resource is renamed or deleted. Resource types that never reference other resources should use none().

      Parameters:
      manager - the configuration manager used to look up the resources of this type.
      targetResource - the path of the resource that is being renamed or deleted.
      Returns:
      the references to the given resource, grouped by the resource that holds them. Each group can produce the ChangeOperations needed to update its resource in the case of a rename operation.
      See Also:
    • getReferenceProperties

      default Collection<ReferenceProperty<R>> getReferenceProperties()
      Returns:
      A collection of all reference properties for the resource type represented by this delegate.
    • none

      static <X> ResourceReferenceDelegate<X> none()
      Returns:
      a delegate that reports no references.