public class ContentResource extends AbstractResource
authContext, uriInfo, userAccessor
Constructor and Description |
---|
ContentResource(UserAccessor userAccessor,
RestContentManager restContentManager,
SpacePermissionManager spacePermissionManager) |
Modifier and Type | Method and Description |
---|---|
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.
|
createRequestContext, getAnonymousUserUriBuilder, getAttachmentUriBuilder, getContentUriBuilder, getCurrentUser, getMissingUserUriBuilder, getSpaceUriBuilder, getUserUriBuilder
public ContentResource(UserAccessor userAccessor, RestContentManager restContentManager, SpacePermissionManager spacePermissionManager)
public javax.ws.rs.core.Response get()
public javax.ws.rs.core.Response getContent(Long id)
id
- public javax.ws.rs.core.Response getAttachments(Long id, String startIndexString, String maxResultsString, Set<String> mime, Set<String> nice, boolean reverseOrder)
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.Copyright © 2003–2015 Atlassian. All rights reserved.