public class WikiRestServiceImpl extends Object implements WikiRestService, org.exoplatform.services.rest.resource.ResourceContainer
| Constructor and Description |
|---|
WikiRestServiceImpl(WikiService wikiService,
org.exoplatform.wiki.rendering.RenderingService renderingService) |
| Modifier and Type | Method and Description |
|---|---|
Attachment |
createAttachment(ObjectFactory objectFactory,
URI baseUri,
Attachment pageAttachment,
Page page,
String xwikiRelativeUrl,
String xwikiAbsoluteUrl) |
Page |
createPage(ObjectFactory objectFactory,
URI baseUri,
URI self,
Page doc) |
PageSummary |
createPageSummary(ObjectFactory objectFactory,
URI baseUri,
Page page) |
Space |
createSpace(ObjectFactory objectFactory,
URI baseUri,
String wikiName,
String spaceName,
Page home) |
javax.ws.rs.core.Response |
getAttachment(javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner,
String pageId,
String attachmentId,
Integer width)
Return an attchment attached to the wiki page.
|
Attachments |
getAttachments(javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner,
String pageId,
Integer start,
Integer number)
Return a list of attachments attached to a wiki page
|
javax.ws.rs.core.Response |
getHelpSyntaxPage(String syntaxId,
String portalUrl)
Return the help syntax page.
|
javax.ws.rs.core.Response |
getImage(javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner,
String pageId,
String imageId,
Integer width)
Deprecated.
use /attachments/{wikiType}/space/{wikiOwner:.+}/page/{pageId}/{attachmentId} instead
|
Spaces |
getLastVisitedSpaces(javax.ws.rs.core.UriInfo uriInfo,
Integer offset,
Integer limit)
Return a list of last visited spaces by the user.
|
Page |
getPage(javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner,
String pageId)
Return a wiki page based on is uri and id
|
Pages |
getPages(javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner,
Integer start,
Integer number,
String parentFilterExpression)
Return a list of pages related to the space and uri
|
javax.ws.rs.core.Response |
getRelated(String path)
Return the related pages of a Wiki page
|
Space |
getSpace(javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner)
Return the space based on the uri
|
Spaces |
getSpaces(javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
Integer start,
Integer number)
Return a list of wiki based on their type.
|
javax.ws.rs.core.Response |
getTreeData(String type,
String path,
String currentPath,
Boolean canEdit,
Boolean showExcerpt,
String depth)
Display the current tree of a wiki based on is path
|
javax.ws.rs.core.Response |
getWikiPageContent(String sessionKey,
String wikiContextKey,
boolean isMarkup,
String data)
Return the wiki page content as html or markup.
|
javax.ws.rs.core.Response |
removeDraft(String draftName)
Remove the draft
|
javax.ws.rs.core.Response |
saveDraft(String wikiType,
String wikiOwner,
String rawPageId,
String pageRevision,
String lastDraftName,
boolean isNewPage,
long clientTime,
String title,
String content,
String isMarkup)
Save draft title and content for a page specified by the given page params
|
javax.ws.rs.core.Response |
searchAccessibleSpaces(String keyword) |
javax.ws.rs.core.Response |
searchData(String keyword,
String wikiType,
String wikiOwner)
Return a list of title based on a searched words.
|
javax.ws.rs.core.Response |
upload(String wikiType,
String wikiOwner,
String pageId)
Upload an attachment to a wiki page
|
public WikiRestServiceImpl(WikiService wikiService, org.exoplatform.wiki.rendering.RenderingService renderingService)
@RolesAllowed(value="users") public javax.ws.rs.core.Response getWikiPageContent(String sessionKey, String wikiContextKey, boolean isMarkup, String data)
getWikiPageContent in interface WikiRestServicesessionKey - key is used to retrieve the editor input value from the session.wikiContextKey - contain the context key which contain the syntax.isMarkup - if true then markup content is returned else html content is returneddata - contain the data as html@RolesAllowed(value="users") public javax.ws.rs.core.Response upload(String wikiType, String wikiOwner, String pageId)
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Is the pageId used by the systempublic javax.ws.rs.core.Response getTreeData(String type, String path, String currentPath, Boolean canEdit, Boolean showExcerpt, String depth)
type - It can be a Portal, Group, User type of wikipath - Contains the path of the wiki pagecurrentPath - Contains the path of the current wiki pageshowExcerpt - Boolean to display or not the excerptdepth - Defined the depth of the children we want to display@RolesAllowed(value="users") public javax.ws.rs.core.Response getRelated(String path)
path - Contains the path of the wiki page@RolesAllowed(value="users") public Spaces getSpaces(@Context javax.ws.rs.core.UriInfo uriInfo, String wikiType, Integer start, Integer number)
uriInfo - Uri of the wikiwikiType - It can be a Portal, Group, User type of wikistart - Not usednumber - Not used@RolesAllowed(value="users") public Spaces getLastVisitedSpaces(@Context javax.ws.rs.core.UriInfo uriInfo, Integer offset, Integer limit)
uriInfo - Uri of the wikioffset - The offset to searchlimit - Limit number to search@RolesAllowed(value="users") public Space getSpace(@Context javax.ws.rs.core.UriInfo uriInfo, String wikiType, String wikiOwner)
uriInfo - Uri of the wikiwikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wiki@RolesAllowed(value="users") public Pages getPages(@Context javax.ws.rs.core.UriInfo uriInfo, String wikiType, String wikiOwner, Integer start, Integer number, String parentFilterExpression)
uriInfo - Uri of the wikiwikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikistart - Not usednumber - Not usedparentFilterExpression - @RolesAllowed(value="users") public Page getPage(@Context javax.ws.rs.core.UriInfo uriInfo, String wikiType, String wikiOwner, String pageId)
uriInfo - Uri of the wikiwikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Id of the wiki page@RolesAllowed(value="users") public Attachments getAttachments(@Context javax.ws.rs.core.UriInfo uriInfo, String wikiType, String wikiOwner, String pageId, Integer start, Integer number)
uriInfo - Uri of the wikiwikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Id of the wiki pagestart - Not usednumber - Not used@RolesAllowed(value="users") public javax.ws.rs.core.Response searchData(String keyword, String wikiType, String wikiOwner) throws Exception
keyword - Word to searchwikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikiExceptionpublic javax.ws.rs.core.Response getImage(@Context
javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner,
String pageId,
String imageId,
Integer width)
uriInfo - Uri of the wikiwikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Id of the wiki pageimageId - Id of the image attached to the wiki pagewidth - expected width of the image, it will keep the ratiopublic javax.ws.rs.core.Response getAttachment(@Context
javax.ws.rs.core.UriInfo uriInfo,
String wikiType,
String wikiOwner,
String pageId,
String attachmentId,
Integer width)
uriInfo - Uri of the wikiwikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Id of the wiki pageattachmentId - Id of the attachment of the wiki pagewidth - in case of an image, expected width of the image, it will keep the ratiopublic Space createSpace(ObjectFactory objectFactory, URI baseUri, String wikiName, String spaceName, Page home)
public Page createPage(ObjectFactory objectFactory, URI baseUri, URI self, Page doc) throws Exception
Exceptionpublic PageSummary createPageSummary(ObjectFactory objectFactory, URI baseUri, Page page) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException, Exception
IllegalArgumentExceptionjavax.ws.rs.core.UriBuilderExceptionExceptionpublic Attachment createAttachment(ObjectFactory objectFactory, URI baseUri, Attachment pageAttachment, Page page, String xwikiRelativeUrl, String xwikiAbsoluteUrl) throws Exception
Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getHelpSyntaxPage(String syntaxId, String portalUrl)
syntaxId - The id of syntax to show in help pageportalUrl - The current portal url@RolesAllowed(value="users") public javax.ws.rs.core.Response searchAccessibleSpaces(String keyword)
@RolesAllowed(value="users") public javax.ws.rs.core.Response saveDraft(String wikiType, String wikiOwner, String rawPageId, String pageRevision, String lastDraftName, boolean isNewPage, long clientTime, String title, String content, String isMarkup)
wikiType - type of wiki to save draftwikiOwner - owner of wiki to save draftrawPageId - name of page to save draft in encoded formatpageRevision - the target revision of target pagelastDraftName - name of the draft page of last saved draft requestisNewPage - The draft for new page or nottitle - draft titlecontent - draft contentisMarkup - content is markup or html. True if is markup.Response with status HTTPStatus.ACCEPTED if saving process is performed successfully
with status HTTPStatus.INTERNAL_ERROR if there is any unknown error in the saving process@RolesAllowed(value="users") public javax.ws.rs.core.Response removeDraft(String draftName)
draftName - The name of draft to removeCopyright © 2003–2016 eXo Platform SAS. All rights reserved.