/**
 * A CCNx library test.
 *
 * Copyright (C) 2008, 2009 Palo Alto Research Center, Inc.
 *
 * This work is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License version 2 as published by the
 * Free Software Foundation. 
 * This work is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details. You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

package org.ccnx.ccn.test;

import java.io.File;
import java.util.ArrayList;

import org.ccnx.ccn.CCNHandle;
import org.ccnx.ccn.impl.repo.Policy;
import org.ccnx.ccn.impl.repo.RepositoryException;
import org.ccnx.ccn.impl.repo.RepositoryInfo;
import org.ccnx.ccn.impl.repo.RepositoryStoreBase;
import org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse;
import org.ccnx.ccn.protocol.ContentName;
import org.ccnx.ccn.protocol.ContentObject;
import org.ccnx.ccn.protocol.Interest;
import org.ccnx.ccn.protocol.MalformedContentNameStringException;

/**
 * Test repository backend. Should not be used in production code.
 */
public class BitBucketRepository extends RepositoryStoreBase {
	
	public boolean checkPolicyUpdate(ContentObject co)
			throws RepositoryException {
		// TODO Auto-generated method stub
		return false;
	}

	public ContentObject getContent(Interest interest)
			throws RepositoryException {
		// TODO Auto-generated method stub
		return null;
	}

	public NameEnumerationResponse getNamesWithPrefix(Interest i, ContentName responseName) {
		// TODO Auto-generated method stub
		return null;
	}

	public byte[] getRepoInfo(ArrayList<ContentName> names) {
		try {
			return (new RepositoryInfo("1.0", "/parc.com/csl/ccn/Repos", "Repository")).encode();
		} catch (Exception e) {}
		return null;
	}

	public static String getUsage() {
		// TODO Auto-generated method stub
		return null;
	}

	public void initialize(String repositoryRoot, 
							File policyFile, String localName, 
							String globalPrefix,
							String nameSpace, CCNHandle handle) throws RepositoryException {
		// TODO Auto-generated method stub
	}

	public NameEnumerationResponse saveContent(ContentObject content) throws RepositoryException {
		// TODO Auto-generated method stub
		return null;
	}

	public void setPolicy(Policy policy) {
	}
	
	public ArrayList<ContentName> getNamespace() {
		ArrayList<ContentName> al = new ArrayList<ContentName>();
		try {
			al.add(ContentName.fromNative("/"));
		} catch (MalformedContentNameStringException e) {}
		return al;
	}

	public boolean diagnostic(String name) {
		// No supported diagnostics
		return false;
	}

	public void shutDown() {
		// TODO Auto-generated method stub
		
	}

	public Policy getPolicy() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getVersion() {
		// TODO Auto-generated method stub
		return null;
	}

	public Object getStatus(String type) {
		// TODO Auto-generated method stub
		return null;
	}
}

@@ -2092,45 +2092,8 @@
 ) %7B%0A
-%09%09// TODO Auto-generated method stub%0A
 %09%09re
@@ -2304,42 +2304,73 @@
 %7B%0A%09%09
-// TODO Auto-generated method stub
+%0A%09%09// Doesn't create a _handle -- no handle for this repository. 
 %0A%09%7D%0A
@@ -2470,45 +2470,8 @@
 n %7B%0A
-%09%09// TODO Auto-generated method stub%0A
 %09%09re
@@ -2877,118 +2877,43 @@
 () %7B
-%0A%09%09// TODO Auto-generated method stub%0A%09%09%0A%09%7D%0A%0A%09public Policy getPolicy() %7B%0A%09%09// TODO Auto-generated method stub
+%09%09%0A%09%7D%0A%0A%09public Policy getPolicy() %7B
 %0A%09%09r
@@ -2973,45 +2973,8 @@
 ) %7B%0A
-%09%09// TODO Auto-generated method stub%0A
 %09%09re
@@ -3032,45 +3032,8 @@
 ) %7B%0A
-%09%09// TODO Auto-generated method stub%0A
 %09%09re

Clean up comments.