code: public Map<String, Object> getDocument(String collectionName, String docId) {
          Map<String, Map<String,Object>> docs = DDPStateSingleton.getInstance()
                  .getCollection(collectionName);
          if (docs != null) {
              return docs.get(docId);
          }
          return null;
      }
docs: Gets a document out of a collection
  @param collectionName collection name
  @param docId document ID
  @return null if not found or a collection of the document's fields