com.atlassian.confluence.importexport
Class DefaultExportContext

java.lang.Object
  extended by com.atlassian.confluence.importexport.DefaultExportContext
All Implemented Interfaces:
ExportContext

public class DefaultExportContext
extends Object
implements ExportContext


Constructor Summary
DefaultExportContext()
           
 
Method Summary
 void addExceptionEntities(List<ConfluenceEntityObject> entities, boolean validate)
          Helper method to add a collection of entities to the current exception entities
 void addExceptionEntity(ConfluenceEntityObject entity)
           
 void addWorkingEntity(ConfluenceEntityObject entity)
          Add to the entities to be exported.
 ContentTree getContentTree()
           
 List<ConfluenceEntityObject> getExceptionEntities()
           
 File getExportDirectory()
           
 String getExportDirectoryPath()
          Deprecated. 
 ExportScope getExportScope()
           
 Set getProcessedIds()
           
 String getScope()
           
 String getType()
           
 com.atlassian.user.User getUser()
           
 List<ConfluenceEntityObject> getWorkingEntities()
          The top level entities to be exported.
static DefaultExportContext getXmlBackupInstance()
           
 boolean isExceptionEntity(ConfluenceEntityObject entity)
          Entities to be excluded from the export.
 boolean isExportAll()
           
 boolean isExportAttachments()
           
 boolean isExportComments()
           
 boolean isExportHierarchy()
           
 boolean isPageInExport(Page page, PageManager pageManager)
           
 void setContentTree(ContentTree contentTree)
           
 void setExportAll(boolean exportAll)
           
 void setExportAttachments(boolean exportAttachments)
           
 void setExportComments(boolean exportComments)
           
 void setExportDirectory(File exportDirectory)
           
 void setExportHierarchy(boolean exportHierarchy)
           
 void setExportScope(ExportScope scope)
           
 void setScope(String scope)
          Deprecated. since 4.2 use setExportScope(ExportScope)
 void setType(String type)
           
 void setUser(com.atlassian.user.User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExportContext

public DefaultExportContext()
Method Detail

getXmlBackupInstance

public static DefaultExportContext getXmlBackupInstance()

addWorkingEntity

public void addWorkingEntity(ConfluenceEntityObject entity)
Add to the entities to be exported. This entity will be exported and its children and components may be too.


addExceptionEntities

public void addExceptionEntities(List<ConfluenceEntityObject> entities,
                                 boolean validate)
                          throws IllegalArgumentException
Helper method to add a collection of entities to the current exception entities

Parameters:
entities - a list of ConfluenceEntityObjects
validate - - if true the contents of the list will be type-checked to ensure that they contain nothing other than ConfluenceEntityObject.
Throws:
IllegalArgumentException - if the list contains something ConfluenceEntityObject and validation is turned on.

addExceptionEntity

public void addExceptionEntity(ConfluenceEntityObject entity)

isPageInExport

public boolean isPageInExport(Page page,
                              PageManager pageManager)
Specified by:
isPageInExport in interface ExportContext
Returns:
true if the given page is part of the current export, otherwise false.

getExceptionEntities

public List<ConfluenceEntityObject> getExceptionEntities()

getWorkingEntities

public List<ConfluenceEntityObject> getWorkingEntities()
Description copied from interface: ExportContext
The top level entities to be exported. Their children and components will usually be exported too.

Specified by:
getWorkingEntities in interface ExportContext

getProcessedIds

public Set getProcessedIds()
Specified by:
getProcessedIds in interface ExportContext

getExportDirectoryPath

@Deprecated
public String getExportDirectoryPath()
Deprecated. 

Specified by:
getExportDirectoryPath in interface ExportContext

setUser

public void setUser(com.atlassian.user.User user)

getUser

public com.atlassian.user.User getUser()
Specified by:
getUser in interface ExportContext
Returns:
the user this export is being generated for.

isExceptionEntity

public boolean isExceptionEntity(ConfluenceEntityObject entity)
Description copied from interface: ExportContext
Entities to be excluded from the export.

Specified by:
isExceptionEntity in interface ExportContext

isExportComments

public boolean isExportComments()
Specified by:
isExportComments in interface ExportContext

setExportComments

public void setExportComments(boolean exportComments)

isExportAttachments

public boolean isExportAttachments()
Specified by:
isExportAttachments in interface ExportContext

setExportAttachments

public void setExportAttachments(boolean exportAttachments)
Specified by:
setExportAttachments in interface ExportContext

isExportHierarchy

public boolean isExportHierarchy()
Specified by:
isExportHierarchy in interface ExportContext

setExportHierarchy

public void setExportHierarchy(boolean exportHierarchy)
Specified by:
setExportHierarchy in interface ExportContext

getExportDirectory

public File getExportDirectory()

setExportDirectory

public void setExportDirectory(File exportDirectory)

getContentTree

public ContentTree getContentTree()
Returns:
tree of ContentNodes to export (each ContentNode holds a page object), permission checking should already be applied to this tree when the context is passed to the Exporter.
See Also:
ContentTree

setContentTree

public void setContentTree(ContentTree contentTree)

getType

public String getType()
Specified by:
getType in interface ExportContext
Returns:
the type of the export: HTML, PDF or XML. These constants are defined above.

setType

public void setType(String type)

getScope

public String getScope()
Specified by:
getScope in interface ExportContext
Returns:
the scope of an XML export: global, space or page. These string constants are defined on ImportExportManager.

getExportScope

public ExportScope getExportScope()
Specified by:
getExportScope in interface ExportContext
Returns:
the scope of an XML export: global, space or page.

setScope

@Deprecated
public void setScope(String scope)
Deprecated. since 4.2 use setExportScope(ExportScope)


setExportScope

public void setExportScope(ExportScope scope)

isExportAll

public boolean isExportAll()

setExportAll

public void setExportAll(boolean exportAll)


Copyright © 2003-2013 Atlassian. All Rights Reserved.