Class MetadataClutter

java.lang.Object
com.redhat.devtools.intellij.common.utils.MetadataClutter

public class MetadataClutter extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final List<String>
    Properties in ObjectMeta that are considered disposable clutter.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.fabric8.kubernetes.api.model.ObjectMeta
    remove(io.fabric8.kubernetes.api.model.ObjectMeta metadata)
    Removes clutter properties from the given ObjectMeta content.
    static String
    remove(String resource)
    Removes clutter properties from the given textual content.
    static String
    remove(String resource, boolean minimizeQuotes)
    Removes clutter properties from the given textual content.

    Methods inherited from class java.lang.Object

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

    • properties

      public static final List<String> properties
      Properties in ObjectMeta that are considered disposable clutter.
  • Constructor Details

    • MetadataClutter

      public MetadataClutter()
  • Method Details

    • remove

      public static String remove(String resource)
      Removes clutter properties from the given textual content. Does nothing if the content is null or empty.
      Parameters:
      resource - where the clutter properties should be removed from
      Returns:
      the content without the clutter properties
    • remove

      public static String remove(String resource, boolean minimizeQuotes)
      Removes clutter properties from the given textual content. Does nothing if the content is null or empty.
      Parameters:
      resource - where the clutter properties should be removed from
      minimizeQuotes - if, when converting from json to yaml, quotes should be removed if not strictly needed
      Returns:
      the content without the clutter properties
    • remove

      public static io.fabric8.kubernetes.api.model.ObjectMeta remove(io.fabric8.kubernetes.api.model.ObjectMeta metadata)
      Removes clutter properties from the given ObjectMeta content. Does nothing if the content is null.
      Parameters:
      metadata - where the clutter properties should be removed from
      Returns:
      the metadata without the clutter properties