java.lang.Object
gg.nils.semanticrelease.maven.plugin.session.impl.SessionImpl
All Implemented Interfaces:
Session

public class SessionImpl extends Object implements Session
  • Constructor Details

    • SessionImpl

      public SessionImpl(String version, 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:
      version - the final version
      multiModuleDirectory - the base maven directory
  • Method Details

    • serializeTo

      public static String serializeTo(Session 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

      public static Session serializeFrom(String content) throws Exception
      De-serializes the given string as a SessionImpl.
      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
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in interface Session
    • getMultiModuleDirectory

      public File getMultiModuleDirectory()
      Specified by:
      getMultiModuleDirectory in interface Session
    • addProject

      public void addProject(GAV project)
      Specified by:
      addProject in interface Session
    • getProjects

      public Set<GAV> getProjects()
      Specified by:
      getProjects in interface Session