Package fr.brouillard.oss.jgitver
Class JGitverSession
- java.lang.Object
-
- fr.brouillard.oss.jgitver.JGitverSession
-
public class JGitverSession extends Object
-
-
Constructor Summary
Constructors Constructor Description JGitverSession(JGitverInformationProvider gitVersionCalculator, File multiModuleDirectory)Standard constructor using mandatory fields.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProject(GAV project)JGitverInformationProvidergetCalculator()FilegetMultiModuleDirectory()Set<GAV>getProjects()StringgetVersion()static JGitverSessionserializeFrom(String content)De-serializes the given string as aJGitverSession.static StringserializeTo(JGitverSession session)Serializes as a String the given configuration 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 computationmultiModuleDirectory- the base maven directory
-
-
Method Detail
-
getVersion
public String getVersion()
-
getCalculator
public JGitverInformationProvider getCalculator()
-
getMultiModuleDirectory
public File getMultiModuleDirectory()
-
addProject
public void addProject(GAV project)
-
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 writtenException- See Also:
serializeFrom(String)
-
serializeFrom
public static JGitverSession serializeFrom(String content) throws Exception
De-serializes the given string as aJGitverSession.- 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
-
-