org.xwiki.gwt.wysiwyg.client.wiki
Interface WikiService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService

@ComponentRole
@RemoteServiceRelativePath(value="WikiService.gwtrpc")
public interface WikiService
extends com.google.gwt.user.client.rpc.RemoteService

The service interface used on the server.

NOTE: This component interface should be split in multiple domain specific interfaces. Don't add any more methods!

Version:
$Id: WikiService.java 31743 2010-10-13 01:20:32Z mflorea $

Method Summary
 Attachment getAttachment(AttachmentReference attachmentReference)
          Returns information about the referenced attachment.
 java.util.List<Attachment> getAttachments(WikiPageReference documentReference)
          Returns all the attachments from the referred page.
 EntityConfig getEntityConfig(EntityReference origin, ResourceReference destination)
          Creates an entity link configuration object (URL, link reference) for a link with the specified origin and destination.
 java.util.List<Attachment> getImageAttachments(WikiPageReference documentReference)
          Returns all the image attachments from the referred page.
 java.util.List<WikiPage> getMatchingPages(java.lang.String keyword, int start, int count)
           
 java.util.List<java.lang.String> getPageNames(java.lang.String wikiName, java.lang.String spaceName)
           
 java.util.List<WikiPage> getRecentlyModifiedPages(int start, int count)
           
 java.util.List<java.lang.String> getSpaceNames(java.lang.String wikiName)
           
 java.lang.String getUploadURL(WikiPageReference documentReference)
           
 java.util.List<java.lang.String> getVirtualWikiNames()
           
 java.lang.Boolean isMultiWiki()
          Check if the current wiki is part of a multiwiki (i.e.
 ResourceReference parseLinkReference(java.lang.String linkReference, EntityReference baseReference)
          Parses the given link reference and extracts a reference to the linked resource.
 

Method Detail

isMultiWiki

java.lang.Boolean isMultiWiki()
Check if the current wiki is part of a multiwiki (i.e. this is a virtual wiki).

Returns:
true if the current wiki is a multiwiki, and false in the other case

getVirtualWikiNames

java.util.List<java.lang.String> getVirtualWikiNames()
Returns:
a list containing the names of all wikis.

getSpaceNames

java.util.List<java.lang.String> getSpaceNames(java.lang.String wikiName)
Parameters:
wikiName - the name of the wiki to search for spaces. If this is null, the current wiki will be used.
Returns:
a list of all spaces names in the specified wiki.

getPageNames

java.util.List<java.lang.String> getPageNames(java.lang.String wikiName,
                                              java.lang.String spaceName)
Parameters:
wikiName - the name of the wiki. Pass null if this should use the current wiki.
spaceName - the name of the space
Returns:
the list of the page names from a given space and a given wiki.

getRecentlyModifiedPages

java.util.List<WikiPage> getRecentlyModifiedPages(int start,
                                                  int count)
Parameters:
start - the start index of the list of pages to return
count - the number of pages to return
Returns:
the recently count modified pages of the current user, starting from position start

getMatchingPages

java.util.List<WikiPage> getMatchingPages(java.lang.String keyword,
                                          int start,
                                          int count)
Parameters:
start - the start index of the list of pages to return
count - the number of pages to return
keyword - the keyword to search the pages for
Returns:
the count pages whose full name or title match the keyword, starting from position start

getEntityConfig

EntityConfig getEntityConfig(EntityReference origin,
                             ResourceReference destination)
Creates an entity link configuration object (URL, link reference) for a link with the specified origin and destination. The link reference in the returned EntityConfig is relative to the link origin.

Parameters:
origin - the origin of the link
destination - the destination of the link
Returns:
the link configuration object that can be used to insert the link in the origin page

getAttachment

Attachment getAttachment(AttachmentReference attachmentReference)
Returns information about the referenced attachment. Note that the EntityReference#getFileName() name will be cleaned to match the attachment names cleaning rules, and the returned attachment serialized reference and access URL will be generated with the cleaned name.

Parameters:
attachmentReference - an attachment reference
Returns:
an Attachment containing the serialized reference and the access URL of the specified attachment, or null in case the attachment was not found

getImageAttachments

java.util.List<Attachment> getImageAttachments(WikiPageReference documentReference)
Returns all the image attachments from the referred page.

Parameters:
documentReference - a reference to the document to get the images from
Returns:
list of the image attachments

getAttachments

java.util.List<Attachment> getAttachments(WikiPageReference documentReference)
Returns all the attachments from the referred page.

Parameters:
documentReference - a reference to the document to get the attachments from
Returns:
list of the attachments

getUploadURL

java.lang.String getUploadURL(WikiPageReference documentReference)
Parameters:
documentReference - a document reference
Returns:
the URL that can be used to upload an attachment to the specified document

parseLinkReference

ResourceReference parseLinkReference(java.lang.String linkReference,
                                     EntityReference baseReference)
Parses the given link reference and extracts a reference to the linked resource. The returned resource reference is resolved relative to the given base entity reference.

Parameters:
linkReference - a serialized link reference
baseReference - the entity reference used to resolve the linked resource reference
Returns:
a reference to the linked resource


Copyright © 2004-2010 XWiki. All Rights Reserved.