Package com.ikanow.infinit.e.data_model.store.social.community

Examples of com.ikanow.infinit.e.data_model.store.social.community.CommunityPojo


  {
    //
    BasicDBObject query = new BasicDBObject();
    query.put("_id", id);
   
    CommunityPojo community = null;
    try
    {
      DBObject dbo = DbManager.getSocial().getCommunity().findOne(query);

      if (dbo != null)
View Full Code Here


        // OK from here on, personId is the object Id...
               
        boolean bAuthorized = isSysAdmin || SocialUtils.isOwnerOrModerator(communityIdStr, callerIdStr);
        if (bAuthorized) {
         
          CommunityPojo cp = CommunityPojo.fromDb(dbo,CommunityPojo.class);
          ObjectId personId = new ObjectId(personIdStr);
         
          if ( cp.isOwner(personId) && !userStatus.equalsIgnoreCase("active")) {           
            rp.setResponse(new ResponseObject("Update member status",false,"Can't change owner status, remove their ownership first"));
            return rp;
          }//TESTED (tried as owner+admin (failed both times), tested owner works fine if setting/keeping active)
          else if ( cp.isMember(personId) )
          {
            // Remove user:
            if (userStatus.equalsIgnoreCase("remove"))
            {
              //removeCommunityMember(callerIdStr, communityIdStr, personIdStr);
              rp = removeCommunityMember(callerIdStr, communityIdStr, personIdStr); //.setResponse(new ResponseObject("Update member status",true,"Member removed from community."));
            }
            else
            {
              //verified user, update status
              if ( cp.updateMemberStatus(personIdStr, userStatus) )
              {
                /////////////////////////////////////////////////////////////////////////////////////////////////
                // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                // Caleb: this means change update to $set
                /////////////////////////////////////////////////////////////////////////////////////////////////
                DbManager.getSocial().getCommunity().update(query, cp.toDb());
                rp.setResponse(new ResponseObject("Update member status",true,"Updated member status successfully"));
              }
              else
              {
                rp.setResponse(new ResponseObject("Update member status",false,"Failed to update status"));
View Full Code Here

        else {
          personIdStr = dboPerson.getString("_id");
        }
        // OK from here on, personId is the object Id...

        CommunityPojo cp = CommunityPojo.fromDb(dbo,CommunityPojo.class);
       
        boolean bOwnershipChangeRequested = userType.equalsIgnoreCase("owner");
        boolean bAuthorized = isSysAdmin;
        if (!bAuthorized) {
          if (bOwnershipChangeRequested) { // must be owner or admin       
            bAuthorized = cp.isOwner(new ObjectId(callerIdStr));
          }//TESTED - tried to update myself as moderator to owner (failed), gave up my community (succeeded), changed ownership as admin (FAILED)
          else { // Can also be moderator
            bAuthorized = SocialUtils.isOwnerOrModerator(communityIdStr, callerIdStr);         
          }//TESTED - tried to update my role as member (failed), as admin->moderator (succeeded), as moderator (succeeded)
        }
       
        if (bAuthorized) // (see above)
        {
          if ( cp.isMember(new ObjectId(personIdStr)))
          {
            boolean bChangedMembership = false;
            boolean bChangedOwnership = !bOwnershipChangeRequested;
           
            ObjectId personId = new ObjectId(personIdStr);
           
            // Check that not trying to downgrade owner...
            if (cp.isOwner(personId) && !bOwnershipChangeRequested) {
              rp.setResponse(new ResponseObject("Update member type",false,"To change ownership, set new owner, will automatically downgrade existing owner to moderator"));
              return rp;
            }//TESTED
           
            String personDisplayName = null;
            //verified user, update status
            for ( CommunityMemberPojo cmp : cp.getMembers())
            {
              if ( cmp.get_id().equals(personId) )
              {
                cmp.setUserType(userType)
                personDisplayName = cmp.getDisplayName();
                bChangedMembership = true;
               
                if (bChangedOwnership) { // (includes case where didn't need to)
                  break;
                }
               
              }//TESTED
              if (bOwnershipChangeRequested && cmp.get_id().equals(cp.getOwnerId())) {
                cmp.setUserType("moderator");
                bChangedOwnership = true;
               
                if (bChangedMembership) {
                  break;
                }
               
              }//TESTED
            }
            if (bChangedMembership) {
              if (bOwnershipChangeRequested) {
                cp.setOwnerId(personId);
                cp.setOwnerDisplayName(personDisplayName);
              }//TESTED
             
              /////////////////////////////////////////////////////////////////////////////////////////////////
              // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
              // Caleb: this means change update to $set
              /////////////////////////////////////////////////////////////////////////////////////////////////
              DbManager.getSocial().getCommunity().update(query, cp.toDb());
              rp.setResponse(new ResponseObject("Update member type",true,"Updated member type successfully"));
            }//TESTED                 
          }
          else
          {
View Full Code Here

      communityIdStr = allowCommunityRegex(personIdStr, communityIdStr);
      BasicDBObject query = new BasicDBObject("_id",new ObjectId(communityIdStr));
      DBObject dboComm = DbManager.getSocial().getCommunity().findOne(query);
      if ( dboComm != null )
      {
        CommunityPojo cp = CommunityPojo.fromDb(dboComm, CommunityPojo.class);
        if ( !cp.getIsPersonalCommunity() )
        {
          BasicDBObject queryPerson = new BasicDBObject("_id",new ObjectId(personIdStr));
          DBObject dboPerson = DbManager.getSocial().getPerson().findOne(queryPerson);
          PersonPojo pp = PersonPojo.fromDb(dboPerson,PersonPojo.class);
          boolean isPending = isMemberPending(cp, pp);
         
          if ( !cp.isMember(new ObjectId(personIdStr)) || isPending )
          {
            Map<String,CommunityAttributePojo> commatt = cp.getCommunityAttributes();
            if ( isSysAdmin || (commatt.containsKey("usersCanSelfRegister") && commatt.get("usersCanSelfRegister").getValue().equals("true") ))
            {   
              boolean requiresApproval = false;
              if ( !isSysAdmin && commatt.containsKey("registrationRequiresApproval") )
                requiresApproval = commatt.get("registrationRequiresApproval").getValue().equals("true");
              //if approval is required, add user to comm, wait for owner to approve
              //otherwise go ahead and add as a member
              if ( requiresApproval )
              {
                cp.addMember(pp,true);
                //write both objects back to db now
                /////////////////////////////////////////////////////////////////////////////////////////////////
                // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                // Caleb: this means change update to $set
                /////////////////////////////////////////////////////////////////////////////////////////////////
                DbManager.getSocial().getCommunity().update(query, cp.toDb());
                             
                //send email out to owner for approval
                CommunityApprovePojo cap = cp.createCommunityApprove(personIdStr,communityIdStr,"join",personIdStr);
                DbManager.getSocial().getCommunityApprove().insert(cap.toDb());
               
                // Get to addresses for Owner and Moderators
                String toAddresses = getToAddressesFromCommunity(cp);
               
                PropertiesManager propManager = new PropertiesManager();
                String rootUrl = propManager.getUrlRoot();
               
                String subject = pp.getDisplayName() + " is trying to join infinit.e community: " + cp.getName();
                String body = pp.getDisplayName() + " is trying to join infinit.e community: " + cp.getName() + "<br/>Do you want to accept this request?" +
                "<br/><a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/true\">Accept</a> " +
                "<a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/false\">Deny</a>";
               
                SendMail mail = new SendMail(new PropertiesManager().getAdminEmailAddress(), toAddresses, subject, body);
               
                if (mail.send("text/html"))
                {
                  rp.setResponse(new ResponseObject("Join Community",true,"Joined community successfully, awaiting owner approval"));
                  rp.setData(new CommunityApprovalPojo(false));
                }
                else
                {
                  rp.setResponse(new ResponseObject("Join Community",false,"The system was uable to send an email to the owner"));               
                }
              }
              else
              {
                cp.addMember(pp);
                pp.addCommunity(cp);
                //write both objects back to db now
                /////////////////////////////////////////////////////////////////////////////////////////////////
                // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                // Caleb: this means change update to $set
                /////////////////////////////////////////////////////////////////////////////////////////////////
                DbManager.getSocial().getCommunity().update(query, cp.toDb());
                DbManager.getSocial().getPerson().update(queryPerson, pp.toDb());
                rp.setResponse(new ResponseObject("Join Community",true,"Joined community successfully"));
                rp.setData(new CommunityApprovalPojo(true));
              }           
            }
View Full Code Here

      communityIdStr = allowCommunityRegex(personIdStr, communityIdStr);
      BasicDBObject query = new BasicDBObject("_id",new ObjectId(communityIdStr));
      DBObject dboComm = DbManager.getSocial().getCommunity().findOne(query);
      if ( dboComm != null )
      {
        CommunityPojo cp = CommunityPojo.fromDb(dboComm, CommunityPojo.class);
        if ( !cp.getIsPersonalCommunity())
        {
          BasicDBObject queryPerson = new BasicDBObject("_id",new ObjectId(personIdStr));
          DBObject dboPerson = DbManager.getSocial().getPerson().findOne(queryPerson);
          PersonPojo pp = PersonPojo.fromDb(dboPerson,PersonPojo.class);
          cp.removeMember(new ObjectId(personIdStr));
          pp.removeCommunity(cp);         
          //write both objects back to db now
          /////////////////////////////////////////////////////////////////////////////////////////////////
          // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
          // Caleb: this means change update to $set
          /////////////////////////////////////////////////////////////////////////////////////////////////
          DbManager.getSocial().getCommunity().update(query, cp.toDb());
          DbManager.getSocial().getPerson().update(queryPerson, pp.toDb());
          rp.setResponse(new ResponseObject("Leave Community",true,"Left community successfully"));
        }
        else
        {
View Full Code Here

      BasicDBObject query = new BasicDBObject("_id",new ObjectId(communityIdStr));
      DBObject dboComm = DbManager.getSocial().getCommunity().findOne(query);
     
      if ( dboComm != null )
      {
        CommunityPojo cp = CommunityPojo.fromDb(dboComm, CommunityPojo.class);
       
        // Make sure this isn't a personal community
        if ( !cp.getIsPersonalCommunity() )
        {
          // Check to see if the user has permissions to invite or selfregister
          boolean selfRegister = canSelfRegister(cp);
          if ( canInvite || cp.getOwnerId().toString().equalsIgnoreCase(userIdStr) || selfRegister )
          {
            BasicDBObject dboPerson = (BasicDBObject) DbManager.getSocial().getPerson().findOne(new BasicDBObject("email", personIdStr));
            if (null == dboPerson) { // (ie personId isn't an email address... convert to ObjectId and try again)
              dboPerson = (BasicDBObject) DbManager.getSocial().getPerson().findOne(new BasicDBObject("_id", new ObjectId(personIdStr)));
            }
            else {
              personIdStr = dboPerson.getString("_id");
            }
            // OK from here on, personId is the object Id...
           
            if ( dboPerson != null )
            {
              PersonPojo pp = PersonPojo.fromDb(dboPerson,PersonPojo.class);             
              //need to check for if a person is pending, and skipInvite and isSysAdmin, otherwise
              //they would just get sent an email again, so leave it be
              boolean isPending = false;
              if ( isSysAdmin && skipInvite )
              {
                isPending = isMemberPending(cp, pp);
              }
             
              if ( selfRegister )
              {
                //If the comm allows for self registering, just call join community
                //instead of invite, it will handle registration
                return this.joinCommunity(pp.get_id().toString(), communityIdStr, isSysAdmin);
              }
              else if ( !cp.isMember(pp.get_id()) || isPending )
              {
                if (isSysAdmin && skipInvite) // Can only skip invite if user is Admin
                {
                  // Update community with new member
                  cp.addMember(pp, false); // Member status set to Active
                  cp.setNumberOfMembers(cp.getNumberOfMembers() + 1); // Increment number of members
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                  // Caleb: this means change update to $set
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  DbManager.getSocial().getCommunity().update(query, cp.toDb());
                 
                  // Add community to persons object and save to db
                  pp.addCommunity(cp);
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                  // Caleb: this means change update to $set
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  DbManager.getSocial().getPerson().update(new BasicDBObject("_id", pp.get_id()), pp.toDb());
                 
                  rp.setResponse(new ResponseObject("Invite Community",true,"User added to community successfully."));
                }
                else
                {
                  cp.addMember(pp, true); // Member status set to Pending
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                  // Caleb: this means change update to $set
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  DbManager.getSocial().getCommunity().update(query, cp.toDb());
                 
                  //send email out inviting user
                  CommunityApprovePojo cap = cp.createCommunityApprove(personIdStr,communityIdStr,"invite",userIdStr);
                  DbManager.getSocial().getCommunityApprove().insert(cap.toDb());
                 
                  PropertiesManager propManager = new PropertiesManager();
                  String rootUrl = propManager.getUrlRoot();
                 
                  if (null == rootUrl) {
                    rp.setResponse(new ResponseObject("Invite Community",false,"The system was unable to email the invite because an invite was required and root.url is not set up."));
                    return rp;
                  }
                 
                  String subject = "Invite to join infinit.e community: " + cp.getName();
                  String body = "You have been invited to join the community " + cp.getName() +
                    "<br/><a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/true\">Accept</a> " +
                    "<a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/false\">Deny</a>";
                 
                  SendMail mail = new SendMail(new PropertiesManager().getAdminEmailAddress(), pp.getEmail(), subject, body);
                 
View Full Code Here

            DBObject dboperson = DbManager.getSocial().getPerson().findOne(queryPerson);
            PersonPojo pp = PersonPojo.fromDb(dboperson, PersonPojo.class);
           
            if ( dboComm != null )
            {
              CommunityPojo cp = CommunityPojo.fromDb(dboComm, CommunityPojo.class);
              boolean isStillPending = isMemberPending(cp, pp);
              //make sure the user is still waiting to join the community, otherwise remove this request and return
              if ( isStillPending )
              {
                if ( resp.equals("false"))
                {
                  //if response is false (deny), always just remove user from community             
                  cp.removeMember(new ObjectId(cap.getPersonId()));
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                  // Caleb: this means change update to $set
                  /////////////////////////////////////////////////////////////////////////////////////////////////
                  DbManager.getSocial().getCommunity().update(query, cp.toDb());
                }
                else
                {
                  //if response is true (allow), always just add community info to user, and change status to active
                 
                  if ( dboperson != null)
                  {
                    cp.updateMemberStatus(cap.getPersonId(), "active");
                    cp.setNumberOfMembers(cp.getNumberOfMembers()+1);
                    /////////////////////////////////////////////////////////////////////////////////////////////////
                    // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                    // Caleb: this means change update to $set
                    /////////////////////////////////////////////////////////////////////////////////////////////////
                    DbManager.getSocial().getCommunity().update(query, cp.toDb());
                    pp.addCommunity(cp);
                    /////////////////////////////////////////////////////////////////////////////////////////////////
                    // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
                    // Caleb: this means change update to $set
                    /////////////////////////////////////////////////////////////////////////////////////////////////
View Full Code Here

      return rp;
    }
   
    /////////////////////////////////////////////////////////////////////////////////////////////////
    // Attempt to parse the JSON passed in to a CommunityPojo
    CommunityPojo updateCommunity = null;
    try
    {
      updateCommunity = ApiManager.mapFromApi(json, CommunityPojo.class, new CommunityPojoApiMap());
    }
    catch (Exception ex)
    {
      rp.setResponse(new ResponseObject("Update Community",false,"Update json is badly formatted, could not deserialize."));
      return rp;
    }
   
    try
    {
      // Retrieve community we are trying to update from the database
      BasicDBObject query = new BasicDBObject("_id", new ObjectId(communityIdStr));
      DBObject dbo = DbManager.getSocial().getCommunity().findOne(query);
      String originalName = null;
     
      if ( dbo != null )
      {
       
        CommunityPojo cp = CommunityPojo.fromDb(dbo, CommunityPojo.class);
       
        if (null == cp) {
          rp.setResponse(new ResponseObject("Update Community",false,"Community to update does not exist"));
          return rp;
        }
        // Here are the fields you are allowed to change:
        // name:
        if (null != updateCommunity.getName())
        {
          // If you're changing name then ensure it's unique for consistency
          //TODO (INF-1214): see addCommunity, this is currently something of a security hole
          BasicDBObject nameCheck = new BasicDBObject("name", updateCommunity.getName());
          nameCheck.put("_id", new BasicDBObject(MongoDbManager.ne_, cp.getId()));
          if (null != MongoDbManager.getSocial().getCommunity().findOne(nameCheck)) {
            rp.setResponse(new ResponseObject("Update Community",false,"Can't change name to an existing community"));
            return rp;           
          }//TESTED (tested changing names of existing community works...)   
          originalName = cp.getName();
          cp.setName(updateCommunity.getName());
        }
        if (null != updateCommunity.getDescription()) {
          cp.setDescription(updateCommunity.getDescription());         
        }
        if (null != updateCommunity.getTags()) {
          cp.setTags(updateCommunity.getTags());         
        }
        if ((null != updateCommunity.getCommunityAttributes() && !updateCommunity.getCommunityAttributes().isEmpty()))
        {
          cp.setCommunityAttributes(updateCommunity.getCommunityAttributes());         
        }
        if ((null != updateCommunity.getCommunityUserAttribute() && !updateCommunity.getCommunityUserAttribute().isEmpty()))
        {
          cp.setCommunityUserAttribute(updateCommunity.getCommunityUserAttribute());         
        }
        // Change owner: not allowed here, use community/update/status
        if ((null != updateCommunity.getOwnerId()) && !updateCommunity.getOwnerId().equals(cp.getOwnerId()))
        {
          rp.setResponse(new ResponseObject("Update Community",false,"Use community/update/status to change ownership"));
          return rp;
        }//TESTED
               
        DbManager.getSocial().getCommunity().update(query, cp.toDb());
               
        // Community name has changed, member records need to be updated to reflect the name change
        if (originalName != null)
        {
          DBObject query_person = new BasicDBObject("communities.name", originalName);
View Full Code Here

        DBObject dbo = DbManager.getSocial().getCommunity().findOne(query);

        if (dbo != null)
        {
          // Get GsonBuilder object with MongoDb de/serializers registered
          CommunityPojo community = CommunityPojo.fromDb(dbo, CommunityPojo.class);

          // Get the list of existing members, check to see if user is already
          // a member of the community, make sure CommunityMember obj isn't null/empty
          Boolean alreadyMember = false;       
          Set<CommunityMemberPojo> cmps = null;
          if (community.getMembers() != null)
          {
            cmps = community.getMembers();
            for (CommunityMemberPojo c : cmps)
            {
              if (c.get_id().toStringMongod().equals(personIdStr)) alreadyMember = true;
            }
          }
          else
          {
            cmps = new HashSet<CommunityMemberPojo>();
            community.setMembers(cmps);
          }

          if (!alreadyMember)
          {
            // Note: This changes community owner
            if (userType.equals("owner"))
            {
              community.setOwnerId(new ObjectId(personIdStr));
              community.setOwnerDisplayName(displayName);
            }

            // Create the new member object
            CommunityMemberPojo cmp = new CommunityMemberPojo();
            cmp.set_id(new ObjectId(personIdStr));
            cmp.setEmail(email);
            cmp.setDisplayName(displayName);
            cmp.setUserStatus(userStatus);
            cmp.setUserType(userType);

            // Set the userAttributes based on default
            Set<CommunityMemberUserAttributePojo> cmua = new HashSet<CommunityMemberUserAttributePojo>();
            Map<String,CommunityUserAttributePojo> cua = community.getCommunityUserAttribute();

            Iterator<Map.Entry<String,CommunityUserAttributePojo>> it = cua.entrySet().iterator();
            while (it.hasNext())
            {
              CommunityMemberUserAttributePojo c = new CommunityMemberUserAttributePojo();
              Map.Entry<String,CommunityUserAttributePojo> pair = it.next();
              c.setType(pair.getKey().toString());
              CommunityUserAttributePojo v = (CommunityUserAttributePojo)pair.getValue();
              c.setValue(v.getDefaultValue());
              cmua.add(c);
            }
            cmp.setUserAttributes(cmua);

            // Get Person data to added to member record
            BasicDBObject query2 = new BasicDBObject();
            query2.put("_id", new ObjectId(personIdStr));
            DBObject dbo2 = DbManager.getSocial().getPerson().findOne(query2);
            PersonPojo p = PersonPojo.fromDb(dbo2, PersonPojo.class);

            if (p.getContacts() != null)
            {
              // Set contacts from person record
              Set<CommunityMemberContactPojo> contacts = new HashSet<CommunityMemberContactPojo>();
              Map<String, PersonContactPojo> pcp = p.getContacts();
              Iterator<Map.Entry<String, PersonContactPojo>> it2 = pcp.entrySet().iterator();
              while (it2.hasNext())
              {
                CommunityMemberContactPojo c = new CommunityMemberContactPojo();
                Map.Entry<String, PersonContactPojo> pair = it2.next();
                c.setType(pair.getKey().toString());
                PersonContactPojo v = (PersonContactPojo)pair.getValue();
                c.setValue(v.getValue());
                contacts.add(c);
              }
              cmp.setContacts(contacts);
            }

            // Set links from person record
            if (p.getLinks() != null)
            {
              // Set contacts from person record
              Set<CommunityMemberLinkPojo> links = new HashSet<CommunityMemberLinkPojo>();
              Map<String, PersonLinkPojo> plp = p.getLinks();
              Iterator<Map.Entry<String, PersonLinkPojo>> it3 = plp.entrySet().iterator();
              while (it.hasNext())
              {
                CommunityMemberLinkPojo c = new CommunityMemberLinkPojo();
                Map.Entry<String, PersonLinkPojo> pair = it3.next();
                c.setTitle(pair.getKey().toString());
                PersonLinkPojo v = (PersonLinkPojo)pair.getValue();
                c.setUrl(v.getUrl());
                links.add(c);
              }
              cmp.setLinks(links);
            }

            // Add new member object to the set
            cmps.add(cmp);

            // Increment number of members by 1
            community.setNumberOfMembers(community.getNumberOfMembers() + 1);

            /////////////////////////////////////////////////////////////////////////////////////////////////
            // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
            // Caleb: this means change update to $set
            /////////////////////////////////////////////////////////////////////////////////////////////////
            DbManager.getSocial().getCommunity().update(query, community.toDb());

            PersonHandler person = new PersonHandler();
            person.addCommunity(personIdStr, communityIdStr, communityName);

            rp.setData(community, new CommunityPojoApiMap());
View Full Code Here

        DBObject dbo = DbManager.getSocial().getCommunity().findOne(query);

        if (dbo != null)
        {
          // Get GsonBuilder object with MongoDb de/serializers registered
          CommunityPojo community = CommunityPojo.fromDb(dbo, CommunityPojo.class);

          Boolean isMember = false;

          Set<CommunityMemberPojo> cmps = null;
          CommunityMemberPojo cmp = null;
          if (community.getMembers() != null)
          {
            cmps = community.getMembers();
            for (CommunityMemberPojo c : cmps)
            {
              if (c.get_id().toStringMongod().equals(personIdStr))
              {
                cmp = c;
                isMember = true;
              }
            }
          }

          if (isMember)
          {
            cmps.remove(cmp);

            community.setNumberOfMembers(community.getNumberOfMembers() - 1);

            /////////////////////////////////////////////////////////////////////////////////////////////////
            // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
            // Caleb: this means change update to $set
            /////////////////////////////////////////////////////////////////////////////////////////////////         
            DbManager.getSocial().getCommunity().update(query, community.toDb());

            PersonHandler person = new PersonHandler();
            person.removeCommunity(personIdStr, communityIdStr);

            rp.setData(community, new CommunityPojoApiMap());
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.store.social.community.CommunityPojo

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.