Package io.writeopia.sdk.manager
Class ContentHandler
-
- All Implemented Interfaces:
public final class ContentHandlerClass dedicated to handle adding, deleting or changing StorySteps
-
-
Method Summary
Modifier and Type Method Description final StoryStatechangeStoryStepState(Map<Integer, StoryStep> currentStory, StoryStep newState, Integer position)final StoryStatechangeStoryType(Map<Integer, StoryStep> currentStory, StoryType type, Integer position, CommandInfo commandInfo)final Map<Integer, StoryStep>addNewContent(Map<Integer, StoryStep> currentStory, StoryStep newStoryUnit, Integer position)final Map<Integer, StoryStep>addNewContentBulk(Map<Integer, StoryStep> currentStory, Map<Integer, StoryStep> newStory, Function0<StoryStep> addInBetween)final Pair<Pair<Integer, StoryStep>, StoryState>onLineBreak(Map<Integer, StoryStep> currentStory, Action.LineBreak lineBreakInfo)final StoryStatedeleteStory(Action.DeleteStory deleteInfo, Map<Integer, StoryStep> history)final Pair<Map<Integer, StoryStep>, Map<Integer, StoryStep>>bulkDeletion(Iterable<Integer> positions, Map<Integer, StoryStep> stories)-
-
Method Detail
-
changeStoryStepState
final StoryState changeStoryStepState(Map<Integer, StoryStep> currentStory, StoryStep newState, Integer position)
-
changeStoryType
final StoryState changeStoryType(Map<Integer, StoryStep> currentStory, StoryType type, Integer position, CommandInfo commandInfo)
-
addNewContent
final Map<Integer, StoryStep> addNewContent(Map<Integer, StoryStep> currentStory, StoryStep newStoryUnit, Integer position)
-
addNewContentBulk
final Map<Integer, StoryStep> addNewContentBulk(Map<Integer, StoryStep> currentStory, Map<Integer, StoryStep> newStory, Function0<StoryStep> addInBetween)
-
onLineBreak
final Pair<Pair<Integer, StoryStep>, StoryState> onLineBreak(Map<Integer, StoryStep> currentStory, Action.LineBreak lineBreakInfo)
-
deleteStory
final StoryState deleteStory(Action.DeleteStory deleteInfo, Map<Integer, StoryStep> history)
-
-
-
-