Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


oracle.stellent.wcm.client.script
Class ScriptMethods

java.lang.Object
  extended by oracle.stellent.wcm.client.script.ScriptMethods


public class ScriptMethods
extends java.lang.Object

Methods made available in the wcm-taglib as functions


Constructor Summary
ScriptMethods()
           

 

Method Summary
static java.util.List<SectionNode> filterSections(SiteContext siteContext, java.util.List sections)
          Filter a section list to remove inactive sections and contributor-only sections if not in contribution mode.
static java.lang.String formatMessage(LocaleMessage localeMessage, java.util.Locale locale)
          Format a message with the given locale
static java.util.List<Mapping> getLocalPageTemplates(ClientApplication clientApplication)
          Load a list of local page templates
static java.lang.String getStackTrace(java.lang.Throwable error)
          Retrieve the error stack trace for an exception
static boolean isNodeInNavigationPath(SiteContext siteContext, java.lang.String nodeID, boolean includeHome)
          Look to see if the current node is in the navigation path
static java.util.List listSectionsForRows(SiteContext siteContext, int startLevel, int stopLevel, boolean includeHome)
          Create a list of sections matching the given parameters.
static ContentStream loadContent(ClientApplication clientApplication, java.lang.String dDocName)
          Load some content from the configured content adapter
static ContentStream loadDataFile(ClientApplication clientApplication, java.lang.String dDocName, ContentAdapter.DataFileParams params)
          Load a data file or dynamic conversion from the Content Server.
static ContentStream loadRendition(ClientApplication clientApplication, java.lang.String dDocName, java.lang.String rendition)
          Load a specific content rendition from the Content Server.
static SectionNode lookupSection(SiteContext siteContext, java.lang.String id)
          Lookup a section by path or ID
static void setConsumptionMode(SiteContext siteContext)
          Set the siteContext mode to Consumption

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ScriptMethods

public ScriptMethods()

Method Detail

filterSections

public static java.util.List<SectionNode> filterSections(SiteContext siteContext,
                                                         java.util.List sections)
Filter a section list to remove inactive sections and contributor-only sections if not in contribution mode.
Parameters:
siteContext - the site context
sections - a list of SectionNode objects
Returns:
a list of sections appropriate for this context

listSectionsForRows

public static java.util.List listSectionsForRows(SiteContext siteContext,
                                                 int startLevel,
                                                 int stopLevel,
                                                 boolean includeHome)
Create a list of sections matching the given parameters. Each row in the list will contain all sections at that level.
Parameters:
siteContext - the site context
startLevel - the level to start (inclusive)
stopLevel - the level to stop (inclusive)
includeHome - true to include the home section
Returns:
a list of rows (each row is represented as a list of sections (List<SectionNode>))

isNodeInNavigationPath

public static boolean isNodeInNavigationPath(SiteContext siteContext,
                                             java.lang.String nodeID,
                                             boolean includeHome)
Look to see if the current node is in the navigation path
Parameters:
siteContext - the site context
nodeID - the node ID
includeHome - true to include the home section in this check, false to exclude
Returns:
true if the node ID is part of the current navigation path

lookupSection

public static SectionNode lookupSection(SiteContext siteContext,
                                        java.lang.String id)
Lookup a section by path or ID
Parameters:
siteContext - the site context
id - the section path or ID
Returns:
the section or null if not found

formatMessage

public static java.lang.String formatMessage(LocaleMessage localeMessage,
                                             java.util.Locale locale)
Format a message with the given locale
Parameters:
localeMessage - the local message
locale - the locale to output the message
Returns:
the formatted message

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable error)
Retrieve the error stack trace for an exception
Parameters:
error - the error
Returns:
the string trace

loadContent

public static ContentStream loadContent(ClientApplication clientApplication,
                                        java.lang.String dDocName)
                                 throws java.io.IOException,
                                        oracle.stellent.ridc.IdcClientException
Load some content from the configured content adapter
Parameters:
clientApplication - the client application
dDocName - the content ID
Returns:
the stream to the content
Throws:
oracle.stellent.ridc.IdcClientException
java.io.IOException
See Also:
ContentAdapter.getContentUri(oracle.stellent.wcm.server.content.spi.ContentID, oracle.stellent.ridc.model.DataBinder)

loadDataFile

public static ContentStream loadDataFile(ClientApplication clientApplication,
                                         java.lang.String dDocName,
                                         ContentAdapter.DataFileParams params)
                                  throws java.io.IOException,
                                         oracle.stellent.ridc.IdcClientException
Load a data file or dynamic conversion from the Content Server.
Parameters:
clientApplication - the client application
dDocName - the content ID
params - the data fail parameters
Returns:
the stream to the content
Throws:
oracle.stellent.ridc.IdcClientException
java.io.IOException
See Also:
ContentAdapter.getDataFileUri(oracle.stellent.wcm.server.content.spi.ContentID, oracle.stellent.ridc.model.DataBinder, oracle.stellent.wcm.server.content.spi.ContentAdapter.DataFileParams)

loadRendition

public static ContentStream loadRendition(ClientApplication clientApplication,
                                          java.lang.String dDocName,
                                          java.lang.String rendition)
                                   throws java.io.IOException,
                                          oracle.stellent.ridc.IdcClientException
Load a specific content rendition from the Content Server.
Parameters:
clientApplication - the client application
dDocName - the content ID
rendition - the rendition
Returns:
the stream to the content
Throws:
oracle.stellent.ridc.IdcClientException
java.io.IOException
See Also:
ContentAdapter.getRenditionUri(oracle.stellent.wcm.server.content.spi.ContentID, oracle.stellent.ridc.model.DataBinder, oracle.stellent.wcm.server.content.spi.ContentAdapter.RenditionParams)

getLocalPageTemplates

public static java.util.List<Mapping> getLocalPageTemplates(ClientApplication clientApplication)
                                                     throws ApplicationException
Load a list of local page templates
Parameters:
clientApplication - the client application
Returns:
list of local page templates
Throws:
ApplicationException

setConsumptionMode

public static void setConsumptionMode(SiteContext siteContext)
Set the siteContext mode to Consumption
Parameters:
siteContext - the site context

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.