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

All Known Implementing Classes:
WikiServiceAsyncCacheProxy

public interface WikiServiceAsync

Service interface used on the client. It should have all the methods from WikiService with an additional AsyncCallback parameter. This is specific to GWT's architecture.

Version:
$Id: 2882a9e626d5f6cba84620bd66287ece3fbc5f43 $

Method Summary
 void getAttachment(AttachmentReference attachmentReference, com.google.gwt.user.client.rpc.AsyncCallback<Attachment> async)
          Returns information about the referenced attachment.
 void getAttachments(WikiPageReference documentReference, com.google.gwt.user.client.rpc.AsyncCallback<List<Attachment>> async)
          Returns all the attachments from the referred page.
 void getEntityConfig(EntityReference origin, ResourceReference destination, com.google.gwt.user.client.rpc.AsyncCallback<EntityConfig> async)
          Creates an entity link configuration object (URL, reference) for a link with the specified origin and destination.
 void getImageAttachments(WikiPageReference documentReference, com.google.gwt.user.client.rpc.AsyncCallback<List<Attachment>> async)
          Returns all the image attachments from the referred page.
 void getMatchingPages(String wikiName, String keyword, int start, int count, com.google.gwt.user.client.rpc.AsyncCallback<List<WikiPage>> async)
           
 void getPageNames(String wikiName, String spaceName, com.google.gwt.user.client.rpc.AsyncCallback<List<String>> async)
          Returns the list of the page names from a given space and a given wiki.
 void getRecentlyModifiedPages(String wikiName, int start, int count, com.google.gwt.user.client.rpc.AsyncCallback<List<WikiPage>> async)
           
 void getSpaceNames(String wikiName, com.google.gwt.user.client.rpc.AsyncCallback<List<String>> async)
          Returns a list of all spaces names in the specified wiki.
 void getUploadURL(WikiPageReference documentReference, com.google.gwt.user.client.rpc.AsyncCallback<String> async)
          Returns the URL to be used to upload an attachment to the specified document.
 void getVirtualWikiNames(com.google.gwt.user.client.rpc.AsyncCallback<List<String>> async)
          Returns a list containing the names of all wikis.
 void isMultiWiki(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
          Deprecated. Multiwiki is on by default, starting with XWiki 5.0.
 void parseLinkReference(String linkReferenceAsString, EntityReference baseReference, com.google.gwt.user.client.rpc.AsyncCallback<ResourceReference> async)
          Parses the given link reference and extracts a reference to the linked resource.
 

Method Detail

isMultiWiki

void isMultiWiki(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
Deprecated. Multiwiki is on by default, starting with XWiki 5.0.

Checks if the editor is running in a multiwiki environment.

Parameters:
async - object used for asynchronous communication between server and client

getVirtualWikiNames

void getVirtualWikiNames(com.google.gwt.user.client.rpc.AsyncCallback<List<String>> async)
Returns a list containing the names of all wikis.

Parameters:
async - async object used for asynchronous communication between server and client

getSpaceNames

void getSpaceNames(String wikiName,
                   com.google.gwt.user.client.rpc.AsyncCallback<List<String>> async)
Returns a list of all spaces names in the specified wiki.

Parameters:
wikiName - the name of the wiki to search for spaces. If this is null the current wiki will be used
async - object used for asynchronous communication between server and client

getPageNames

void getPageNames(String wikiName,
                  String spaceName,
                  com.google.gwt.user.client.rpc.AsyncCallback<List<String>> async)
Returns the list of the page names from a given space and a given wiki.

Parameters:
wikiName - the name of the wiki. Pass null if the current wiki should be used instead
spaceName - the name of the space
async - object used for asynchronous communication between server and client

getRecentlyModifiedPages

void getRecentlyModifiedPages(String wikiName,
                              int start,
                              int count,
                              com.google.gwt.user.client.rpc.AsyncCallback<List<WikiPage>> async)
Parameters:
wikiName - the name of the wiki where to look for modified pages
start - the start index of the list of pages to return
count - the number of pages to return
async - object used for asynchronous communication between server and client, to return on success the recently count modified pages of the current user, starting from position start

getMatchingPages

void getMatchingPages(String wikiName,
                      String keyword,
                      int start,
                      int count,
                      com.google.gwt.user.client.rpc.AsyncCallback<List<WikiPage>> async)
Parameters:
wikiName - the wiki where to run the search
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
async - object used for asynchronous communication between server and client, to return on success the count pages whose full name or title match the keyword, starting from position start

getEntityConfig

void getEntityConfig(EntityReference origin,
                     ResourceReference destination,
                     com.google.gwt.user.client.rpc.AsyncCallback<EntityConfig> async)
Creates an entity link configuration object (URL, reference) for a link with the specified origin and destination. The string serialization of the entity reference in the returned EntityConfig is relative to the link origin.

Parameters:
origin - the origin of the link
destination - the destination of the link
async - object used for asynchronous communication between server and client.

getAttachment

void getAttachment(AttachmentReference attachmentReference,
                   com.google.gwt.user.client.rpc.AsyncCallback<Attachment> async)
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
async - object used for asynchronous communication between server and client, to return, on success, an Attachment containing the serialized reference and the access URL of the specified attachment, or null in case the attachment was not found

getImageAttachments

void getImageAttachments(WikiPageReference documentReference,
                         com.google.gwt.user.client.rpc.AsyncCallback<List<Attachment>> async)
Returns all the image attachments from the referred page.

Parameters:
documentReference - a reference to the document to get the images from
async - object used for asynchronous communication between server and client

getAttachments

void getAttachments(WikiPageReference documentReference,
                    com.google.gwt.user.client.rpc.AsyncCallback<List<Attachment>> async)
Returns all the attachments from the referred page.

Parameters:
documentReference - a reference to the document to get the attachments from
async - object used for asynchronous communication between server and client

getUploadURL

void getUploadURL(WikiPageReference documentReference,
                  com.google.gwt.user.client.rpc.AsyncCallback<String> async)
Returns the URL to be used to upload an attachment to the specified document.

Parameters:
documentReference - the document for which to retrieve the upload URL
async - object used for asynchronous communication between server and client

parseLinkReference

void parseLinkReference(String linkReferenceAsString,
                        EntityReference baseReference,
                        com.google.gwt.user.client.rpc.AsyncCallback<ResourceReference> async)
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:
linkReferenceAsString - a serialized link reference
baseReference - the entity reference used to resolve the linked resource reference
async - object used for asynchronous communication between server and client


Copyright © 2004-2013 XWiki. All Rights Reserved.