Package org.opencms.staticexport
Class CmsLinkTable
java.lang.Object
org.opencms.staticexport.CmsLinkTable
Maintains a table of links for an element of a CmsXmlPage.
- Since:
- 6.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Comparator used to deterministically order the link table. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Pattern
Pattern used to extract the index and the part before the index from a link id. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new link with a given internal name and internal flag to the link table.addLink
(CmsRelationType type, String targetUri, boolean internal) Adds a new link to the link table.Returns the CmsLink Entry for a given name.boolean
isEmpty()
Returns if the link table is empty.iterator()
Returns an iterator over the links in the table.int
size()
Returns the size of this link table.
-
Field Details
-
LINK_PATTERN
Pattern used to extract the index and the part before the index from a link id.
-
-
Constructor Details
-
CmsLinkTable
public CmsLinkTable()Creates a new CmsLinkTable.
-
-
Method Details
-
addLink
Adds a new link with a given internal name and internal flag to the link table.- Parameters:
link
- theCmsLink
to add- Returns:
- the new link entry
-
addLink
Adds a new link to the link table.- Parameters:
type
- type of the linktargetUri
- link destinationinternal
- flag to indicate if the link is a local link- Returns:
- the new link entry
-
getLink
Returns the CmsLink Entry for a given name.- Parameters:
name
- the internal name of the link- Returns:
- the CmsLink entry
-
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
Returns the size of this link table.- Returns:
- the size of this link table
-