1 package org.apache.commons.jelly.tags.ant;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import java.util.Hashtable;
20
21 import org.apache.tools.ant.Project;
22
23 /*** Interface for delegates supporting property management
24 * for a<code>GrantProject</code>.
25 *
26 * @see org.apache.commons.jelly.tags.ant.GrantProject#setProperty
27 * @see org.apache.commons.jelly.tags.ant.GrantProject#setNewProperty
28 * @see org.apache.commons.jelly.tags.ant.GrantProject#setUserProperty
29 * @see org.apache.commons.jelly.tags.ant.GrantProject#setInheritedProperty
30 * @see org.apache.commons.jelly.tags.ant.GrantProject#getProperty
31 * @see org.apache.commons.jelly.tags.ant.GrantProject#getUserProperty
32 * @see org.apache.commons.jelly.tags.ant.GrantProject#getProperties
33 * @see org.apache.commons.jelly.tags.ant.GrantProject#getUserProperties
34 * @see org.apache.commons.jelly.tags.ant.GrantProject#copyUserProperties
35 * @see org.apache.commons.jelly.tags.ant.GrantProject#copyInheritedProperties
36 * @see org.apache.commons.jelly.tags.ant.GrantProject#setSystemProperties
37 * @see org.apache.commons.jelly.tags.ant.GrantProject#setJavaVersionProperty
38 *
39 * @author <a href="mailto:bob@eng.werken.com">Bob McWhirter</a>
40 * @author <a href="mailto:stephenh@chase3000.com">Stephen Haberman</a>
41 */
42 public interface PropsHandler {
43
44 /*** Set a property.
45 *
46 * @param key The property key.
47 * @param value The value.
48 */
49 void setProperty(String key, String value);
50
51 /*** Set a user property.
52 *
53 * @param key The user property key.
54 * @param value The value.
55 */
56 void setUserProperty(String key, String value);
57
58 /*** Set a new property.
59 *
60 * @param key The property key.
61 * @param value The value.
62 */
63 void setNewProperty(String key, String value);
64
65 /*** Sets an inherited property.
66 *
67 * @param key The user property key.
68 * @param value The value.
69 */
70 void setInheritedProperty(String key, String value);
71
72 /*** Sets a property that is not a user property.
73 *
74 * Acts as the replacement for ant's private
75 * <code>setPropertyInternal</code> method.
76 *
77 * @param key The property key.
78 * @param value The value.
79 */
80 void setPropertyIfUndefinedByUser(String key, String value);
81
82 /*** Retrieve a property.
83 *
84 * @param key The property key.
85 *
86 * @return The value.
87 */
88 String getProperty(String key);
89
90 /*** Retrieve a user property.
91 *
92 * @param key The user property key.
93 *
94 * @return The value.
95 */
96 String getUserProperty(String key);
97
98 /*** Retrieve a <code>Hashtable</code> of all properties.
99 *
100 * @return A <code>Hashtable</code> of all properties.
101 */
102 Hashtable getProperties();
103
104 /*** Retrieve a <code>Hashtable</code> of all user properties.
105 *
106 * @return A <code>Hashtable</code> of all user properties.
107 */
108 Hashtable getUserProperties();
109
110 /*** Copy all of the user properties to the other <code>Project</code>.
111 *
112 * @param other The <code>Project</code> to copy the properties to.
113 */
114 void copyUserProperties(Project other);
115
116 /*** Copy all of the inherited properties to the other <code>Project</code>.
117 *
118 * @param other The <code>Project</code> to copy the properties to.
119 */
120 void copyInheritedProperties(Project other);
121
122 /*** Set the system variables for a <code>Project</code> that have
123 * not already been assigned as user properties.
124 */
125 void setSystemProperties();
126
127 /*** Set the <code>ant.java.version</code> property.
128 */
129 void setJavaVersionProperty();
130
131
132 }