com.bea.netuix.servlets.manager.communities.invitations.notification
Class NotificationInvitationHelper

java.lang.Object
  extended by com.bea.netuix.servlets.manager.communities.invitations.notification.NotificationInvitationHelper

public class NotificationInvitationHelper
extends Object

A helper class paired with the NotificationInviter to help get community information out of notifications sent by the NotificationInviter. Because notifications are sent directly to WLS users (which have to authenticate to receive the notifications) it is not necessary to generate validation text for invitations sent over notifications.

The overview of community functionality contains a description of the community framework.

See Also
NotificationInviter

Field Summary
static String NOTIFICATION_NAME
          The name of the notifications sent by the NotificationInviter implementation.
static String NOTIFICATION_NAMESPACE
          The namespace of the notifications sent by the NotificationInviter implementation.
 
Method Summary
 CommunityDefinition getCommunityDefinition()
          Returns the CommunityDefinition for the community the invitation if for.
 CommunityDefinitionId getCommunityDefinitionId()
          Retrieves the community definition ID from the invitation.
 CommunityURI getCommunityURI()
          Retrieves the community URI from the invitation.
 Date getExpirationDate()
          Retrieves the expiration date for the invitation.
static NotificationInvitationHelper getNotificationInvitationHelper(Notification invitation, javax.servlet.http.HttpServletRequest request)
          Used to get a NotificationInvitationHelper instance from a Notification sent by the NotificationInviter implementation.
static ArrayList<NotificationInvitationHelper> getNotificationInvitationHelpers(javax.servlet.http.HttpServletRequest request)
          Used to get all NotificationInvitationHelper instances appropriate for the specified request.
 GenericURL getRegistrationPageUrl(javax.servlet.http.HttpServletResponse response)
          Gets a URL to the community registration page.
 String getSendingUsername()
          Retrieves the user from whom the invitation was sent, if a user sent the invitation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTIFICATION_NAMESPACE

public static final String NOTIFICATION_NAMESPACE
The namespace of the notifications sent by the NotificationInviter implementation.

See Also
Constants Summary

NOTIFICATION_NAME

public static final String NOTIFICATION_NAME
The name of the notifications sent by the NotificationInviter implementation.

See Also
Constants Summary
Method Detail

getNotificationInvitationHelpers

public static ArrayList<NotificationInvitationHelper> getNotificationInvitationHelpers(javax.servlet.http.HttpServletRequest request)
Used to get all NotificationInvitationHelper instances appropriate for the specified request. If no notification-based invitations have been sent to the user authenticated in the request, an empty ArrayList will be returned. All notifications for invitations which have been consumed will be marked for consumption (to be consumed at the end of the page render cycle) and will not be returned in the ArrayList.

Parameters
request - the HttpServletRequest
Returns
a set of all NotificationInvitationHelper objects for all notification-based invitations send to the user authenticated in the request.

getNotificationInvitationHelper

public static NotificationInvitationHelper getNotificationInvitationHelper(Notification invitation,
                                                                           javax.servlet.http.HttpServletRequest request)
Used to get a NotificationInvitationHelper instance from a Notification sent by the NotificationInviter implementation. If the notification is not recognized as one sent by the NotificationInviter (if the namespace and name are wrong) null will be returned. If the notification is for an invitation which has been consumed, the notification will be marked for consumption (to be consumed at the end of the page render cycle) and null will be returned.

Parameters
invitation - the Notification-based invitation object to create a helper for.
request - the HttpServletRequest
Returns
a new NotificationInvitationHelper if appropriate for the specified notification, null otherwise.

getCommunityURI

public CommunityURI getCommunityURI()
Retrieves the community URI from the invitation.

Returns
the community URI of the community the notification is an invitation for.

getCommunityDefinitionId

public CommunityDefinitionId getCommunityDefinitionId()
Retrieves the community definition ID from the invitation.

Returns
the community definition ID of the community the notification is an invitation for.

getSendingUsername

public String getSendingUsername()
Retrieves the user from whom the invitation was sent, if a user sent the invitation.

Returns
the WLS user ID of the user that sent the invitation, or null if not available.

getExpirationDate

public Date getExpirationDate()
Retrieves the expiration date for the invitation.

Returns
the expiration date for the invitation.

getCommunityDefinition

public CommunityDefinition getCommunityDefinition()
Returns the CommunityDefinition for the community the invitation if for.

Returns
the community the invitation is for.

getRegistrationPageUrl

public GenericURL getRegistrationPageUrl(javax.servlet.http.HttpServletResponse response)
Gets a URL to the community registration page.

Returns
a URL to the community registration page for the invitation.


Copyright © 2011, Oracle. All rights reserved.