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

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


                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
                /////////////////////////////////////////////////////////////////////////////////////////////////
View Full Code Here


                  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
View Full Code Here

              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
                  /////////////////////////////////////////////////////////////////////////////////////////////////
View Full Code Here

                 
                  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());
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.