Class DefaultPageNameConflictResolver
- java.lang.Object
-
- com.atlassian.confluence.pages.persistence.dao.bulk.impl.DefaultPageNameConflictResolver
-
- All Implemented Interfaces:
PageNameConflictResolver
public class DefaultPageNameConflictResolver extends Object implements PageNameConflictResolver
Default page name conflict resolver. Will add ([conflicted number]) at the end of conflict page titlte- Since:
- 5.10
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_RETRY
-
Constructor Summary
Constructors Constructor Description DefaultPageNameConflictResolver()
DefaultPageNameConflictResolver(PageNameConflictResolver delegateConflictResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
couldProvideNewName()
Indicates that this always provides a new name during the copy process, even for non-conflicting pagesint
getMaxRetryNumber()
This is maximum number to retry saving page.String
resolveConflict(int currentRetryNumber, String originalName)
Implements the name conflict resolution strategy
-
-
-
Field Detail
-
MAX_RETRY
public static final int MAX_RETRY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultPageNameConflictResolver
public DefaultPageNameConflictResolver(PageNameConflictResolver delegateConflictResolver)
-
DefaultPageNameConflictResolver
public DefaultPageNameConflictResolver()
-
-
Method Detail
-
couldProvideNewName
public boolean couldProvideNewName()
Description copied from interface:PageNameConflictResolver
Indicates that this always provides a new name during the copy process, even for non-conflicting pages- Specified by:
couldProvideNewName
in interfacePageNameConflictResolver
- Returns:
- true if yes otherwise false
-
getMaxRetryNumber
public int getMaxRetryNumber()
Description copied from interface:PageNameConflictResolver
This is maximum number to retry saving page. In case, there is duplication still happen even we already try to rename the page- Specified by:
getMaxRetryNumber
in interfacePageNameConflictResolver
- Returns:
- max retry to save page with new name
-
resolveConflict
public String resolveConflict(int currentRetryNumber, String originalName)
Description copied from interface:PageNameConflictResolver
Implements the name conflict resolution strategy- Specified by:
resolveConflict
in interfacePageNameConflictResolver
- Returns:
- new name which could solve conflict
-
-