Class CursorFactory
java.lang.Object
com.atlassian.confluence.api.service.pagination.CursorFactory
Factory to create cursor entities
- Since:
- 7.18
-
Method Summary
Modifier and TypeMethodDescriptionstatic CursorCreate cursor from stringstatic CursorgetEmptyCursorBy(ContentType contentType) static voidregisterCursorInstanceCreator(String cursorType, Function<String, Cursor> function) Additional cursor types could be registered through this method.static voidregisterEmptyContentCursor(ContentType contentType, Cursor emptyCursor) Register an empty cursor for a content type.static voidunregisterCursorInstanceCreator(String cursorType) Unregister a cursor type creator.static voidunregisterEmptyContentCursor(ContentType contentType) Unregister an empty cursor for a content type.
-
Method Details
-
registerCursorInstanceCreator
public static void registerCursorInstanceCreator(String cursorType, Function<String, Cursor> function) Additional cursor types could be registered through this method.- Parameters:
cursorType- Cursor type (name)function- Function that could create instance of the cursor from string- Since:
- 9.2.5
-
unregisterCursorInstanceCreator
Unregister a cursor type creator.- Parameters:
cursorType- Cursor type (name) to unregister- Since:
- 9.2.11
-
registerEmptyContentCursor
Register an empty cursor for a content type.- Parameters:
contentType- the content typeemptyCursor- the empty cursor instance for this content type- Since:
- 9.2.11
-
unregisterEmptyContentCursor
Unregister an empty cursor for a content type.- Parameters:
contentType- the content type to unregister- Since:
- 9.2.11
-
buildFrom
Create cursor from string- Parameters:
cursorString- Cursor in string format- Returns:
- Cursor entity or null if string is null or empty
-
getEmptyCursorBy
- Parameters:
contentType- theContentTypeto get the empty cursor for- Returns:
- the empty
ContentCursorfor that content type - Since:
- 9.2.6
-