<commit_before>/*
   Copyright 2012  Knowledge Media Institute - The Open University

   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 uk.ac.open.kmi.iserve.sal.manager;

import java.io.InputStream;
import java.net.URI;
import java.util.List;

import uk.ac.open.kmi.iserve.sal.exception.DocumentException;

/**
 * Class Description
 * 
 * @author <NAME> (Knowledge Media Institute - The Open University)
 */
public interface DocumentManager {

	public abstract List<URI> listDocuments();
	
	public abstract List<URI> listDocumentsForService(String serviceId);
	
	public abstract List<URI> listDocumentsForService(URI serviceURI);

	public abstract String getDocument(URI documentUri)
			throws DocumentException;
	
	public abstract URI addDocument(String fileName,
			String documentContent, String serviceId) throws DocumentException;
	
	public abstract URI addDocument(String fileName,
			InputStream docContent, URI serviceUri) throws DocumentException;

	public abstract URI deleteDocument(URI documentUri)
			throws DocumentException;

	public abstract URI deleteDocumentById(String documentId)
			throws DocumentException;

	public abstract boolean documentExists(String serviceId, String fileName)
			throws DocumentException;
<commit_msg>Reordered methods to follow CRUD. No actual changes<commit_after>/*
   Copyright 2012  Knowledge Media Institute - The Open University

   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 uk.ac.open.kmi.iserve.sal.manager;

import java.io.InputStream;
import java.net.URI;
import java.util.List;

import uk.ac.open.kmi.iserve.sal.exception.DocumentException;

/**
 * Class Description
 * 
 * @author <NAME> (Knowledge Media Institute - The Open University)
 */
public interface DocumentManager {

	// Create Methods
	public abstract URI addDocument(String fileName,
			String documentContent, String serviceId) throws DocumentException;
	
	public abstract URI addDocument(String fileName,
			InputStream docContent, URI serviceUri) throws DocumentException;
	
	// Read Methods

	public abstract String getDocument(URI documentUri)
			throws DocumentException;
	
	// Delete Methods
	public abstract URI deleteDocument(URI documentUri)
			throws DocumentException;

	public abstract URI deleteDocumentById(String documentId)
			throws DocumentException;

	
	// General Management Methods
	
	public abstract List<URI> listDocuments();
	
	public abstract List<URI> listDocumentsForService(String serviceId);
	
	public abstract List<URI> listDocumentsForService(URI serviceURI);
	
	public abstract boolean documentExists(String serviceId, String fileName)
			throws DocumentException;

{'fraction_non_alphanumeric': 0.062174746644754864, 'fraction_numerical': 0.004382360996987127, 'mean_word_length': 4.541729893778452, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1698564', 'n_tokens_mistral': 957, 'n_tokens_neox': 882, 'n_words': 368}