com.atlassian.confluence.it.api
Class ApiEntityConverter
java.lang.Object
com.atlassian.confluence.it.api.ApiEntityConverter
public class ApiEntityConverter
- extends java.lang.Object
Converts API Model entities into test-support objects like Page and Blogpost.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
convertApiContentToIt
public static com.google.common.base.Function<Content,? extends AbstractContentEntity> convertApiContentToIt
ApiEntityConverter
public ApiEntityConverter()
convertApiContentToItPage
public static Page convertApiContentToItPage(com.atlassian.fugue.Option<Content> contentOption)
convertApiContentToItPage
public static Page convertApiContentToItPage(Content content)
convertApiContentToItBlogPost
public static BlogPost convertApiContentToItBlogPost(Content content)
convertApiContentToItComment
public static Comment convertApiContentToItComment(Content content)
convertApiContentToItAttachment
public static Attachment convertApiContentToItAttachment(Content attachmentContent)
convertApiPersonToItUser
public static User convertApiPersonToItUser(Person person)
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 the
ContentRepresentation.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
passed
ContentRepresentation
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)
convertItSpaceToApiSpace
public static Space convertItSpaceToApiSpace(Space space)
convertApiSpaceToItSpace
public static Space convertApiSpaceToItSpace(Space space)
convertAttachmentsToUploads
public static java.util.List<AttachmentUpload> convertAttachmentsToUploads(Attachment... attachments)
throws java.io.IOException
- Convert IT
Attachment
objects into AttachmentUpload
versions suitable for sending to the
ContentService
.
- Throws:
java.io.IOException
convertAttachmentToUpload
public static AttachmentUpload convertAttachmentToUpload(Attachment attachment)
throws java.io.IOException
- Throws:
java.io.IOException
convertApiContentPageToItAttachments
public static java.util.List<Attachment> convertApiContentPageToItAttachments(PageResponse<Content> contents)
convertItAttachmentToApiContent
public static Content convertItAttachmentToApiContent(Attachment attachment)
Copyright © 2003-2014 Atlassian. All Rights Reserved.