public class STKDateContentUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ASCENDING |
static String |
DESCENDING |
static Object |
INSTANCE |
Constructor and Description |
---|
STKDateContentUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
filterDateContentList(List<javax.jcr.Node> itemsList,
Calendar minDate,
Calendar maxDate) |
static void |
filterDateContentList(List<javax.jcr.Node> itemsList,
Calendar minDate,
Calendar maxDate,
String datePropertyName) |
static void |
filterDateContentList(List<javax.jcr.Node> itemsList,
Calendar minDate,
Calendar maxDate,
String datePropertyName,
boolean useCreationDate)
Filters out items (nodes) which do not meet this condition: minDate <= itemDate && itemDate < maxDate.
|
static void |
sortDateContentList(List<javax.jcr.Node> itemsList,
String sortDirection) |
static void |
sortDateContentList(List<javax.jcr.Node> itemsList,
String sortDirection,
String datePropertyName) |
static void |
sortDateContentList(List<javax.jcr.Node> itemsList,
String sortDirection,
String datePropertyName,
boolean useCreationDate,
Calendar defaultDate)
Sorts list of nodes by date.
|
static void |
sortDateContentList(List<javax.jcr.Node> itemsList,
String sortDirection,
String datePropertyName,
Calendar defaultDate) |
public static final Object INSTANCE
public static final String ASCENDING
public static final String DESCENDING
public static void filterDateContentList(List<javax.jcr.Node> itemsList, Calendar minDate, Calendar maxDate)
public static void filterDateContentList(List<javax.jcr.Node> itemsList, Calendar minDate, Calendar maxDate, String datePropertyName)
public static void filterDateContentList(List<javax.jcr.Node> itemsList, Calendar minDate, Calendar maxDate, String datePropertyName, boolean useCreationDate)
itemsList
- List of nodes.minDate
- Minimal date of the interval.maxDate
- Maximal date of the interval.datePropertyName
- Name of property in which is date stored.useCreationDate
- If true, then will look to MetaData for creation date and if exists, will use it as a date if no date found in property datePropertyName.public static void sortDateContentList(List<javax.jcr.Node> itemsList, String sortDirection)
public static void sortDateContentList(List<javax.jcr.Node> itemsList, String sortDirection, String datePropertyName)
public static void sortDateContentList(List<javax.jcr.Node> itemsList, String sortDirection, String datePropertyName, Calendar defaultDate)
public static void sortDateContentList(List<javax.jcr.Node> itemsList, String sortDirection, String datePropertyName, boolean useCreationDate, Calendar defaultDate)
itemsList
- List of nodes.sortDirection
- Sort direction (asc, desc).datePropertyName
- Name of property in which is date stored.useCreationDate
- If true, then will look to MetaData for creation date and if exists, will use it as a date if no date found in property datePropertyName.defaultDate
- Default date used if no date in node found.Copyright © 2008–2016 Magnolia International Ltd.. All rights reserved.