com.atlassian.confluence.plugins.rest.resources
Class ContentResource
java.lang.Object
com.atlassian.confluence.plugins.rest.resources.AbstractResource
com.atlassian.confluence.plugins.rest.resources.ContentResource
public class ContentResource
- extends AbstractResource
Rest resource for accessing Confluence content.
Currently supports only read access for pages, blogs and comments.
Method Summary |
javax.ws.rs.core.Response |
get()
Returns HTTP 404 (not found) as there is no content to return if no ID is passed. |
javax.ws.rs.core.Response |
getAttachments(Long id,
String startIndexString,
String maxResultsString,
Set<String> mime,
Set<String> nice,
boolean reverseOrder)
Returns the attachments for a given resource. |
javax.ws.rs.core.Response |
getContent(Long id)
Returns the content for the given ID. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContentResource
public ContentResource(UserAccessor userAccessor,
RestContentManager restContentManager,
SpacePermissionManager spacePermissionManager)
get
public javax.ws.rs.core.Response get()
- Returns HTTP 404 (not found) as there is no content to return if no ID is passed.
- Returns:
getContent
public javax.ws.rs.core.Response getContent(Long id)
- Returns the content for the given ID.
- Parameters:
id
-
- Returns:
getAttachments
public javax.ws.rs.core.Response getAttachments(Long id,
String startIndexString,
String maxResultsString,
Set<String> mime,
Set<String> nice,
boolean reverseOrder)
- Returns the attachments for a given resource. The results are ordered by the creation date.
- Parameters:
id
- ID of resource (such as a page or blog post)startIndexString
- Index of first item (inclusive) to return.maxResultsString
- Maximum number of items to return. Default is 50.mimeType
- Mime types to filter the attachments by, such as: image/jpegattachmentType
- 'Nice' type to filter the attachments by. Filtering
is case insensititve. Can be one or more of: PDF, IMAGE, XML, HTML,
TEXT, WORD, EXCEL, POWERPOINT, JAVA_SOURCE, JAVA_ARCHIVE, ZIP. You can
specify multiple types like this: ?attachmentType=image&attachmentType=pdfreverseOrder
- set to true to have the results returned in reverse chronological order.
- Returns:
- attachmentEntityList
Copyright © 2003-2012 Atlassian. All Rights Reserved.