Class CmsLinkTable

java.lang.Object
org.opencms.staticexport.CmsLinkTable

public class CmsLinkTable extends Object
Maintains a table of links for an element of a CmsXmlPage.

Since:
6.0.0
  • Field Details

  • Constructor Details

    • CmsLinkTable

      public CmsLinkTable()
      Creates a new CmsLinkTable.

  • Method Details

    • addLink

      public CmsLink addLink(CmsLink link)
      Adds a new link with a given internal name and internal flag to the link table.

      Parameters:
      link - the CmsLink to add
      Returns:
      the new link entry
    • addLink

      public CmsLink addLink(CmsRelationType type, String targetUri, boolean internal)
      Adds a new link to the link table.

      Parameters:
      type - type of the link
      targetUri - link destination
      internal - flag to indicate if the link is a local link
      Returns:
      the new link entry
    • getLink

      public CmsLink getLink(String name)
      Returns the CmsLink Entry for a given name.

      Parameters:
      name - the internal name of the link
      Returns:
      the CmsLink entry
    • isEmpty

      public boolean isEmpty()
      Returns if the link table is empty.

      Returns:
      true if the link table is empty, false otherwise
    • iterator

      Returns an iterator over the links in the table.

      The objects iterated are of type CmsLink.

      Returns:
      a string iterator for internal link names
    • size

      public int size()
      Returns the size of this link table.

      Returns:
      the size of this link table