Skip navigation links

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

E17273-03


oracle.stellent.wcm.client.model
Class SiteContext

java.lang.Object
  extended by oracle.stellent.wcm.client.model.SiteContext


public class SiteContext
extends java.lang.Object

Represents the context during the evaluation of the site. Typically, a SiteContext is created at the beginning of a rendering request (i.e. in a servlet) and then used to keep track of the current state of the site.


Constructor Summary
SiteContext()
          Create a default site context.

 

Method Summary
 void clearContext()
          Reset the context object
 FilePath getFilePath()
           
 oracle.stellent.ridc.IdcContext getIdcContext()
           
 SiteRequest.Mode getMode()
           
 PageTemplate getPageTemplate()
           
 java.util.Map<java.lang.String,java.lang.String> getParameters()
           
 java.lang.String getPath()
           
 Placeholder getPlaceholder()
           
 java.lang.String getPreviewID()
           
 ProjectFile getProject()
           
 SectionNode getSection()
           
 java.lang.String getSiteID()
          Retrieve the site ID for this context
 UrlContext getUrlContext()
          Get the url context object associated with this SiteContext.
 java.util.Map<UrlRequest.UrlRoot,java.lang.String> getUrlPatterns()
          The format strings to use for the URL types.
 boolean isContributorMode()
           
 boolean isDevelopmentMode()
           
 boolean isErrorMode()
           
 boolean isPathFromUrl()
          Set to true if the path was initialized from the browser url
 boolean isPreview()
           
 boolean isScriptIncluded()
           
 void populateSiteRequest(SiteRequest siteRequest)
          Populate the site request based on the information in this context object
 void setContributorMode(boolean contributorMode)
          Set the contributor mode with a simple boolean
 void setDevelopmentMode(boolean developmentMode)
           
 void setIdcContext(oracle.stellent.ridc.IdcContext idcContext)
           
 void setMode(SiteRequest.Mode mode)
          Set the mode
 void setPageTemplate(PageTemplate pageTemplate)
          Set the page template
 void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
          Set the url parameters
 void setPath(java.lang.String path)
          Set the path portion of the url
 void setPathFromUrl(boolean pathFromUrl)
          Set the initialized from url flag
 void setPlaceholder(Placeholder placeholder)
          Set the active placeholder object
 void setPreview(boolean preview)
           
 void setPreviewID(java.lang.String previewID)
           
 void setProject(ProjectFile project)
          Set the project associated with the site ID
 void setScriptIncluded(boolean scriptIncluded)
          Set the scriptIncluded flag
 void setSection(SectionNode section)
          Set the active section
 void setSiteID(java.lang.String siteID)
          Set the site identifier
 void setUrl(java.lang.String url)
          Set the URL; will individually set the path and parameters objects
 void setUrlContext(UrlContext urlContext)
          Set the url context object associated with this SiteContext.
 void setUrlPatterns(java.util.Map<UrlRequest.UrlRoot,java.lang.String> urlPatterns)
          Set the url patterns to use for this site context

 

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

 

Constructor Detail

SiteContext

public SiteContext()
Create a default site context. The siteID is set to null and the path is initialized "/index.html".

Method Detail

clearContext

public void clearContext()
Reset the context object

getUrlPatterns

public java.util.Map<UrlRequest.UrlRoot,java.lang.String> getUrlPatterns()
The format strings to use for the URL types.
Returns:
the url patterns or null if not set

getUrlContext

public UrlContext getUrlContext()
Get the url context object associated with this SiteContext.

setUrlContext

public void setUrlContext(UrlContext urlContext)
Set the url context object associated with this SiteContext.
Parameters:
urlContext - an object containing a break down of the url request.

setUrlPatterns

public void setUrlPatterns(java.util.Map<UrlRequest.UrlRoot,java.lang.String> urlPatterns)
Set the url patterns to use for this site context
Parameters:
urlPatterns - a mapping of url root to pattern

setSiteID

public void setSiteID(java.lang.String siteID)
Set the site identifier
Parameters:
siteID - the site ID

getSiteID

public java.lang.String getSiteID()
Retrieve the site ID for this context
Returns:
the site ID

getProject

public ProjectFile getProject()
Returns:
the project associated with the site ID

setProject

public void setProject(ProjectFile project)
Set the project associated with the site ID
Parameters:
project - the project

getSection

public SectionNode getSection()
Returns:
the active section as identified by the url path

setSection

public void setSection(SectionNode section)
Set the active section
Parameters:
section - the section

isPathFromUrl

public boolean isPathFromUrl()
Set to true if the path was initialized from the browser url
Returns:
true if initialized via the browser path

setPathFromUrl

public void setPathFromUrl(boolean pathFromUrl)
Set the initialized from url flag
Parameters:
pathFromUrl - true to set the flag indicating the context was initialized from the url

setUrl

public void setUrl(java.lang.String url)
Set the URL; will individually set the path and parameters objects
Parameters:
url - the url with optional urlencoded parameters

getPath

public java.lang.String getPath()
Returns:
the path component of the url without any parameters

setPath

public void setPath(java.lang.String path)
Set the path portion of the url
Parameters:
path - the path

getParameters

public java.util.Map<java.lang.String,java.lang.String> getParameters()
Returns:
a mapping of url parameters for this context

setParameters

public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Set the url parameters
Parameters:
parameters - the parameters

getFilePath

public FilePath getFilePath()
Returns:
the FilePath object that wraps the path; null if no path is set

getPageTemplate

public PageTemplate getPageTemplate()
Returns:
the active page template or null if no page template is set

setPageTemplate

public void setPageTemplate(PageTemplate pageTemplate)
Set the page template
Parameters:
pageTemplate - the current page template

getPlaceholder

public Placeholder getPlaceholder()
Returns:
the current placeholder object

setPlaceholder

public void setPlaceholder(Placeholder placeholder)
Set the active placeholder object
Parameters:
placeholder - the placeholder

isScriptIncluded

public boolean isScriptIncluded()
Returns:
true if the contributor script initialization code has already been included in the client output

setScriptIncluded

public void setScriptIncluded(boolean scriptIncluded)
Set the scriptIncluded flag
Parameters:
scriptIncluded - true to indicate the script code has been included

setMode

public void setMode(SiteRequest.Mode mode)
Set the mode
Parameters:
mode - the mode for this context

getMode

public SiteRequest.Mode getMode()
Returns:
the current context mode

isContributorMode

public boolean isContributorMode()
Returns:
true if this is in contribution mode

setContributorMode

public void setContributorMode(boolean contributorMode)
Set the contributor mode with a simple boolean
Parameters:
contributorMode - true for contributor mode, false for consumption mode

isErrorMode

public boolean isErrorMode()
Returns:
true to report errors in the UI (usually when in contributor or development modes)

isDevelopmentMode

public boolean isDevelopmentMode()
Returns:
true if the context is currently in development mode

setDevelopmentMode

public void setDevelopmentMode(boolean developmentMode)

isPreview

public boolean isPreview()
Returns:
true if this context is rendering a preview

setPreview

public void setPreview(boolean preview)

getPreviewID

public java.lang.String getPreviewID()
Returns:
the preview identifier

setPreviewID

public void setPreviewID(java.lang.String previewID)

getIdcContext

public oracle.stellent.ridc.IdcContext getIdcContext()
Returns:
the associated RIDC user context

setIdcContext

public void setIdcContext(oracle.stellent.ridc.IdcContext idcContext)

populateSiteRequest

public void populateSiteRequest(SiteRequest siteRequest)
Populate the site request based on the information in this context object
Parameters:
siteRequest - the site request to populate

Skip navigation links

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

E17273-03


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