Class InsertFragmentOperation

    • Field Detail

      • ARGUMENT_FRAGMENT

        public static final java.lang.String ARGUMENT_FRAGMENT
        The fragment argument. The value is fragment.
        See Also:
        Constant Field Values
      • ARGUMENT_DESCRIPTOR_FRAGMENT

        protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_FRAGMENT
        Argument defining the XML fragment that will be inserted.
      • ARGUMENT_XPATH_LOCATION

        public static final java.lang.String ARGUMENT_XPATH_LOCATION
        The insert location argument. The value is insertLocation.
        See Also:
        Constant Field Values
      • ARGUMENT_DESCRIPTOR_XPATH_LOCATION

        protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_XPATH_LOCATION
        Argument defining the location where the operation will be executed as an XPath expression.
      • ARGUMENT_RELATIVE_LOCATION

        public static final java.lang.String ARGUMENT_RELATIVE_LOCATION
        The insert position argument. The value is insertPosition.
        See Also:
        Constant Field Values
      • ARGUMENT_DESCRIPTOR_RELATIVE_LOCATION

        protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_RELATIVE_LOCATION
        Argument defining the relative position to the node obtained from the XPath location.
      • ARGUMENT_GO_TO_NEXT_EDITABLE_POSITION

        public static final java.lang.String ARGUMENT_GO_TO_NEXT_EDITABLE_POSITION
        Detect and position the caret inside the first edit location. It can be either an offset inside the content or an in-place editor.
        See Also:
        Constant Field Values
      • ARGUMENT_DESCRIPTOR_GO_TO_NEXT_EDITABLE_POSITION

        protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_GO_TO_NEXT_EDITABLE_POSITION
        Argument defining if the fragment insertion is schema aware.
      • ARGUMENT_INSERT_FRAG_EVEN_IF_INVALID

        public static final java.lang.String ARGUMENT_INSERT_FRAG_EVEN_IF_INVALID
        true to insert the fragment even if invalid.
        See Also:
        Constant Field Values
      • ARGUMENT_DESCR_INSERT_FRAG_EVEN_IF_INVALID

        protected static final ArgumentDescriptor ARGUMENT_DESCR_INSERT_FRAG_EVEN_IF_INVALID
        Argument descriptor.
    • Constructor Detail

      • InsertFragmentOperation

        public InsertFragmentOperation()
        Constructor.
    • Method Detail

      • doOperationInternal

        protected void doOperationInternal​(AuthorAccess authorAccess,
                                           java.lang.Object fragment,
                                           java.lang.Object xpathLocation,
                                           java.lang.Object relativeLocation,
                                           boolean goToFirstEditablePosition,
                                           java.lang.Object schemaAwareArgumentValue)
                                    throws AuthorOperationException
        Performs the insert operation.
        Parameters:
        authorAccess - The author access used to access the document.
        fragment - The fragment to be inserted.
        xpathLocation - The XPath location where the insertion takes place. If null, insert at caret position.
        relativeLocation - The location of the insertion relative to the node selected by the XPath.
        goToFirstEditablePosition - true if we should go to the first editable position in the fragment after insertion.
        schemaAwareArgumentValue - true if the insertion should be schema aware.
        Throws:
        AuthorOperationException
      • doOperationInternal

        protected void doOperationInternal​(AuthorAccess authorAccess,
                                           java.lang.Object fragment,
                                           java.lang.Object xpathLocation,
                                           java.lang.Object relativeLocation,
                                           boolean goToFirstEditablePosition,
                                           java.lang.Object schemaAwareArgumentValue,
                                           boolean isInsertEvenIfInvalid)
                                    throws AuthorOperationException
        Performs the insert operation.
        Parameters:
        authorAccess - The author access used to access the document.
        fragment - The fragment to be inserted.
        xpathLocation - The XPath location where the insertion takes place. If null, insert at caret position.
        relativeLocation - The location of the insertion relative to the node selected by the XPath.
        goToFirstEditablePosition - true if we should go to the first editable position in the fragment after insertion.
        schemaAwareArgumentValue - true if the insertion should be schema aware.
        isInsertEvenIfInvalid - true to insert the fragment even if it would make the document invalid.
        Throws:
        AuthorOperationException