Class MathSolverController
- All Implemented Interfaces:
AutoCloseable
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
applyAction
(@NotNull String blockId, @NotNull String action) Applies the solved action of the specified block to the rendering.final void
applyAction
(@NotNull String blockId, @NotNull String action, @Nullable ParameterSet overrideConfiguration) Applies the solved action of the specified block to the rendering.final void
close()
protected void
finalize()
final @NotNull String
getActionOutput
(@NotNull String blockId, @NotNull String action, @NotNull MimeType mimeType) Returns the output for the given action and the specified block.final @NotNull String
getActionOutput
(@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 boolean
isClosed()
Tells whether theclose()
method has been called.
-
Method Details
-
finalize
-
close
public final void close()- Specified by:
close
in interfaceAutoCloseable
-
isClosed
public final boolean isClosed()Tells whether theclose()
method has been called. Once an object is closed any method will throwIllegalStateException
.- Returns:
true
if 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
- ifblockId
is null.IllegalArgumentException
- whenblockId
is invalid.IllegalArgumentException
- whenoverrideConfiguration
is 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
- ifblockId
is null.IllegalArgumentException
- whenblockId
is 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, eitherJIIX
orLATEX
.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
- ifblockId
is null.IllegalArgumentException
- whenblockId
is invalid.NullPointerException
- ifaction
is null.IllegalArgumentException
- whenaction
is invalidNullPointerException
- ifmimeType
is null.IllegalArgumentException
- when the specified MIME type is not supported.IllegalArgumentException
- whenoverrideConfiguration
is 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, eitherJIIX
orLATEX
.- 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
- ifblockId
is null.IllegalArgumentException
- whenblockId
is invalid.NullPointerException
- ifaction
is null.IllegalArgumentException
- whenaction
is invalidNullPointerException
- ifmimeType
is 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
- ifblockId
is null.IllegalArgumentException
- whenblockId
is invalid.NullPointerException
- ifaction
is null.IllegalArgumentException
- whenaction
is invalid.IllegalArgumentException
- whenoverrideConfiguration
is 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
- ifblockId
is null.IllegalArgumentException
- whenblockId
is invalid.NullPointerException
- ifaction
is null.IllegalArgumentException
- whenaction
is invalid.IllegalStateException
- when associated part type is not "Raw Content" or block type is not "Math".IllegalStateException
- when associated with an offscreen editor.
-