Packages

  • package root
    Definition Classes
    root
  • package domino

    Contains Domino, a lightweight Scala library for writing elegant OSGi bundle activators.

    Contains Domino, a lightweight Scala library for writing elegant OSGi bundle activators.

    For getting started, please see DominoActivator, the main entry point to the Domino DSL. Each sub package contains functionality for a specific part of the DSL.

    Definition Classes
    root
  • package scala_osgi_metatype

    Contains Scala interfaces, adapters and builders for easily building OSGi Metatype descriptions.

    Contains Scala interfaces, adapters and builders for easily building OSGi Metatype descriptions. OSGi Metatype descriptions are very well suited for quickly providing administration user interfaces.

    You probably want to check out the builders.

    Definition Classes
    domino
    Note

    I created totally new Scala interfaces and adapters instead of directly implementing the Java interfaces of the OSGi Metatype API in order to prevent name clashes and confusion about what method to call. Scala Swing does it the same way, I guess for the same reasons.

  • package adapters

    Contains adapters which translate the Scala OSGi Metatype interfaces to the ones defined in the native OSGi API.

    Contains adapters which translate the Scala OSGi Metatype interfaces to the ones defined in the native OSGi API.

    Definition Classes
    scala_osgi_metatype
  • package builders

    Contains builder objects for easily creating Scala OSGi metatypes.

    Contains builder objects for easily creating Scala OSGi metatypes.

    Example

    The following example demonstrates how you can describe configuration parameters for a service.

    import domino.scala_osgi_metatype.builders._
    
    val myObjectClass = ObjectClass(
      id = "domino.my_service",
      name = "My configurable service",
      requiredAttributes = List(
        ElementaryAttribute[Int](id = "size", name = "Size", default = Some(5)),
        ElementaryAttribute[String](id = "user", name = "User", default = Some("root"))
      )
    )
    Definition Classes
    scala_osgi_metatype
  • ElementaryAttribute
  • ListAttribute
  • ObjectClass
  • ObjectClassDefinitionConvenience
  • SingleMetaTypeProvider
  • package interfaces

    Contains Scala traits which accurately model the facilities of the OSGi Metatype API.

    Contains Scala traits which accurately model the facilities of the OSGi Metatype API.

    Definition Classes
    scala_osgi_metatype

package builders

Contains builder objects for easily creating Scala OSGi metatypes.

Example

The following example demonstrates how you can describe configuration parameters for a service.

import domino.scala_osgi_metatype.builders._

val myObjectClass = ObjectClass(
  id = "domino.my_service",
  name = "My configurable service",
  requiredAttributes = List(
    ElementaryAttribute[Int](id = "size", name = "Size", default = Some(5)),
    ElementaryAttribute[String](id = "user", name = "User", default = Some("root"))
  )
)
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. builders
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ObjectClassDefinitionConvenience extends AnyRef

    Adds some convenience methods to the given object class definition.

  2. class SingleMetaTypeProvider extends MetaTypeProvider

    A meta type provider which provides an object class definition for one id.

    A meta type provider which provides an object class definition for one id. Ignores the language.

Value Members

  1. object ElementaryAttribute

    Convenient builder for elementary attribute definitions without advanced validation (type validation is done).

    Convenient builder for elementary attribute definitions without advanced validation (type validation is done).

    Examples

    // Minimum
    ElementaryAttribute[Int](id = "size")
    
    // Maximum
    ElementaryAttribute[Int](
      id = "size",
      name = "Size",
      description = "Size of the container",
      default = 5,
      options = List(
        "Small" -> 2,
        "Medium" -> 5,
        "Large" -> 10
    )
  2. object ListAttribute

    Convenient builder for list attribute definitions without advanced validation (type validation is done).

    Convenient builder for list attribute definitions without advanced validation (type validation is done).

    Examples

    // Minimum
    ListAttribute[String](id = "allowedFruits")
    
    // Maximum
    ListAttribute[String](
      id = "allowedFruits",
      name = "Allowed fruits",
      description = "These fruits are allowed",
      default = List("apple", "orange"),
      options = List(
        "Apple" -> "apple",
        "Orange" -> "orange",
        "Plum" -> "plum",
        "Banana" -> "banana"
    )
  3. object ObjectClass

    Convenient builder for object class definitions.

    Convenient builder for object class definitions.

    Examples

    // Minimum (though I strongly advise to provide a name as well)
    ObjectClass(
      id = "domino.my_service",
      requiredAttributes = List(
        ElementaryAttribute[Int](id = "size")
      )
    )
    
    // Maximum
    ObjectClass(
      id = "domino.my_service",
      name = "My configurable service",
      description = "A service which is configurable",
      requiredAttributes = List(
        ElementaryAttribute[Int](id = "size", name = "Size", default = Some(5)),
        ElementaryAttribute[String](id = "user", name = "User", default = Some("root"))
      ),
      optionalAttributes = List(
        ListAttribute[String](id = "allowedFruits")
      )
    )
    Note

    I've decided not to create a named case class extending ObjectClassDefinition because it would cause name/type conflicts. Moreover, the named class wouldn't add any benefits and would be just another class name to wonder about.

Inherited from AnyRef

Inherited from Any

Ungrouped