Examples of Community


Examples of com.eatle.persistent.pojo.foundation.place.Community

      List<Community> communityList)
  {
    Map<Long, List<Community>> communityMap = new HashMap<Long, List<Community>>();
    for (int i = 0; i < communityList.size(); i++)
    {
      Community community = communityList.get(i);
      Long distinctId = community.getDistrictId();
      Long key = distinctId;
      if (distinctId == null || distinctId == 0)
      {
        key = 0L;
      }
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.place.Community

      json.put(DwzAjaxJsonUtil.KEY_STATUSCODE, 300);
      json.put(DwzAjaxJsonUtil.KEY_MESSAGE, "操作失败!");
    }
    else
    {
      Community c = communityService.findById(community.getId());
      ReflectionUtils.copyPorperties(c, community, new String[] { "name",
          "pinyinName", "districtId" });
      communityService.update(c);
    }
    super.writeMap(json);
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.activitystreams.model.Community

  }

  public Community getCommunity() {
    if(community==null){
      if(StringUtil.equalsIgnoreCase(getAsString(ASJsonPath.TargetObjectType),"community")){
        community = new Community(dataHandler);
      }
    }
    return community;
  }
View Full Code Here

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

    public void testCreateCommunity8() {
      testCreateCommunity();
    }
   
    public void testCreateCommunity() {
      Community comm = getCommunity(community.getCommunityUuid(), false);
      Assert.assertNotNull("Create community failed", comm);
      deleteCommunity(comm);
      comm = getCommunity(comm.getCommunityUuid(), false);
      Assert.assertNull("Delete community failed", comm);
      community = null;
    }
View Full Code Here

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

        return;
      }
     
        String duplicateTitle = "Duplicate Title - " + System.currentTimeMillis();
        String updatedContent = "Updated Content - " + System.currentTimeMillis();
        Community community2 = createCommunity(duplicateTitle, "public", "Content for duplicate test", "duplicate");
       
        addSnippetParam("CommunityService.communityUuid", community.getCommunityUuid());
        addSnippetParam("sample.communityTitle", duplicateTitle);
        addSnippetParam("sample.communityContent", updatedContent);
View Full Code Here

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

          CommunityService communityService = app.getCommunityService();
            Collection<Community> communities = communityService.getPublicCommunities();
            HashMap<String, String> parameters = new HashMap<String, String>();
            parameters.put("ps", "100"); //100 members will be retrieved at a time. Max is 10,000.
            for (Iterator<Community> iter = communities.iterator(); iter.hasNext(); ) {
                Community community = iter.next();
                boolean moreMembers = true;
                int page = 1;
               
                System.out.println(community.getTitle());
                do{
                    parameters.put("page", Integer.toString(page));
                    EntityList<Member> members = communityService.getMembers(community.getCommunityUuid(), parameters);
                    for (int i=0; i<members.size(); i++) {
                        System.out.println("    " + members.get(i).getEmail());
                    }
                    if((members.getStartIndex() + members.getItemsPerPage()) <= members.getTotalResults()){
                        moreMembers = true;
View Full Code Here

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

    createCommunity();
  }

  public void createCommunity() throws ClientServicesException{
    CommunityService service = new CommunityService();
    community = new Community(service, "");
    community.setTitle("Test Followservice Community " + System.currentTimeMillis());
    community.setContent("Java Community Content");
    String type = "public";
    community.setCommunityType(type);
    community = community.save();
View Full Code Here

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

    parameters.put("ps", "100"); //100 members will be retrieved at a time. Max is 10,000.
      try {
        CommunityService communityService = app.getCommunityService();
            Collection<Community> communities = communityService.getPublicCommunities();
            for (Iterator<Community> iter = communities.iterator(); iter.hasNext(); ) {
                Community community = iter.next();
                boolean moreMembers = true;
                int page = 1;
               
                System.out.println(community.getTitle());
                do{
                    parameters.put("page", Integer.toString(page));
                    EntityList<Member> members = communityService.getMembers(community.getCommunityUuid(), parameters);
                    for (int i=0; i<members.size(); i++) {
                        System.out.println("    " + members.get(i).getEmail());
                    }
                    if((members.getStartIndex() + members.getItemsPerPage()) <= members.getTotalResults()){
                        moreMembers = true;
View Full Code Here

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

      CreateCommunitiesApp app = new CreateCommunitiesApp();
   
      try {
            for (int i=0; i<10; i++) {
              long start = System.currentTimeMillis();
              Community community = new Community(app.communityService, "");
              community.setTitle("CreateCommunity-"+System.currentTimeMillis()+"-"+i);
              community.setCommunityType("public");
              community.setContent("");
              app.createCommunity(community);
              long duration = System.currentTimeMillis() - start;
              System.out.println("Create community took "+duration+"(ms)");
            }
        } catch (ClientServicesException e) {
View Full Code Here

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

  public Community createTestCommunity() throws ClientServicesException {
    if (communityService==null){
      communityService = new CommunityService();
    }

    Community community = new Community(communityService, "");
    community.setTitle("JavaTestCommunity " + System.currentTimeMillis());
    community.setContent("Java Community Content");
    String type = "public";
    if (TestEnvironment.isSmartCloudEnvironment()) {
      type = "private";
    }
    community.setCommunityType(type);
    community = community.save();
    community = community.load();
    return community;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.