@API(type=INTERNAL, src=PUBLIC) public class InsertFragmentOperation extends java.lang.Object implements AuthorOperation
Modifier and Type | Field and Description |
---|---|
protected static ArgumentDescriptor |
ARGUMENT_DESCRIPTOR_FRAGMENT
Argument defining the XML fragment that will be inserted.
|
protected static ArgumentDescriptor |
ARGUMENT_DESCRIPTOR_GO_TO_NEXT_EDITABLE_POSITION
Argument defining if the fragment insertion is schema aware.
|
protected static ArgumentDescriptor |
ARGUMENT_DESCRIPTOR_RELATIVE_LOCATION
Argument defining the relative position to the node obtained from the XPath location.
|
protected static ArgumentDescriptor |
ARGUMENT_DESCRIPTOR_XPATH_LOCATION
Argument defining the location where the operation will be executed as an XPath expression.
|
static java.lang.String |
ARGUMENT_FRAGMENT
The fragment argument.
|
static java.lang.String |
ARGUMENT_GO_TO_NEXT_EDITABLE_POSITION
Detect and position the caret inside the first edit location.
|
static java.lang.String |
ARGUMENT_RELATIVE_LOCATION
The insert position argument.
|
static java.lang.String |
ARGUMENT_XPATH_LOCATION
The insert location argument.
|
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
Constructor and Description |
---|
InsertFragmentOperation()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
doOperation(AuthorAccess authorAccess,
ArgumentsMap args)
Perform the actual operation.
|
protected void |
doOperationInternal(AuthorAccess authorAccess,
java.lang.Object fragment,
java.lang.Object xpathLocation,
java.lang.Object relativeLocation,
boolean goToFirstEditablePosition,
java.lang.Object schemaAwareArgumentValue)
Performs the insert operation.
|
ArgumentDescriptor[] |
getArguments() |
java.lang.String |
getDescription() |
public static final java.lang.String ARGUMENT_FRAGMENT
fragment
.protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_FRAGMENT
public static final java.lang.String ARGUMENT_XPATH_LOCATION
insertLocation
.protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_XPATH_LOCATION
public static final java.lang.String ARGUMENT_RELATIVE_LOCATION
insertPosition
.protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_RELATIVE_LOCATION
public static final java.lang.String ARGUMENT_GO_TO_NEXT_EDITABLE_POSITION
protected static final ArgumentDescriptor ARGUMENT_DESCRIPTOR_GO_TO_NEXT_EDITABLE_POSITION
public void doOperation(AuthorAccess authorAccess, ArgumentsMap args) throws AuthorOperationException
AuthorOperation
Workspace.getPlatform()
.
To get to the Workspace
you may use: AuthorAccess.getWorkspaceAccess()
.doOperation
in interface AuthorOperation
authorAccess
- The author access.
Provides access to specific informations and actions for
editor, document, workspace, tables, change tracking, utility a.s.o.args
- The map of arguments. All the arguments defined by method
AuthorOperation.getArguments()
must be present in the map of arguments.AuthorOperationException
- Thrown when the operation fails.AuthorOperation.doOperation(AuthorAccess, ArgumentsMap)
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
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.AuthorOperationException
public ArgumentDescriptor[] getArguments()
getArguments
in interface AuthorOperation
ArgumentDescriptor
representing
the arguments this operation uses.AuthorOperation.getArguments()
public java.lang.String getDescription()
getDescription
in interface Extension
Extension.getDescription()
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.