Package cz.metacentrum.perun.core.api
Class Member
java.lang.Object
cz.metacentrum.perun.core.api.PerunBean
cz.metacentrum.perun.core.api.Auditable
cz.metacentrum.perun.core.api.Member
- All Implemented Interfaces:
Serializable
,Comparable<PerunBean>
- Direct Known Subclasses:
RichMember
Member of a Virtual Organization.
- Author:
- Michal Prochazka michalp@ics.muni.cz, Martin Kuba makub@ics.muni.cz
- See Also:
-
Constructor Summary
ConstructorDescriptionMember()
Member
(int id) Member
(int id, int userId) Member
(int id, int userId, int voId, Status status, String createdAt, String createdBy, String modifiedAt, String modifiedBy, Integer createdByUid, Integer modifiedByUid) Member
(int id, String createdAt, String createdBy, String modifiedAt, String modifiedBy, Integer createdByUid, Integer modifiedByUid) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns group status of member for given context.int
int
getVoId()
int
hashCode()
boolean
void
putGroupStatus
(int groupId, MemberGroupStatus status) Adds member's status for given group.void
putGroupStatuses
(Map<Integer, MemberGroupStatus> groupStatuses) Adds member's statuses for given group.protected void
setGroupsStatuses
(Map<Integer, MemberGroupStatus> groupsStatuses) void
void
setMembershipType
(String type) void
setSourceGroupId
(Integer sourceGroupId) void
setSponsored
(boolean sponsored) void
void
void
setUserId
(int userId) void
setVoId
(int voId) toString()
Methods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUid
Methods inherited from class cz.metacentrum.perun.core.api.PerunBean
compareTo, getBeanName, getId, setId
-
Constructor Details
-
Member
public Member() -
Member
public Member(int id) -
Member
-
Member
public Member(int id, int userId) -
Member
-
Member
-
-
Method Details
-
equals
-
getGroupStatus
Returns group status of member for given context.This value is used to calculate member's group status for groups that are relevant to given context. E.g.: If this member is returned from call ResourceManager.getAllowedMembers(), this status returns member's total group status calculated from groups that can access this resource and contains this member.
- Returns:
- memberGroup status for context relevant groups.
-
getGroupStatuses
-
getMembershipType
-
setMembershipType
-
setMembershipType
-
getSourceGroupId
-
setSourceGroupId
-
getStatus
-
setStatus
-
setStatus
-
getUserId
public int getUserId() -
setUserId
public void setUserId(int userId) -
getVoId
public int getVoId() -
setVoId
public void setVoId(int voId) -
hashCode
public int hashCode() -
isSponsored
public boolean isSponsored() -
setSponsored
public void setSponsored(boolean sponsored) -
putGroupStatus
Adds member's status for given group. If member already had a VALID status for given group, nothing is changed.- Parameters:
groupId
- group IDstatus
- member's status for given group
-
putGroupStatuses
Adds member's statuses for given group. If member already had a VALID status for any of given groups, then nothing is changed for the group.- Parameters:
groupStatuses
- map containing group's IDs and member statuses
-
serializeToString
- Overrides:
serializeToString
in classAuditable
-
setGroupsStatuses
-
toString
-