Class XHTMLUpdateImageMapOperation
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.imagemap.operations.UpdateImageMapOperationBase
-
- ro.sync.ecss.extensions.xhtml.imagemap.XHTMLUpdateImageMapOperation
-
- All Implemented Interfaces:
AuthorOperation
,Extension
@API(type=INTERNAL, src=PUBLIC) public class XHTMLUpdateImageMapOperation extends UpdateImageMapOperationBase
XHTML implementation of the operation that updates an image map with shape information from an SVG.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XHTMLUpdateImageMapOperation.XHTMLNewShapeDescriptor
Descriptor of a shape that was added client-side.
-
Field Summary
-
Fields inherited from class ro.sync.ecss.extensions.commons.imagemap.operations.UpdateImageMapOperationBase
ARGUMENT_SHAPES, ARGUMENTS
-
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 XHTMLUpdateImageMapOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doOperation(AuthorAccess authorAccess, ArgumentsMap args)
Perform the actual operation.protected AuthorElement[]
getExistingShapesList(AuthorElement existingImageMap)
Return the list of existing shapes starting from the existing Image Map.protected AuthorElement
getImageMapElement(AuthorElement currentElement)
Return the image map that contains the current element.protected java.util.List<? extends NewShapeDescriptor>
getNewShapesList(java.lang.String svgText)
Return the list of new shapes descriptors.-
Methods inherited from class ro.sync.ecss.extensions.commons.imagemap.operations.UpdateImageMapOperationBase
getArguments, getDescription
-
-
-
-
Method Detail
-
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
- Overrides:
doOperation
in classUpdateImageMapOperationBase
- 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)
-
getNewShapesList
protected java.util.List<? extends NewShapeDescriptor> getNewShapesList(java.lang.String svgText) throws AuthorOperationException
Description copied from class:UpdateImageMapOperationBase
Return the list of new shapes descriptors.- Specified by:
getNewShapesList
in classUpdateImageMapOperationBase
- Parameters:
svgText
- The SVG text.- Returns:
- The list.
- Throws:
AuthorOperationException
- If the conversion fails.- See Also:
UpdateImageMapOperationBase.getNewShapesList(java.lang.String)
-
getExistingShapesList
protected AuthorElement[] getExistingShapesList(AuthorElement existingImageMap)
Description copied from class:UpdateImageMapOperationBase
Return the list of existing shapes starting from the existing Image Map.- Specified by:
getExistingShapesList
in classUpdateImageMapOperationBase
- Parameters:
existingImageMap
- The existing Image Map.- Returns:
- The array of elements that correspond to shapes.
- See Also:
UpdateImageMapOperationBase.getExistingShapesList(ro.sync.ecss.extensions.api.node.AuthorElement)
-
getImageMapElement
protected AuthorElement getImageMapElement(AuthorElement currentElement)
Description copied from class:UpdateImageMapOperationBase
Return the image map that contains the current element.- Specified by:
getImageMapElement
in classUpdateImageMapOperationBase
- Parameters:
currentElement
- The current element.- Returns:
- The image map element.
- See Also:
UpdateImageMapOperationBase.getImageMapElement(ro.sync.ecss.extensions.api.node.AuthorElement)
-
-