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

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


              if ((null == cp.getCommunityStatus()) || !cp.getCommunityStatus().equalsIgnoreCase("active")) {
                return new ResponsePojo(new ResponseObject("Add Community", false, "Can't create sub-community of inactive community"));             
              }//TESTED
              // Check attributes
              if (null != cp.getCommunityAttributes()) {
                CommunityAttributePojo attr = cp .getCommunityAttributes().get("usersCanCreateSubCommunities");
                if ((null == attr) || (null== attr.getValue()) || (attr.getValue().equals("false"))) {
                  if (!cp.isOwner(person.get_id()) && !SocialUtils.isModerator(userIdStr, cp) && !RESTTools.adminLookup(userIdStr)) {
                    return new ResponsePojo(new ResponseObject("Add Community", false, "Can't create sub-community when not permitted by parent"));
                  }//TESTED (owner+admin+mod)
                }
              }           
View Full Code Here


      selfCommunity.setDescription(person.getDisplayName() + "'s Personal Community");
      selfCommunity.setCreated(new Date());
      selfCommunity.setModified(new Date());
      selfCommunity.setIsPersonalCommunity(true);   
      Map<String,CommunityAttributePojo> commAttributes = new HashMap<String,CommunityAttributePojo>();
      commAttributes.put("isPublic", new CommunityAttributePojo("boolean","false") );
      commAttributes.put("usersCanSelfRegister", new CommunityAttributePojo("boolean","false") );
      commAttributes.put("registrationRequiresApproval", new CommunityAttributePojo("boolean","false") );
      commAttributes.put("usersCanCreateSubCommunities", new CommunityAttributePojo("boolean","false") );
      selfCommunity.setCommunityAttributes(commAttributes);
      Map<String,CommunityUserAttributePojo> commUserAttributes = new HashMap<String,CommunityUserAttributePojo>();
      commUserAttributes.put("publishLoginToActivityFeed", new CommunityUserAttributePojo("boolean","true",true));
      commUserAttributes.put("publishCommentsToActivityFeed", new CommunityUserAttributePojo("boolean","true",true));
      commUserAttributes.put("publishSharingToActivityFeed", new CommunityUserAttributePojo("boolean","true",true));
View Full Code Here

   * @return Map<String, CommunityAttributePojo
   */
  private Map<String, CommunityAttributePojo> getDefaultCommunityAttributes()
  {
    Map<String, CommunityAttributePojo> c = new HashMap<String, CommunityAttributePojo>();
    CommunityAttributePojo v = new CommunityAttributePojo()
    v.setType("Boolean");
    v.setValue("false");
    c.put("isPublic", v);
    v = new CommunityAttributePojo();
    v.setType("Boolean");
    v.setValue("true");
    c.put("usersCanSelfRegister", v);
    v = new CommunityAttributePojo();
    v.setType("Boolean");
    v.setValue("true");
    c.put("registrationRequiresApproval", v);
    v = new CommunityAttributePojo();
    v.setType("Boolean");
    v.setValue("false");
    c.put("usersCanCreateSubCommunities", v);
    return c;
  }
View Full Code Here

TOP

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

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.