The manifest.json file

Main properties

The following table gives an overview of all properties that can be used in a manifest.json file:

name

The name of this bundle.

Example: "name": "mybundle"

Default: None. This property is required.

version (required)

The version of this bundle.

Example: "version": "1.0.0"

Default: None. This property is required.

deprecated

Whether a bundle is deprecated. Tools such as the App Editor may display a hint to the user.

Example
"deprecated": {
  "message": "This bundle is deprecated. Use SOME_ALTERNATIVE instead.",
  "since": "<Optional version or date as a string>"
}
Example
"deprecated": true

Default: false

title

The display name of this bundle.

Example: "title": "My Bundle"

Default: Value of the name property.

vendor

The vendor of this bundle.

Example: "vendor": "con terra GmbH"

Default: "".

description

A description of this bundle.

Example: "description": "My bundle does something"

Default: "".

keywords

A list of categories (application specific use, tags for the bundle).

Example: "keywords": ["test", "nursery"]

Default: [].

contactAddress

A contact address for this bundle.

Example: "contactAddress": "Martin-Luther-King Weg 24, 48145 Münster"

Default: "".

copyright

The copyright of this bundle.

Example: "copyright": "con terra GmbH"

Default: "".

url

A documentation link.

Example: "url": "http://conterra.de/mapapps/systembundle"

Default: "".

icon

Metadata about the icon of this bundle.

Example
"icon": {
  "url":"/icons/bundle-logo.png",
  "width":64,
   "height":64
}

Default: {}

licenses

Metadata about the license of this bundle.

Example
"licenses": [{
   "type": "GPL",
   "version" :"2.4",
   "url": "http://www.opensource.org/licenses/jabberpl.php"
    }
]

Default: {}

layer

Specifies the name of the source file, which is loaded during the resolve phase of the bundle, the so called "layer file". This file is very important for bundle loading and source/component name resolution. To disable resolving of source files, declare the property with the empty string "".

Example: "layer": "module"

Default: "module".

startLevel

Defines the StartLevel of this bundle. This provides a way to modify or optimize the start order of bundles.

Example: "startLevel" : 1

Default: 50.

autoStartPolicy

Defines that this bundle shall be started or not.

Example: "autoStartPolicy" : "no"

Default: "yes".

activator

Specifies a bundle activator class. The activator is informed about the start and stop of the bundle.

Example: "activator": "Activator"

Default: "".

i18n

Specifies if the bundle provides language-specific resources, see Bundle internationalization. The default value ["bundle"] requires the file nls/bundle.js to be present. Set to [] if the bundle has no i18n resources.

Example: "i18n" : []

Default: ["bundle"].

requiredExecutionEnvironment

Specifies client environment requirements. If these requirements are not fulfilled, the bundle is not started.

Each entry in the array of browsers has the following format:

value := <browsername>(:<version-range>)?
Examples Description

FF:[3.1,4.0]

Firefox from version 3.1 to 4.0

FF:[1.0,4.0)

Firefox from version 1.0 to 4.0 (4.0 not included)

FF

Firefox any version

FF:[3,]

Firefox from version 3 and later

Following browser names can be used:

Name Description

IE

Internet Explorer

Edge

Microsoft Edge

FF

Firefox

Chrome

Google Chrome

Khtml

KHTML browsers

Mozilla

Mozilla-based browsers (Firefox, SeaMonkey)

Opera

Opera

Safari

Safari based browsers, Safari or iPhone

WebKit

WebKit based browser (such as Konqueror, Safari, Chrome)

Android

Android

iPhone

iPhone

iPad

iPad

BlackBerry

BlackBerry

Touch

Browser supports touch input

Mobile

The browser is a mobile variant

Example: "requiredExecutionEnvironment": ["IE:[7,]","FF:[3,]"]

Default: [].

excludedExecutionEnvironment

Excludes a execution environment. Works like "requiredExecutionEnvironment", but excluding and not including.

Example: "excludedExecutionEnvironment" : ["iPhone"]

Default: [].

dependencies

Declares the dependencies of this bundle to other bundles.

Example
"dependencies" : {
    "map" : "1.0.0",
    ...
}

Default: {}

optionalDependencies

Declares the optional dependencies of this bundle to other bundles.

Example
"dependencies" : {
    "map" : "1.0.0",
    ...
}

Default: {}

components

This is the entry point for component declarations. Visit the components configuration reference for a description of entries for this array.

Default: []

editor

Bundle metadata for the App Editor.

Set the "suggest" property to false to exclude a bundle from the suggestion list during autocompletion.

Example
"editor": {
   "suggest": "false"
}

Default: {}

Component properties

Following properties can be declared on a component description.

Property Sample Description

