Class PomEditor.Parent

  • Enclosing class:
    PomEditor

    public class PomEditor.Parent
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Parent()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean deleteParent()
      Removes parent.
      void setParent​(Coordinates coordinates)
      Sets project/parent to the given artifact coordinates.
      boolean updateParent​(boolean upsert, Coordinates coordinates)
      Updates/insert parent.
      • Methods inherited from class java.lang.Object

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

      • Parent

        public Parent()
    • Method Detail

      • setParent

        public void setParent​(Coordinates coordinates)
                       throws eu.maveniverse.domtrip.DomTripException
        Sets project/parent to the given artifact coordinates.
        Parameters:
        coordinates - the parent artifact (groupId, artifactId, version)
        Throws:
        eu.maveniverse.domtrip.DomTripException - if an error occurs during editing
      • updateParent

        public boolean updateParent​(boolean upsert,
                                    Coordinates coordinates)
                             throws eu.maveniverse.domtrip.DomTripException
        Updates/insert parent. It goes for project/parent and rewrites it according to passed in coordinates.
        Parameters:
        upsert - whether to create the parent if it doesn't exist
        coordinates - the parent coordinates
        Returns:
        true if the parent was updated or created, false otherwise
        Throws:
        eu.maveniverse.domtrip.DomTripException - if an error occurs during editing
        Since:
        0.3.1
      • deleteParent

        public boolean deleteParent()
                             throws eu.maveniverse.domtrip.DomTripException
        Removes parent. It goes for project/parent and removes entry if present.
        Returns:
        true if the parent was updated or created, false otherwise
        Throws:
        eu.maveniverse.domtrip.DomTripException
        Since:
        0.3.1