01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: /** The application id. */
29: protected long appId;
30: protected long id;
31:
32: /**
33: * <p>Default constructor.</p>
34: */
35: public UserAttributeImpl() {
36: }
37:
38: /**
39: * <p>User attribute constructor given a name and description.</p>
40: * @param The user attribute name.
41: * @param The user attribute description.
42: */
43: public UserAttributeImpl(String name, String description) {
44: this .name = name;
45: this .description = description;
46: }
47:
48: private String name;
49:
50: /**
51: * @see org.apache.jetspeed.om.common.UserAttribute#getName()
52: */
53: public String getName() {
54: return name;
55: }
56:
57: /**
58: * @see org.apache.jetspeed.om.common.UserAttribute#setName(java.lang.String)
59: */
60: public void setName(String name) {
61: this .name = name;
62: }
63:
64: private String description;
65:
66: /**
67: * @see org.apache.jetspeed.om.common.UserAttribute#getDescription()
68: */
69: public String getDescription() {
70: return description;
71: }
72:
73: /**
74: * @see org.apache.jetspeed.om.common.UserAttribute#setDescription(java.lang.String)
75: */
76: public void setDescription(String description) {
77: this .description = description;
78: }
79:
80: /**
81: * <p>Convert {@link UserAttribute} to String.</p>
82: * @return String value of UserAttribute.
83: */
84: public String toString() {
85: String userAttribute = "[[name, " + this .name
86: + "], [description, " + this .description + "]]";
87: return userAttribute;
88: }
89:
90: /**
91: * @return Returns the id.
92: */
93: public long getId() {
94: return id;
95: }
96: }
|