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.ContentURL;
2021/***22 * Bean like implementation of the ContentURL 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: BaseContentURL.java,v 1.4 2004/02/23 03:08:26 jford Exp $28 */29publicclassBaseContentURL implements ContentURL30 {
31private String url;
32privateboolean cacheKey = true;
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 }
4445BaseContentURL obj = (BaseContentURL)object;
4647if (cacheKey != obj.cacheKey)
48 {
49return false;
50 }
5152if (url!=null)
53 {
54if(!url.equals(obj.url))
55 {
56return false;
57 }
58 }
59else60 {
61if (obj.url!=null)
62 {
63return false;
64 }
65 }
6667returntrue;
68 }
6970/*** @return the string URL */71public String getURL()
72 {
73return url;
74 }
7576/*** Sets the string URL77 *78 * @param value the new URL value79 */80publicvoid setURL(String value)
81 {
82this.url = value;
83 }
8485publicboolean isCacheKey()
86 {
87return cacheKey;
88 }
8990publicvoid setCachedOnURL(boolean cacheKey)
91 {
92this.cacheKey = cacheKey;
93 }
9495publicboolean getCachedOnURL()
96 {
97returnthis.cacheKey;
98 }
99100 }