org.apache.lenya.cms.site
Class AbstractLink

java.lang.Object
  extended by org.apache.lenya.cms.site.AbstractLink
All Implemented Interfaces:
Link

public abstract class AbstractLink
extends java.lang.Object
implements Link

The AbstractLink class encapsulates a string label and a associated language.


Constructor Summary
AbstractLink(DocumentFactory factory, SiteNode node, java.lang.String _label, java.lang.String _language)
          Creates a new AbstractLink object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          (non-Javadoc)
 Document getDocument()
           
 java.lang.String getLabel()
          Get the actual label of the AbstractLink object
 java.lang.String getLanguage()
          Get the language of this AbstractLink object
 SiteNode getNode()
           
 int hashCode()
          (non-Javadoc)
protected  void save()
           
 void setLabel(java.lang.String label)
           
 java.lang.String toString()
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.lenya.cms.site.Link
delete
 

Constructor Detail

AbstractLink

public AbstractLink(DocumentFactory factory,
                    SiteNode node,
                    java.lang.String _label,
                    java.lang.String _language)
Creates a new AbstractLink object.

Parameters:
factory - The document factory.
node - The site node.
_label - the actual label
_language - the language
Method Detail

getLabel

public java.lang.String getLabel()
Get the actual label of the AbstractLink object

Specified by:
getLabel in interface Link
Returns:
the actual label as a String

getLanguage

public java.lang.String getLanguage()
Get the language of this AbstractLink object

Specified by:
getLanguage in interface Link
Returns:
the language

toString

public java.lang.String toString()
(non-Javadoc)

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

equals

public boolean equals(java.lang.Object obj)
(non-Javadoc)

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
(non-Javadoc)

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

getDocument

public Document getDocument()
Specified by:
getDocument in interface Link
Returns:
The document this link points to.

getNode

public SiteNode getNode()
Specified by:
getNode in interface Link
Returns:
The node this link belongs to.

setLabel

public void setLabel(java.lang.String label)
Specified by:
setLabel in interface Link
Parameters:
label - The new label.

save

protected void save()


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.