nl.surfnet.coin.teams.domain
Class Invitation
java.lang.Object
nl.surfnet.coin.shared.domain.DomainObject
nl.surfnet.coin.teams.domain.Invitation
- All Implemented Interfaces:
- Serializable
public class Invitation
- extends nl.surfnet.coin.shared.domain.DomainObject
- See Also:
- Serialized Form
|
Constructor Summary |
Invitation()
Constructor Hibernate needs when fetching results from the db. |
Invitation(String email,
String teamId)
Constructor with the most common fields |
| Methods inherited from class nl.surfnet.coin.shared.domain.DomainObject |
equals, getId, hashCode, setId, toString |
Invitation
public Invitation()
- Constructor Hibernate needs when fetching results from the db.
Do not use to create new Invitations.
Invitation
public Invitation(String email,
String teamId)
- Constructor with the most common fields
- Parameters:
email - address of the person to inviteteamId - id of the team the person will join
setTeamId
public void setTeamId(String teamId)
- Parameters:
teamId - the teamId to set
getTeamId
public String getTeamId()
- Returns:
- the teamId
setEmail
public void setEmail(String email)
- Parameters:
email - the email to set
getEmail
public String getEmail()
- Returns:
- the email
getTimestamp
public long getTimestamp()
- Returns:
- timestamp when the invitation was last updates
setTimestamp
public void setTimestamp(long timestamp)
- Parameters:
timestamp - to indicate when the invitation was last updated
getInvitationHash
public String getInvitationHash()
- Returns:
- unique hash to identify the invitation
isDeclined
public boolean isDeclined()
- Returns:
- true if the invitee has declined the invitation
setDeclined
public void setDeclined(boolean declined)
- Parameters:
declined - indicator if the invitation is denied
isAccepted
public boolean isAccepted()
- Returns:
- true if the invitee has accepted the invitation
setAccepted
public void setAccepted(boolean accepted)
- Parameters:
accepted - indicator if the invitation is denied
getInvitationMessages
public List<InvitationMessage> getInvitationMessages()
- Returns:
- List of
InvitationMessage's
addInvitationMessage
public void addInvitationMessage(InvitationMessage invitationMessage)
- Adds one
InvitationMessage to this Invitation
- Parameters:
invitationMessage - InvitationMessage to add
getLatestInvitationMessage
public InvitationMessage getLatestInvitationMessage()
- Returns:
- latest
InvitationMessage or null if none is set
getInvitationMessagesReversed
public List<InvitationMessage> getInvitationMessagesReversed()
getExpireTime
public long getExpireTime()
getIntendedRole
public Role getIntendedRole()
- Returns:
- the
Role the invitee should get within the team. Defaults to Role.Member
setIntendedRole
public void setIntendedRole(Role intendedRole)
- Setting a role other than
Role.Member can give the invitee more privileges automatically
- Parameters:
intendedRole - the Role the invitee should get within the team. Can be null
Copyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.