01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13: package org.wings.session;
14:
15: import java.util.Map;
16:
17: /**
18: * @author <a href="mailto:engels@mercatis.de">Holger Engels</a>
19: */
20: public interface PropertyService {
21: /**
22: * Gets the session property indicated by the specified key.
23: *
24: * @param key the name of the session property.
25: * @return the string value of the session property,
26: * or <code>null</code> if there is no property with that key.
27: * @see org.wings.session.PropertyService#getProperties()
28: */
29: Object getProperty(String key);
30:
31: /**
32: * Gets the session property indicated by the specified key.
33: *
34: * @param key the name of the session property.
35: * @param def a default value.
36: * @return the string value of the session property,
37: * or the default value if there is no property with that key.
38: * @see org.wings.session.PropertyService#getProperties()
39: */
40: Object getProperty(String key, Object def);
41:
42: /**
43: * Sets the session property indicated by the specified key.
44: *
45: * @param key the name of the session property.
46: * @param value the value of the session property.
47: * @return the previous value of the session property,
48: * or <code>null</code> if it did not have one.
49: * @see org.wings.session.PropertyService#getProperty(java.lang.String)
50: * @see org.wings.session.PropertyService#getProperty(java.lang.String, java.lang.Object)
51: */
52: Object setProperty(String key, Object value);
53:
54: Map getProperties();
55:
56: Object removeProperty(String key);
57:
58: boolean containsProperty(String key);
59: }
|