1 /*=========================================================================== 2 3 ObjectWeb Naming Context Framework 4 Copyright (C) 2002 USTL - LIFL - GOAL 5 Contact: architecture@objectweb.org 6 7 This library is free software; you can redistribute it and/or 8 modify it under the terms of the GNU Lesser General Public 9 License as published by the Free Software Foundation; either 10 version 2.1 of the License, or any later version. 11 12 This library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 Lesser General Public License for more details. 16 17 You should have received a copy of the GNU Lesser General Public 18 License along with this library; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 USA 21 22 Initial developer(s): Philippe Merle. 23 Contributor(s): ______________________________________. 24 25 ===========================================================================*/ 26 27 package org.objectweb.util.browser.core.api; 28 29 /** 30 * Standard interface for {@link Name Name} factories. 31 * 32 * 33 * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a> 34 * @version 0.1 35 */ 36 public interface NameFactory { 37 38 /** 39 * The standard name of this interface to use 40 * in the context of the Fractal framework. 41 */ 42 static final String NAME_FACTORY = NameFactory.class.getName(); 43 44 /** 45 * Creates a new {@link Name Name} with an identifier and no subname. 46 * 47 * The identifier and the subname of the created {@link Name Name} 48 * are set respectively to the given id and the null value. 49 * 50 * @param id The identifier of the {@link Name Name} to create. 51 * 52 * @return The created {@link Name Name}. 53 * 54 * @postcondition 55 * return.getOWId() == id 56 * and return.getOWSubName() == null; 57 */ 58 Name newOWName(String id); 59 60 /** 61 * Creates a new {@link Name Name} with an identifier and a subname. 62 * 63 * The identifier and the subname of the created {@link Name Name} 64 * are set respectively to the given id and subname. 65 * 66 * @param id The identifier of the {@link Name Name} to create. 67 * @param subname The subname of the {@link Name Name} to create. 68 * 69 * @return The created {@link Name Name}. 70 * 71 * @postcondition 72 * return.getOWId() == id 73 * and return.getOWSubName() == subname; 74 */ 75 Name newOWName(String id, Name subname); 76 77 } 78