Class JGitverSession


  • public class JGitverSession
    extends Object
    • Constructor Detail

      • JGitverSession

        public JGitverSession​(JGitverInformationProvider gitVersionCalculator,
                              File multiModuleDirectory)
        Standard constructor using mandatory fields. The class does not use final attributes dues to its jaxb nature that requires an empty constructor.
        Parameters:
        gitVersionCalculator - the jgitver computation
        multiModuleDirectory - the base maven directory
    • Method Detail

      • getVersion

        public String getVersion()
      • getMultiModuleDirectory

        public File getMultiModuleDirectory()
      • addProject

        public void addProject​(GAV project)
      • getProjects

        public Set<GAV> getProjects()
      • serializeTo

        public static String serializeTo​(JGitverSession session)
                                  throws Exception
        Serializes as a String the given configuration object.
        Parameters:
        session - the object to serialize
        Returns:
        a non null String representation of the given object serialized
        Throws:
        IOException - if the serialized form cannot be written
        Exception
        See Also:
        serializeFrom(String)
      • serializeFrom

        public static JGitverSession serializeFrom​(String content)
                                            throws Exception
        De-serializes the given string as a JGitverSession.
        Parameters:
        content - the string to de-serialize
        Returns:
        a non null configuration object
        Throws:
        Exception - if the given string could not be interpreted by simplexml