Class KokosService

java.lang.Object
com.smeup.kokos.sdk.caller.KokosService
Direct Known Subclasses:
KokosCallableProgram, KokosFallbackService, KokosInputPanelService, KokosUpdateDataTableService, SDKToolService

public abstract class KokosService extends Object
Author:
mattia.bonardi StreamingService contains all methods to produce SmeupDataStrucutures
  • Field Details

  • Constructor Details

    • KokosService

      public KokosService()
  • Method Details

    • execute

      public void execute(Fun fun, ExecutionContext context, OutputStream out, SmeupDataStructurePrinter printer) throws Throwable
      Execute method of service. Call the relative method declared into FUN.
      Parameters:
      fun - fun
      context - context
      out - stream
      Throws:
      Throwable - Exception
    • writeDataNode

      public void writeDataNode(SmeupDataNode node, boolean hasChildren) throws Exception
      Write a single SmeupDataNode data structure. If the following SmeupDataNode are children you set hasChildren to true.
      Parameters:
      node - node
      hasChildren - children flag
      Throws:
      Exception - Exception
    • writeDataNodeClosure

      public void writeDataNodeClosure() throws Exception
      Use this method to top the writer from writing child nodes.
      Throws:
      Exception - Exception
    • writeDataColumns

      public void writeDataColumns(List<SmeupDataColumn> columns) throws Exception
      Write SmeupDataTable columns. This method must be invoked before writing the lines.
      Parameters:
      columns - columns
      Throws:
      Exception - Exception
    • writeDataColumn

      public void writeDataColumn(SmeupDataColumn column) throws Exception
      Write single SmeupDataTable column. Columns must be returned before writing the lines. You can return also all columns as list: writeColumns()
      Parameters:
      column - column
      Throws:
      Exception - Exception
    • writeDataRow

      public void writeDataRow(SmeupDataRow row) throws Exception
      Write single SmeupDataDataset row. Rows must be returned after writing the columns.
      Parameters:
      row - row
      Throws:
      Exception - Exception
    • writeMessage

      public void writeMessage(SmeupMessage... message) throws Exception
      Write a SmeupMessage. Messages cannot be returned between writing columns rows and nodes.
      Parameters:
      message - message
      Throws:
      Exception - Exception
    • writeRawData

      public void writeRawData(String xml) throws Exception
      Write SmeupRawData data structure. Return a plain data.
      Parameters:
      xml - xml
      Throws:
      Exception - Exception
    • writeButtons

      public void writeButtons(List<SmeupDataNode> buttons) throws Exception
      Return a buttons
      Parameters:
      buttons - buttons
      Throws:
      Exception - Exception
    • writeSch

      public void writeSch(SmeupSch sch)
      Write SmeupSch data structure (SCH)
      Parameters:
      sch - sch
    • writeLayout

      public void writeLayout(SmeupLayout lay)
      Write SmeupLayout data structure (LAY)
      Parameters:
      lay - lay
    • writeAction

      public void writeAction(SmeupAction... actions)
      Append action or actions at the end of the stream
      Parameters:
      actions - single or list of actions
    • writeSetup

      public void writeSetup(SmeupSetup setup)
      Append setup data at the end of the stream
      Parameters:
      setup - data setup
    • writeVariable

      public void writeVariable(SmeupVariable... variable)
      Write variable or variables at the end of the stream
      Parameters:
      variable - single or list of variables