public class DateVersionSelector extends java.lang.Object implements VersionSelector
This Class implements a version selector that selects a version by creation
date. The selected version is the latest that is older or equal than the
given date. If no version could be found null is returned
unless the returnLatest flag is set to true, where
the latest version is returned.
V1.0 - 02-Sep-2006
V1.1 - 03-Sep-2006
V1.2 - 05-Sep-2006
new DateVersionSelector("03-Sep-2006").select() -> V1.1
new DateVersionSelector("04-Sep-2006").select() -> V1.1
new DateVersionSelector("01-Sep-2006").select() -> null
new DateVersionSelector("01-Sep-2006", true).select() -> V1.2
new DateVersionSelector(null, true).select() -> V1.2
| Constructor and Description |
|---|
DateVersionSelector(java.lang.String timestamp)
Creates a
DateVersionSelector that will select the latest
version of all those that are older than the given timestamp. |
| Modifier and Type | Method and Description |
|---|---|
NodeBuilder |
select(NodeBuilder history)
Selects a version of the given version history.
|
public DateVersionSelector(java.lang.String timestamp)
DateVersionSelector that will select the latest
version of all those that are older than the given timestamp.timestamp - reference timestamppublic NodeBuilder select(NodeBuilder history) throws RepositoryException
VersionSelectornull. Please note,
that a version selector is not allowed to return the root version.select in interface VersionSelectorhistory - version history to select a version fromnull.RepositoryException - if an error occurs."Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"