Novell exteNd
Director 5.2 API

com.sssw.portal.api
Interface EbiPortalContext

All Superinterfaces:
EbiContext, EbiRequestContext

public interface EbiPortalContext
extends EbiRequestContext

Provides a generic interface for the portal context object.


Field Summary
static int PERSIST
          When setting state this indicates that the state is stored int 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 paramter 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 value object for the currently processed 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()
          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
 HttpServletRequest getHttpServletRequest()
          Gets the HttpServletRequest associated with this context.
 HttpServletResponse getHttpServletResponse()
          Gets the HttpServletResponse associated with this context.
 long getLastModified()
          Deprecated.  
 String getPageName()
          Gets the currently viewed portal page name (shared or user page) The EbiPortalContext.getPageType() will indicate which type it is (shared or user)
 String getPageType()
          Gets the type of the currently viewed portal page (shared or user)
 String getProfileName()
          Deprecated. use EbiPortalContext#getUserPageName()
 boolean isComponentContentWellFormed()
          Indicated whether or not the processed data from a component is well formed.
 boolean isPageWellFormed()
          Indicated whether or not any of the data (from multiple components) on the page has malformed data (e.g.
 void reset()
          Clears all current component information, setting it up for the next component.
 void setCallingPage(String url)
          Set the current calling page URL.
 void setCallingPageQuery(String query)
          Sets the calling page quesry 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 being processes.
 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 components title bar
 void setComponentTitle(String title, int level)
          Sets the title to be displayed in the components title bar
 void setComponentTitleBarEnabled(boolean enable)
          Overrides the default setting of the component's title bar setting (enabled or not?)
 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 miliseconds)
          Deprecated.  
 void setLastModifiedNow()
          Deprecated.  
 void setPageName(String pageName)
          Sets the currently viewed page (Shared or User page) Should call EbiPortalContext.setPageType() to set the type of this page.
 void setPageType(String pageType)
          Sets the page type of the current page (Shared or User) The page type can either be 'SHAREDPAGE' or 'USERPAGE'
 void setProfileName(String profileName)
          Deprecated. use EbiPortalContext#setUserPageName()
 
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
Since:
v4.0

SESSION

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

PERSIST

public static final int PERSIST
When setting state this indicates that the state is stored int the user persistent store
Since:
v4.0

STATE_NORMAL

public static final String STATE_NORMAL
The normal state of a component
Since:
v4.0

STATE_MINIMIZED

public static final String STATE_MINIMIZED
The state when only the component title bar is showing
Since:
v4.0

STATE_MAXIMIZED

public static final String STATE_MAXIMIZED
The state when the component has the entire page to itself
Since:
v4.0
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.

getHttpServletRequest

public HttpServletRequest getHttpServletRequest()
Gets the HttpServletRequest associated with this context.

Returns:
The HttpServletRequest

getHttpServletResponse

public HttpServletResponse getHttpServletResponse()
Gets the HttpServletResponse associated with this context.

Returns:
The HttpServletResponse

getCallingPage

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

The calling page reffers to a portal uri. This will not return a calling page to anotherapplication or server.

Returns:
The URL of the calling page

setCallingPage

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

getCallingPageQuery

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

setCallingPageQuery

public void setCallingPageQuery(String query)
Sets the calling page quesry 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
Returns:
the currently viewed portal page's page ID

getProfileName

public String getProfileName()
Deprecated. use EbiPortalContext#getUserPageName()

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

setProfileName

public void setProfileName(String profileName)
Deprecated. use EbiPortalContext#setUserPageName()

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

setPageName

public void setPageName(String pageName)
Sets the currently viewed page (Shared or User page) Should call EbiPortalContext.setPageType() to set the type of this page.
Parameters:
pageName - The name of the user or shared page

setPageType

public void setPageType(String pageType)
Sets the page type of the current page (Shared or User) The page type can either be 'SHAREDPAGE' or 'USERPAGE'
Parameters:
pageName - The page type

getPageName

public String getPageName()
Gets the currently viewed portal page name (shared or user page) The EbiPortalContext.getPageType() will indicate which type it is (shared or user)
Returns:
the page ID of the current portal page

getPageType

public String getPageType()
Gets the type of the currently viewed portal page (shared or user)
Returns:
the page type of the current portal page

getLastModified

public long getLastModified()
Deprecated.  

No information available
Returns:
no info available

setLastModified

public void setLastModified(long miliseconds)
Deprecated.  

No information available
Parameters:
miliseconds -  

setLastModifiedNow

public void setLastModifiedNow()
Deprecated.  

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 presetnation manager.
Parameters:
wellFormed - Indicates if the data from the componetn 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()
Indicated whether or not any of the data (from multiple components) on the page has malformed data (e.g. html components).
Returns:
true if the current user's page is well formed XML

setComponentID

public void setComponentID(String compID)
Sets the current component being processes.
Parameters:
compID -  

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)

Since:
v4.0
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 teh current component/instance's mode
Since:
v4.0

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.

Parameters:
state - The name of the state to be set on the session
level - Indicates at what levels to store the state the levels can be used in combination

example: setComponentState("minimized",EbiPortalContext.SESSION + EbiPortalContext.PERSIST

Since:
v4.0
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 teh current component/instance's state
Since:
v4.0

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 - this
Parameters:
componentID -  
instanceName -  

getComponentInfo

public EbiPortalComponentInfo getComponentInfo()
Returns the value object for the currently processed component.
Returns:
the component info object for the current component.

setComponentTitleBarEnabled

public void setComponentTitleBarEnabled(boolean enable)
Overrides the default setting of the component's title bar setting (enabled or not?)
Parameters:
enable -  

setComponentTitle

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

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

Parameters:
title -  
level - Indicates at what levels to persist the title.
Since:
4.0
See Also:
EbiPortalContext.REQUEST, EbiPortalContext.SESSION, EbiPortalContext.PERSIST

setComponentTitle

public void setComponentTitle(String title)
Sets the title to be displayed in the components title bar

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

Parameters:
title -  
Since:
4.0

getComponentTitleBarEnabled

public boolean getComponentTitleBarEnabled()
Gets the title enabled setting.
Returns:
true if the component should be decorated, false if no decoration is to be applied.

getComponentTitle

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

The title is retrieved in the follwoing order

  1. Locate title in the session
  2. No title for this component instance in teh 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.
Returns:
the current component's instance name

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"

Specified by:
getContextName in interface EbiContext
Returns:
the context name used in namespacing

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 Do not call this method unless you know what your doing!
Parameters:
contextName -  

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


Novell exteNd
Director 5.2 API