Package com.ikanow.infinit.e.data_model.store.config.source

Examples of com.ikanow.infinit.e.data_model.store.config.source.SourcePojo.toDb()


      DBObject dbo = (BasicDBObject)DbManager.getIngest().getSource().findOne(query);
      SourcePojo sp = SourcePojo.fromDb(dbo,SourcePojo.class);
      sp.setApproved(true);

      DbManager.getIngest().getSource().update(query, (DBObject) sp.toDb());
      rp.setData(sp, new SourcePojoApiMap(null, communityIdSet, null));
      rp.setResponse(new ResponseObject("Approve Source",true,"Source approved successfully"));
     
      // Send email notification to the person who submitted the source
      emailSourceApproval(sp, submitterId, "Approved");
View Full Code Here


     
      // Case 1: is currently active, set to inactive
     
      if (sp.isApproved()) {
        sp.setApproved(false);
        DbManager.getIngest().getSource().update(query, (DBObject) sp.toDb());
        rp.setResponse(new ResponseObject("Decline Source",true,"Source set to unapproved, use config/source/delete to remove it"));
      }
     
      // Case 2: is currently inactive, has been active
     
View Full Code Here

            GenericProcessingController.recreateCommunityDocIndex_unknownFields(id, false);
          }
        }
        //TESTED (cut and paste from saveSource)
       
        DbManager.getIngest().getSource().save(newSource.toDb());
        String awaitingApproval = (isApproved) ? "" : " Awaiting approval by the community owner or moderators.";
       
        if (isUniqueSource(newSource, Arrays.asList(new ObjectId(communityIdStr))))
        {       
          rp.setResponse(new ResponseObject("Source", true, "New source added successfully." +
View Full Code Here

              GenericProcessingController.recreateCommunityDocIndex_unknownFields(id, false);
            }
          }
          //TESTED
         
          DbManager.getIngest().getSource().save(source.toDb());
          if (isUniqueSource(source, communityIdSet))
          {
            rp.setResponse(new ResponseObject("Source", true, "New source added successfully."));
          }
          else { // Still allow people to add identical sources, but warn them so they can delete it if they way
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.