/**
 * Copyright 2010 JBoss Inc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
/*
 * Copyright 2005 JBoss Inc
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.drools.guvnor.server.repository;

import java.util.Properties;

import javax.jcr.LoginException;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.Workspace;

import org.drools.repository.JCRRepositoryConfigurator;
import org.drools.repository.RulesRepositoryException;

public class MockRepositoryConfigurator extends JCRRepositoryConfigurator {

    
    @Override
    public Repository getJCRRepository(Properties properties) {
    	if (repository==null) {
    		repository = new MockRepo();
    	}
        return repository;
    }

    public void setupRulesRepository(Session session) throws RulesRepositoryException {
        
    }

	@Override
	public void registerNodeTypesFromCndFile(String cndFileName,
			Session session, Workspace workspace) throws RepositoryException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void shutdown() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Session login(String userName) throws RepositoryException {
		// TODO Auto-generated method stub
		return null;
	}
    
}

@@ -1610,17 +1610,16 @@
 rator %7B%0A
-%0A
     %0A   
@@ -1716,10 +1716,12 @@
 tory
+ 
 ==
+ 
 null
@@ -1804,112 +1804,8 @@
  %7D%0A%0A
-    public void setupRulesRepository(Session session) throws RulesRepositoryException %7B%0A        %0A    %7D%0A%0A
 %09@Ov
@@ -1876,12 +1876,9 @@
 ame,
-%0A%09%09%09
+ 
 Sess
@@ -1910,16 +1910,28 @@
 rkspace)
+%0A           
  throws 
@@ -1961,42 +1961,18 @@
 %09// 
-TODO Auto-generated method stub%0A%09%09
+Do nothing
 %0A%09%7D%0A
@@ -2018,42 +2018,18 @@
 %09// 
-TODO Auto-generated method stub%0A%09%09
+Do nothing
 %0A%09%7D%0A
@@ -2117,39 +2117,18 @@
 %09// 
-TODO Auto-generated method stub
+Do nothing
 %0A%09%09r

clean up mock configurator code