public class DateVersionSelector extends 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(String timestamp)
Creates a
DateVersionSelector that will select the latest
version of all those that are older than the given timestamp. |
public DateVersionSelector(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
VersionSelector
null
. Please note,
that a version selector is not allowed to return the root version.select
in interface VersionSelector
history
- version history to select a version fromnull
.RepositoryException
- if an error occurs."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"