|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.xsp.designer.context.XSPContext
public abstract class XSPContext
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_PARAMETERS
|
static java.lang.String |
CONTEXT
|
static java.lang.String |
COOKIE
|
static java.lang.String |
DELIMITER
|
static java.lang.String |
FALSE
|
static java.lang.String |
TRUE
|
Constructor Summary | |
---|---|
protected |
XSPContext(javax.faces.context.FacesContext context)
Construct a RuntimeContext instance based on the specified
FacesContext object. |
Method Summary | |
---|---|
protected void |
addUrlParameter(XSPUrl url,
java.lang.String name,
java.lang.String value)
|
java.util.ResourceBundle |
bundle(java.lang.String bundleName)
Return a named resource bundle for the current Locale. |
java.util.ResourceBundle |
bundle(java.lang.String bundleName,
java.util.Locale locale)
Return a named resource bundle for a particular Locale. |
protected XSPUrl |
createRequestUrl(javax.faces.context.FacesContext facesContext)
|
protected XSPUrl |
createRequestUrlFromViewId(javax.faces.component.UIViewRoot viewRoot)
|
protected com.ibm.designer.runtime.directory.DirectoryUser |
createUser(java.lang.String dName,
java.lang.String cName,
boolean fillUserFromDirectory)
|
java.lang.String |
filterHTML(java.lang.String html)
Filter the content of an HTML snippet. |
java.lang.String |
filterHTML(java.lang.String html,
java.lang.String processor)
Filter the content of an HTML snippet. |
java.lang.String |
getComponentInstanceId()
Gets the component instance ID. |
java.lang.String |
getComponentMode()
Gets the component execution mode. |
java.lang.Object |
getComponentParameter(java.lang.String name)
Gets the value of a component parameter. |
protected com.ibm.designer.runtime.directory.DirectoryServer |
getDirectoryServer()
|
javax.faces.context.FacesContext |
getFacesContext()
|
FacesContextEx |
getFacesContextEx()
|
java.lang.String |
getHistoryUrl(int level)
Get a URL in the history stack. |
java.lang.String[] |
getHistoryUrls()
Get the URLs in the history stack. |
java.util.Locale |
getLocale()
Gets the current locale. |
java.lang.String |
getLocaleString()
Gets the current locale as a string. |
protected PersistentSessionData |
getPersistentSessionData()
|
java.lang.String |
getProperty(java.lang.String name)
Return a property value. |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Return a property value. |
java.lang.String |
getSessionProperty(java.lang.String name)
Return a session property value. |
java.lang.String |
getSubmittedValue()
Get submitted value. |
java.lang.String |
getThemeId()
Return the current theme id. |
java.util.TimeZone |
getTimeZone()
Gets the current time zone. |
java.lang.String |
getTimeZoneString()
Gets the current time zone as a string. |
XSPUrl |
getUrl()
Gets the URL of the requested page |
java.lang.String |
getUrlParameter(java.lang.String name)
Gets the an URL parameter value. |
com.ibm.designer.runtime.directory.DirectoryUser |
getUser()
Gets the current user from the directory. |
XSPUserAgent |
getUserAgent()
Return the current browser. |
static XSPContext |
getXSPContext(javax.faces.context.FacesContext context)
|
protected void |
init(javax.faces.context.FacesContext context)
|
boolean |
isComponent()
Check if the application is running as a component. |
boolean |
isDataBeingLoaded()
Check if a datasource is being loaded. |
boolean |
isDataBeingSaved()
Check if a datasource is being saved. |
boolean |
isDirectionLTR()
Check for LTR mode. |
boolean |
isDirectionRTL()
Check for RTL mode. |
boolean |
isPortletContext()
When running within the context of a portlet this method will return true. |
boolean |
isRcpContext()
When running within the context of the rich client platpage this method will return true. |
boolean |
isRunningContext(java.lang.String context)
Check if the application is running in a particular context. |
boolean |
isServletContext()
When running within the context of a servlet this method will return true. |
void |
redirectToHome()
Redirect to the home page. |
void |
redirectToPage(java.lang.String page)
Use a new page to edit the same document(s) |
void |
redirectToPage(java.lang.String page,
boolean redirect)
Use a new page to edit the same document(s) |
void |
redirectToPrevious()
Redirect to the previous page, if any. |
void |
reloadPage()
Reload the current page |
protected void |
renderPage(java.lang.String page,
boolean redirect)
|
void |
resetUrlInternal()
|
protected java.lang.Object |
resolveVariable(java.lang.String name)
|
void |
setComponentMode(java.lang.String mode)
Change current component mode. |
void |
setComponentMode(java.lang.String mode,
boolean cancel)
Change current component mode. |
void |
setComponentParameter(java.lang.String name,
java.lang.Object value)
Set the value of a component parameter. |
protected void |
setDirectoryUser(com.ibm.designer.runtime.directory.DirectoryUser dirUser)
|
void |
setDocumentMode(java.lang.String mode)
Change the current document mode. |
void |
setDocumentMode(java.lang.String var,
java.lang.String mode)
Change the document mode. |
void |
setLocale(java.util.Locale locale)
Force the Locale for this session |
void |
setLocaleString(java.lang.String locale)
Force the Locale for this session |
void |
setSessionProperty(java.lang.String name,
java.lang.String value)
Set a session property value. |
void |
setTimeZone(java.util.TimeZone timeZone)
Force the Timezone for this session |
void |
setTimeZoneString(java.lang.String timeZone)
Force the Timezone for this session |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONTEXT
public static final java.lang.String COOKIE
public static final java.lang.String COMPONENT_PARAMETERS
public static final java.lang.String DELIMITER
public static final java.lang.String TRUE
public static final java.lang.String FALSE
Constructor Detail |
---|
protected XSPContext(javax.faces.context.FacesContext context)
RuntimeContext
instance based on the specified
FacesContext object.
context
- Method Detail |
---|
public static XSPContext getXSPContext(javax.faces.context.FacesContext context)
protected void init(javax.faces.context.FacesContext context)
public javax.faces.context.FacesContext getFacesContext()
public FacesContextEx getFacesContextEx()
protected PersistentSessionData getPersistentSessionData()
protected void setDirectoryUser(com.ibm.designer.runtime.directory.DirectoryUser dirUser)
protected java.lang.Object resolveVariable(java.lang.String name)
protected com.ibm.designer.runtime.directory.DirectoryServer getDirectoryServer()
protected com.ibm.designer.runtime.directory.DirectoryUser createUser(java.lang.String dName, java.lang.String cName, boolean fillUserFromDirectory)
protected void renderPage(java.lang.String page, boolean redirect)
public java.util.ResourceBundle bundle(java.lang.String bundleName) throws java.io.IOException
bundleName
- the name of the resource bundle to load
java.io.IOException
public java.util.ResourceBundle bundle(java.lang.String bundleName, java.util.Locale locale) throws java.io.IOException
bundleName
- the name of the resource bundle to loadlocale
- the locale to use - null means the current one
java.io.IOException
public XSPUserAgent getUserAgent()
public java.lang.String getThemeId()
public java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
name
- the property namedefaultValue
- the value to return if the property doesn't exist
public java.lang.String getProperty(java.lang.String name)
name
- the property name
public java.lang.String getSessionProperty(java.lang.String name)
name
- the property namedefaultValue
- the value to return if the property doesn't exist
public void setSessionProperty(java.lang.String name, java.lang.String value)
name
- the property namedefaultValue
- the value to return if the property doesn't existpublic boolean isComponent()
public java.lang.String getComponentInstanceId()
public java.lang.String getComponentMode()
public void setComponentMode(java.lang.String mode)
updateParameters
- true is the component parameters should be updatepublic void setComponentMode(java.lang.String mode, boolean cancel)
mode
- the new mode to switch to ('view', 'edit', 'help'...)cancel
- true if the previous mode should be cancelled (ex: parameters are no updated)public java.lang.Object getComponentParameter(java.lang.String name)
name
- The name of the parameter.
public final void setComponentParameter(java.lang.String name, java.lang.Object value)
name
- The name of the parameter.value
- The value of the parameter.public java.lang.String getSubmittedValue()
public boolean isRunningContext(java.lang.String context)
public boolean isServletContext()
public boolean isPortletContext()
public boolean isRcpContext()
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
public java.lang.String getLocaleString()
public void setLocaleString(java.lang.String locale)
public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)
public java.lang.String getTimeZoneString()
public void setTimeZoneString(java.lang.String timeZone)
public java.lang.String filterHTML(java.lang.String html)
html
- the html string to filter
public java.lang.String filterHTML(java.lang.String html, java.lang.String processor)
html
- the html string to filterprocessor
- the filtering processor name to use
public com.ibm.designer.runtime.directory.DirectoryUser getUser()
public XSPUrl getUrl()
public java.lang.String getUrlParameter(java.lang.String name)
public void resetUrlInternal()
protected XSPUrl createRequestUrl(javax.faces.context.FacesContext facesContext)
protected void addUrlParameter(XSPUrl url, java.lang.String name, java.lang.String value)
protected XSPUrl createRequestUrlFromViewId(javax.faces.component.UIViewRoot viewRoot)
public void reloadPage()
public void redirectToPage(java.lang.String page, boolean redirect)
page
- the page namepublic void redirectToPage(java.lang.String page)
page
- the page namepublic void redirectToPrevious()
public void redirectToHome()
public java.lang.String getHistoryUrl(int level)
level
- the history level: 0 is the current page, 1 or -1 the previous...
public java.lang.String[] getHistoryUrls()
public boolean isDirectionLTR()
public boolean isDirectionRTL()
public boolean isDataBeingLoaded()
public boolean isDataBeingSaved()
public void setDocumentMode(java.lang.String mode)
the
- new mode (edit, readOnly, autoEdit, toggle)public void setDocumentMode(java.lang.String var, java.lang.String mode)
var
- the name of the document to change. null means the current documentthe
- new mode (edit, readOnly, autoEdit, toggle)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |