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

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


     
      // 1) Check authentication
     
      String sourceKey = null;
      ObjectId sourceId = null;
      SourcePojo source = null;
      BasicDBObject query = new BasicDBObject();
        // (already authenticated by this point)
     
      try {
        sourceId = new ObjectId(sourceKeyOrId);
        query.put(SourcePojo._id_, sourceId);
        source = SourcePojo.fromDb(
            MongoDbManager.getIngest().getSource().findOne(query),
            SourcePojo.class);
      }
      catch (Exception e) {
        // it's a job name
        sourceKey = sourceKeyOrId;
        query.put(SourcePojo.key_, sourceKey);
        source = SourcePojo.fromDb(
            MongoDbManager.getIngest().getSource().findOne(query),
            SourcePojo.class);
      }
      if (null == source) {
        throw new RuntimeException("Authentication failure or no matching source");
      }
      sourceKey = source.getKey();
      sourceId = source.getId();
     
      DBCollection cacheCollection = DbManager.getDocument().getMetadata();
     
      // 2) Do we already have this cache?
     
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.store.config.source.SourcePojo

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.