|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.wysiwyg.server.DefaultWikiService
public class DefaultWikiService
The default implementation for WikiService.
| Constructor Summary | |
|---|---|
DefaultWikiService()
|
|
| Method Summary | |
|---|---|
Attachment |
getAttachment(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName,
java.lang.String attachmentName)
Returns attachment information from the passed parameters, testing if the passed attachment exists. |
java.util.List<Attachment> |
getAttachments(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName)
Returns all the attachments from the referred page. |
java.util.List<Attachment> |
getImageAttachments(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName)
Returns all the image attachments from the referred page. |
java.util.List<WikiPage> |
getMatchingPages(java.lang.String keyword,
int start,
int count)
|
LinkConfig |
getPageLink(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName,
java.lang.String revision,
java.lang.String anchor)
Creates a page link (URL, reference) from the given parameters. |
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.util.List<java.lang.String> |
getVirtualWikiNames()
|
java.lang.Boolean |
isMultiWiki()
Check if the current wiki is part of a multiwiki (i.e. |
protected org.xwiki.model.reference.DocumentReference |
prepareDocumentReference(java.lang.String wiki,
java.lang.String space,
java.lang.String page)
Gets a document reference from the passed parameters, handling the empty wiki, empty space or empty page name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultWikiService()
| Method Detail |
|---|
public java.lang.Boolean isMultiWiki()
isMultiWiki in interface WikiServiceWikiService.isMultiWiki()public java.util.List<java.lang.String> getVirtualWikiNames()
getVirtualWikiNames in interface WikiServiceWikiService.getVirtualWikiNames()public java.util.List<java.lang.String> getSpaceNames(java.lang.String wikiName)
getSpaceNames in interface WikiServicewikiName - the name of the wiki to search for spaces. If this is null, the current wiki will be
used.
WikiService.getSpaceNames(String)
public java.util.List<java.lang.String> getPageNames(java.lang.String wikiName,
java.lang.String spaceName)
getPageNames in interface WikiServicewikiName - the name of the wiki. Pass null if this should use the current wiki.spaceName - the name of the space
WikiService.getPageNames(String, String)
public java.util.List<WikiPage> getRecentlyModifiedPages(int start,
int count)
getRecentlyModifiedPages in interface WikiServicestart - the start index of the list of pages to returncount - the number of pages to return
count modified pages of the current user, starting from position startWikiService.getRecentlyModifiedPages(int, int)
public java.util.List<WikiPage> getMatchingPages(java.lang.String keyword,
int start,
int count)
getMatchingPages in interface WikiServicekeyword - the keyword to search the pages forstart - the start index of the list of pages to returncount - the number of pages to return
count pages whose full name or title match the keyword, starting from position startWikiService.getMatchingPages(String, int, int)
public LinkConfig getPageLink(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName,
java.lang.String revision,
java.lang.String anchor)
getPageLink in interface WikiServicewikiName - the name of the wiki to which to linkspaceName - the name of the space of the page. If this parameter is missing, it is replaced with the space
of the current document in the context.pageName - the name of the page to which to link to. If it's missing, it is replaced with "WebHome".revision - the value for the page revision to which to link to. If this is missing, the link is made to the
latest revision, the default view action for the document.anchor - the name of the anchor type.
WikiService.getPageLink(String, String, String, String, String)
public Attachment getAttachment(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName,
java.lang.String attachmentName)
attachmentName name will be cleaned to match the attachment names cleaning rules, and the attachment
reference and URL will be generated with the cleaned name. This function will be used as a method to test the
correct upload of a file to a page.
getAttachment in interface WikiServicewikiName - the name of the wiki of the page the file is attached tospaceName - the name of the space of the page the file is attached topageName - the name of the page the file is attached toattachmentName - the uncleaned name of the attachment, which is to be cleaned on the server
Attachment containing the reference and the URL of the attachment, or null in case the
attachment was not foundWikiService.getAttachment(String, String, String, String)
protected org.xwiki.model.reference.DocumentReference prepareDocumentReference(java.lang.String wiki,
java.lang.String space,
java.lang.String page)
wiki - the wiki of the documentspace - the space of the documentpage - the page name of the targeted document
DocumentReference corresponding to the passed parameters, with all the missing
values completed with defaults
public java.util.List<Attachment> getImageAttachments(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName)
getImageAttachments in interface WikiServicewikiName - the name of the wiki to get images fromspaceName - the name of the space to get image attachments frompageName - the name of the page to get image attachments from
WikiService.getImageAttachments(String, String, String)
public java.util.List<Attachment> getAttachments(java.lang.String wikiName,
java.lang.String spaceName,
java.lang.String pageName)
getAttachments in interface WikiServicewikiName - the name of the wiki to get attachments fromspaceName - the name of the space to get attachments frompageName - the name of the page to get attachments from
WikiService.getAttachments(String, String, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||