name

"name" : "MyService"

required

The name of the component. Used as "impl" value if "impl" is not declared. Must be unique inside a bundle.

impl

"impl": "MyService"

optional (default: value of name)

The implementation class. An instance of this class is created if the component has to create a new service.

enabled

"enabled": true

optional (default: true)

Specifies if the component should be enabled during the bundle start.

componentFactory

"componentFactory" : "FactoryName"

optional (default: "")

Specifies the name of the Factory Component, this name is available as service property "Component-Factory"

serviceFactory

"serviceFactory": "false"

optional (default: false)

Specifies if this component shall be newly created for each requesting bundle.

configPolicy

"configPolicy" : "optional"

optional (default: optional). Allowed values are ignore or optional. The configPolicy required is not supported.

Specifies if a configuration element must be available at the Configuration Admin Service.

immediate

"immediate" : true

optional (default: false)

Specifies if this is an immediate component.

activate

"activate" : "activate"

optional (default: "activate"):

Specifies the method name to signal if the component is activated, it is only called if present in the instance.

deactivate

"deactivate" : "deactivate"

optional (default: "deactivate")

Specifies the method name to signal if component is deactivated, it is only called if present in the instance.

modified

"modified" : "modified"

optional (default: "modified")

Specifies the method name to signal if the component configuration is changed, it is only called if present in the instance.

instanceFactory

"instanceFactory" :true

optional (default: false)

Marks that the component instance is a factory for a service instance. The component instance must provide a createInstance method if this flag is true.

createInstance

"createInstance" : "createInstance"

optional (default: "createInstance")

Specifies the method name to call for instance creation if this component is an instanceFactory.

destroyInstance

"destroyInstance" : "destroyInstance"

optional (default: "destroyInstance")

Specifies the method name to call for instance dispose if this component is an instanceFactory.

provides

"provides": [ "ct.service.api.log.LogService" ]

optional (default: [])

Declares all interface names for which this component is registered as service at the App Runtime. If this is not specified, this component is an immediate component.

propertiesConstructor

"propertiesConstructor" : false

optional (default: false):

If true, the declared properties are "injected" as constructor parameters.

properties

"properties":{
  "Event-Topics" : ["some/topic"],
  "_privateProperty" : "text"
}

optional (default: {})

Declares configuration properties and service properties. Properties starting with '_' underscore are treated as private and are only visible by this component. If "propertiesConstructor" is false, all properties are injected into a _properties member of the component instance.

references

"references":[{
  "name" : "tool",
  "providing": "ct.tools.Tool"
}]

optional (default: [])

Array of reference declarations.

publicProperties

"properties": {
  "visibleProp": "Tell it to the service"
},
"publicProperties" : ["visibleProp"]

optional (default: [])

Array of property names that are explicitly treated as public.

privateProperties

"properties": {
  "internalProp": "dont tell the service"
},
"privateProperties" : ["internalProp"]

optional (default: [])

Array of property names that are explicitly treated as private.

Reference properties

A reference declaration can have following properties.

Property Sample Description

name

"name":"log"

Required

The internal name of this reference (used for injection and error logging).

providing

"providing":"ct.framework.api.LogService"

Required

The interface name under which the target service must be registered in the service registry.

filter

"filter" : "(client=true)",

Optional

A filter expression which expresses further service metadata requirements of the reference. It is needed if the providing interface is not sufficient to find the correct target service.

Default: ""

policy

"policy" : "dynamic"

Optional

The binding style policy. Allowed values are "static" or "dynamic". The value "static" means that the component is restarted if the reference becomes unsatisfied but another matching reference is available. The value "dynamic" means that the component is able to handle the dynamic unbinding/binding and keeps running during reference updates.

Default: "dynamic"

cardinality

"cardinality": "1..1"

Optional

Specifies the cardinality of the reference. Allowed values are "0..1","1..1","0..n" and "1..n".

Default: "1..1"

bind

"bind": "setLog"

Optional

Specifies the method called during the injection process. If the method is not present, the reference is injected as property "<name>" into the instance, in this sample "log".

Default: set<name> or add<name>, depending on the cardinality

unbind

"unbind": "unsetLog"

Optional

Specifies the method called during the ejection process.

Default: "unset<name>" or "remove<name>", depending on the cardinality

noInjection

"noInjection" : false

Optional

Signals that this reference should not be injected and the component uses a programmatic resolving by applying the ComponentContext.locate* methods.

Default: false

connect

"connect" : {
   "onClick" : "_handleClick"
}

Optional

Defines that the App Runtime should manage the connects to the reference. In the sample the App Runtime connects to the event onClick of the reference and route it to the _handleClick method of the instance.

Default: {}