Class MathSolverController
- All Implemented Interfaces:
AutoCloseable
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionfinal voidapplyAction(@NotNull String blockId, @NotNull String action) Applies the solved action of the specified block to the rendering.final voidapplyAction(@NotNull String blockId, @NotNull String action, @Nullable ParameterSet overrideConfiguration) Applies the solved action of the specified block to the rendering.final voidclose()protected voidfinalize()final @NotNull StringgetActionOutput(@NotNull String blockId, @NotNull String action, @NotNull MimeType mimeType) Returns the output for the given action and the specified block.final @NotNull StringgetActionOutput(@NotNull String blockId, @NotNull String action, @NotNull MimeType mimeType, @Nullable ParameterSet overrideConfiguration) Returns the output for the given action and the specified block.final @NotNull String[]getAvailableActions(@NotNull String blockId) Returns the available actions for the specified block.final @NotNull String[]getAvailableActions(@NotNull String blockId, @Nullable ParameterSet overrideConfiguration) Returns the available actions for the specified block.final booleanisClosed()Tells whether theclose()method has been called.
-
Method Details
-
finalize
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
isClosed
public final boolean isClosed()Tells whether theclose()method has been called. Once an object is closed any method will throwIllegalStateException.- Returns:
trueif this object is closed.
-
getAvailableActions
@NotNull public final @NotNull String[] getAvailableActions(@NotNull @NotNull String blockId, @Nullable @Nullable ParameterSet overrideConfiguration) throws NullPointerException, IllegalArgumentException, IllegalStateException Returns the available actions for the specified block.Note: Following limitation applies: the part managed by the associated editor must be a "Raw Content" and the specified block must be a "Math" block.
- Parameters:
blockId- the identifier of the block.overrideConfiguration- the extra configuration used.- Returns:
- an array of the available actions.
- Throws:
IllegalStateException- when editor is closed.IllegalStateException- when editor is not associated with a part.NullPointerException- ifblockIdis null.IllegalArgumentException- whenblockIdis invalid.IllegalArgumentException- whenoverrideConfigurationis invalid.IllegalStateException- when associated part type is not "Raw Content" or block type is not "Math".
-
getAvailableActions
@NotNull public final @NotNull String[] getAvailableActions(@NotNull @NotNull String blockId) throws NullPointerException, IllegalArgumentException, IllegalStateException Returns the available actions for the specified block.Note: Following limitation applies: the part managed by the associated editor must be a "Raw Content" and the specified block must be a "Math" block.
- Parameters:
blockId- the identifier of the block.- Returns:
- an array of the available actions.
- Throws:
IllegalStateException- when editor is closed.IllegalStateException- when editor is not associated with a part.NullPointerException- ifblockIdis null.IllegalArgumentException- whenblockIdis invalid.IllegalStateException- when associated part type is not "Raw Content" or block type is not "Math".
-
getActionOutput
@NotNull public final @NotNull String getActionOutput(@NotNull @NotNull String blockId, @NotNull @NotNull String action, @NotNull @NotNull MimeType mimeType, @Nullable @Nullable ParameterSet overrideConfiguration) throws NullPointerException, IllegalArgumentException, IllegalStateException Returns the output for the given action and the specified block.Note: Following limitation applies: the part managed by the associated editor must be a "Raw Content" and the specified block must be a "Math" block.
- Parameters:
blockId- the identifier of the block.action- the action operated by the math solver.mimeType- the MIME type that specifies the output format, eitherJIIXorLATEX.overrideConfiguration- the extra configuration used.- Returns:
- a string representing the output formatted with the given MIME type.
- Throws:
IllegalStateException- when editor is closed.IllegalStateException- when editor is not associated with a part.NullPointerException- ifblockIdis null.IllegalArgumentException- whenblockIdis invalid.NullPointerException- ifactionis null.IllegalArgumentException- whenactionis invalidNullPointerException- ifmimeTypeis null.IllegalArgumentException- when the specified MIME type is not supported.IllegalArgumentException- whenoverrideConfigurationis invalid.IllegalStateException- when associated part type is not "Raw Content" or block type is not "Math".
-
getActionOutput
@NotNull public final @NotNull String getActionOutput(@NotNull @NotNull String blockId, @NotNull @NotNull String action, @NotNull @NotNull MimeType mimeType) throws NullPointerException, IllegalArgumentException, IllegalStateException Returns the output for the given action and the specified block.Note: Following limitation applies: the part managed by the associated editor must be a "Raw Content" and the specified block must be a "Math" block.
- Parameters:
blockId- the identifier of the block.action- the action operated by the math solver.mimeType- the MIME type that specifies the output format, eitherJIIXorLATEX.- Returns:
- a string representing the output formatted with the given MIME type.
- Throws:
IllegalStateException- when editor is closed.IllegalStateException- when editor is not associated with a part.NullPointerException- ifblockIdis null.IllegalArgumentException- whenblockIdis invalid.NullPointerException- ifactionis null.IllegalArgumentException- whenactionis invalidNullPointerException- ifmimeTypeis null.IllegalArgumentException- when the specified MIME type is not supported.IllegalStateException- when associated part type is not "Raw Content" or block type is not "Math".
-
applyAction
public final void applyAction(@NotNull @NotNull String blockId, @NotNull @NotNull String action, @Nullable @Nullable ParameterSet overrideConfiguration) throws NullPointerException, IllegalArgumentException, IllegalStateException Applies the solved action of the specified block to the rendering.Note: Following limitation applies: incompatible with Offscreen interactivity service.
- Parameters:
blockId- the identifier of the block.action- the action used by the math solver.overrideConfiguration- the extra configuration used.- Throws:
IllegalStateException- when editor is closed.IllegalStateException- when editor is not associated with a part.NullPointerException- ifblockIdis null.IllegalArgumentException- whenblockIdis invalid.NullPointerException- ifactionis null.IllegalArgumentException- whenactionis invalid.IllegalArgumentException- whenoverrideConfigurationis invalid.IllegalStateException- when associated part type is not "Raw Content" or block type is not "Math".
-
applyAction
public final void applyAction(@NotNull @NotNull String blockId, @NotNull @NotNull String action) throws NullPointerException, IllegalArgumentException, IllegalStateException Applies the solved action of the specified block to the rendering.Note: Following limitation applies: incompatible with Offscreen interactivity service.
- Parameters:
blockId- the identifier of the block.action- the action used by the math solver.- Throws:
IllegalStateException- when editor is closed.IllegalStateException- when editor is not associated with a part.NullPointerException- ifblockIdis null.IllegalArgumentException- whenblockIdis invalid.NullPointerException- ifactionis null.IllegalArgumentException- whenactionis invalid.IllegalStateException- when associated part type is not "Raw Content" or block type is not "Math".IllegalStateException- when associated with an offscreen editor.
-