1 /* 2 * jDTAUS Core RI Client Container 3 * Copyright (C) 2005 Christian Schulte 4 * <cs@schulte.it> 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.1 of the License, or 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 package org.jdtaus.core.container.ri.client; 22 23 /** 24 * Scope a specification applies to. 25 * 26 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 27 * @version $JDTAUS: Scope.java 8641 2012-09-27 06:45:17Z schulte $ 28 */ 29 interface Scope 30 { 31 32 /** 33 * Gets an object from the scope. 34 * 35 * @param identifier The identifier of the object to get from the scope. 36 * 37 * @return The object identified by {@code identifier} or {@code null} if 38 * no object identified by {@code identifier} exists in the scope. 39 */ 40 Object getObject( String identifier ); 41 42 /** 43 * Puts an object into the scope. 44 * 45 * @param identifier The identifier of the object to put into the scope. 46 * @param object The object to put into the scope. 47 * 48 * @return The previous object from the scope or {@code null} if there was 49 * no object identified by {@code identifier} in the scope. 50 */ 51 Object putObject( String identifier, Object object ); 52 53 /** 54 * Removes an object from the scope. 55 * 56 * @param identifier The identifier of the object to remove from the scope. 57 * 58 * @return The removed object or {@code null} if there was no object 59 * identified by {@code identifier} in the scope. 60 */ 61 Object removeObject( String identifier ); 62 63 }