1 /* Context.java -- 2 Copyright (C) 2005, 2006 Free Software Foundation, Inc. 3 4 This file is part of GNU Classpath. 5 6 GNU Classpath is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GNU Classpath is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GNU Classpath; see the file COPYING. If not, write to the 18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA. 20 21 Linking this library statically or dynamically with other modules is 22 making a combined work based on this library. Thus, the terms and 23 conditions of the GNU General Public License cover the whole 24 combination. 25 26 As a special exception, the copyright holders of this library give you 27 permission to link this library with independent modules to produce an 28 executable, regardless of the license terms of these independent 29 modules, and to copy and distribute the resulting executable under 30 terms of your choice, provided that you also meet, for each linked 31 independent module, the terms and conditions of the license of that 32 module. An independent module is a module which is not derived from 33 or based on this library. If you modify this library, you may extend 34 this exception to your version of the library, but you are not 35 obligated to do so. If you do not wish to do so, delete this 36 exception statement from your version. */ 37 38 39 package org.omg.CORBA; 40 41 42 /** 43 * 44 * This class holds the list of the named properties. It is normally 45 * used to represent information about various circumstances of the 46 * invocation. A Context if first created by 47 * {@link org.omg.CORBA.ORB#get_default_context() } and then invoking 48 * {@link #create_child(String)} of the default context. 49 * 50 * The contexts are named. 51 * 52 * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) 53 * 54 */ 55 public abstract class Context 56 { Context()57 public Context() 58 { 59 } 60 61 /** 62 * Get the context name. 63 * @return the name of this context. 64 */ context_name()65 public abstract String context_name(); 66 67 /** 68 * Create a child of this Context, giving it a name. 69 * @param child a name of the child context. 70 * 71 * @return the newly created context. 72 */ create_child(String child)73 public abstract Context create_child(String child); 74 75 /** 76 * Delete one or several (identically named) given properties. 77 * 78 * @param property the name of the property to delete, may 79 * end by wildchar character '*'. The search scope is always 80 * limited to the current context. 81 */ delete_values(String property)82 public abstract void delete_values(String property); 83 84 /** 85 * Search the values. 86 * 87 * @param start_scope the context at which to initiate the search. 88 * @param flags the search operation flags. 89 * The flag {@link CTX_RESTRICT_SCOPE} means 90 * that search is restricted to the start_scope. 91 * @param pattern the property being searched, can be 92 * either name or name with the optional trailing wildchar character 93 * '*'. 94 * @return the list of the found properties. 95 */ get_values(String start_scope, int flags, String pattern )96 public abstract NVList get_values(String start_scope, int flags, 97 String pattern 98 ); 99 100 /** 101 * Get the parent of this context. 102 * @return the parent of this context. 103 */ parent()104 public abstract Context parent(); 105 106 /** 107 * Set a property. 108 * @param name the property name. 109 * @param value the property value (the {@link Any} must hold string). 110 */ set_one_value(String name, Any value)111 public abstract void set_one_value(String name, Any value); 112 113 /** 114 * Set multiple properties. 115 * 116 * @param values a list of properties, the {@link Any}'s 117 * in the list components must hold strings. 118 */ set_values(NVList values)119 public abstract void set_values(NVList values); 120 121 122 } 123