Class Member

All Implemented Interfaces:
Serializable, Comparable<PerunBean>
Direct Known Subclasses:
RichMember

public class Member extends Auditable
Member of a Virtual Organization.
Author:
Michal Prochazka michalp@ics.muni.cz, Martin Kuba makub@ics.muni.cz
See Also:
Serialized Form
  • Constructor Details

    • Member

      public Member()
    • Member

      public Member(int id)
    • Member

      public Member(int id, String createdAt, String createdBy, String modifiedAt, String modifiedBy, Integer createdByUid, Integer modifiedByUid)
    • Member

      public Member(int id, int userId)
    • Member

      public Member(int id, int userId, int voId, Status status)
    • Member

      public Member(int id, int userId, int voId, Status status, String createdAt, String createdBy, String modifiedAt, String modifiedBy, Integer createdByUid, Integer modifiedByUid)
  • Method Details

    • getUserId

      public int getUserId()
    • setUserId

      public void setUserId(int userId)
    • getStatus

      public Status getStatus()
    • setStatus

      public void setStatus(Status status)
    • setStatus

      public void setStatus(String status)
    • getSourceGroupId

      public Integer getSourceGroupId()
    • setSourceGroupId

      public void setSourceGroupId(Integer sourceGroupId)
    • getVoId

      public int getVoId()
    • setVoId

      public void setVoId(int voId)
    • setMembershipType

      public void setMembershipType(MembershipType type)
    • setMembershipType

      public void setMembershipType(String type)
    • getMembershipType

      public MembershipType getMembershipType()
    • isSponsored

      public boolean isSponsored()
    • setSponsored

      public void setSponsored(boolean sponsored)
    • putGroupStatus

      public void putGroupStatus(int groupId, MemberGroupStatus status)
      Adds member's status for given group. If member already had a VALID status for given group, nothing is changed.
      Parameters:
      groupId - group ID
      status - member's status for given group
    • getGroupStatuses

      public Map<Integer,​MemberGroupStatus> getGroupStatuses()
    • getGroupStatus

      public MemberGroupStatus 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.
    • setGroupsStatuses

      protected void setGroupsStatuses(Map<Integer,​MemberGroupStatus> groupsStatuses)
    • putGroupStatuses

      public void putGroupStatuses(Map<Integer,​MemberGroupStatus> groupStatuses)
      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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PerunBean
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Auditable
    • serializeToString

      public String serializeToString()
      Overrides:
      serializeToString in class Auditable
    • toString

      public String toString()
      Overrides:
      toString in class Auditable