ServiceArchive.java [tools/MetaModelTools/src/archives] Revision: b816c005b011b82e557a073fe4c4977da3cbaf04 Date: Tue Dec 17 11:39:29 MST 2019
/*
* $Id$
*
* This file is part of the Cloud Services Integration Platform (CSIP),
* a Model-as-a-Service framework, API, and application suite.
*
* 2012-2019, OMSLab, Colorado State University.
*
* OMSLab licenses this file to you under the MIT license.
* See the LICENSE file in the project root for more information.
*/
package archives;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
import org.bson.conversions.Bson;
import org.codehaus.jettison.json.JSONObject;
import models.ModelArchive;
/**
*
* @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
*/
public interface ServiceArchive {
public ArrayList<ModelArchive> getArchiveByReqIP(String ip, String service) throws Exception;
public ModelArchive getArchiveBySUID(String suid) throws Exception;
public default ArrayList<ModelArchive> getArchivesByFilter(String key, String value, int limit) throws Exception{
return getArchivesByFilter( key, value, limit, false);
}
public ArrayList<ModelArchive> getArchivesByFilter(String key, String value, int limit, boolean basicArchiveFunctionalaity) throws Exception;
public ArrayList<ModelArchive> getArchivesByFilters(Iterable<Bson> filters, int limit) throws Exception;
public JSONObject getServiceRequest(String suid) throws Exception;
public JSONObject getServiceResponse(String suid) throws Exception;
public void shutdown() throws Exception;
public long getCount();
public Set<String> keys(int skip, int limit, String sortby, boolean sortAsc);
public boolean hasArchive(String suid) throws Exception;
public ArrayList<String> getSUIDsByFilter(String key, String value);
}