1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.om.registry.base;
1819import org.apache.jetspeed.om.registry.Category;
2021/***22 * Bean like implementation of the Category interface suitable for23 * Castor serialization.24 *25 * @see org.apache.jetspeed.om.registry.Security26 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>27 * @version $Id: BaseCategory.java,v 1.4 2004/02/23 03:08:26 jford Exp $28 */29publicclassBaseCategory implements Category, java.io.Serializable
30 {
31private String name;
32private String group = "Jetspeed";
3334/***35 * Implements the equals operation so that 2 elements are equal if36 * all their member values are equal.37 */38publicboolean equals(Object object)
39 {
40if (object==null)
41 {
42return false;
43 }
4445BaseCategory obj = (BaseCategory)object;
4647if (name!=null)
48 {
49if (!name.equals(obj.getName()))
50 {
51return false;
52 }
53 }
54else55 {
56if (obj.getName()!=null)
57 {
58return false;
59 }
60 }
6162if (group!=null)
63 {
64if(!group.equals(obj.getGroup()))
65 {
66return false;
67 }
68 }
69else70 {
71if (obj.getGroup()!=null)
72 {
73return false;
74 }
75 }
7677returntrue;
78 }
7980/*** @return the string Name */81public String getName()
82 {
83return name;
84 }
8586/*** Sets the string Name87 *88 * @param value the new Name value89 */90publicvoid setName(String name)
91 {
92this.name = name;
93 }
9495/*** @return the string Group */96public String getGroup()
97 {
98return group;
99 }
100101/*** Sets the string Group102 *103 * @param value the new Group value104 */105publicvoid setGroup(String group)
106 {
107this.group = group;
108 }
109110 }