importJava "org.simantics.document.server.io.IFont" where
data IFont
+
+ @JavaName getFamily
+ fontFamily :: IFont -> <Proc> Maybe String
+ @JavaName getStyle
+ fontStyle :: IFont -> <Proc> Maybe String
+ @JavaName getHeight
+ fontHeight :: IFont -> <Proc> Integer
importJava "org.simantics.document.server.io.IColor" where
data IColor
contextDocument :: CommandContext -> <Proc> IDocument
contextDocument ctx = justValue ctx "__document__"
+
+importJava "org.simantics.document.server.io.IRequest" where
+ @private
+ data IRequest
+
+ @private
+ getParameter :: IRequest -> String -> <Proc> Maybe String
+
+possibleQueryParameterFromContext :: CommandContext -> String -> <Proc> Maybe String
+possibleQueryParameterFromContext context parameter = do
+ request = fromJust $ possibleValue context "__request__"
+ getParameter request parameter