com.fatwire.gst.foundation.facade.assetapi.asset
Class PreviewContext

java.lang.Object
  extended by com.fatwire.gst.foundation.facade.assetapi.asset.PreviewContext

public class PreviewContext
extends Object

Since:
Apr 21, 2011
Author:
Dolf.Dijkstra

Constructor Summary
PreviewContext()
           
 
Method Summary
static Date getPreviewDate(COM.FutureTense.Interfaces.ICS ics, Date cutoff)
          Returns the value of the preview date based on the provided date and the setting for the xcelerate property cs.sitepreview.
static Date getPreviewDateFromCSVar(COM.FutureTense.Interfaces.ICS ics, String varName)
          Returns the value of the preview date based on the cs variable and the setting for the xcelerate property cs.sitepreview.
static Date getPreviewDateFromSession(COM.FutureTense.Interfaces.ICS ics, String ssvarName)
          Returns the value of the preview date based on the session variable and the setting for the xcelerate property cs.sitepreview.
static boolean isSitePreviewDelivery(COM.FutureTense.Interfaces.ICS ics)
           
static boolean isSitePreviewEnabled(COM.FutureTense.Interfaces.ICS ics)
          Checks if start/enddate checking is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreviewContext

public PreviewContext()
Method Detail

getPreviewDateFromSession

public static Date getPreviewDateFromSession(COM.FutureTense.Interfaces.ICS ics,
                                             String ssvarName)
Returns the value of the preview date based on the session variable and the setting for the xcelerate property cs.sitepreview.

Parameters:
ics -
ssvarName -
Returns:
the preview date

getPreviewDateFromCSVar

public static Date getPreviewDateFromCSVar(COM.FutureTense.Interfaces.ICS ics,
                                           String varName)
Returns the value of the preview date based on the cs variable and the setting for the xcelerate property cs.sitepreview.

Parameters:
ics -
varName -
Returns:
the date to preview

getPreviewDate

public static Date getPreviewDate(COM.FutureTense.Interfaces.ICS ics,
                                  Date cutoff)
Returns the value of the preview date based on the provided date and the setting for the xcelerate property cs.sitepreview.

Parameters:
ics -
cutoff -
Returns:
the date to preview

isSitePreviewEnabled

public static boolean isSitePreviewEnabled(COM.FutureTense.Interfaces.ICS ics)
Checks if start/enddate checking is enabled.

Parameters:
ics -
Returns:
true if 'cs.sitepreview' xcelerate property is either 'contentmanagement' or 'delivery', false if set to 'disabled'.

isSitePreviewDelivery

public static boolean isSitePreviewDelivery(COM.FutureTense.Interfaces.ICS ics)
Parameters:
ics -
Returns:
true if 'cs.sitepreview' xcelerate property is set to delivery


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.