Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/opencms/template/cache/CmsElementLink.java


1   /*
2   * File   : $Source: /usr/local/cvs/opencms/src/com/opencms/template/cache/CmsElementLink.java,v $
3   * Date   : $Date: 2003/01/20 23:59:22 $
4   * Version: $Revision: 1.5 $
5   *
6   * This library is part of OpenCms -
7   * the Open Source Content Mananagement System
8   *
9   * Copyright (C) 2001  The OpenCms Group
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about OpenCms, please see the
22  * OpenCms Website: http://www.opencms.org 
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27  */
28  
29  package com.opencms.template.cache;
30  
31  
32  /**
33   * An instance of CmsElementLink is a link to another element. The link contains
34   * only the name of the linked element. Which element is linked will be
35   * determinded during the runtime of the content-creation (getContent-method).
36   *
37   * @author Andreas Schouten
38   */
39  public class CmsElementLink {
40  
41      /**
42       * The name of the element to link to.
43       */
44      String m_elementName;
45  
46      /**
47       * Creates a new Element-Link to find out where to link to.
48       * @param nameToLinkTo - the name of the element to link to.
49       */
50      public CmsElementLink(String nameToLinkTo) {
51          m_elementName = nameToLinkTo;
52      }
53  
54      /**
55       * Returns the name of the element to link to.
56       * @return the name of the element to link to.
57       */
58      public String toString() {
59          return m_elementName;
60      }
61  
62      /**
63       * Returns the name of the element to link to.
64       * @return the name of the element to link to.
65       */
66      public String getElementName() {
67          return toString();
68      }
69  }