Package

ch.waan.mcddpui

api

Permalink

package api

package holding basic API traits and other core API functionality.

Some functionality of the scala API require implicit conversions. These implicits can all be found in the Implicits object.

Since

MCDDPUI 0.1.0

Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. api
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait Command extends AnyRef

    Permalink

    Marker Trait for commands.

    Marker Trait for commands.

    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

  2. trait CommandExecutor[T] extends AnyRef

    Permalink

    A handler that accepts commands and executes them.

    A handler that accepts commands and executes them.

    T

    the type of the data structure the executor operates on

    Version

    1.1 (0.1.0), 2016-02-26

    Since

    MCDDPUI 0.1.0

  3. trait ManagerCommand extends Command

    Permalink

    A manager command is a command targeted at a CommandExecutor to influence the internal behavior of the executor.

    A manager command is a command targeted at a CommandExecutor to influence the internal behavior of the executor.

    They are not targeted at modification of the internal data structure. In fact this trait is a pure marker trait without any methods.

    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

  4. trait MutationCommand[T, U] extends Command

    Permalink

    A mutation command represents a function transforming a given (immutable) data structure into another (immutable) data structure.

    A mutation command represents a function transforming a given (immutable) data structure into another (immutable) data structure. Any mutation may result in any arbitrary exception or error. Therefore error handling is necessary at the command execution site.

    T

    the input type

    U

    the output type

    Version

    1.2 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

    Note

    The implicit conversion methods Implicits.function2mutationCommand and Implicits.mutationCommand2function can be used to convert freely between types T => Unit and ReadCommand[T].

    ,

    Immutability of the data structure cannot be enforced. Therefore ensuring immutability (or at least apparent immutability) lies in the responsibility of the user.

    See also

    Command.get

  5. trait ReadCommand[T] extends Command

    Permalink

    A read command represents a function inspecting a (preferably immutable) data structure without effect in said data structure.

    A read command represents a function inspecting a (preferably immutable) data structure without effect in said data structure. A read command may also have side-effects. A read command may result in any arbitrary exception or error. Therefore error handling is necessary at the command execution site. If a read command has side effects the command implementation must ensure a valid (preferably unaffected) state of any (potentially) affected resource.

    T

    the input type for the command

    Annotations
    @FunctionalInterface()
    Version

    1.2, 2016-02-29

    Since

    MCDDPUI 0.1.0

    Note

    The implicit conversion methods Implicits.function2readCommand and Implicits.readCommand2function can be used to convert freely between types T => Unit and ReadCommand[T].

    ,

    Immutability of the data structure cannot be enforced. Therefore ensuring immutability (or at least ensuring the lack of any mutating operations on the data structure) lies in the responsibility of the user.

    See also

    Implicits

  6. trait Record[T] extends AnyRef

    Permalink

    a record encapsulates an immutable data structure in a modifiable container with a modification history and undo/redo functionality

    a record encapsulates an immutable data structure in a modifiable container with a modification history and undo/redo functionality

    T

    the type of the encapsulated data structure

    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

    Note

    Immutability of the data structure cannot be enforced. Therefore ensuring immutability (or at least apparent immutability) lies in the responsibility of the user.

  7. case class UIData(viewStack: List[ViewData], props: HashMap[String, String] = HashMap.empty) extends Product with Serializable

    Permalink

    root object for the structural representation of the UI state in a UI application.

    root object for the structural representation of the UI state in a UI application. Contains a view stack and an immutable hash map for representing global UI state.

    viewStack

    the stack containing the view data representations in the order they are layered. (opaque layers!).

    props

    a hash map containing global UI properties

    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

  8. case class UIUniverse[T](data: T, ui: UIData) extends Product with Serializable

    Permalink

    data structure root node for UI applications.

    data structure root node for UI applications.

    Holds the operational data as well as an abstract representation encoding the state of the UI. This allows for full historizing not only operational data but for UI state changes as well.

    T

    the data type of the operational data

    data

    the operational data

    ui

    the UI state representation

    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

  9. trait ViewData extends AnyRef

    Permalink

    common base trait for all view data objects.

    common base trait for all view data objects.

    A view data object represents a particular UI state in the internal data structure of a UI application. implementations of this trait should always be immutable to allow for proper thread-safe object sharing in multi-threaded applications.

    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

Value Members

  1. object Command

    Permalink

    Command Helper

    Command Helper

    This object contains command getters useful for command instantiation through java lambda definitions. Also getters for the undo and redo commands are provided that map back to the corresponding singleton objects

    Version

    1.1 (0.1.0), 2016-02-26

    Since

    MCDDPUI 0.1.0

    Note

    this object is designed for usage with java

  2. object Implicits

    Permalink

    collection of implicit conversion methods and implicit classes extending the basic functionality of the java API to better suit scala implementations.

    collection of implicit conversion methods and implicit classes extending the basic functionality of the java API to better suit scala implementations.

    // import all implicits
    import ch.waan.mcddpui.api.Implicits._
    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

  3. object ManagerCommand

    Permalink

    Collection of predefined manager commands.

    Collection of predefined manager commands.

    Version

    1.1 (0.1.0), 2016-02-29

    Since

    MCDDPUI 0.1.0

Inherited from AnyRef

Inherited from Any

Ungrouped