Interface ReferenceProperty<C>
- Type Parameters:
C
- The type of the configuration object for the resource, once decoded
public interface ReferenceProperty<C>
A property on a resource that references another resource. The reference property will be a string property,
referencing the name of another resource.
Usually built using a ReferencePropertyBuilder
-
Method Summary
Modifier and TypeMethodDescriptionfindReference
(C config, ResourcePath targetResource) Find references to the target resource in the given objectgetReferenceValues
(C config)
-
Method Details
-
getSourceType
ResourceType getSourceType()- Returns:
- The type of the resource that this property is on
-
getTargetType
ResourceType getTargetType()- Returns:
- The type of the resource that this property references
-
getReferenceValues
- Parameters:
config
- A decoded resource configuration object- Returns:
- The reference values of this property in the given object
-
findReference
Find references to the target resource in the given object- Parameters:
config
- The config object to check and see if it references the targettargetResource
- The target to see if any properties ofconfig
reference- Returns:
- A reference updater, if any reference was found. This object knows the name of the property that holds the reference, and the logic to create a new copy of the config object with the reference updated.
-