%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.jetspeed.om.impl.UserAttributeImpl |
|
|
1 | /* |
|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
3 | * contributor license agreements. See the NOTICE file distributed with |
|
4 | * this work for additional information regarding copyright ownership. |
|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
6 | * (the "License"); you may not use this file except in compliance with |
|
7 | * the License. You may obtain a copy of the License at |
|
8 | * |
|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
10 | * |
|
11 | * Unless required by applicable law or agreed to in writing, software |
|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 | * See the License for the specific language governing permissions and |
|
15 | * limitations under the License. |
|
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 | 0 | { |
38 | 0 | } |
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 | 0 | { |
47 | 0 | this.name = name; |
48 | 0 | this.description = description; |
49 | 0 | } |
50 | ||
51 | private String name; |
|
52 | ||
53 | /** |
|
54 | * @see org.apache.jetspeed.om.common.UserAttribute#getName() |
|
55 | */ |
|
56 | public String getName() |
|
57 | { |
|
58 | 0 | 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 | 0 | this.name = name; |
67 | 0 | } |
68 | ||
69 | private String description; |
|
70 | ||
71 | /** |
|
72 | * @see org.apache.jetspeed.om.common.UserAttribute#getDescription() |
|
73 | */ |
|
74 | public String getDescription() |
|
75 | { |
|
76 | 0 | 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 | 0 | this.description = description; |
85 | 0 | } |
86 | ||
87 | /** |
|
88 | * <p>Convert {@link UserAttribute} to String.</p> |
|
89 | * @return String value of UserAttribute. |
|
90 | */ |
|
91 | public String toString() |
|
92 | { |
|
93 | 0 | String userAttribute = "[[name, " + this.name + "], [description, " + this.description + "]]"; |
94 | 0 | return userAttribute; |
95 | } |
|
96 | ||
97 | /** |
|
98 | * @return Returns the id. |
|
99 | */ |
|
100 | public long getId() |
|
101 | { |
|
102 | 0 | return id; |
103 | } |
|
104 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |