Class MetadataClutter


  • public class MetadataClutter
    extends java.lang.Object
    • Field Summary

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

      Constructors 
      Constructor Description
      MetadataClutter()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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 java.lang.String remove​(java.lang.String resource)
      Removes clutter properties from the given textual content.
      static java.lang.String remove​(java.lang.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 Detail

      • properties

        public static final java.util.List<java.lang.String> properties
        Properties in ObjectMeta that are considered disposable clutter.
    • Constructor Detail

      • MetadataClutter

        public MetadataClutter()
    • Method Detail

      • remove

        public static java.lang.String remove​(java.lang.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 java.lang.String remove​(java.lang.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