Skip to content

woq-blended/scala-osgi-metatype

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala OSGi Metatype

Scala OSGi Metatype is basically the OSGi Metatype API translated to idiomatic Scala. It contains interfaces, adapters and builders for easily building OSGi Metatype descriptions.

For those who don't know the OSGi Metatype API, it's a very practical addition to the OSGi ConfigurationAdmin API for describing configuration GUIs.

Example

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

import org.helgoboss.scala_osgi_metatype.builders._

val myObjectClass = ObjectClass(
  id = "org.helgoboss.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"))
  )
)

Documentation

  • Scaladoc

Further reading

Scala OSGi Metatype is nicely integrated into the Domino library. You might want to have a look at its user guide.

About

OSGi Metatype API for Scala

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%