org.xwiki.rendering.wiki
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: 0ed82437c68d7b4001f7a42cb2ffc4da121fb5d1 $

Method Summary
 String getDocumentEditURL(ResourceReference documentReference)
           
 String getDocumentViewURL(ResourceReference documentReference)
           
 String getImageURL(ResourceReference imageReference, Map<String,String> parameters)
           
 String getLinkURL(ResourceReference linkReference)
           
 boolean isDocumentAvailable(ResourceReference documentReference)
           
 

Method Detail

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 documentReference)
Parameters:
documentReference - the reference to the document
Returns:
true if the document exists and can be viewed or false otherwise

getDocumentViewURL

String getDocumentViewURL(ResourceReference documentReference)
Parameters:
documentReference - the reference to the document
Returns:
the URL to view the specified wiki document

getDocumentEditURL

String getDocumentEditURL(ResourceReference documentReference)
Parameters:
documentReference - the reference to the document
Returns:
the URL to edit the specified wiki document


Copyright © 2004-2012 XWiki. All Rights Reserved.