com.bea.portal.tools.portal.controls
Interface CommunityInvitationControl


@ControlInterface
public interface CommunityInvitationControl

Control for Community invitation functionality.


Method Summary
 void cleanupAllInactiveInvitations(ResourceContext context)
          Deletes all inactive status Invitations from the database
 void cleanupInactiveInvitations(CommunityDefinitionId communityId, ResourceContext context)
          Deletes all inactive status Invitations from the database for a specified Community.
 InvitationStatus consumeInvitation(InviteeId inviteeId, InvitationStatus toStatus, ResourceContext context)
          Consumes an Invitation that is in active status and moves it to one of the inactive statuses.
 Invitation getInvitation(CommunityDefinitionId communityId, String wlsUserName, ResourceContext context)
          Retrieves an Invitation by communityId and wlsUserName.
 Invitation getInvitation(InviteeId inviteeId, ResourceContext context)
          Retrieves an Invitation by InviteeId.
 Invitation getInvitation(String validationText, ResourceContext context)
          Retrieves an Invitation by validation text.
 SortableFilterablePagedResult<Invitation> getInvitations(int pageSize, InvitationSearchCriteria criteria, ResourceContext context)
          Paginated search method for getting Invitations matching the supplied InvitationSearchCriteria
 void inviteToCommunity(InviteeIterator invitees, InvitationDetails invitationDetails, CommunityInviter[] communityInviters, boolean synchronous, ResourceContext context)
          Invites a set of Invitees to a community, via a specified set of communications methods.
 void removeInvitation(InviteeId inviteeId, ResourceContext context)
          Deletes a single Invitation from the database.
 

Method Detail

inviteToCommunity

void inviteToCommunity(InviteeIterator invitees,
                       InvitationDetails invitationDetails,
                       CommunityInviter[] communityInviters,
                       boolean synchronous,
                       ResourceContext context)
                       throws ToolsException
Invites a set of Invitees to a community, via a specified set of communications methods.

Parameters
invitees - an InviteeIterator that can enumerate all users to invite
invitationDetails - detailed information about the invitation to perform
communityInviters - an array of CommunityInviters which specifies the various communications channel Inviters the framework should use to send the invitations. The array may be empty, meaning that invitations will be created but no mechanism will be used to inform the invitee(s) that they have been invited.
synchronous - if true, the method blocks until all invitations are sent, if false, the method is asynchronous and returns before starting to send invitations. If sending many invitations, the asynchronous version should be used to avoid transaction timeouts and to prevent blocking the thread. In some circumstances, a synchronous call is desired to ensure the invitation exists once the method returns.
context - the resource context.
Throws
ToolsException

getInvitation

Invitation getInvitation(String validationText,
                         ResourceContext context)
                         throws ToolsException
Retrieves an Invitation by validation text. This is useful for cases where the Invitee was an external user and does not yet have a WLS username, and where the application supplied a unique validation text for each Invitee

Parameters
validationText -
context - the resource context
Returns
invitation details for the invitation with the specified validation text, if it exists, otherwise null.
Throws
ToolsException

getInvitation

Invitation getInvitation(CommunityDefinitionId communityId,
                         String wlsUserName,
                         ResourceContext context)
                         throws ToolsException
Retrieves an Invitation by communityId and wlsUserName. This is useful for cases where the Invitee has an existing WLS username and the Community is known. If there is more than one Invitation for the specified user and community, the most recent Invitation will be returned.

Parameters
communityId -
wlsUserName -
context - the resource context
Returns
an Invitation object for the specified community and user if one exists, null otherwise.
Throws
ToolsException

getInvitation

Invitation getInvitation(InviteeId inviteeId,
                         ResourceContext context)
                         throws ToolsException
Retrieves an Invitation by InviteeId. This is useful for cases where a Communities application has access to the InviteeId, typically obtained from a custom CommunityInviter implementation after an invitation operation has completed.

Parameters
inviteeId -
context - the resource context
Returns
invitation details for the invitation with the specified validation text, if it exists, otherwise null.
Throws
ToolsException

getInvitations

SortableFilterablePagedResult<Invitation> getInvitations(int pageSize,
                                                         InvitationSearchCriteria criteria,
                                                         ResourceContext context)
                                                         throws ToolsException
Paginated search method for getting Invitations matching the supplied InvitationSearchCriteria

Parameters
pageSize - Number of results to return per page
criteria - the criteria for the search.
context - the resource context.
Returns
a SortableFilterablePagedResult of Invitations matching the InvitationSearchCriteria
Throws
ToolsException

consumeInvitation

InvitationStatus consumeInvitation(InviteeId inviteeId,
                                   InvitationStatus toStatus,
                                   ResourceContext context)
                                   throws ToolsException
Consumes an Invitation that is in active status and moves it to one of the inactive statuses. If the invitation was created with a self_destruct flag marked true, this will additionally delete the Invitation record.

Parameters
inviteeId -
toStatus -
context - the resource context
Returns
the InvitationStatus that the system set the Invitation to. In the case of either expiration or prior revocation, this will be the status returned instead of the input status, so the caller should check to verify the actual result of the operation.
Throws
ToolsException

removeInvitation

void removeInvitation(InviteeId inviteeId,
                      ResourceContext context)
                      throws ToolsException
Deletes a single Invitation from the database.

Parameters
inviteeId - the id of the invitation to delete
context - the resource context
Throws
ToolsException

cleanupInactiveInvitations

void cleanupInactiveInvitations(CommunityDefinitionId communityId,
                                ResourceContext context)
                                throws ToolsException
Deletes all inactive status Invitations from the database for a specified Community.

Parameters
communityId -
context - the resource context
Throws
ToolsException

cleanupAllInactiveInvitations

void cleanupAllInactiveInvitations(ResourceContext context)
                                   throws ToolsException
Deletes all inactive status Invitations from the database

Parameters
context - the resource context
Throws
ToolsException


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.