1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.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 at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.services.registry;
1819import org.apache.jetspeed.om.registry.Registry;
20import org.apache.jetspeed.om.registry.RegistryEntry;
21import org.apache.jetspeed.om.registry.RegistryException;
22import org.apache.turbine.services.Service;
23import java.util.Enumeration;
2425/***26 * <P>This service is a facade for all registry related operations</P>27 *28 * @see org.apache.jetspeed.om.registry.Registry29 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>30 * @version $Id: RegistryService.java,v 1.4 2004/02/23 03:31:50 jford Exp $31 */32publicinterfaceRegistryServiceextends Service
33 {
3435/*** The name of this service */36public String SERVICE_NAME = "Registry";
3738/***39 * Returns a Registry object for further manipulation40 *41 * @param regName the name of the registry to fetch42 * @return a Registry object if found by the manager or null43 */44publicRegistry get( String regName );
4546/***47 * Creates a new RegistryEntry instance compatible with the current48 * Registry instance implementation49 *50 * @param regName the name of the registry to use51 * @return the newly created RegistryEntry52 */53publicRegistryEntry createEntry( String regName );
5455/***56 * Returns a RegistryEntry from the named Registry.57 * This is a convenience wrapper around {@link58 * org.apache.jetspeed.om.registry.Registry#getEntry }59 *60 * @param regName the name of the registry61 * @param entryName the name of the entry to retrieve from the62 * registry63 * @return a RegistryEntry object if the key is found or null64 */65publicRegistryEntry getEntry( String regName, String entryName );
6667/***68 * Add a new RegistryEntry in the named Registry.69 * This is a convenience wrapper around {@link70 * org.apache.jetspeed.om.registry.Registry#addEntry }71 *72 * @param regName the name of the registry73 * @param entry the Registry entry to add74 * @exception Sends a RegistryException if the manager can't add75 * the provided entry76 */77publicvoid addEntry( String regName, RegistryEntry entry )
78 throws RegistryException;
7980/***81 * Deletes a RegistryEntry from the named Registry82 * This is a convenience wrapper around {@link83 * org.apache.jetspeed.om.registry.Registry#removeEntry }84 *85 * @param regName the name of the registry86 * @param entryName the name of the entry to remove87 */88publicvoid removeEntry( String regName, String entryName );
8990/***91 * List all the registry currently available to this service92 *93 * @return an Enumeration of registry names.94 */95public Enumeration getNames();
9697 }