KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > mdr > persistence > StorageFactory


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.mdr.persistence;
20
21 import java.util.Map JavaDoc;
22 /**
23  * For any implementation of Storage, the constructor is something like
24  * StorageImplementation(name). Different names represent different repositories.
25  * The meaning of "name" is implementation-defined. For btree it will be the
26  * base of the file name.
27  * This factory is used only to create instances of Storage. Methods to create and
28  * delete physical resources for the Storage, open and close the Storage etc. are
29  * defined in Storage interface.
30  *
31  * @author Pavel Buzek
32  * @version
33  */

34
35 public interface StorageFactory {
36
37     /** Creates instance of class that implements Storage interface.
38      * throws StorageException if the name is not valid name of a Storage
39      */

40     public Storage createStorage (Map JavaDoc properties) throws StorageException;
41
42     /** Creates a NULL MOFID in the format used by this Storage
43      * implementation
44      */

45     public MOFID createNullMOFID () throws StorageException;
46 }
47
Popular Tags