KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > util > IPropertyHolder


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

15 package org.apache.tapestry.util;
16
17 import java.util.List JavaDoc;
18
19 /**
20  * An interface that defines an object that can store named propertys. The names
21  * and the properties are Strings.
22  *
23  * @author Howard Lewis Ship
24  *
25  **/

26
27 public interface IPropertyHolder
28 {
29     /**
30      * Returns a List of Strings, the names of all
31      * properties held by the receiver. May return an empty list.
32      * The List is sorted alphabetically. The List may be modified
33      * without affecting this property holder.
34      *
35      * <p>Prior to release 2.2, this method returned Collection.
36      *
37      **/

38
39     public List JavaDoc getPropertyNames();
40
41     /**
42      * Sets a named property. The new value replaces the existing value, if any.
43      * Setting a property to null is the same as removing the property.
44      *
45      **/

46
47     public void setProperty(String JavaDoc name, String JavaDoc value);
48
49     /**
50      * Removes the named property, if present.
51      *
52      **/

53
54     public void removeProperty(String JavaDoc name);
55
56     /**
57      * Retrieves the named property, or null if the property is not defined.
58      *
59      **/

60
61     public String JavaDoc getProperty(String JavaDoc name);
62 }
Popular Tags