Package com.ibm.sbt.services.client.connections.communities

Examples of com.ibm.sbt.services.client.connections.communities.Member


   
    @Before
    public void initCommunity() {
      addSnippetParam("sample.userId3", getCommunityUuid())
      try {
        addMember(new Member(getCommunityService(), "sample.userId3"))
      } catch(Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here


        }
    }
   
    protected void addMember(Community community, String id, String role) throws Exception {
        CommunityService communityService = getCommunityService();
        Member member = new Member(communityService, id);
        member.setRole(role);
        communityService.addMember(community.getCommunityUuid(), member);
    }
View Full Code Here

    protected boolean hasMember(Community community, String id) throws Exception {
        CommunityService communityService = getCommunityService();
        EntityList<Member> memberList = communityService.getMembers(community.getCommunityUuid());
        for (int i=0; i<memberList.size(); i++) {
          Member member = (Member)memberList.get(i);
            if (id.equals(member.getEmail()) || id.equals(member.getUserid())) {
                return true;
            }
        }
        return false;
    }  
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.connections.communities.Member

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.