com.atlassian.confluence.pages.persistence.dao
Class AbstractAttachmentCopier

java.lang.Object
  extended by com.atlassian.confluence.pages.persistence.dao.AbstractAttachmentCopier
All Implemented Interfaces:
AttachmentDao.AttachmentCopier
Direct Known Subclasses:
AbstractHibernateAttachmentDao.IntraHibernateAttachmentCopier, GeneralAttachmentCopier

public abstract class AbstractAttachmentCopier
extends java.lang.Object
implements AttachmentDao.AttachmentCopier

This method implements some of the methods from the AttachmentDao.AttachmentCopier interface. It also provides some convenience methods for checking whether a given object is to be included in the copy.


Field Summary
protected  com.atlassian.core.util.ProgressMeter progress
           
 
Constructor Summary
AbstractAttachmentCopier()
           
 
Method Summary
protected  java.util.List<Space> getSpacesToInclude()
           
protected  boolean isContentExcluded(ContentEntityObject content)
          Returns whether a ContentEntityObject is excluded from the copy
protected  boolean isContentSpaceIncluded(ContentEntityObject content)
          Returns whether the content's Space is in the inclusion List.
protected  boolean isSpaceIncluded(Space space)
          Returns whether the space is in the inclusion List.
 void setParentContentToExclude(java.util.List<? extends ConfluenceEntityObject> contentList)
          Set which parent content should be excluded from the copy.
 void setProgressMeter(com.atlassian.core.util.ProgressMeter progress)
          Set the progress meter to report the status of the copy.
 void setSpacesToInclude(java.util.List<? extends Space> spaceList)
          Set which Spaces should be included in the copy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.pages.persistence.dao.AttachmentDao.AttachmentCopier
copy
 

Field Detail

progress

protected com.atlassian.core.util.ProgressMeter progress
Constructor Detail

AbstractAttachmentCopier

public AbstractAttachmentCopier()
Method Detail

setParentContentToExclude

public void setParentContentToExclude(java.util.List<? extends ConfluenceEntityObject> contentList)
Description copied from interface: AttachmentDao.AttachmentCopier
Set which parent content should be excluded from the copy.

Specified by:
setParentContentToExclude in interface AttachmentDao.AttachmentCopier
Parameters:
contentList - a List of ContentEntityObjects

setSpacesToInclude

public void setSpacesToInclude(java.util.List<? extends Space> spaceList)
Description copied from interface: AttachmentDao.AttachmentCopier
Set which Spaces should be included in the copy. If no Spaces are set, then content from all Spaces is included.

Specified by:
setSpacesToInclude in interface AttachmentDao.AttachmentCopier
Parameters:
spaceList - a List of Spaces

setProgressMeter

public void setProgressMeter(com.atlassian.core.util.ProgressMeter progress)
Description copied from interface: AttachmentDao.AttachmentCopier
Set the progress meter to report the status of the copy.

Specified by:
setProgressMeter in interface AttachmentDao.AttachmentCopier
Parameters:
progress - a ProgressMeter instance

isSpaceIncluded

protected boolean isSpaceIncluded(Space space)
Returns whether the space is in the inclusion List.

Parameters:
space - the Space to check
Returns:
true if it is included, false otherwise

isContentSpaceIncluded

protected boolean isContentSpaceIncluded(ContentEntityObject content)
Returns whether the content's Space is in the inclusion List. This method first checks if there are any Space restrictions. If there are none, true is returned. Then checks whether content belongs to a Space. If it is not a SpaceContentEntityObject, false is returned. Otherwise, #isSpaceIncluded() is called.

Parameters:
content - the ContentEntityObject to check
Returns:
true if it is included, false otherwise

isContentExcluded

protected boolean isContentExcluded(ContentEntityObject content)
Returns whether a ContentEntityObject is excluded from the copy

Parameters:
content - the ContentEntityObject to check
Returns:
true if excluded, false otherwise

getSpacesToInclude

protected java.util.List<Space> getSpacesToInclude()


Copyright © 2003-2013 Atlassian. All Rights Reserved.