Package ro.sync.ecss.extensions.api
Class DITAAuthorActionEventHandler
java.lang.Object
ro.sync.ecss.extensions.api.AuthorActionEventHandlerBase
ro.sync.ecss.extensions.api.DefaultAuthorActionEventHandler
ro.sync.ecss.extensions.api.DITAAuthorActionEventHandler
- All Implemented Interfaces:
AuthorActionEventHandler,Extension
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public class DITAAuthorActionEventHandler
extends DefaultAuthorActionEventHandler
Author action event handler for DITA.
IMPORTANT, THIS CLASS SHOULD HAVE BEEN CREATED IN THE FRAMEWORK SPECIFIC PACKAGE.
BUT IT WAS NOT, TOO LATE, WE KEEP IT HERE FOR BACKWARD COMPATIBILITY
-
Nested Class Summary
Nested classes/interfaces inherited from interface ro.sync.ecss.extensions.api.AuthorActionEventHandler
AuthorActionEventHandler.AuthorActionEventType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanareCompatibleLists(AuthorNode node1, AuthorNode node2) Check if two given nodes are compatible lists (i.e.booleancanHandleEvent(AuthorAccess authorAccess, AuthorActionEventDetails eventDetails) Check if an Author action event can be handled.getListItemAncestorToSplit(AuthorNode node, AuthorAccess access) Return the list item ancestor of the current node that needs to be split on Enter.protected StringgetParagraphElement(AuthorAccess authorAccess) Get the preferred XML element content to be inserted.booleanhandleEvent(AuthorAccess authorAccess, AuthorActionEventHandler.AuthorActionEventType eventType) An event was generated.protected booleanisList(AuthorNode node) Check if the given node is a list.protected booleanisMovableListItem(AuthorAccess authorAccess, AuthorNode candidate) Checks if this node represents a list item that can be promoted/demoted.Methods inherited from class ro.sync.ecss.extensions.api.DefaultAuthorActionEventHandler
canHandleEvent, getContentCompletionActions, getDescription, getPreferredXMLElementContent, promote, promoteSubListItems
-
Constructor Details
-
DITAAuthorActionEventHandler
public DITAAuthorActionEventHandler()
-
-
Method Details
-
isMovableListItem
Description copied from class:DefaultAuthorActionEventHandlerChecks if this node represents a list item that can be promoted/demoted.- Overrides:
isMovableListItemin classDefaultAuthorActionEventHandler- Parameters:
authorAccess- The Author access.candidate- The node that candidates for promotion/demotion.- Returns:
trueif the list item can be promoted/demoted.- See Also:
-
isList
Description copied from class:DefaultAuthorActionEventHandlerCheck if the given node is a list.- Overrides:
isListin classDefaultAuthorActionEventHandler- Parameters:
node- The node.- Returns:
trueif the node is a list.- See Also:
-
getParagraphElement
Description copied from class:DefaultAuthorActionEventHandlerGet the preferred XML element content to be inserted. Can benull.- Overrides:
getParagraphElementin classDefaultAuthorActionEventHandler- Parameters:
authorAccess- The author access.- Returns:
- the preferred XML element content to be inserted.
-
areCompatibleLists
Description copied from class:DefaultAuthorActionEventHandlerCheck if two given nodes are compatible lists (i.e. if we accept items from one list to migrate into the other one).- Overrides:
areCompatibleListsin classDefaultAuthorActionEventHandler- Returns:
trueif the two given nodes are compatible lists.- See Also:
-
getListItemAncestorToSplit
Description copied from interface:AuthorActionEventHandlerReturn the list item ancestor of the current node that needs to be split on Enter.- Parameters:
node- The node.access- Access object to the Author API.- Returns:
- the list item ancestor of the current node that needs to be split on Enter, or
null. - See Also:
-
handleEvent
public boolean handleEvent(AuthorAccess authorAccess, AuthorActionEventHandler.AuthorActionEventType eventType) Description copied from interface:AuthorActionEventHandlerAn event was generated.- Specified by:
handleEventin interfaceAuthorActionEventHandler- Overrides:
handleEventin classDefaultAuthorActionEventHandler- Parameters:
authorAccess- Author access.eventType- The type of the generated event.- Returns:
trueif the event was handled and the default operation should be skipped,falseto let the default operation execute.- See Also:
-
canHandleEvent
Description copied from interface:AuthorActionEventHandlerCheck if an Author action event can be handled.- Parameters:
authorAccess- Access to the Author API.eventDetails- The details of the event generated.- Returns:
trueif the Author action event can be handled.- See Also:
-