org.jboss.portal.api.session
Interface PortalSession

All Known Implementing Classes:
PortalSessionImpl

public interface PortalSession

The portal session, the portal session attributes are accessible however it is not possible to influence the lifecycle of the session as it is managed by the portal.

Version:
$Revision: 8785 $
Author:
Julien Viet

Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Returns a session attribute.
 java.lang.String getId()
          Return the session id.
 void removeAttribute(java.lang.String name)
          Removes an attribute value.
 void setAttribute(java.lang.String name, java.lang.Object attribute)
          Update an attribute value.
 

Method Detail

getId

java.lang.String getId()
Return the session id.

Returns:
the session id

getAttribute

java.lang.Object getAttribute(java.lang.String name)
                              throws java.lang.IllegalArgumentException
Returns a session attribute.

Parameters:
name - the attribute name
Returns:
the attribute value or null if it is not found
Throws:
java.lang.IllegalArgumentException - if the attribute name is null

setAttribute

void setAttribute(java.lang.String name,
                  java.lang.Object attribute)
                  throws java.lang.IllegalArgumentException
Update an attribute value. If the attribute value is null, then it is considered as a removal.

Parameters:
name - the attribute name
attribute - the attribute value
Throws:
java.lang.IllegalArgumentException - if the attribute name is null

removeAttribute

void removeAttribute(java.lang.String name)
                     throws java.lang.IllegalArgumentException
Removes an attribute value.

Parameters:
name - the attribute name
Throws:
java.lang.IllegalArgumentException - if the attribute name is null