1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.impl;
18
19 import org.apache.jetspeed.om.common.UserAttribute;
20
21 /***
22 * <p>User attribute implementation.</p>
23 *
24 * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
25 */
26 public class UserAttributeImpl implements UserAttribute
27 {
28
29 /*** The application id. */
30 protected long appId;
31 protected long id;
32
33 /***
34 * <p>Default constructor.</p>
35 */
36 public UserAttributeImpl()
37 {
38 }
39
40 /***
41 * <p>User attribute constructor given a name and description.</p>
42 * @param The user attribute name.
43 * @param The user attribute description.
44 */
45 public UserAttributeImpl(String name, String description)
46 {
47 this.name = name;
48 this.description = description;
49 }
50
51 private String name;
52
53 /***
54 * @see org.apache.jetspeed.om.common.UserAttribute#getName()
55 */
56 public String getName()
57 {
58 return name;
59 }
60
61 /***
62 * @see org.apache.jetspeed.om.common.UserAttribute#setName(java.lang.String)
63 */
64 public void setName(String name)
65 {
66 this.name = name;
67 }
68
69 private String description;
70
71 /***
72 * @see org.apache.jetspeed.om.common.UserAttribute#getDescription()
73 */
74 public String getDescription()
75 {
76 return description;
77 }
78
79 /***
80 * @see org.apache.jetspeed.om.common.UserAttribute#setDescription(java.lang.String)
81 */
82 public void setDescription(String description)
83 {
84 this.description = description;
85 }
86
87 /***
88 * <p>Convert {@link UserAttribute} to String.</p>
89 * @return String value of UserAttribute.
90 */
91 public String toString()
92 {
93 String userAttribute = "[[name, " + this.name + "], [description, " + this.description + "]]";
94 return userAttribute;
95 }
96
97 /***
98 * @return Returns the id.
99 */
100 public long getId()
101 {
102 return id;
103 }
104 }