java.lang.Object
com.atlassian.confluence.content.render.xhtml.model.links.UnresolvedLink
com.atlassian.confluence.content.render.xhtml.model.links.NotPermittedLink
All Implemented Interfaces:
Link

public class NotPermittedLink extends UnresolvedLink
A not permitted link. Wraps the link that is not permitted.

To the user, a not permitted link is indistinguishable from an unresolved link. Hence the "is-a" relationship of not permitted link to unresolved link.

Not permitted links get their own representation because Confluence should be able to distinguish between the two.

Since:
4.0
  • Constructor Details

    • NotPermittedLink

      public NotPermittedLink(Link delegate)
  • Method Details

    • getDelegate

      public Link getDelegate()
    • getBody

      public LinkBody<?> getBody()
      Specified by:
      getBody in interface Link
      Returns:
      the body of the link (this may be text or an image)
    • getDestinationResourceIdentifier

      public ResourceIdentifier getDestinationResourceIdentifier()
      Specified by:
      getDestinationResourceIdentifier in interface Link
      Returns:
      a resource identifier to the destination. If null then the link is a self reference.
      See Also:
    • updateDestination

      public Link updateDestination(ResourceIdentifier destination)
      Description copied from interface: Link
      Returns a new instance of this link with an updated destination.
      Specified by:
      updateDestination in interface Link
      Parameters:
      destination - the updated destination
      Returns:
      a new instance with the updated destination.
    • getAnchor

      public String getAnchor()
      Specified by:
      getAnchor in interface Link
      Returns:
      link anchor
    • getTarget

      public Optional<String> getTarget()
      Description copied from interface: Link
      Returns the target attribute for the link. Only "_blank" is supported.
      Specified by:
      getTarget in interface Link
      Returns:
      target attribute
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object