@PermitAll public class InvitationServiceImpl extends BaseServiceImpl<Invitation> implements InvitationService
| Constructor and Description |
|---|
InvitationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Invitation |
accept(Invitation invitation,
HawkularUser user)
Marks an invitation as accepted, converting the data from
Invitation into an
OrganizationMembership |
Invitation |
create(String email,
HawkularUser invitedBy,
Organization organization,
Role role)
Stores an invitation with the given parameters.
|
Invitation |
get(String id)
Retrieves an
Invitation based on the ID. |
Invitation |
getById(UUID token)
Retrieves an
Invitation based on the token. |
Invitation |
getByToken(String token)
Retrieves an
Invitation based on the token. |
List<Invitation> |
getInvitationsForOrganization(Organization organization)
Retrieves all invitations for the given organization.
|
List<Invitation> |
getPendingInvitationsForOrganization(Organization organization)
Retrieves the pending invitations for the given organization.
|
void |
markAsDispatched(Invitation invitation)
Marks the given invitation as dispatched.
|
void |
remove(Invitation invitation)
Remove the invitation from the storage.
|
getByIdpublic Invitation getById(UUID token)
InvitationServiceInvitation based on the token.getById in interface InvitationServicetoken - the token that was received by the invited userpublic Invitation get(String id)
InvitationServiceInvitation based on the ID.get in interface InvitationServiceid - the invitation's IDpublic Invitation getByToken(String token)
InvitationServiceInvitation based on the token.getByToken in interface InvitationServicetoken - the token that was received by the invited userpublic List<Invitation> getPendingInvitationsForOrganization(Organization organization)
InvitationServicegetPendingInvitationsForOrganization in interface InvitationServiceorganization - the organization of which pending invitations are queried from.public List<Invitation> getInvitationsForOrganization(Organization organization)
InvitationServicegetInvitationsForOrganization in interface InvitationServiceorganization - the organization of the invitations are queried from.public Invitation create(String email, HawkularUser invitedBy, Organization organization, Role role)
InvitationServicecreate in interface InvitationServiceemail - the user that has been invitedinvitedBy - the user who sent the invitationorganization - the organization for which the user was invited torole - the role on the organization for the invited userpublic Invitation accept(Invitation invitation, HawkularUser user)
InvitationServiceInvitation into an
OrganizationMembershipaccept in interface InvitationServiceinvitation - the invitation to be accepteduser - the user that is accepting the invitationpublic void remove(Invitation invitation)
InvitationServiceremove in interface InvitationServiceinvitation - the invitation to be removedpublic void markAsDispatched(Invitation invitation)
InvitationServicemarkAsDispatched in interface InvitationServiceinvitation - the invitation to mark as dispatchedCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.