Interface VersionService<T extends com.flower.docs.domain.component.Version>
-
public interface VersionService<T extends com.flower.docs.domain.component.Version>
Service dedicated toVersioning
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 versionableComponent
void
deleteVersions(com.flower.docs.domain.common.Id vsid)
Deletes all versions of a versionableComponent
com.flower.docs.domain.component.VersionSeries
getVersions(com.flower.docs.domain.common.Id vsid)
Gets version series of a versionableComponent
T
promote(com.flower.docs.domain.common.Id id, java.lang.String label)
Promotes a versionableComponent
as new versionT
revert(com.flower.docs.domain.common.Id vsid, com.flower.docs.domain.common.Id version)
Reverts to a specific version of a versionableVersionSeries
-
-
-
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 versionableComponent
as new version- Parameters:
id
- The component identifier from which the version should be createdlabel
- The version label. If null or empty, the defaultVersionLabelStrategy
is used to determine version label- Returns:
- The created version
- Throws:
com.flower.docs.domain.exception.TechnicalException
- If a technical error occurscom.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 versionableComponent
- 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 occurscom.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 versionableVersionSeries
- Parameters:
vsid
- The unique identifier of a version seriesversion
- 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 occurscom.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 versionableComponent
- Parameters:
vsid
- The unique identifier of a version series- Throws:
com.flower.docs.domain.exception.TechnicalException
- If a technical error occurscom.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 versionableComponent
- Parameters:
vsid
- The unique identifier of a version seriesversionId
- The identifier of the version to delete- Throws:
com.flower.docs.domain.exception.TechnicalException
- If a technical error occurscom.flower.docs.domain.exception.FunctionalException
- If a functional error occurs
-
-