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
Modifier and TypeMethodDescriptiondefault org.eclipse.ditto.json.JsonPointerextractAttributePath(org.eclipse.ditto.json.JsonPointer path) Extract the attribute path from the given json pointer.default 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 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.visitAttribute(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.ATTRIBUTEresource.visitAttributes(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.ATTRIBUTESresource.visitFeature(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.FEATUREresource.visitFeatureDefinition(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.FEATURE_DEFINITIONresource.visitFeatureDesiredProperties(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.FEATURE_DESIRED_PROPERTIESresource.visitFeatureDesiredProperty(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.FEATURE_DESIRED_PROPERTYresource.visitFeatureProperties(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.FEATURE_PROPERTIESresource.visitFeatureProperty(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.FEATURE_PROPERTYresource.visitFeatures(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.FEATURESresource.visitPolicyId(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.POLICY_IDresource.visitThing(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.THINGresource.visitThingDefinition(org.eclipse.ditto.json.JsonPointer path, P param) Invoked for theThingResource.DEFINITIONresource.
-
Method Details
-
visitThing
Invoked for theThingResource.THINGresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.THINGresource.
-
visitThingDefinition
Invoked for theThingResource.DEFINITIONresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.DEFINITIONresource.
-
visitPolicyId
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
Invoked for theThingResource.ATTRIBUTESresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.ATTRIBUTESresource.
-
visitAttribute
Invoked for theThingResource.ATTRIBUTEresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.ATTRIBUTEresource.
-
visitFeature
Invoked for theThingResource.FEATUREresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATUREresource.
-
visitFeatures
Invoked for theThingResource.FEATURESresource.- Parameters:
path- the original resource pathparam- the parameter that is passed through- Returns:
- the result for the
ThingResource.FEATURESresource.
-
visitFeatureDefinition
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
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
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
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
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
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
Extract the subject id from the given json pointer.- Parameters:
path- the path from which to extract the subject id- Returns:
- the subject id
-