public interface Versioning
| Modifier and Type | Method and Description |
|---|---|
Version |
getDocumentVersion(Section document,
boolean defaults)
Returns version of the given document (section).
|
Version |
getFirstVersion()
Returns the first version specified by the used pattern.
|
default void |
updateVersionID(Section updated,
Section def)
Sets version ID of the default section into the updated section content.
|
@Nullable Version getDocumentVersion(@NotNull Section document, boolean defaults)
If obtaining version of the defaults (parameter is set to true), returning null is
considered illegal and will throw a NullPointerException. Otherwise, for the document itself, if the
version returned is null, the updater assigns getFirstVersion() to it.
document - the documentdefaults - if getting version of the defaultsnull if it could not be obtained/parsed@NotNull Version getFirstVersion()
Pattern.getFirstVersion()default void updateVersionID(@NotNull
Section updated,
@NotNull
Section def)
Should be used only if the underlying versioning implementation supports file manipulation (AutomaticVersioning).
updated - the updated sectiondef - the default section equivalentCopyright © 2022. All rights reserved.