%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.jetspeed.om.impl.UserAttributeRefImpl |
|
|
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 | import org.apache.jetspeed.om.common.UserAttributeRef; |
|
21 | ||
22 | /** |
|
23 | * <p>User attribute ref implementation.</p> |
|
24 | * |
|
25 | * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a> |
|
26 | */ |
|
27 | public class UserAttributeRefImpl implements UserAttributeRef |
|
28 | { |
|
29 | ||
30 | /** The application id. */ |
|
31 | protected long appId; |
|
32 | protected long id; |
|
33 | ||
34 | /** |
|
35 | * <p>Default constructor.</p> |
|
36 | */ |
|
37 | public UserAttributeRefImpl() |
|
38 | 0 | { |
39 | 0 | } |
40 | ||
41 | /** |
|
42 | * <p>User attribute ref constructor given a name and name link.</p> |
|
43 | * @param The user attribute ref name. |
|
44 | * @param The user attribute ref name link. |
|
45 | */ |
|
46 | public UserAttributeRefImpl(String name, String nameLink) |
|
47 | 0 | { |
48 | 0 | this.name = name; |
49 | 0 | this.nameLink = nameLink; |
50 | 0 | } |
51 | ||
52 | /** |
|
53 | * <p>User attribute ref constructor given a {@link UserAttribute}.</p> |
|
54 | * @param The user attribute ref name. |
|
55 | * @param The user attribute ref name link. |
|
56 | */ |
|
57 | public UserAttributeRefImpl(UserAttribute userAttribute) |
|
58 | 0 | { |
59 | 0 | this.name = userAttribute.getName(); |
60 | 0 | this.description = userAttribute.getDescription(); |
61 | 0 | } |
62 | ||
63 | private String name; |
|
64 | ||
65 | /** |
|
66 | * @see org.apache.jetspeed.om.common.UserAttributeRef#getName() |
|
67 | */ |
|
68 | public String getName() |
|
69 | { |
|
70 | 0 | return name; |
71 | } |
|
72 | ||
73 | /** |
|
74 | * @see org.apache.jetspeed.om.common.UserAttributeRef#setName(java.lang.String) |
|
75 | */ |
|
76 | public void setName(String name) |
|
77 | { |
|
78 | 0 | this.name = name; |
79 | 0 | } |
80 | ||
81 | private String nameLink; |
|
82 | ||
83 | /** |
|
84 | * @see org.apache.jetspeed.om.common.UserAttributeRef#getNameLink() |
|
85 | */ |
|
86 | public String getNameLink() |
|
87 | { |
|
88 | 0 | return nameLink; |
89 | } |
|
90 | ||
91 | /** |
|
92 | * @see org.apache.jetspeed.om.common.UserAttributeRef#setNameLink(java.lang.String) |
|
93 | */ |
|
94 | public void setNameLink(String nameLink) |
|
95 | { |
|
96 | 0 | this.nameLink = nameLink; |
97 | 0 | } |
98 | ||
99 | private String description; |
|
100 | ||
101 | /** |
|
102 | * @see org.apache.jetspeed.om.common.UserAttributeRef#getDescription() |
|
103 | */ |
|
104 | public String getDescription() |
|
105 | { |
|
106 | 0 | return description; |
107 | } |
|
108 | ||
109 | /** |
|
110 | * @see org.apache.jetspeed.om.common.UserAttributeRef#setDescription(java.lang.String) |
|
111 | */ |
|
112 | public void setDescription(String description) |
|
113 | { |
|
114 | 0 | this.description = description; |
115 | 0 | } |
116 | ||
117 | /** |
|
118 | * <p>Convert {@link UserAttributeRef} to String.</p> |
|
119 | * @return String value of UserAttributeRef. |
|
120 | */ |
|
121 | public String toString() |
|
122 | { |
|
123 | 0 | String userAttributeRef = "[[name, " + this.name + "], [name-link, " + this.nameLink + "]]"; |
124 | 0 | return userAttributeRef; |
125 | } |
|
126 | ||
127 | /** |
|
128 | * @return Returns the id. |
|
129 | */ |
|
130 | public long getId() |
|
131 | { |
|
132 | 0 | return id; |
133 | } |
|
134 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |