public abstract class AbstractAttachmentCopier extends Object implements AttachmentDao.AttachmentCopier
It also provides some convenience methods for checking whether a given object is to be included in the copy.
Modifier and Type | Field and Description |
---|---|
protected com.atlassian.core.util.ProgressMeter |
progress |
Constructor and Description |
---|
AbstractAttachmentCopier() |
Modifier and Type | Method and Description |
---|---|
protected 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(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(List<? extends Space> spaceList)
Set which Spaces should be included in the copy.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy
public void setParentContentToExclude(List<? extends ConfluenceEntityObject> contentList)
AttachmentDao.AttachmentCopier
setParentContentToExclude
in interface AttachmentDao.AttachmentCopier
contentList
- a List of ContentEntityObjectspublic void setSpacesToInclude(List<? extends Space> spaceList)
AttachmentDao.AttachmentCopier
If no Spaces are set, then content from all Spaces is included.
setSpacesToInclude
in interface AttachmentDao.AttachmentCopier
spaceList
- a List of Spacespublic void setProgressMeter(com.atlassian.core.util.ProgressMeter progress)
AttachmentDao.AttachmentCopier
setProgressMeter
in interface AttachmentDao.AttachmentCopier
progress
- a ProgressMeter instanceprotected boolean isSpaceIncluded(Space space)
space
- the Space to checkprotected boolean isContentSpaceIncluded(ContentEntityObject content)
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.
content
- the ContentEntityObject to checkprotected boolean isContentExcluded(ContentEntityObject content)
content
- the ContentEntityObject to checkCopyright © 2003–2016 Atlassian. All rights reserved.