Class PomEditor.Subprojects

  • Enclosing class:
    PomEditor

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

      Constructors 
      Constructor Description
      Subprojects()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      eu.maveniverse.domtrip.Element addModule​(eu.maveniverse.domtrip.Element modulesElement, java.lang.String moduleName)
      Adds a module to the modules section.
      boolean addSubProject​(java.lang.String moduleName)
      Adds a module entry to project/modules/module[], if not already present.
      boolean removeSubProject​(java.lang.String moduleName)
      Removes a module entry from project/modules/module[], if present.
      • Methods inherited from class java.lang.Object

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

      • Subprojects

        public Subprojects()
    • Method Detail

      • addModule

        public eu.maveniverse.domtrip.Element addModule​(eu.maveniverse.domtrip.Element modulesElement,
                                                        java.lang.String moduleName)
                                                 throws eu.maveniverse.domtrip.DomTripException
        Adds a module to the modules section.
        Parameters:
        modulesElement - the modules container element
        moduleName - the name of the module
        Returns:
        the newly created module element
        Throws:
        eu.maveniverse.domtrip.DomTripException - if the module cannot be added
      • addSubProject

        public boolean addSubProject​(java.lang.String moduleName)
                              throws eu.maveniverse.domtrip.DomTripException
        Adds a module entry to project/modules/module[], if not already present.
        Parameters:
        moduleName - the module name/path
        Returns:
        true if the module was added, false if it already existed
        Throws:
        eu.maveniverse.domtrip.DomTripException - if an error occurs during editing
      • removeSubProject

        public boolean removeSubProject​(java.lang.String moduleName)
                                 throws eu.maveniverse.domtrip.DomTripException
        Removes a module entry from project/modules/module[], if present.
        Parameters:
        moduleName - the module name/path
        Returns:
        true if the module was removed, false if it didn't exist
        Throws:
        eu.maveniverse.domtrip.DomTripException