KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jcr > nodetype > NodeTypeManager


1 /*
2  * $Id: NodeTypeManager.java,v 1.2 2004/07/24 00:16:23 benjmestrallet Exp $
3  *
4  * Copyright 2002-2004 Day Management AG, Switzerland.
5  *
6  * Licensed under the Day RI License, Version 2.0 (the "License"),
7  * as a reference implementation of the following specification:
8  *
9  * Content Repository API for Java Technology, revision 0.12
10  * <http://www.jcp.org/en/jsr/detail?id=170>
11  *
12  * You may not use this file except in compliance with the License.
13  * You may obtain a copy of the License files at
14  *
15  * http://www.day.com/content/en/licenses/day-ri-license-2.0
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */

24 package javax.jcr.nodetype;
25
26 import javax.jcr.*;
27
28 /**
29  * Allows for the retrieval of node types.
30  * Accessed via {@link Workspace#getNodeTypeManager}.
31  *
32  * @author Peeter Piegaze
33  * @author Stefan Guggisberg
34  */

35 public interface NodeTypeManager {
36
37   /**
38    * Returns the named node type. Throws a
39    * <code>NoSuchNodeTypeException</code> if a node type by that name
40    * does not exist.
41    *
42    * @param nodeTypeName the name of an existing node type.
43    * @return A <code>NodeType</code> object.
44    * @throws NoSuchNodeTypeException if no node type by the given name exists.
45    */

46   public NodeType getNodeType(String JavaDoc nodeTypeName) throws NoSuchNodeTypeException;
47
48   /**
49    * Returns an iterator over all available node types (primary and mixin).
50    *
51    * @return An <code>NodeTypeIterator</code>.
52    * @throws RepositoryException if an error occurs.
53    */

54   public NodeTypeIterator getAllNodeTypes() throws RepositoryException;
55
56   /**
57    * Returns an iterator over all available primary node types.
58    *
59    * @return An <code>NodeTypeIterator</code>.
60    * @throws RepositoryException if an error occurs.
61    */

62   public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException;
63
64   /**
65    * Returns an iterator over all available mixin node types.
66    *
67    * @return An <code>NodeTypeIterator</code>.
68    * @throws RepositoryException if an error occurs.
69    */

70   public NodeTypeIterator getMixinNodeTypes() throws RepositoryException;
71 }
Popular Tags