1 /*
2 * This file is a part of CAST project.
3 * (c) Copyright 2007, AGH University of Science & Technology
4 * https://caribou.iisg.agh.edu.pl/trac/cast
5 *
6 * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 * http://www.eclipse.org/legal/epl-v10.html
10 */
11 /*
12 * File: IPersistenceProviderFactory.java
13 * Created: 2009-09-15
14 * Author: tmilos
15 * $Id$
16 */
17
18 package pl.edu.agh.cast.data.persistence;
19
20 /**
21 * Interface of persistence provider factory.
22 *
23 * @see IPersistenceProvider
24 *
25 * @author AGH CAST Team
26 */
27 public interface IPersistenceProviderFactory {
28
29 /**
30 * Returns the ID of the provider.
31 *
32 * @return provider ID
33 */
34 public String getProviderId();
35
36 /**
37 * Creates a new instance of persistence provider.
38 *
39 * @param filePath
40 * the path to configuration/storage file for the provider
41 * @return a new instance of persistence provider
42 * @throws PersistenceException
43 * if provider could not be created
44 */
45 public IPersistenceProvider createPersistenceProvider(String filePath) throws PersistenceException;
46
47 /**
48 * Returns the path to the persistence provider configuration or storage file. The path is relative to the project
49 * path.
50 *
51 * @return the path to the persistence file
52 */
53 public String getPersistenceFilePath();
54
55 }