Interface VersionService<T extends com.flower.docs.domain.component.Version>


  • public interface VersionService<T extends com.flower.docs.domain.component.Version>
    Service dedicated to Versioning management of components
    Author:
    Christopher Laszczuk
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void deleteVersion​(com.flower.docs.domain.common.Id vsid, com.flower.docs.domain.common.Id versionId)
      Deletes a version of a versionable Component
      void deleteVersions​(com.flower.docs.domain.common.Id vsid)
      Deletes all versions of a versionable Component
      com.flower.docs.domain.component.VersionSeries getVersions​(com.flower.docs.domain.common.Id vsid)
      Gets version series of a versionable Component
      T promote​(com.flower.docs.domain.common.Id id, java.lang.String label)
      Promotes a versionable Component as new version
      T revert​(com.flower.docs.domain.common.Id vsid, com.flower.docs.domain.common.Id version)
      Reverts to a specific version of a versionable VersionSeries
    • Method Detail

      • promote

        T promote​(com.flower.docs.domain.common.Id id,
                  java.lang.String label)
           throws com.flower.docs.domain.exception.TechnicalException,
                  com.flower.docs.domain.exception.FunctionalException
        Promotes a versionable Component as new version
        Parameters:
        id - The component identifier from which the version should be created
        label - The version label. If null or empty, the default VersionLabelStrategy is used to determine version label
        Returns:
        The created version
        Throws:
        com.flower.docs.domain.exception.TechnicalException - If a technical error occurs
        com.flower.docs.domain.exception.FunctionalException - If a functional error occurs
      • getVersions

        com.flower.docs.domain.component.VersionSeries getVersions​(com.flower.docs.domain.common.Id vsid)
                                                            throws com.flower.docs.domain.exception.TechnicalException,
                                                                   com.flower.docs.domain.exception.FunctionalException
        Gets version series of a versionable Component
        Parameters:
        vsid - The unique reference of a version series
        Returns:
        The version series containing all versions of the component
        Throws:
        com.flower.docs.domain.exception.TechnicalException - If a technical error occurs
        com.flower.docs.domain.exception.FunctionalException - If a functional error occurs
        See Also:
        Version.getVersionSeriesId()
      • revert

        T revert​(com.flower.docs.domain.common.Id vsid,
                 com.flower.docs.domain.common.Id version)
          throws com.flower.docs.domain.exception.TechnicalException,
                 com.flower.docs.domain.exception.FunctionalException
        Reverts to a specific version of a versionable VersionSeries
        Parameters:
        vsid - The unique identifier of a version series
        version - The unique identifier of the version which be part of version series
        Returns:
        The new version of the component
        Throws:
        com.flower.docs.domain.exception.TechnicalException - If a technical error occurs
        com.flower.docs.domain.exception.FunctionalException - If a functional error occurs
      • deleteVersions

        void deleteVersions​(com.flower.docs.domain.common.Id vsid)
                     throws com.flower.docs.domain.exception.TechnicalException,
                            com.flower.docs.domain.exception.FunctionalException
        Deletes all versions of a versionable Component
        Parameters:
        vsid - The unique identifier of a version series
        Throws:
        com.flower.docs.domain.exception.TechnicalException - If a technical error occurs
        com.flower.docs.domain.exception.FunctionalException - If a functional error occurs
      • deleteVersion

        void deleteVersion​(com.flower.docs.domain.common.Id vsid,
                           com.flower.docs.domain.common.Id versionId)
                    throws com.flower.docs.domain.exception.TechnicalException,
                           com.flower.docs.domain.exception.FunctionalException
        Deletes a version of a versionable Component
        Parameters:
        vsid - The unique identifier of a version series
        versionId - The identifier of the version to delete
        Throws:
        com.flower.docs.domain.exception.TechnicalException - If a technical error occurs
        com.flower.docs.domain.exception.FunctionalException - If a functional error occurs