KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > naming > api > PNameManager


1 /**
2  * JORM: an implementation of a generic mapping system for persistent Java
3  * objects. Two mapping are supported: to RDBMS and to binary files.
4  * Copyright (C) 2001-2003 France Telecom R&D - INRIA
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * Contact: jorm-team@objectweb.org
21  *
22  */

23
24 package org.objectweb.jorm.naming.api;
25
26 import org.objectweb.jorm.type.api.PType;
27 import org.objectweb.jorm.api.PException;
28 import org.objectweb.jorm.api.PExceptionIO;
29
30 /**
31  * The <b>PNameManager</b> interface provides a means to create, remove
32  * and manage PName. It ensures that each of the names it manages unambiguously
33  * designates a particular information item (another persistent name or a
34  * binding for instance).
35  * @author R. Basset, P. D?chamboux
36  */

37 public interface PNameManager extends PNameCoder {
38     /**
39      * It associates a PName to an information item within a naming context.
40      * @param conn The connection that can be used to access the data store.
41      * @param infoitem The information item that must be accessible through a
42      * PName within a naming context.
43      * @return The <code>PName</code> associated to the given information
44      * item.
45      * @exception PExceptionNaming Raised in case of problem within the
46      * naming context.
47      * @exception PExceptionIO Raised in case of problem during the access of
48      * the data store.
49      */

50     PName export(Object JavaDoc conn, Object JavaDoc infoitem) throws PException;
51
52     /**
53      * It associates a PName to an information item within a naming context.
54      * @param conn The connection that can be used to access the data store.
55      * @param infoitem The information item that must be accessible through a
56      * PName within a naming context.
57      * @param hints Any information relevant for name creation.
58      * @return The <code>PName</code> associated to the given information
59      * item.
60      * @exception PExceptionNaming Raised in case of problem within the
61      * naming context.
62      * @exception PExceptionIO Raised in case of problem during the access of
63      * the data store.
64      */

65     PName export(Object JavaDoc conn, Object JavaDoc infoitem, Object JavaDoc hints)
66             throws PException;
67
68     /**
69      * It removes the PName and all the associated information within a naming
70      * context (i.e., the association between the PName and its information
71      * item).
72      * @param conn The connection that can be used to access the data store.
73      * @param pn A PName valid in this naming context. In case of a PBinder,
74      * export is done on a PBinding.
75      * @exception PExceptionNaming Raised in case of problem within the
76      * naming context.
77      * @exception PExceptionIO Raised in case of problem during the access of
78      * the data store
79      */

80     void unexport(Object JavaDoc conn, PName pn) throws PException;
81
82     /**
83      * It removes the PName and all the associated information within a naming
84      * context (i.e., the association between the PName and its information
85      * item).
86      * @param conn The connection that can be used to access the data store.
87      * @param pn A PName valid in this naming context. In case of a PBinder,
88      * export is done on a PBinding.
89      * @param hints Any information relevant for name removing.
90      * @exception PExceptionNaming Raised in case of problem within the
91      * naming context.
92      * @exception PExceptionIO Raised in case of problem during the access of
93      * the data store
94      */

95     void unexport(Object JavaDoc conn, PName pn, Object JavaDoc hints) throws PException;
96 }
97
Popular Tags