SilverStream eXtend
Director 4.0

com.sssw.portal.api
Interface EbiPortalContext

All Superinterfaces:
EbiContext, EbiRequestContext

public interface EbiPortalContext
extends EbiRequestContext

Generic interface for the portal context object.


Field Summary
static int PERSIST
          When setting state this indicates that the state is stored in the user persistent store.
static int REQUEST
          When setting state this indicates that the state is remembered for the duration of the request.
static int SESSION
          When setting state this indicates that the state is remembered for the duration of the session.
static String STATE_MAXIMIZED
          The state when the component has the entire page to itself
static String STATE_MINIMIZED
          The state when only the component title bar is showing
static String STATE_NORMAL
          The normal state of a component.
 
Method Summary
 String getCallingPage()
          Retrieves the URL to the calling page.
 String getCallingPageQuery()
          Retrieves the query parameter string from the calling page.
 Object getComponentContent()
          Retrieves the markup set by the the Current component's getComponentData() method.
 String getComponentID()
          Gets the current component being processed.
 EbiPortalComponentInfo getComponentInfo()
          Returns the component information object for the current component.
 String getComponentInstanceName()
          Returns the unique instance name of the current component.
 String getComponentMode()
          Gets the current component's and instance's mode.
 String getComponentState()
          Gets the current component's and instance's state.
 Document getComponentStyleDocument()
          Retrieves the style document to be used when rendering the component, assuming the component is XML.
 String getComponentStyleID()
          Gets the style ID of the style to be used to render this component.
 String getComponentTitle()
          Gets the title to be set in the title bar when the component is decorated
 boolean getComponentTitleBarEnabled()
          Gets the title enabled setting.
 String getContentType()
          Gets the content type of the content of EbiPortalContext.getComponentContent()
 String getContextName()
          Gets the name of the context, which is used to namespace the calls to the underlying framework service factory.
 String getCurrentPID()
          Gets the current Portal Page ID
 long getLastModified()
          Deprecated.  
 String getPageName()
          Gets the currently viewed portal page name
 String getProfileName()
          Deprecated.  
 boolean isComponentContentWellFormed()
          Indicated whether or not the processed data from a component is well formed.
 boolean isPageWellFormed()
          Indicates whether or not any of the data (from multiple components) on the page has malformed data (for example, HTML components).
 void reset()
          Clears all current component information, setting it up for the next component.
 void setCallingPage(String url)
          Sets the current calling page URL.
 void setCallingPageQuery(String query)
          Sets the calling page query parameter.
 void setComponentContent(Object content)
          This method is called by a component within the getComponentData() method.
 void setComponentContentWellFormed(boolean wellFormed)
          Set whether or not the data from the component is well formed (e.g.
 void setComponentID(String compID)
          Sets the current component to be processed by the Presentation Manager.
 void setComponentID(String componentID, String instanceName)
          Sets the current component to be processed by the Presentation Manager.
 void setComponentMode(String mode, int level)
          Sets the component mode for the current component
 void setComponentState(String state, int level)
          Sets the component state for the current component.
 void setComponentStyleDocument(Document style)
          Sets the style to be used by the component.
 void setComponentStyleID(String styleID)
          Sets the style ID to be used when rendering the current component.
 void setComponentTitle(String title)
          Sets the title to be displayed in the component's title bar.
 void setComponentTitle(String title, int level)
          Sets the title to be displayed in the component's title bar
 void setComponentTitleBarEnabled(boolean enable)
          Overrides the default setting of the component's title bar setting (enabled or disabled)
 void setContentType(String type)
          Specifies the content type of the content being set by EbiPortalContext.setComponentContent(Object)
 void setContextName(String contextName)
          Sets the name of the context, which is used to namespace the calls to the underlying framework service factory.
 void setCurrentPID(String pidName)
          Sets the current Portal Page ID
 void setLastModified(long p0)
          Deprecated.  
 void setLastModifiedNow()
          No information available
 void setPageName(String pageName)
          Sets the currently viewed user page name.
 void setProfileName(String profileName)
          Deprecated.  
 
Methods implemented from interface com.sssw.fw.api.EbiRequestContext
getCookieValue, getResponsePhrase, getResponseStatus, getServletContext, getURI, hasQueryString, setCookieValue, setRequestResponse, setResponsePhrase, setResponseStatus, setServletContext, setURI
 
Methods implemented from interface com.sssw.fw.api.EbiContext
cloneCopy, getAttributeNames, getBrowserInfo, getEbiRequest, getEbiResponse, getEbiSession, getEbiSession, getEbiWhiteboard, getEJBContext, getException, getLocale, getPrincipal, getTemporaryData, getTemporaryValue, getValue, getValue, getValueNames, hasSession, hasValue, isNewSession, removeAllValues, removeValue, setEbiRequest, setEbiResponse, setEbiSession, setEJBContext, setException, setTemporaryValue, setValue
 

Field Detail

REQUEST

public static final int REQUEST
When setting state this indicates that the state is remembered for the duration of the request.

SESSION

public static final int SESSION
When setting state this indicates that the state is remembered for the duration of the session.

PERSIST

public static final int PERSIST
When setting state this indicates that the state is stored in the user persistent store.

STATE_NORMAL

public static final String STATE_NORMAL
The normal state of a component.

STATE_MINIMIZED

public static final String STATE_MINIMIZED
The state when only the component title bar is showing

STATE_MAXIMIZED

public static final String STATE_MAXIMIZED
The state when the component has the entire page to itself
Method Detail

reset

public void reset()
Clears all current component information, setting it up for the next component. This method also clears response status and response phrase.

getCallingPage

public String getCallingPage()
Retrieves the URL to the calling page.

The calling page refers to a portal URI. This will not return a calling page to another application or server.


setCallingPage

public void setCallingPage(String url)
Sets the current calling page URL.
Parameters:
url - the url of the calling page

getCallingPageQuery

public String getCallingPageQuery()
Retrieves the query parameter string from the calling page.
Returns:
the url of the calling page

setCallingPageQuery

public void setCallingPageQuery(String query)
Sets the calling page query parameter.
Parameters:
query - the query string of the calling page

setCurrentPID

public void setCurrentPID(String pidName)
Sets the current Portal Page ID
Parameters:
pidName - sets the currently viewd PID

getCurrentPID

public String getCurrentPID()
Gets the current Portal Page ID

getProfileName

public String getProfileName()
Deprecated.  

Retrieves the currently viewed user page name.
Returns:
The page name of the current user's personalized page.

setProfileName

public void setProfileName(String profileName)
Deprecated.  

Sets the currently viewed user page name
Parameters:
profileName - The name of the user page.

getLastModified

public long getLastModified()
Deprecated.  

No information available

setLastModified

public void setLastModified(long p0)
Deprecated.  

No information available

setLastModifiedNow

public void setLastModifiedNow()
No information available

getComponentContent

public Object getComponentContent()
Retrieves the markup set by the the Current component's getComponentData() method.
Returns:
The markup in DOM or String format.

setComponentContent

public void setComponentContent(Object content)
This method is called by a component within the getComponentData() method. This sets the markup that is returned to the presentation manager.
Parameters:
content - The content returned byt the component is as a DOM or a String. The return type is specified by EbiPortalContext.getContentType()

setComponentContentWellFormed

public void setComponentContentWellFormed(boolean wellFormed)
Set whether or not the data from the component is well formed (e.g. XML, XHTML, WML, etc...) This relates to the data after it has been processed. For example, if the component sent back XML from the getComponentData() method, a XSL stylesheet was applied to that content by the presentation manager. The resulting data from that transformation may be HTML, WML, etc. HTML is not well formed, but XHTML, WML is. This method is not typically called by a component developer - usually called by the presentation manager.
Parameters:
wellFormed - Indicates if the data from the component is well formed (XML, XHTML, etc).

isComponentContentWellFormed

public boolean isComponentContentWellFormed()
Indicated whether or not the processed data from a component is well formed. Well formed can be XHTML, XML, WML. HTML is usually not well formed.
Returns:
true if the current component content is well formed XML, false otherwise

isPageWellFormed

public boolean isPageWellFormed()
Indicates whether or not any of the data (from multiple components) on the page has malformed data (for example, HTML components).
Returns:
true if the current user's page is well formed XML

setComponentID

public void setComponentID(String compID)
Sets the current component to be processed by the Presentation Manager.
Parameters:
compID - The component ID.

setComponentID

public void setComponentID(String componentID,
                           String instanceName)
Sets the current component to be processed by the Presentation Manager. The component's instance name is also set.
Parameters:
componentID - The component ID.
instanceName - The instance name.

getComponentID

public String getComponentID()
Gets the current component being processed.
Returns:
the ID of the current component

setComponentMode

public void setComponentMode(String mode,
                             int level)
Sets the component mode for the current component

the mode is set on the user's session with the componentID and instance name making up the key.

Parameters:
mode - The name of the mode to be set on the session, if null the mode will be cleared from the associated level.
level - Indicates at what level to store the mode.

example: setComponentMode("edit",EbiPortalContext.SESSION)

See Also:
EbiPortalContext.REQUEST, EbiPortalContext.SESSION, EbiPortalContext.PERSIST

getComponentMode

public String getComponentMode()
Gets the current component's and instance's mode.
Returns:
The name of the current component/instance's mode.

setComponentState

public void setComponentState(String state,
                              int level)
Sets the component state for the current component.

The mode is set on the user's session with the componentID and instance name making up the key. The levels can be used in combination setComponentState("minimized",EbiPortalContext.SESSION + EbiPortalContext.PERSIST

Parameters:
state - The name of the state to be set on the session.
level - The level to set.
See Also:
EbiPortalContext.REQUEST, EbiPortalContext.SESSION, EbiPortalContext.PERSIST

getComponentState

public String getComponentState()
Gets the current component's and instance's state.
Returns:
The name of the current component/instance's state

getComponentInfo

public EbiPortalComponentInfo getComponentInfo()
Returns the component information object for the current component.

setComponentTitleBarEnabled

public void setComponentTitleBarEnabled(boolean enable)
Overrides the default setting of the component's title bar setting (enabled or disabled)
Parameters:
enable - Set to true to enable.

setComponentTitle

public void setComponentTitle(String title,
                              int level)
Sets the title to be displayed in the component's title bar

If this method is not called by the component then the display name, supplied in the descriptor, is used.

  • setComponentTitle("Custom Title",EbiPortalContext.REQUEST) - Set the title for the duration of the request
  • setComponentTitle("Custom Title",EbiPortalContext.SESSION) - Set the title for the duration of the session
  • setComponentTitle("Custom Title",EbiPortalContext.PERSIST) - Set the title permanently in the user store

Parameters:
title - The title to display in the title bar.
level - Indicates the level to persist the title.
See Also:
EbiPortalContext.REQUEST, EbiPortalContext.SESSION, EbiPortalContext.PERSIST

setComponentTitle

public void setComponentTitle(String title)
Sets the title to be displayed in the component's title bar.

If this method is not called by the component then the display name, supplied in the descriptor, is used. This method is equivalent to calling setComponentTitle("Custom Title",EbiPortalContext.REQUEST)

Parameters:
title - The title to display in the title bar.

getComponentTitleBarEnabled

public boolean getComponentTitleBarEnabled()
Gets the title enabled setting.
Returns:
true if title bar is enabled.

getComponentTitle

public String getComponentTitle()
Gets the title to be set in the title bar when the component is decorated

The title is retrieved in the following order

  1. Locate title in the session
  2. No title for this component instance in the session so retrieve from the user persist store
  3. The title has never been set/altered so use the component descriptor display-name

Returns:
the title of the component, may include markup.

getComponentStyleID

public String getComponentStyleID()
Gets the style ID of the style to be used to render this component. A style is an XSL file located in the resource set. The component is expected to have a content type of XML or DOM.
Returns:
The style ID of the style to be used to render an XML component.

setComponentStyleID

public void setComponentStyleID(String styleID)
Sets the style ID to be used when rendering the current component.
Parameters:
styleID - The styleID of the style to be used to render the component.

getComponentInstanceName

public String getComponentInstanceName()
Returns the unique instance name of the current component.

getComponentStyleDocument

public Document getComponentStyleDocument()
Retrieves the style document to be used when rendering the component, assuming the component is XML.
Returns:
the xsl stylesheet in the form of a Document

setComponentStyleDocument

public void setComponentStyleDocument(Document style)
Sets the style to be used by the component. This allows a programmer to overide the style id that may be set.
Parameters:
style - The XSL style sheet in document format to be used when rendering the XML component.

setContentType

public void setContentType(String type)
Specifies the content type of the content being set by EbiPortalContext.setComponentContent(Object)
Specified by:
setContentType in interface EbiRequestContext
Parameters:
type -

Possible types are: EbiComponentConstants.MIME_TYPE_WML EbiComponentConstants.MIME_TYPE_XML EbiComponentConstants.MIME_TYPE_HTML EbiComponentConstants.MIME_TYPE_XMLDOM EbiComponentConstants.MIME_TYPE_HTML_UTF8


getContextName

public String getContextName()
Gets the name of the context, which is used to namespace the calls to the underlying framework service factory. This should only be set within the war's web.xml file and set at deployment time This is a workaround for the missing method getContextName() from the Servlet context which will show up in 2.3. Example of the web.xml entry:

context-name "the web apps context goes here"


setContextName

public void setContextName(String contextName)
Sets the name of the context, which is used to namespace the calls to the underlying framework service factory. This should only be set within the war's web.xml file and set at deployment time This is a workaround for the missing method getContextName() from the Servlet context which will show up in 2.3

getContentType

public String getContentType()
Gets the content type of the content of EbiPortalContext.getComponentContent()
Specified by:
getContentType in interface EbiRequestContext
Returns:

Possible return types are: EbiComponentConstants.MIME_TYPE_WML EbiComponentConstants.MIME_TYPE_XML EbiComponentConstants.MIME_TYPE_HTML EbiComponentConstants.MIME_TYPE_XMLDOM EbiComponentConstants.MIME_TYPE_HTML_UTF8


setPageName

public void setPageName(String pageName)
Sets the currently viewed user page name.
Parameters:
pageName - The name of the user page.

getPageName

public String getPageName()
Gets the currently viewed portal page name
Returns:
the page ID of the current portal page

SilverStream eXtend
Director 4.0