Class SchemaAwareHandlerResultsImpl
- java.lang.Object
-
- ro.sync.ecss.extensions.api.schemaaware.SchemaAwareHandlerResultsImpl
-
- All Implemented Interfaces:
SchemaAwareHandlerResult
,SchemaAwareHandlerResultInsertConstants
@API(type=EXTENDABLE, src=PUBLIC) public class SchemaAwareHandlerResultsImpl extends java.lang.Object implements SchemaAwareHandlerResult
Default implementation forSchemaAwareHandlerResult
}.- Since:
- 11.2
-
-
Field Summary
-
Fields inherited from interface ro.sync.ecss.extensions.api.schemaaware.SchemaAwareHandlerResult
TYPE_HANDLE_DELETE_ELEMENT_TAGS_OPERATION, TYPE_HANDLE_DELETE_OPERATION, TYPE_HANDLE_DELETE_SELECTION_OPERATION, TYPE_HANDLE_INSERT_FRAGMENT_OPERATION, TYPE_HANDLE_JOIN_ELEMENTS_OPERATION, TYPE_HANDLE_TYPING_OPERATION
-
Fields inherited from interface ro.sync.ecss.extensions.api.schemaaware.SchemaAwareHandlerResultInsertConstants
RESULT_ID_HANDLE_INSERT_FRAGMENT_OFFSET
-
-
Constructor Summary
Constructors Constructor Description SchemaAwareHandlerResultsImpl(java.lang.String operationID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResult(java.lang.String resultKey, java.lang.Object resultValue)
Add result.java.lang.Object
getResult(java.lang.String resultId)
Get the result for the given id.java.lang.String
getType()
The type of operation that generated the result.
-
-
-
Constructor Detail
-
SchemaAwareHandlerResultsImpl
public SchemaAwareHandlerResultsImpl(java.lang.String operationID)
- Parameters:
operationID
- One ofSchemaAwareHandlerResult.TYPE_HANDLE_INSERT_FRAGMENT_OPERATION
for insert fragment operation orSchemaAwareHandlerResult.TYPE_HANDLE_TYPING_OPERATION
for typing operation.
-
-
Method Detail
-
addResult
public void addResult(java.lang.String resultKey, java.lang.Object resultValue)
Add result.- Parameters:
resultKey
- The result key. Constants are defined inSchemaAwareHandlerResult
}.resultValue
- The result value.
-
getResult
public java.lang.Object getResult(java.lang.String resultId)
Description copied from interface:SchemaAwareHandlerResult
Get the result for the given id.- Specified by:
getResult
in interfaceSchemaAwareHandlerResult
- Parameters:
resultId
- One of the constants defined in this interface.- Returns:
- The value for the result. Can be
null
for an unknown result id. - See Also:
SchemaAwareHandlerResult.getResult(java.lang.String)
-
getType
public java.lang.String getType()
Description copied from interface:SchemaAwareHandlerResult
The type of operation that generated the result. Depending on a result type, different information is available throughSchemaAwareHandlerResult.getResult(String)
method. Possible values are:SchemaAwareHandlerResult.TYPE_HANDLE_DELETE_ELEMENT_TAGS_OPERATION
for delete element tags operation, seeAuthorSchemaAwareEditingHandler.handleDeleteElementTags(ro.sync.ecss.extensions.api.node.AuthorNode, AuthorAccess)
;SchemaAwareHandlerResult.TYPE_HANDLE_DELETE_OPERATION
for a keyboard delete operation, seeAuthorSchemaAwareEditingHandler.handleDelete(int, int, AuthorAccess, boolean)
;SchemaAwareHandlerResult.TYPE_HANDLE_DELETE_SELECTION_OPERATION
for delete selection operation, seeAuthorSchemaAwareEditingHandler.handleDeleteSelection(int, int, int, AuthorAccess)
;SchemaAwareHandlerResult.TYPE_HANDLE_JOIN_ELEMENTS_OPERATION
for join elements operation, seeAuthorSchemaAwareEditingHandler.handleJoinElements(ro.sync.ecss.extensions.api.node.AuthorNode, java.util.List, AuthorAccess)
;SchemaAwareHandlerResult.TYPE_HANDLE_INSERT_FRAGMENT_OPERATION
for insert fragment operation, seeAuthorSchemaAwareEditingHandler.handlePasteFragment(int, ro.sync.ecss.extensions.api.node.AuthorDocumentFragment[], int, AuthorAccess)
;SchemaAwareHandlerResult.TYPE_HANDLE_TYPING_OPERATION
for typing operation, seeAuthorSchemaAwareEditingHandler.handleTyping(int, char, AuthorAccess)
.
- Specified by:
getType
in interfaceSchemaAwareHandlerResult
- Returns:
- One of the constants from above, describing which schema aware operation generated the result.
- See Also:
SchemaAwareHandlerResult.getType()
-
-