Package com.atlassian.confluence.it.api
Class ApiEntityConverter
- java.lang.Object
-
- com.atlassian.confluence.it.api.ApiEntityConverter
-
public class ApiEntityConverter extends Object
Converts API Model entities into test-support objects like Page and Blogpost.
-
-
Constructor Summary
Constructors Constructor Description ApiEntityConverter()
-
Method Summary
-
-
-
Method Detail
-
convertApiContentToItBlogPost
public static BlogPost convertApiContentToItBlogPost(Content content)
-
convertApiContentToItAttachment
public static Attachment convertApiContentToItAttachment(Content attachmentContent)
-
convertItPageToApiContent
public static Content convertItPageToApiContent(Page page)
Converts an acceptance-test Page object into an API Content instance, where the body of the Content is in theContentRepresentation.STORAGE
format.
-
convertItPageToApiContent
public static Content convertItPageToApiContent(Page page, ContentRepresentation format)
Converts an acceptance-test Page object into an API Content instance, where the body of the Content is in the passedContentRepresentation
format.
-
convertItBlogPostToApiContent
public static Content convertItBlogPostToApiContent(BlogPost blogPost, ContentRepresentation format)
-
convertItContentToApiContent
public static Content convertItContentToApiContent(ContentEntity entity)
-
convertItCommentToApiContent
public static Content convertItCommentToApiContent(Comment comment, ContentRepresentation format)
-
convertAttachmentsToUploads
public static List<AttachmentUpload> convertAttachmentsToUploads(Attachment... attachments) throws IOException
Convert ITAttachment
objects intoAttachmentUpload
versions suitable for sending to theContentService
.- Throws:
IOException
-
convertAttachmentToUpload
public static AttachmentUpload convertAttachmentToUpload(Attachment attachment) throws IOException
- Throws:
IOException
-
convertApiContentPageToItAttachments
public static List<Attachment> convertApiContentPageToItAttachments(PageResponse<Content> contents)
-
convertItAttachmentToApiContent
public static Content convertItAttachmentToApiContent(Attachment attachment)
-
-