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

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


    return createCommunity(title, type, content, tags, true);
  }

  protected Community createCommunity(String title, String type,
      String content, String tags, boolean retry) {
    Community community = null;
    try {
      loginConnections();
      CommunityService communityService = getCommunityService();

      long start = System.currentTimeMillis();
      community = new Community(communityService, "");
      community.setTitle(title);
      community.setCommunityType(type);
      community.setContent(content);
      community.setTags(tags);
      String communityUuid = communityService.createCommunity(community);
      community = communityService.getCommunity(communityUuid);

      long duration = System.currentTimeMillis() - start;
      Trace.log("Created test community: " + communityUuid + " took "
View Full Code Here


        //Assert.assertEquals(invite.getContributor().getName(), json.getAsObject("getCommunityUuid").getAsString("name"));
        //Assert.assertEquals(invite.getContributor().getUserid(), json.getAsObject("getCommunityUuid").getAsString("userid"));
    }
   
    protected Community getLastCreatedCommunity() {
        Community community = null;
        try {
            CommunityService communityService = getCommunityService();
            Collection<Community> communities = communityService.getMyCommunities();
            community = communities.iterator().next();
            Trace.log("Last created community: "+community.getCommunityUuid());
            Trace.log("Last created community: "+community.getPublished());
            Iterator<Community> i = communities.iterator();
            while (i.hasNext()) {
              Community c= i.next();
              Trace.log("Last created community: "+c.getCommunityUuid());
              Trace.log("Last created community: "+c.getTitle());
              Trace.log("Last created community: "+c.getPublished());
            }
        } catch (ClientServicesException cse) {
            fail("Error getting last created community", cse);
        }
       
View Full Code Here

    protected Community getCommunity(String communityUuid) {
        return getCommunity(communityUuid, true);
    }
   
    protected Community getCommunity(String communityUuid, boolean failOnCse) {
        Community community = null;
        try {
         
           
            CommunityService communityService = getCommunityService();
            community = communityService.getCommunity(communityUuid);
            Trace.log("Got community: "+community.getCommunityUuid());
        } catch (ClientServicesException cse) {
          if (failOnCse) {
            fail("Error retrieving community", cse);
          }
        }
View Full Code Here

    protected Community createCommunity(String title, String type, String content, String tags) {
      return createCommunity(title, type, content, tags, true);
    }
   
    protected Community createCommunity(String title, String type, String content, String tags, boolean retry) {
        Community community = null;
        try {
            CommunityService communityService = getCommunityService();
           
          long start = System.currentTimeMillis();
            community = new Community(communityService, "");
            community.setTitle(title);
            community.setCommunityType(type);
            community.setContent(content);
            community.setTags(tags);
            String communityUuid = communityService.createCommunity(community);
            community = communityService.getCommunity(communityUuid);
           
            long duration = System.currentTimeMillis() - start;
            Trace.log("Created test community: "+communityUuid + " took "+duration+"(ms)");
View Full Code Here

    }
    }
   
    protected void createCommunityWithTags(String tags) {
      CommunityService communityService = new CommunityService();
      Community community = null;
      try{
      community = new Community(communityService, "");
      community.setTitle(this.getClass().getName() + "#" + this.hashCode() + " Community - " + System.currentTimeMillis());
      community.setContent("Test Community created to test Activity Streams");
      community.setTags(tags);
      String communityId = communityService.createCommunity(community);
      }catch(ClientServicesException cse){
        assertNull("CommunityServiceException in testing SearchByFilters");
      }
    }
View Full Code Here

TOP

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

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.