@ProviderType public final class ModificationDate extends Object
Modifier and Type | Method and Description |
---|---|
static Date |
get(com.day.cq.wcm.api.Page page)
Get modification date of page
|
static Date |
get(org.apache.sling.api.resource.Resource resource)
Looks for either jcr:lastModified or cq:lastModified property in the given resource, which can be either the jcr:content-ode of a cq-page, or a rendition
node
|
static Date |
mostRecent(Date... dates)
Returns the most recent of the specified dates
|
static Date |
mostRecent(ModificationDateProvider... dateProviders)
Finds the most recent modification date from a
ModificationDateProvider and multiple additional resources |
static Date |
mostRecent(com.day.cq.wcm.api.Page... pages)
Finds the most recent modification date of all specified pages
|
static Date |
mostRecent(org.apache.sling.api.resource.Resource... resources)
Finds the most recent modification date of all specified resources
|
public static Date get(com.day.cq.wcm.api.Page page)
page
- CQ pagepublic static Date get(org.apache.sling.api.resource.Resource resource)
resource
- a resource with a cq:lastModified property *and/or* a file/jcr:content subnode with a jcr:lastModified propertypublic static Date mostRecent(org.apache.sling.api.resource.Resource... resources)
resources
- multiple resources (typically jcr:content nodes of cq-pages or rendition resources)public static Date mostRecent(com.day.cq.wcm.api.Page... pages)
pages
- multiple cq pagespublic static Date mostRecent(ModificationDateProvider... dateProviders)
ModificationDateProvider
and multiple additional resourcesdateProviders
- Multiple modification date providersCopyright © 2014–2017 wcm.io. All rights reserved.