|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseFacesSessionBean
com.webmethods.caf.faces.bean.BaseFacesPreferencesBean
public class BaseFacesPreferencesBean
Smart preferences bean. Preferences for portlets may be coming from following sources:
The preference value from the url always takes precendence over value stored on the bean or taken from wired source or persisted. Transient value, if explicitely set, should take precedence over wired or persisted value.
Client applications should subclass this base class for each portlet in a portlet application.
Field Summary |
---|
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean |
---|
fExpireWithPageFlow |
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean |
---|
DATA_BINDING_CLIENTS, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders |
Constructor Summary | |
---|---|
BaseFacesPreferencesBean()
Default constructor. |
|
BaseFacesPreferencesBean(String[] prefNames)
Constrcutor that takes list of preference names. |
Method Summary | |
---|---|
protected PortletConfig |
getPortletConfig()
Returns portlet config object |
IContentProvider |
getPortletResources()
Deprecated. |
ResourceBundleContentProvider |
getPortletResourcesProvider()
Returns ResourceBundleContentProvider for the associated portlet
for the current locale. |
String |
getPortletURI()
Get the URI of the current portlet instance. |
protected PortletPreferences |
getPreferences()
Returns instance of the Portlet Preferences for the current portlet |
Map |
getPreferencesMap()
Returns all the preferences as modifiable map |
protected Object |
getPreferenceValue(String preferenceName,
Class preferenceClass)
Returns portlet preference value and converts it to the target class. |
String |
getProxyThingID()
Returns MWS proxyThingID for portlets used as 'pseudo portlet renderers' |
protected void |
initPreferences()
Initializes preferences from the request parameters. |
protected void |
release()
Override this method to release any resources associated with this session. |
protected void |
setPreferenceValue(String preferenceName,
Object preferenceValue)
Sets new value of the portlet preference. |
protected void |
updatePreferences()
Copies any new preference values into the underlying PortletPreferences storage. |
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean |
---|
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound |
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean |
---|
createMethodBinding, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseFacesPreferencesBean()
PREFERENCES_NAMES
field in this class.
public BaseFacesPreferencesBean(String[] prefNames)
prefNames
- names of the portlet preferencesMethod Detail |
---|
protected void release()
BaseFacesSessionBean
release
in class BaseFacesSessionBean
protected void initPreferences() throws Exception
Exception
- if call is made outside of the PortletContextpublic String getProxyThingID() throws Exception
Exception
protected void updatePreferences() throws Exception
Exception
protected Object getPreferenceValue(String preferenceName, Class preferenceClass) throws Exception
preferenceName
- portlet preference namepreferenceClass
- target value class
Exception
protected void setPreferenceValue(String preferenceName, Object preferenceValue) throws Exception
preferenceName
- portlet preference namepreferenceValue
- preference value
Exception
public IContentProvider getPortletResources()
BaseFacesPreferencesBean.getPortletResourcesProvider()
public ResourceBundleContentProvider getPortletResourcesProvider()
ResourceBundleContentProvider
for the associated portlet
for the current locale. The locale is specified by
UIViewRoot
. The resource bundle
base name is specified in
PortletConfig#getResourceBundle(java.util.Locale)
. If resource
bundle cannot be loaded the returned provider is empty.
public Map getPreferencesMap()
Map<String, Object>
of all the preferences.public String getPortletURI()
String
.protected PortletConfig getPortletConfig()
protected PortletPreferences getPreferences() throws Exception
javax.portlet.PortletPreferences
object
Exception
- if this is made outside of the PortletContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |