@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface AuthorDocumentFilterBypass
AuthorDocumentController
to
change the AuthorDocument
.Modifier and Type | Method and Description |
---|---|
AuthorPersistentHighlight |
addCommentMarker(int startOffset,
int endOffset,
java.lang.String comment,
java.lang.String parentID)
Add a comment marker for the given interval.
|
AuthorPersistentHighlight |
addPersistentMarker(AuthorPersistentHighlight.PersistentHighlightType type,
int startOffset,
int endOffset,
java.util.Map<java.lang.String,java.lang.String> properties)
Add a comment marker for the given interval.
|
boolean |
delete(int startOffset,
int endOffset,
boolean withBackspace)
Deletes a document fragment between the start and end offset.
|
boolean |
deleteNode(AuthorNode node)
Deletes the specified node from the document.
|
void |
insertFragment(int offset,
AuthorDocumentFragment frag)
Insert an
AuthorDocumentFragment at the given offset. |
void |
insertMultipleElements(AuthorElement parentElement,
java.lang.String[] elementNames,
int[] offsets,
java.lang.String namespace)
Insert multiple elements at the given offsets.
|
boolean |
insertMultipleFragments(AuthorElement parentElement,
AuthorDocumentFragment[] fragments,
int[] offsets)
Insert multiple fragments at the given offsets.
|
boolean |
insertNode(int offset,
AuthorNode node)
Insert the specified node at the given offset.
|
void |
insertText(int offset,
java.lang.String text)
Inserts a text at the given offset.
|
void |
multipleDelete(AuthorElement parentElement,
int[] startOffsets,
int[] endOffsets)
Deletes the given intervals.
|
void |
removeAttribute(java.lang.String attributeName,
AuthorElement element)
Removes an attribute from the given element.
|
boolean |
removeMarker(AuthorPersistentHighlight marker)
Remove a persistent marker
|
void |
renameElement(AuthorElement element,
java.lang.String newName,
java.lang.Object infoProvider)
Rename the given element.
|
void |
setAttribute(java.lang.String attributeName,
AttrValue value,
AuthorElement element)
Sets the value of an attribute in the specified element.
|
void |
setDoctype(AuthorDocumentType docType)
Set a new internal document type to the Author content.
|
void |
setMultipleAttributes(int parentElementStartOffset,
int[] elementOffsets,
java.util.Map<java.lang.String,AttrValue> attributes)
Sets the value of the given attribute in the specified elements.
|
void |
setMultipleDistinctAttributes(int parentElementStartOffset,
int[] elementOffsets,
java.util.List<java.util.Map<java.lang.String,AttrValue>> attributes)
Sets the value of the given attribute in the specified elements.
|
boolean |
split(AuthorNode toSplit,
int splitOffset)
Splits the specified node at the given offset.
|
void |
surroundInFragment(AuthorDocumentFragment xmlFragment,
int startOffset,
int endOffset)
Surround the content between the given offsets with the
xmlFragment . |
void |
surroundInFragment(java.lang.String xmlFragment,
int startOffset,
int endOffset)
Surround the content between the given offsets with the
xmlFragment . |
void |
surroundInText(java.lang.String header,
java.lang.String footer,
int startOffset,
int endOffset)
Surround the content between the given offsets with plain text fragments(without XML parsing).
|
void |
surroundWithNode(AuthorNode node,
int startOffset,
int endOffset,
boolean leftToRight)
Surrounds the fragment between the specified offset with the specified node.
|
void insertText(int offset, java.lang.String text)
offset
- The insert position, 0 based.text
- The text to be inserted.void insertFragment(int offset, AuthorDocumentFragment frag)
AuthorDocumentFragment
at the given offset.offset
- The offset where the fragment will be inserted, 0 based.frag
- The AuthorDocumentFragment
to be inserted.boolean insertNode(int offset, AuthorNode node)
offset
- The offset where the node will be inserted. 0 based.node
- The AuthorNode
to insert.true
if the operation was successful.void insertMultipleElements(AuthorElement parentElement, java.lang.String[] elementNames, int[] offsets, java.lang.String namespace)
parentElement
- The parent element that contains all the new inserted
elements.elementNames
- The element names to be inserted.offsets
- The absolute offsets where the elements will be inserted. 0 based.namespace
- The namespace of the new inserted elements.boolean insertMultipleFragments(AuthorElement parentElement, AuthorDocumentFragment[] fragments, int[] offsets)
parentElement
- The parent element that contains all the new inserted
elements.fragments
- The fragments to be inserted.offsets
- The absolute offsets where the elements will be inserted. 0 based.true
if the operation succeed.boolean delete(int startOffset, int endOffset, boolean withBackspace)
startOffset
- Start offset, 0 based and inclusive.endOffset
- End offset, 0 based and inclusive.withBackspace
- true
if BACKSPACE
key was used when deleting the fragment.true
if the delete operation was successful.boolean deleteNode(AuthorNode node)
node
- The AuthorNode
to delete.true
if the delete node operation was successful.void multipleDelete(AuthorElement parentElement, int[] startOffsets, int[] endOffsets)
parentElement
- The element that contains all the deleted intervals.startOffsets
- The start offset for each interval.
Must be in document order. 0 based and inclusive.endOffsets
- The end offset for each interval.
Must be in document order. 0 based and inclusive.void renameElement(AuthorElement element, java.lang.String newName, java.lang.Object infoProvider)
element
- The AuthorElement
that is renamed.newName
- The new name for the element.infoProvider
- Information provider used for internal processing.void setAttribute(java.lang.String attributeName, AttrValue value, AuthorElement element)
AuthorElement.setAttribute(String, AttrValue)
directly)
will be subject to undo/redo.attributeName
- Name of the attribute being changed.value
- New AttrValue
for the attribute. If null
, the attribute is
removed from the element.element
- The AuthorElement
whose attribute is changing.void removeAttribute(java.lang.String attributeName, AuthorElement element)
AuthorElement.setAttribute(String, AttrValue)
directly) will
be subject to undo/redo.attributeName
- Name of the attribute to remove.element
- The AuthorElement
whose attribute will be removed.boolean split(AuthorNode toSplit, int splitOffset)
UniqueAttributesRecognizer
.toSplit
- The AuthorNode
to split.splitOffset
- The split offset. The offset must be greater or equal
to 1 and less than the current document length.true
if the node was split.void surroundWithNode(AuthorNode node, int startOffset, int endOffset, boolean leftToRight)
node
- The AuthorNode
that will surround the fragment.startOffset
- Start offset of the surrounded fragment. 0 based and inclusive.endOffset
- End offset of the surrounded fragment. 0 based and inclusive.leftToRight
- true
if after the operation the selection
in the author page is done from the left to the right.void surroundInFragment(java.lang.String xmlFragment, int startOffset, int endOffset) throws AuthorOperationException
xmlFragment
.
If endOffset < startOffset
the xmlFragment
will be inserted at startOffset
.xmlFragment
- The XML fragment which will surround the given interval.
The first leaf node of the XML fragment will be the parent of the surrounded content.startOffset
- The start offset of the content to be surrounded, 0 based and inclusive.endOffset
- The end offset of the content to be surrounded, 0 based and inclusive.AuthorOperationException
- If the content between start and end offset could not be surrounded.void surroundInText(java.lang.String header, java.lang.String footer, int startOffset, int endOffset) throws AuthorOperationException
header
at startOffset
and
the footer
at endOffset
.header
- The header to be inserted before the surrounded text.footer
- The footer to be inserted after the surrounded text.startOffset
- The start offset of the text to be surrounded, 0 based and inclusive.endOffset
- The end offset of the text to be surrounded, 0 based and inclusive.AuthorOperationException
- If the operation failed.void setDoctype(AuthorDocumentType docType)
docType
- The document type information.void surroundInFragment(AuthorDocumentFragment xmlFragment, int startOffset, int endOffset) throws AuthorOperationException
xmlFragment
.
If endOffset < startOffset
the xmlFragment
will be inserted at startOffset
.xmlFragment
- The XML fragment which will surround the given interval.
The first leaf node of the XML fragment will be the parent of the surrounded content.startOffset
- The start offset of the content to be surrounded, 0 based and inclusive.endOffset
- The end offset of the content to be surrounded, 0 based and inclusive.AuthorOperationException
void setMultipleDistinctAttributes(int parentElementStartOffset, int[] elementOffsets, java.util.List<java.util.Map<java.lang.String,AttrValue>> attributes)
parentElementStartOffset
- The start offset of the parent element.elementOffsets
- The start offset for each element.attributes
- The list with attributes. Every attribute name is mapped to
an AttrValue
object. If the value is null
, the attribute will
be removed.void setMultipleAttributes(int parentElementStartOffset, int[] elementOffsets, java.util.Map<java.lang.String,AttrValue> attributes)
parentElementStartOffset
- The start offset of the parent element.elementOffsets
- The start offset for each element.attributes
- The list with attributes. Every attribute name is mapped to
an AttrValue
object. If the value is null
, the attribute will
be removed.AuthorPersistentHighlight addCommentMarker(int startOffset, int endOffset, java.lang.String comment, java.lang.String parentID)
startOffset
- Start offset of markerendOffset
- End offset of markercomment
- The comment to be added.parentID
- The comment parent id (not null
for replies).null
.AuthorPersistentHighlight addPersistentMarker(AuthorPersistentHighlight.PersistentHighlightType type, int startOffset, int endOffset, java.util.Map<java.lang.String,java.lang.String> properties)
type
- The persistent marker type (comment or custom)startOffset
- Start offset of markerendOffset
- End offset of markerproperties
- not null
comment properties.null
.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
boolean removeMarker(AuthorPersistentHighlight marker)
marker
- The marker© Copyright Syncro Soft SRL 2002 - 2021. All rights reserved.