Class AbstractPatchBuilder<T extends AbstractPatchBuilder<T>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER  
      protected java.lang.String op  
      static java.lang.String OP_KEY  
      static java.lang.String PATH_KEY  
      protected com.linkedin.common.urn.Urn targetEntityUrn  
      static java.lang.String VALUE_KEY  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      com.linkedin.mxe.MetadataChangeProposal build()
      Builder method
      protected com.linkedin.mxe.GenericAspect buildPatch()
      Generates Json patch for this builder to be set on the returned proposal from the buidler method
      protected abstract java.lang.String getAspectName()
      The aspect name associated with this builder
      protected abstract java.lang.String getPath()
      Path of the patch to apply, patch builders with complex object subpath will use a FieldPath enum to specify
      protected abstract java.util.stream.Stream<java.lang.Object> getRequiredProperties()
      Properties required by this builder to properly construct a patch
      protected abstract com.fasterxml.jackson.databind.JsonNode getValue()
      Json Patch value in JsonNode format, Note: field values initialize as null, so setting a field to null will be ignored rather than actually setting the field to null.
      T op​(PatchOperationType op)
      Sets the operation of the patch
      T urn​(com.linkedin.common.urn.Urn urn)
      Sets the target entity urn to be updated by this patch
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • op

        protected java.lang.String op
      • targetEntityUrn

        protected com.linkedin.common.urn.Urn targetEntityUrn
      • OBJECT_MAPPER

        public static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
    • Constructor Detail

      • AbstractPatchBuilder

        public AbstractPatchBuilder()
    • Method Detail

      • build

        public com.linkedin.mxe.MetadataChangeProposal build()
        Builder method
        Returns:
        a MetadataChangeProposal constructed from the builder's properties
      • buildPatch

        protected com.linkedin.mxe.GenericAspect buildPatch()
        Generates Json patch for this builder to be set on the returned proposal from the buidler method
        Returns:
        a JsonPatch wrapped by GenericAspect
      • getRequiredProperties

        protected abstract java.util.stream.Stream<java.lang.Object> getRequiredProperties()
        Properties required by this builder to properly construct a patch
        Returns:
        a list of properties to execute a null check on
      • getPath

        protected abstract java.lang.String getPath()
        Path of the patch to apply, patch builders with complex object subpath will use a FieldPath enum to specify
        Returns:
        path string
      • getValue

        protected abstract com.fasterxml.jackson.databind.JsonNode getValue()
        Json Patch value in JsonNode format, Note: field values initialize as null, so setting a field to null will be ignored rather than actually setting the field to null.
        Returns:
        JsonNode
      • getAspectName

        protected abstract java.lang.String getAspectName()
        The aspect name associated with this builder
        Returns:
        aspect name
      • op

        public T op​(PatchOperationType op)
        Sets the operation of the patch
        Parameters:
        op - The op value
        Returns:
        this PatchBuilder subtype's instance
      • urn

        public T urn​(com.linkedin.common.urn.Urn urn)
        Sets the target entity urn to be updated by this patch
        Parameters:
        urn - The target entity whose aspect is to be patched by this update
        Returns:
        this PatchBuilder subtype's instance