Class UpdateCommand

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Integer>

    public class UpdateCommand
    extends CommandCommons
    This class handles the update command
    • Constructor Summary

      Constructors 
      Constructor Description
      UpdateCommand()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer doAction()  
      boolean printOutdatedPlugin​(java.util.List<org.apache.maven.model.Dependency> localPomDependencies, java.util.List<java.lang.String> centralMavenVersionList, java.util.HashMap<java.lang.String,​java.lang.String> updatePluginVersions, java.util.HashMap<java.lang.Integer,​java.lang.String> listOfArtifacts)
      This method is printing the outdated plug-ins
      void updateOutdatedPlugins​(java.util.List<org.apache.maven.model.Dependency> localPomDependencies, java.util.HashMap<java.lang.Integer,​java.lang.String> listOfArtifacts, java.util.List<java.lang.String> centralMavenVersionList, org.apache.maven.model.Model model, java.util.ArrayList<java.lang.String> userInputPluginForUpdate)
      This method is updating the outdated plug-ins
      • Methods inherited from class java.lang.Object

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

      • UpdateCommand

        public UpdateCommand()
    • Method Detail

      • doAction

        public java.lang.Integer doAction()
                                   throws java.lang.Exception
        Specified by:
        doAction in class CommandCommons
        Throws:
        java.lang.Exception
      • printOutdatedPlugin

        public boolean printOutdatedPlugin​(java.util.List<org.apache.maven.model.Dependency> localPomDependencies,
                                           java.util.List<java.lang.String> centralMavenVersionList,
                                           java.util.HashMap<java.lang.String,​java.lang.String> updatePluginVersions,
                                           java.util.HashMap<java.lang.Integer,​java.lang.String> listOfArtifacts)
        This method is printing the outdated plug-ins
        Parameters:
        localPomDependencies - This parameter holds the artificial dependencies
        centralMavenVersionList - This parameter holds version list
        updatePluginVersions - This parameter contains the key, value pair of versions
        listOfArtifacts - This holds a list of artifact ids which need to be updated
        Returns:
        true if all plugins are up-to-date and false if update is needed
      • updateOutdatedPlugins

        public void updateOutdatedPlugins​(java.util.List<org.apache.maven.model.Dependency> localPomDependencies,
                                          java.util.HashMap<java.lang.Integer,​java.lang.String> listOfArtifacts,
                                          java.util.List<java.lang.String> centralMavenVersionList,
                                          org.apache.maven.model.Model model,
                                          java.util.ArrayList<java.lang.String> userInputPluginForUpdate)
        This method is updating the outdated plug-ins
        Parameters:
        localPomDependencies - This is holding the dependencies of artificial pom
        listOfArtifacts - This parameter holds the value of updated plug-ins version
        centralMavenVersionList - This parameter holds the version list
        model - This parameter holds the after pom file reader dependencies
        userInputPluginForUpdate - This is holding user input for update plug-ins