Adds some convenience methods to the given object class definition.
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.
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).
// 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 )
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).
// 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" )
Convenient builder for object class definitions.
Convenient builder for object class definitions.
// 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") ) )
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.
Contains builder objects for easily creating Scala OSGi metatypes.
Example
The following example demonstrates how you can describe configuration parameters for a service.