KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > layout > impl > LinkLayout


1 /*
2  * Copyright 1999-2002,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 at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * 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 and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.portal.layout.impl;
17
18 import org.apache.cocoon.portal.layout.AbstractLayout;
19 import org.apache.cocoon.portal.layout.Layout;
20
21 /**
22  * A link layout references another layout to be used instead. The reference
23  * can be changed using events.
24  *
25  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
26  * @author <a HREF="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
27  * @author <a HREF="mailto:juergen.seitz@basf-it-services.com">J&uuml;rgen Seitz</a>
28  *
29  * @version CVS $Id: LinkLayout.java 37334 2004-09-01 11:29:10Z cziegeler $
30  */

31 public class LinkLayout extends AbstractLayout implements Layout {
32
33     protected String JavaDoc linkedLayoutKey;
34     protected String JavaDoc linkedLayoutId;
35
36     public void setLayoutId(String JavaDoc layoutId) {
37         this.linkedLayoutId = layoutId;
38     }
39
40     public String JavaDoc getLayoutId() {
41         return this.linkedLayoutId;
42     }
43
44     public String JavaDoc getLayoutKey() {
45         return linkedLayoutKey;
46     }
47
48     public void setLayoutKey(String JavaDoc key) {
49         linkedLayoutKey = key;
50     }
51
52     /* (non-Javadoc)
53      * @see java.lang.Object#clone()
54      */

55     protected Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
56         LinkLayout clone = (LinkLayout)super.clone();
57         
58         clone.linkedLayoutId = this.linkedLayoutId;
59         clone.linkedLayoutKey = this.linkedLayoutKey;
60         
61         return clone;
62     }
63     
64 }
65
Popular Tags