Class SimpleSiteStructure
java.lang.Object
com.atlassian.confluence.it.export.SimpleSiteStructure
A simple representation of an exported Confluence site providing an easy way to validate site exports in acceptance
tests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static interface
static class
static class
static class
static class
The representation of a Confluence user in the export file -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addAttachmentData
(String name, InputStream inputStream) static SimpleSiteStructure
Utility method to create a SimpleSiteStructure as represented by the supplied InputStream.getAttachmentData
(SimpleSiteStructure.AttachmentRepresentation attachment, int version) getPageFromSpaceWithTitle
(String spaceKey, String title) boolean
hasAnonymizedUser
(String username) boolean
hasPage
(AbstractPageEntity page) boolean
hasUserWithEmail
(String username)
-
Constructor Details
-
SimpleSiteStructure
public SimpleSiteStructure()
-
-
Method Details
-
add
- Parameters:
rep
- the object to be stored in the structure.
-
getPageFromSpaceWithTitle
public SimpleSiteStructure.PageRepresentation getPageFromSpaceWithTitle(String spaceKey, String title) - Parameters:
spaceKey
- the key of the space the page is found intitle
- the title of the page- Returns:
- a Page representation for the specified page in the specified space, or null if there is none.
-
hasUserWithEmail
-
hasAnonymizedUser
-
hasPage
-
getAllAttachments
- Returns:
- all attachments found in the export
-
createFromStream
Utility method to create a SimpleSiteStructure as represented by the supplied InputStream.- Parameters:
str
- the stream to parse.- Returns:
- the SimpleSiteStructure represented by this stream.
- Throws:
Exception
-
addAttachmentData
- Throws:
IOException
-
getAttachmentData
public String getAttachmentData(SimpleSiteStructure.AttachmentRepresentation attachment, int version)
-