private int handleExportCollection(Collection source, Collection target) {
		MongoClient sourceClient = null;
		MongoClient targetClient = null;
		try {
			sourceClient = MongoUtils.getMongoClient(source.getDatabase().getHost());
			targetClient = MongoUtils.getMongoClient(target.getDatabase().getHost());
			String targetCollectionName = target.getName();
			if (tgtCreateNewCollection.isSelected()) {
				targetCollectionName = tgtNewCollection.getText();
				if (targetCollectionName == null || targetCollectionName.isEmpty()) {
					UIUtils.error(this, "Please enter the new collection name");
					return (-1);
				}
 			}
			DBCursor cursor = sourceClient.getDB(source.getDatabase().getName()).getCollection(source.getName()).find();
			int count = 0;
			while (cursor.hasNext()) {
				targetClient.getDB(target.getDatabase().getName()).getCollection(targetCollectionName).insert(cursor.next());
				count++;
			}
			return (count);
		} catch (Exception e) {
			new ErrorDialog(this, e);
			return (-1);
		} finally {
			if (sourceClient != null) {
				sourceClient.close();
			}
			if (targetClient != null) {
				targetClient.close();
			}
		}
	}