Package io.wcm.caravan.hal.comparison
Interface HalComparisonContext
-
@ProviderType public interface HalComparisonContext
The "relational" location of a resource (or property) within a tree ofHalResource
s, constructed by concatenating the relations and JSON properties to follow from the API entry point.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getActualUrl()
List<String>
getAllPropertyNames()
List<String>
getAllRelations()
String
getExpectedUrl()
String
getLastProperyName()
String
getLastRelation()
io.wcm.caravan.hal.resource.HalResource
getParentResourceWithRelation(String relation)
String
toString()
-
-
-
Method Detail
-
getLastRelation
String getLastRelation()
- Returns:
- the name of the last HAL relation in the path
-
getAllRelations
List<String> getAllRelations()
- Returns:
- all relations that were followed to get to the context resource
-
getParentResourceWithRelation
io.wcm.caravan.hal.resource.HalResource getParentResourceWithRelation(String relation)
- Parameters:
relation
- that was used to embed/link to the resource which is to be found- Returns:
- the nearest parent of the current context that was linked or embedded with that relation
-
getLastProperyName
String getLastProperyName()
- Returns:
- the name of the JSON property where a difference was detected (or empty string, if the difference was not in a JSON property)
-
getAllPropertyNames
List<String> getAllPropertyNames()
- Returns:
- the names of all JSON properties contained in the HAL path (as returned by
toString()
-
getExpectedUrl
String getExpectedUrl()
- Returns:
- the URL where the resource that contains the expected value can be loaded from
-
getActualUrl
String getActualUrl()
- Returns:
- the URL where the resource that contains the actual value can be loaded from
-
-