| java.lang.Object org.jasig.portal.channels.portlet.CPortletAdapter
CPortletAdapter | public class CPortletAdapter implements ICharacterChannel,IPrivileged,ICacheable,IDirectResponse,IPortletAdaptor(Code) | | A JSR 168 Portlet adapter that presents a portlet
through the uPortal channel interface.
There is a related channel type called
"Portlet Adapter" that is included with uPortal, so to use
this channel, just select the "Portlet" type when publishing.
Note: A portlet can specify the String "password" in the
user attributes section of the portlet.xml. In this is done,
this adapter will look for the user's cached password. If
the user's password is being stored in memory by a caching
security context, the adapter will consult the cache to fill the
request for the attribute. If the user's password is not cached,
null will be set for the attributes value.
author: Ken Weiner, kweiner@unicon.net version: $Revision: 42658 $ |
log | final protected Log log(Code) | | |
portletPreferenceNamePrefix | final public static String portletPreferenceNamePrefix(Code) | | |
generateKey | public ChannelCacheKey generateKey()(Code) | | Generates a channel cache key. The key scope is currently set to be
instance-wide.
the channel cache key |
getMarkup | protected synchronized String getMarkup() throws PortalException(Code) | | This is where we do the real work of getting the markup.
This is called from both renderXML() and renderCharacters().
markup representing channel content |
getUserInfo | protected Map getUserInfo(ChannelStaticData staticData, UserAttributeListImpl userAttributes)(Code) | | Get the Map of portlet user attribute names to portlet user attribute values.
This is an extension point. You can extend CPortletAdapter and override this
method to implement the particular user attribute Map creation strategy that
you need to implement. Such strategies might rename uPortal
user attributes to names that your particular portlet knows how to consume,
transform the user attribute values to forms expected by your portlet, add
additional attributes, convey a CAS proxy ticket or other security token.
This extension point is the way to accomodate the particular user attributes
particular portlets require.
The default implementation of this method includes in the userInfo Map
those uPortal IPerson attributes matching entries in the list of attributes the
Portlet declared it wanted. Additionally, the default implementation copies
the cached user password if the Portlet declares it wants the user attribute
'password'.
Parameters: staticData - data associated with the particular instance of the portlet window for the particularuser session Parameters: userAttributes - the user attributes requested by the Portlet a Map from portlet user attribute names to portlet user attribute values. |
isCacheValid | public boolean isCacheValid(Object validity)(Code) | | Determines whether the cached content for this channel is still valid.
Return true when:
- We have not just received an event
- No runtime parameters are sent to the channel
- The focus hasn't switched.
Otherwise, return false .
In other words, cache the content in all cases except
for when a user clicks a channel button, a link or form button within the channel,
or the focus or unfocus button.
Parameters: validity - the validity object true if the cache is still valid, otherwise false |
receiveEvent | public void receiveEvent(PortalEvent ev)(Code) | | React to portal events.
Removes channel state from the channel state map when the session expires.
Parameters: ev - a portal event |
renderCharacters | public void renderCharacters(PrintWriter pw) throws PortalException(Code) | | Output channel content to the portal as raw characters
Parameters: pw - a print writer |
renderXML | public void renderXML(ContentHandler out) throws PortalException(Code) | | Output channel content to the portal. This version of the
render method is normally not used since this is a "character channel".
Parameters: out - a sax document handler |
setServletConfig | public static void setServletConfig(ServletConfig config)(Code) | | Receive the servlet config from uPortal's PortalSessionManager servlet.
Pluto needs access to this object from serveral places.
Parameters: config - the servlet config |
setupRequestAttributes | protected void setupRequestAttributes(HttpServletRequest request)(Code) | | Adds the appropriate information to the request attributes of the portlet.
This is an extension point. You can override this method to set other
request attributes.
Parameters: request - The request to add the attributes to |
|
|