Home > Contents > Index >  
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

FilterAssetsByDate.filter

Filters the given list of assets based on the input date and returns the result as a new list of assets

Syntax

Parameters

inputList
Input parameter. IList that represents the input set of assets. This list must contain columns with the names 'assetid' and 'assettype'

outputListName
Output parameter. String that represents the name of the output list to be created after filtering the assets given by the inputList parameter

date
Input parameter. String that represents the filter criteria. The start and end dates of input assets are compared with this parameter to decide if the asset will appear in the output list. If this parameter is null or empty, the current date on the Server is considered as the input date.

ics
Input parameter. ICS object reference.

Important note about caching

It must be noted that when this method is invoked from within a template to render a set of assets selectively based on date, the resulting page is cached or not depending on an attribute called 'cs.sitepreview'. This property is specified in futuretense.ini and can have three possible values: contentmanagement, delivery and disabled. It must be set to contentmanagement for Content management installations and delivery for production installations.

If the 'cs.sitepreview' property is set to contentmanagement this method performs the filtering operation on the given list of assets using the date specified in the date attribute. If no value is specified for the date attribute, the method uses the current Server date. Also, the method disables caching of the the current page and all of its parent pages.

When 'cs.sitepreview' property is set to delivery, the 'date' input parameter is IGNORED and the current Server date is considered for filtering. This behaviour ensures that on production installations Sites renders only assets that are valid for the current date/time. Also in this case the expiry time for the cached pages will be dependent on the start/end date attributes of the asset being filtered.

When 'cs.sitepreview' property is set to disabled, the method does not perform any filtering. It simply returns the input list as the output. Also in this case, caching of pages is not affected by this method.

Returns

Creates a new IList with the name specified by the outputListName parameter. This list contains the set of assets that pass the filter test based on the input date.

The method also returns an integer representing the errno after the filter operation.

Example

The following example illustrates the use of FilterAssetsByDate.filter

 

   Home > Contents > Index >

Oracle JAVA Reference
Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.