com.atlassian.confluence.it.export
Class SimpleSiteStructure

java.lang.Object
  extended by com.atlassian.confluence.it.export.SimpleSiteStructure

public class SimpleSiteStructure
extends java.lang.Object

A simple representation of an exported Confluence site providing an easy way to validate site exports in acceptance tests.


Nested Class Summary
static class SimpleSiteStructure.AttachmentRepresentation
           
static class SimpleSiteStructure.IdentifiedRepresentation
           
static class SimpleSiteStructure.PageRepresentation
           
static class SimpleSiteStructure.SpaceRepresentation
           
 
Constructor Summary
SimpleSiteStructure()
           
 
Method Summary
 void add(SimpleSiteStructure.IdentifiedRepresentation rep)
           
static SimpleSiteStructure createFromStream(java.io.InputStream str)
          Utility method to create a SimpleSiteStructure as represented by the supplied InputStream.
 java.util.Set<SimpleSiteStructure.AttachmentRepresentation> getAllAttachments()
           
 SimpleSiteStructure.PageRepresentation getPageFromSpaceWithTitle(java.lang.String spaceKey, java.lang.String title)
           
 boolean hasPage(Page page)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSiteStructure

public SimpleSiteStructure()
Method Detail

add

public void add(SimpleSiteStructure.IdentifiedRepresentation rep)
Parameters:
rep - the object to be stored in the structure.

getPageFromSpaceWithTitle

public SimpleSiteStructure.PageRepresentation getPageFromSpaceWithTitle(java.lang.String spaceKey,
                                                                        java.lang.String title)
Parameters:
spaceKey - the key of the space the page is found in
title - the title of the page
Returns:
a Page representation for the specified page in the specified space, or null if there is none.

hasPage

public boolean hasPage(Page page)

getAllAttachments

public java.util.Set<SimpleSiteStructure.AttachmentRepresentation> getAllAttachments()
Returns:
all attachments found in the export

createFromStream

public static SimpleSiteStructure createFromStream(java.io.InputStream str)
                                            throws java.lang.Exception
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:
java.lang.Exception


Copyright © 2003-2014 Atlassian. All Rights Reserved.