com.fatwire.gst.foundation.facade.fsii
Class SitePlanUtils

java.lang.Object
  extended by com.fatwire.gst.foundation.facade.fsii.SitePlanUtils

public final class SitePlanUtils
extends Object

Miscellaneous utility library used to access data stored in the site plan or assets related to the site plan.

This module is aware of two special types of page subtypes: Aliases and Navigatin Placeholders. Aliases are pages that are aliases to other pages containing the same information in the site plan tree. Navigation Placeholders are pages that are typically located at the root of the site plan tree and do not contain any content. They are not content assets but are organizational in nature.

Since:
Nov 17, 2009
Author:
Tony Field

Field Summary
static String PAGE_SUBTYPE_ALIAS
          Name of the page subtype indicating that this page is just an alias to another page.
static String PAGE_SUBTYPE_ASSOCIATION_NAME
          Name of the association in an alias page that contains the target page.
static String PAGE_SUBTYPE_NAVIGATION_PLACEHOLDER
          Name of the page subtype indicating that this page is NOT rendered on the site but is instead merely used to group navigation components on the site.
 
Method Summary
static com.fatwire.assetapi.data.AssetId getPageDetailForPage(COM.FutureTense.Interfaces.ICS ics, String p, String assocname)
          Get the specified page detail asset id for the specified page.
static String getPageDetailTemplateForPage(COM.FutureTense.Interfaces.ICS ics, String p, String assocname)
          Return the name of the template assigned to the associated PageDetail asset.
static PageLinkData getSitePlanAsLinks(COM.FutureTense.Interfaces.ICS ics, String p, String assocname, String linktextAttr, String tname, String wrapper, boolean withChildren)
          Get a PageLinkData object from the site plan tree.
static HeadTagData getStandardHeadData(COM.FutureTense.Interfaces.ICS ics, String c, String cid, String metaKeywordAttribute, String metaDescriptionAttribute, String titleAttribute)
          Return a bean containing the common information found inside a HEAD html tag.
static String getTemplateForPage(COM.FutureTense.Interfaces.ICS ics, String p)
          For a given page asset, return the template
static String resolvePageAlias(COM.FutureTense.Interfaces.ICS ics, String p)
          Given an input page, find out if it is an alias or not, and if it is, return the ID of the target page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_SUBTYPE_NAVIGATION_PLACEHOLDER

public static final String PAGE_SUBTYPE_NAVIGATION_PLACEHOLDER
Name of the page subtype indicating that this page is NOT rendered on the site but is instead merely used to group navigation components on the site.

See Also:
Constant Field Values

PAGE_SUBTYPE_ALIAS

public static final String PAGE_SUBTYPE_ALIAS
Name of the page subtype indicating that this page is just an alias to another page.

See Also:
Constant Field Values

PAGE_SUBTYPE_ASSOCIATION_NAME

public static final String PAGE_SUBTYPE_ASSOCIATION_NAME
Name of the association in an alias page that contains the target page.

See Also:
Constant Field Values
Method Detail

getPageDetailTemplateForPage

public static String getPageDetailTemplateForPage(COM.FutureTense.Interfaces.ICS ics,
                                                  String p,
                                                  String assocname)
Return the name of the template assigned to the associated PageDetail asset. Note that the asset type of the page detail is not fixed - any one will work.

Parameters:
ics - context
p - id of page asset
assocname - name of the association between the page and the page detail asset
Returns:
the template name

getTemplateForPage

public static String getTemplateForPage(COM.FutureTense.Interfaces.ICS ics,
                                        String p)
For a given page asset, return the template

Parameters:
ics - context
p - page asset id
Returns:
template field

getPageDetailForPage

public static com.fatwire.assetapi.data.AssetId getPageDetailForPage(COM.FutureTense.Interfaces.ICS ics,
                                                                     String p,
                                                                     String assocname)
Get the specified page detail asset id for the specified page.

Parameters:
ics - context
p - page asset id
assocname - name of the association containing the page detail.
Returns:
the assetid

getStandardHeadData

public static HeadTagData getStandardHeadData(COM.FutureTense.Interfaces.ICS ics,
                                              String c,
                                              String cid,
                                              String metaKeywordAttribute,
                                              String metaDescriptionAttribute,
                                              String titleAttribute)
Return a bean containing the common information found inside a HEAD html tag.

Does not resolve aliases.

Parameters:
ics - context
c - asset type
cid - asset id
metaKeywordAttribute - attribute used to contain meta keywords. must be multi-valued
metaDescriptionAttribute - attribute used to contain description. expects single-valued
titleAttribute - attribute used to contain title. expects single-valued.
Returns:
HeadTagData object

getSitePlanAsLinks

public static PageLinkData getSitePlanAsLinks(COM.FutureTense.Interfaces.ICS ics,
                                              String p,
                                              String assocname,
                                              String linktextAttr,
                                              String tname,
                                              String wrapper,
                                              boolean withChildren)
Get a PageLinkData object from the site plan tree. If the linktext is derived from an associated asset, specify the association name. If the linktet is derived from the page asset itself, leave detailAssocName as null. Either way, the linktext comes from the appropriate asset's linktextAttr.

Links are not populated for Navigation Placeholders, but it is often very convenient to pass a navigation placeholder into this function in order to return all children under a specific placeholder.

Aliases are resolved.

Parameters:
ics - context
p - page
assocname - association name for pageDetail if applicable. May be null
linktextAttr - attribute in associated pagedetail if specified, otherwise attribute in page asset
tname - Template name to link to. Required if links are to work but can be omitted if links are not desired.
wrapper - Wrapper SiteEntry name. Null is allowed.
withChildren - populate the result with data for children as well
Returns:
PageLinkData

resolvePageAlias

public static String resolvePageAlias(COM.FutureTense.Interfaces.ICS ics,
                                      String p)
Given an input page, find out if it is an alias or not, and if it is, return the ID of the target page. If not an alias, the original input is returned

Parameters:
ics - context
p - input page id
Returns:
resolved alias page id


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