Interface ResourceTransformationDescriptionBuilder

    • Method Detail

      • getAttributeBuilder

        AttributeTransformationDescriptionBuilder getAttributeBuilder()
        Get a builder to define custom attribute transformation rules. These rules transform the resource and its operations.
        Returns:
        the attribute transformation builder
      • addOperationTransformationOverride

        OperationTransformationOverrideBuilder addOperationTransformationOverride​(String operationName)
        Add an operation transformation entry for a given operation. By default all operations inherit the attribute transformation rules from this transformation description. This behavior can be overridden for a given operation.
        Parameters:
        operationName - the operation name
        Returns:
        the operation transformation builder
      • setCustomResourceTransformer

        ResourceTransformationDescriptionBuilder setCustomResourceTransformer​(ResourceTransformer resourceTransformer)
        Set an optional custom resource transformer. This transformer is going to be called after all attribute transformations set up by getAttributeBuilder() and needs to take care of adding the currently transformed resource properly. If not specified, the resource will be added according to other rules defined by this builder.
        Parameters:
        resourceTransformer - the resource transformer
        Returns:
        the builder for the current resource
      • addChildResource

        ResourceTransformationDescriptionBuilder addChildResource​(PathElement pathElement,
                                                                  DynamicDiscardPolicy dynamicDiscardPolicy)
        Add a child resource to this builder. This is going to register the child automatically at the TransformersSubRegistration when registering the transformation description created by this builder.
        Parameters:
        pathElement - the path element
        dynamicDiscardPolicy - a checker to decide whether the child should be added or not
        Returns:
        the builder for the child resource
      • addChildResource

        ResourceTransformationDescriptionBuilder addChildResource​(ResourceDefinition definition,
                                                                  DynamicDiscardPolicy dynamicDiscardPolicy)
        Add a child resource to this builder. This is going to register the child automatically at the TransformersSubRegistration when registering the transformation description created by this builder.
        Parameters:
        definition - the resource definition
        dynamicDiscardPolicy - a checker to decide whether the child should be added or not
        Returns:
        the builder for the child resource
      • discardChildResource

        DiscardTransformationDescriptionBuilder discardChildResource​(PathElement pathElement)
        Recursively discards all child resources and its operations.
        Parameters:
        pathElement - the path element
        Returns:
        the builder for the child resource
      • rejectChildResource

        RejectTransformationDescriptionBuilder rejectChildResource​(PathElement pathElement)
        Recursively rejects all child resources and its operations
        Parameters:
        pathElement - the path element
        Returns:
        the builder for the child resource
      • addChildRedirection

        ResourceTransformationDescriptionBuilder addChildRedirection​(PathElement current,
                                                                     PathElement legacy)
        Add a child resource, where all operations will get redirected to the legacy address. You can either pass in
        • Fixed elements - e.g. current:addr1=test + legacy:addr2=toast, in which case addr1=test gets redirected to addr2=toast}
        • Wildcard elements - e.g. current:addr1=* + legacy:addr2=*, in which case addr1=test gets redirected to addr2=test, addr1=ping gets redirected to addr2=ping, etc.
        Parameters:
        current - the current path element
        legacy - the legacy path element.
        Returns:
        the builder for the child resource
      • addChildRedirection

        ResourceTransformationDescriptionBuilder addChildRedirection​(PathElement current,
                                                                     PathElement legacy,
                                                                     DynamicDiscardPolicy dynamicDiscardPolicy)
        Add a child resource, where all operations will get redirected to the legacy address. You can either pass in
        • Fixed elements - e.g. current:addr1=test + legacy:addr2=toast, in which case addr1=test gets redirected to addr2=toast}
        • Wildcard elements - e.g. current:addr1=* + legacy:addr2=*, in which case addr1=test gets redirected to addr2=test, addr1=ping gets redirected to addr2=ping, etc.
        Parameters:
        current - the current path element
        legacy - the legacy path element.
        dynamicDiscardPolicy - a checker to decide whether the child should be added or not
        Returns:
        the builder for the child resource
      • addChildRedirection

        ResourceTransformationDescriptionBuilder addChildRedirection​(PathElement pathElement,
                                                                     PathAddressTransformer pathAddressTransformer)
        Add a child resource, where all operation will get redirected to a different address defined by the path transformation.
        Parameters:
        pathElement - the path element of the child
        pathAddressTransformer - the path transformation
        Returns:
        the builder for the child resource
      • addChildRedirection

        ResourceTransformationDescriptionBuilder addChildRedirection​(PathElement pathElement,
                                                                     PathAddressTransformer pathAddressTransformer,
                                                                     DynamicDiscardPolicy dynamicDiscardPolicy)
        Add a child resource, where all operation will get redirected to a different address defined by the path transformation.
        Parameters:
        pathElement - the path element of the child
        pathAddressTransformer - the path transformation
        dynamicDiscardPolicy - a checker to decide whether the child should be added or not
        Returns:
        the builder for the child resource
      • discardOperations

        ResourceTransformationDescriptionBuilder discardOperations​(String... operationNames)
        Don't forward and just discard the operation.
        Parameters:
        operationNames - the operation names
        Returns:
        the builder for this resource