Interface ThingResourceVisitor<P,​R>

  • Type Parameters:
    P - the additional parameter that is passed through to the visit method
    R - 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 Detail

      • visitThing

        R visitThing​(org.eclipse.ditto.json.JsonPointer path,
                     @Nullable
                     P param)
        Invoked for the ThingResource.THING resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.THING resource.
      • visitThingDefinition

        R visitThingDefinition​(org.eclipse.ditto.json.JsonPointer path,
                               @Nullable
                               P param)
        Invoked for the ThingResource.DEFINITION resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.DEFINITION resource.
      • visitPolicyId

        R visitPolicyId​(org.eclipse.ditto.json.JsonPointer path,
                        @Nullable
                        P param)
        Invoked for the ThingResource.POLICY_ID resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.POLICY_ID resource.
      • visitAttributes

        R visitAttributes​(org.eclipse.ditto.json.JsonPointer path,
                          @Nullable
                          P param)
        Invoked for the ThingResource.ATTRIBUTES resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.ATTRIBUTES resource.
      • visitAttribute

        R visitAttribute​(org.eclipse.ditto.json.JsonPointer path,
                         @Nullable
                         P param)
        Invoked for the ThingResource.ATTRIBUTE resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.ATTRIBUTE resource.
      • visitFeature

        R visitFeature​(org.eclipse.ditto.json.JsonPointer path,
                       @Nullable
                       P param)
        Invoked for the ThingResource.FEATURE resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.FEATURE resource.
      • visitFeatures

        R visitFeatures​(org.eclipse.ditto.json.JsonPointer path,
                        @Nullable
                        P param)
        Invoked for the ThingResource.FEATURES resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.FEATURES resource.
      • visitFeatureDefinition

        R visitFeatureDefinition​(org.eclipse.ditto.json.JsonPointer path,
                                 @Nullable
                                 P param)
        Invoked for the ThingResource.FEATURE_DEFINITION resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.FEATURE_DEFINITION resource.
      • visitFeatureProperties

        R visitFeatureProperties​(org.eclipse.ditto.json.JsonPointer path,
                                 @Nullable
                                 P param)
        Invoked for the ThingResource.FEATURE_PROPERTIES resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.FEATURE_PROPERTIES resource.
      • visitFeatureProperty

        R visitFeatureProperty​(org.eclipse.ditto.json.JsonPointer path,
                               @Nullable
                               P param)
        Invoked for the ThingResource.FEATURE_PROPERTY resource.
        Parameters:
        path - the original resource path
        param - the parameter that is passed through
        Returns:
        the result for the ThingResource.FEATURE_PROPERTY resource.
      • getUnknownPathException

        org.eclipse.ditto.base.model.exceptions.DittoRuntimeException getUnknownPathException​(org.eclipse.ditto.json.JsonPointer path)
        Returns a DittoRuntimeException for 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 DittoRuntimeException indicating 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