KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > nl > hippo > cms > sitesdirectory > SitesDirectory


1 /*
2  * Copyright 2004 Hippo Webworks.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package nl.hippo.cms.sitesdirectory;
17
18 import java.util.Iterator JavaDoc;
19
20 /**
21  * <p>
22  * A directory of sites to which the content in the CMS can be deployed.
23  * </p>
24  *
25  * @author Johan Stuyts
26  */

27 public interface SitesDirectory
28 {
29     /**
30      * <p>
31      * The preferred Avalon role under which an implementation of this interface
32      * should be registered in the service manager.
33      * </p>
34      */

35     String JavaDoc ROLE = SitesDirectory.class.getName();
36     
37     /**
38      * <p>
39      * Get the number of sites known by this directory.
40      * </p>
41      *
42      * @return The number of known sites.
43      */

44     int getNumberOfSites();
45
46     /**
47      * <p>
48      * Get an <code>Iterator</code> over the site IDs.
49      * </p>
50      *
51      * @return An <code>Iterator</code> over the site IDs.
52      */

53     Iterator JavaDoc siteIdsIterator();
54
55     /**
56      * <p>
57      * Get the site information associated with <code>siteId</code>.
58      * </p>
59      *
60      * @param siteId
61      * The site ID for which to retrieve the site information.
62      * @return The site information associated with <code>siteId</code>, or
63      * <code>null</code> if there is no information for
64      * <code>siteId</code>.
65      */

66     SiteInformation getSite(String JavaDoc siteId);
67 }
68
Popular Tags