Class UpdateImageMapOperationBase
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.imagemap.operations.UpdateImageMapOperationBase
-
- All Implemented Interfaces:
AuthorOperation
,Extension
- Direct Known Subclasses:
DITAUpdateImageMapOperation
,XHTMLUpdateImageMapOperation
@API(type=EXTENDABLE, src=PUBLIC) public abstract class UpdateImageMapOperationBase extends java.lang.Object implements AuthorOperation
Updates an image map with shape information from an SVG.- Since:
- 25.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ARGUMENT_SHAPES
An SVG with the shapes to be used to update the Image Map at caret.protected static ArgumentDescriptor[]
ARGUMENTS
The arguments descriptor.-
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
-
-
Constructor Summary
Constructors Constructor Description UpdateImageMapOperationBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
doOperation(AuthorAccess authorAccess, ArgumentsMap args)
Perform the actual operation.ArgumentDescriptor[]
getArguments()
java.lang.String
getDescription()
protected abstract AuthorElement[]
getExistingShapesList(AuthorElement existingImageMap)
Return the list of existing shapes starting from the existing Image Map.protected abstract AuthorElement
getImageMapElement(AuthorElement currentElement)
Return the image map that contains the current element.protected abstract java.util.List<? extends NewShapeDescriptor>
getNewShapesList(java.lang.String svgText)
Return the list of new shapes descriptors.
-
-
-
Field Detail
-
ARGUMENT_SHAPES
public static final java.lang.String ARGUMENT_SHAPES
An SVG with the shapes to be used to update the Image Map at caret.- See Also:
- Constant Field Values
-
ARGUMENTS
protected static final ArgumentDescriptor[] ARGUMENTS
The arguments descriptor.
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interfaceExtension
- Returns:
- The description of the extension.
- See Also:
Extension.getDescription()
-
doOperation
public void doOperation(AuthorAccess authorAccess, ArgumentsMap args) throws AuthorOperationException
Description copied from interface:AuthorOperation
Perform the actual operation. You can check if the operation was invoked from the oXygen standalone application or from the oXygen plugin for Eclipse by using the method:ApplicationInformationAccess.getPlatform()
. To get to theWorkspace
you may use:AuthorAccess.getWorkspaceAccess()
.- Specified by:
doOperation
in interfaceAuthorOperation
- Parameters:
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 methodAuthorOperation.getArguments()
must be present in the map of arguments.- Throws:
AuthorOperationException
- Thrown when the operation fails.- See Also:
AuthorOperation.doOperation(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.ArgumentsMap)
-
getImageMapElement
protected abstract AuthorElement getImageMapElement(AuthorElement currentElement)
Return the image map that contains the current element.- Parameters:
currentElement
- The current element.- Returns:
- The image map element.
-
getNewShapesList
protected abstract java.util.List<? extends NewShapeDescriptor> getNewShapesList(java.lang.String svgText) throws AuthorOperationException
Return the list of new shapes descriptors.- Parameters:
svgText
- The SVG text.- Returns:
- The list.
- Throws:
AuthorOperationException
- If the conversion fails.
-
getExistingShapesList
protected abstract AuthorElement[] getExistingShapesList(AuthorElement existingImageMap)
Return the list of existing shapes starting from the existing Image Map.- Parameters:
existingImageMap
- The existing Image Map.- Returns:
- The array of elements that correspond to shapes.
-
getArguments
public ArgumentDescriptor[] getArguments()
- Specified by:
getArguments
in interfaceAuthorOperation
- Returns:
- An array of
ArgumentDescriptor
representing the arguments this operation uses. - See Also:
AuthorOperation.getArguments()
-
-