Interface WikiModel


@Role public interface WikiModel
Bridge between the Rendering module and a Wiki Model. Contains wiki APIs required by Rendering classes such as Renderers. For example the XHTML Link Renderer needs to know if a wiki document exists in order to know how to generate the HTML (in order to display a question mark for non existing documents) and it also needs to get the URL pointing the wiki document.
Since:
2.0M1
Version:
$Id: 7abeb891c8e332ae512c39216b98a71e08ad9024 $
  • Method Details

    • getLinkURL

      String getLinkURL(ResourceReference linkReference)
      Parameters:
      linkReference - the reference to the link resource
      Returns:
      the URL to the link resource (the resource could be a document, a URL, a path, etc)
      Since:
      2.5RC1
    • getImageURL

      String getImageURL(ResourceReference imageReference, Map<String,String> parameters)
      Parameters:
      imageReference - the reference to the image resource
      parameters - the optional parameters passed to the image reference (width, height, etc)
      Returns:
      the URL to the image resource (the resource could be an attacment in a document, an icon, etc)
      Since:
      2.5RC1
    • isDocumentAvailable

      boolean isDocumentAvailable(ResourceReference resourceReference)
      Parameters:
      resourceReference - the reference pointing to a wiki document
      Returns:
      true if the wiki document exists and can be viewed or false otherwise
    • getDocumentViewURL

      String getDocumentViewURL(ResourceReference resourceReference)
      Parameters:
      resourceReference - the reference pointing to a wiki document
      Returns:
      the URL to view the specified wiki document
    • getDocumentEditURL

      String getDocumentEditURL(ResourceReference resourceReference)
      Parameters:
      resourceReference - the reference pointing to a wiki document
      Returns:
      the URL to edit the specified wiki document
    • getXDOM

      default XDOM getXDOM(ResourceReference resourceReference) throws WikiModelException
      Parameters:
      resourceReference - the resource reference for which to return the XDOM (note that only some reference type can be supported, such as DocumentResourceReference since some resources have no XDOM content)
      Returns:
      the XDOM
      Throws:
      WikiModelException - if the XDOM content for the passed resource cannot be retrieved
      Since:
      9.6RC1