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

Examples of com.ikanow.infinit.e.data_model.api.social.community.CommunityApprovalPojo


                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));
              }           
            }
            else
            {
              rp.setResponse(new ResponseObject("Join Community",false,"You must be invited to this community"));
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.api.social.community.CommunityApprovalPojo

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.