Interface ThingResourceVisitor<P,R>
-
- Type Parameters:
P- the additional parameter that is passed through to the visit methodR- the result type of the visit method
public interface ThingResourceVisitor<P,R>Defines methods where implementing classes can handle the different resources in the respective methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default org.eclipse.ditto.json.JsonPointerextractAttributePath(org.eclipse.ditto.json.JsonPointer path)Extract the attribute path from the given json pointer.default java.lang.StringextractFeatureId(org.eclipse.ditto.json.JsonPointer path)Extract the feature id from the given json pointer.default org.eclipse.ditto.json.JsonPointerextractFeaturePropertyPath(org.eclipse.ditto.json.JsonPointer path)Extract the feature property path from the given json pointer.default java.lang.StringextractSubjectId(org.eclipse.ditto.json.JsonPointer path)Extract the subject id from the given json pointer.org.eclipse.ditto.base.model.exceptions.DittoRuntimeExceptiongetUnknownPathException(org.eclipse.ditto.json.JsonPointer path)Returns aDittoRuntimeExceptionfor the case when the given path could not be matched against the valid paths.RvisitAttribute(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.ATTRIBUTEresource.RvisitAttributes(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.ATTRIBUTESresource.RvisitFeature(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.FEATUREresource.RvisitFeatureDefinition(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.FEATURE_DEFINITIONresource.RvisitFeatureDesiredProperties(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.FEATURE_DESIRED_PROPERTIESresource.RvisitFeatureDesiredProperty(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.FEATURE_DESIRED_PROPERTYresource.RvisitFeatureProperties(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.FEATURE_PROPERTIESresource.RvisitFeatureProperty(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.FEATURE_PROPERTYresource.RvisitFeatures(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.FEATURESresource.RvisitPolicyId(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.POLICY_IDresource.RvisitThing(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.THINGresource.RvisitThingDefinition(org.eclipse.ditto.json.JsonPointer path, P param)Invoked for theThingResource.DEFINITIONresource.
-
-
-
Method Detail
-
visitThing
R visitThing(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.THINGresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.THINGresource.
-
visitThingDefinition
R visitThingDefinition(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.DEFINITIONresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.DEFINITIONresource.
-
visitPolicyId
R visitPolicyId(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.POLICY_IDresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.POLICY_IDresource.
-
visitAttributes
R visitAttributes(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.ATTRIBUTESresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.ATTRIBUTESresource.
-
visitAttribute
R visitAttribute(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.ATTRIBUTEresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.ATTRIBUTEresource.
-
visitFeature
R visitFeature(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.FEATUREresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATUREresource.
-
visitFeatures
R visitFeatures(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.FEATURESresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATURESresource.
-
visitFeatureDefinition
R visitFeatureDefinition(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.FEATURE_DEFINITIONresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATURE_DEFINITIONresource.
-
visitFeatureProperties
R visitFeatureProperties(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.FEATURE_PROPERTIESresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATURE_PROPERTIESresource.
-
visitFeatureProperty
R visitFeatureProperty(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.FEATURE_PROPERTYresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATURE_PROPERTYresource.
-
visitFeatureDesiredProperties
R visitFeatureDesiredProperties(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.FEATURE_DESIRED_PROPERTIESresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATURE_DESIRED_PROPERTIESresource.
-
visitFeatureDesiredProperty
R visitFeatureDesiredProperty(org.eclipse.ditto.json.JsonPointer path, @Nullable P param)
Invoked for theThingResource.FEATURE_DESIRED_PROPERTYresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATURE_DESIRED_PROPERTYresource.
-
getUnknownPathException
org.eclipse.ditto.base.model.exceptions.DittoRuntimeException getUnknownPathException(org.eclipse.ditto.json.JsonPointer path)
Returns aDittoRuntimeExceptionfor the case when the given path could not be matched against the valid paths.- Parameters:
path- the path that could not be matched.- Returns:
- a
DittoRuntimeExceptionindicating that the path was unknown
-
extractFeaturePropertyPath
default org.eclipse.ditto.json.JsonPointer extractFeaturePropertyPath(org.eclipse.ditto.json.JsonPointer path)
Extract the feature property path from the given json pointer.- Parameters:
path- the path from which to extract the feature property path- Returns:
- the feature property path
-
extractAttributePath
default org.eclipse.ditto.json.JsonPointer extractAttributePath(org.eclipse.ditto.json.JsonPointer path)
Extract the attribute path from the given json pointer.- Parameters:
path- the path from which to extract the attribute path- Returns:
- the attribute path
-
extractFeatureId
default java.lang.String extractFeatureId(org.eclipse.ditto.json.JsonPointer path)
Extract the feature id from the given json pointer.- Parameters:
path- the path from which to extract the feature id- Returns:
- the feature id
-
extractSubjectId
default java.lang.String extractSubjectId(org.eclipse.ditto.json.JsonPointer path)
Extract the subject id from the given json pointer.- Parameters:
path- the path from which to extract the subject id- Returns:
- the subject id
-
-