org.apache.lenya.cms.linking
Class LinkTarget

java.lang.Object
  extended by org.apache.lenya.cms.linking.LinkTarget

public class LinkTarget
extends java.lang.Object

The target of a link.


Constructor Summary
protected LinkTarget()
          Ctor for non-existing targets.
protected LinkTarget(org.apache.lenya.cms.publication.Document doc)
          Ctor.
protected LinkTarget(org.apache.lenya.cms.publication.Document doc, int revisionNumber)
          Ctor.
 
Method Summary
 boolean exists()
           
 org.apache.lenya.cms.publication.Document getDocument()
           
 int getRevisionNumber()
           
 boolean isRevisionSpecified()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkTarget

protected LinkTarget(org.apache.lenya.cms.publication.Document doc,
                     int revisionNumber)
Ctor.

Parameters:
doc - The document.
revisionNumber - The revision number.

LinkTarget

protected LinkTarget(org.apache.lenya.cms.publication.Document doc)
Ctor.

Parameters:
doc - The document.

LinkTarget

protected LinkTarget()
Ctor for non-existing targets.

Method Detail

getDocument

public org.apache.lenya.cms.publication.Document getDocument()
                                                      throws LinkException
Returns:
The linked document.
Throws:
LinkException - if the target doesn't exist.

getRevisionNumber

public int getRevisionNumber()
                      throws LinkException
Returns:
The revision number.
Throws:
LinkException - if the target doesn't exist or no revision number is specified in the link.

isRevisionSpecified

public boolean isRevisionSpecified()
Returns:
if the revision is specified in the link.

exists

public boolean exists()
Returns:
if the target exists.


Copyright © $ Apache Software Foundation. All Rights Reserved.