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:
  • 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

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Auditable
    • 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.
    • getGroupStatuses

      public Map<Integer,MemberGroupStatus> getGroupStatuses()
    • getMembershipType

      public MembershipType getMembershipType()
    • setMembershipType

      public void setMembershipType(MembershipType type)
    • setMembershipType

      public void setMembershipType(String type)
    • getSourceGroupId

      public Integer getSourceGroupId()
    • setSourceGroupId

      public void setSourceGroupId(Integer sourceGroupId)
    • getStatus

      public Status getStatus()
    • setStatus

      public void setStatus(Status status)
    • setStatus

      public void setStatus(String status)
    • getUserId

      public int getUserId()
    • setUserId

      public void setUserId(int userId)
    • getVoId

      public int getVoId()
    • setVoId

      public void setVoId(int voId)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Auditable
    • 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
    • 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
    • serializeToString

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

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

      public String toString()
      Overrides:
      toString in class Auditable