Interface Reference
References are used to find dependencies between resources so that rename and delete operations can be performed safely. When a rename or delete operation detects a reference, it can force the user to confirm that the operation will break references (delete), or by automatically updating references to the new name (rename).
To support rename, the reference must also contain the logic to create a new copy of the relevant source configuration with the reference updated to a new name.
Note that it is not common to use this class directly. Instead, you will register ReferenceProperty objects to describe the reference properties within your resource type or extension point, which will then be automatically used by the system to create these Reference objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Reference
create
(ResourcePath sourceResource, String sourceProperty, ResourcePath targetResource, Function<ResourcePath, ChangeOperation> updateFunction) updateReference
(ResourcePath newTargetReference)
-
Method Details
-
getSourceResource
ResourcePath getSourceResource() -
getSourceProperty
String getSourceProperty() -
getTargetResource
ResourcePath getTargetResource() -
updateReference
-
create
static Reference create(ResourcePath sourceResource, String sourceProperty, ResourcePath targetResource, Function<ResourcePath, ChangeOperation> updateFunction)
-