KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > wings > session > PropertyService


1 /*
2  * $Id: PropertyService.java,v 1.4 2004/12/01 07:54:27 hengels Exp $
3  * Copyright 2000,2005 wingS development team.
4  *
5  * This file is part of wingS (http://www.j-wings.org).
6  *
7  * wingS is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation; either version 2.1
10  * of the License, or (at your option) any later version.
11  *
12  * Please see COPYING for the complete licence.
13  */

14 package org.wings.session;
15
16 import java.util.Map JavaDoc;
17
18 /**
19  * @author <a HREF="mailto:engels@mercatis.de">Holger Engels</a>
20  * @version $Revision: 1.4 $
21  */

22 public interface PropertyService
23         extends Service {
24     /**
25      * Gets the session property indicated by the specified key.
26      *
27      * @param key the name of the session property.
28      * @return the string value of the session property,
29      * or <code>null</code> if there is no property with that key.
30      * @see org.wings.session.PropertyService#getProperties()
31      */

32     Object JavaDoc getProperty(String JavaDoc key);
33
34     /**
35      * Gets the session property indicated by the specified key.
36      *
37      * @param key the name of the session property.
38      * @param def a default value.
39      * @return the string value of the session property,
40      * or the default value if there is no property with that key.
41      * @see org.wings.session.PropertyService#getProperties()
42      */

43     Object JavaDoc getProperty(String JavaDoc key, Object JavaDoc def);
44
45     /**
46      * Sets the session property indicated by the specified key.
47      *
48      * @param key the name of the session property.
49      * @param value the value of the session property.
50      * @return the previous value of the session property,
51      * or <code>null</code> if it did not have one.
52      * @see org.wings.session.PropertyService#getProperty(java.lang.String)
53      * @see org.wings.session.PropertyService#getProperty(java.lang.String, java.lang.Object)
54      */

55     Object JavaDoc setProperty(String JavaDoc key, Object JavaDoc value);
56
57     Map JavaDoc getProperties();
58
59     Object JavaDoc removeProperty(String JavaDoc key);
60
61     boolean containsProperty(String JavaDoc key);
62 }
63
64
65
Popular Tags